query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Get a Subscription by order_id and product_id
public function get_order_product_subscription( $order_id, $product_id ) { $subscription_key = WC_Subscriptions_Manager::get_subscription_key( $order_id, $product_id ); $subscription = WC_Subscriptions_Manager::get_subscription( $subscription_key ); return $subscription; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wcs_get_subscriptions_for_product( $product_ids, $fields = 'ids' ) {\n\tglobal $wpdb;\n\n\t// If we have an array of IDs, convert them to a comma separated list and sanatise them to make sure they're all integers\n\tif ( is_array( $product_ids ) ) {\n\t\t$ids_for_query = implode( \"', '\", array_map( 'absint', array_unique( array_filter( $product_ids ) ) ) );\n\t} else {\n\t\t$ids_for_query = absint( $product_ids );\n\t}\n\n\t$subscription_ids = $wpdb->get_col( \"\n\t\tSELECT DISTINCT order_items.order_id FROM {$wpdb->prefix}woocommerce_order_items as order_items\n\t\t\tLEFT JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS itemmeta ON order_items.order_item_id = itemmeta.order_item_id\n\t\t\tLEFT JOIN {$wpdb->posts} AS posts ON order_items.order_id = posts.ID\n\t\tWHERE posts.post_type = 'shop_subscription'\n\t\t\tAND itemmeta.meta_value IN ( '\" . $ids_for_query . \"' )\n\t\t\tAND itemmeta.meta_key IN ( '_variation_id', '_product_id' )\"\n\t);\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = ( 'ids' !== $fields ) ? wcs_get_subscription( $post_id ) : $post_id;\n\t}\n\n\treturn apply_filters( 'woocommerce_subscriptions_for_product', $subscriptions, $product_ids, $fields );\n}", "public function getSubscriptionById($id_subscription) {\n $this->db->where('ID_SUBSCRIPTION', $id_subscription);\n $query = $this->db->get($this->table);\n return $query->row();\n}", "public static function getSubscriptionProductsList() {\n $sku = array();\n $query = db_select('commerce_product', 'cp');\n $query->fields('cp', array('sku'));\n $query->leftJoin('field_data_field_product', 'pr', 'cp.product_id = pr.entity_id');\n $query->condition('pr.bundle', 'subscription', '=');\n $result = $query->execute();\n while ($product = $result->fetchAssoc()) {\n $sku[] = $product['sku'];\n }\n return new Response(TRUE, $sku, NULL);\n }", "public function getSubscriptionWithId(int $subscriptionId);", "function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}", "protected function createBasicSubscriptionAndOrder() {\n $subscription = Subscription::create([\n 'type' => 'product_variation',\n 'store_id' => $this->store->id(),\n 'billing_schedule' => $this->billingSchedule,\n 'uid' => $this->user,\n 'payment_method' => $this->paymentMethod,\n 'purchased_entity' => $this->variation,\n 'title' => $this->variation->getOrderItemTitle(),\n 'unit_price' => new Price('2', 'USD'),\n 'state' => 'pending',\n 'starts' => \\Drupal::time()->getRequestTime() - 5,\n 'ends' => \\Drupal::time()->getRequestTime() + 1000,\n ]);\n $subscription->save();\n\n $order_storage = \\Drupal::entityTypeManager()->getStorage('commerce_order');\n $result = $order_storage->getQuery()\n ->condition('type', 'recurring')\n ->pager(1)\n ->execute();\n $this->assertEmpty($result);\n\n $subscription->getState()->applyTransition($subscription->getState()->getTransitions()['activate']);\n $subscription->save();\n\n $orders = $order_storage->loadMultiple($order_storage->getQuery()\n ->condition('type', 'recurring')\n ->execute());\n $this->assertCount(1, $orders);\n $order = reset($orders);\n\n return [$subscription, $order];\n }", "function wcs_get_subscriptions( $args ) {\n\tglobal $wpdb;\n\n\t$args = wp_parse_args( $args, array(\n\t\t\t'subscriptions_per_page' => 10,\n\t\t\t'paged' => 1,\n\t\t\t'offset' => 0,\n\t\t\t'orderby' => 'start_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'customer_id' => 0,\n\t\t\t'product_id' => 0,\n\t\t\t'variation_id' => 0,\n\t\t\t'order_id' => 0,\n\t\t\t'subscription_status' => array( 'any' ),\n\t\t\t'meta_query_relation' => 'AND',\n\t\t)\n\t);\n\n\t// if order_id is not a shop_order\n\tif ( 0 !== $args['order_id'] && 'shop_order' !== get_post_type( $args['order_id'] ) ) {\n\t\treturn array();\n\t}\n\n\t// Ensure subscription_status is an array.\n\t$args['subscription_status'] = $args['subscription_status'] ? (array) $args['subscription_status'] : array();\n\n\t// Grab the native post stati, removing pending and adding any.\n\t$builtin = get_post_stati( array( '_builtin' => true ) );\n\tunset( $builtin['pending'] );\n\t$builtin['any'] = 'any';\n\n\t// Make sure status starts with 'wc-'\n\tforeach ( $args['subscription_status'] as &$status ) {\n\t\tif ( isset( $builtin[ $status ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$status = wcs_sanitize_subscription_status_key( $status );\n\t}\n\n\t// Prepare the args for WP_Query\n\t$query_args = array(\n\t\t'post_type' => 'shop_subscription',\n\t\t'post_status' => $args['subscription_status'],\n\t\t'posts_per_page' => $args['subscriptions_per_page'],\n\t\t'paged' => $args['paged'],\n\t\t'offset' => $args['offset'],\n\t\t'order' => $args['order'],\n\t\t'fields' => 'ids',\n\t\t'meta_query' => isset( $args['meta_query'] ) ? $args['meta_query'] : array(), // just in case we need to filter or order by meta values later\n\t);\n\n\t// Maybe only get subscriptions created by a certain order\n\tif ( 0 != $args['order_id'] && is_numeric( $args['order_id'] ) ) {\n\t\t$query_args['post_parent'] = $args['order_id'];\n\t}\n\n\t// Map subscription specific orderby values to internal/WordPress keys\n\tswitch ( $args['orderby'] ) {\n\t\tcase 'status' :\n\t\t\t$query_args['orderby'] = 'post_status';\n\t\t\tbreak;\n\t\tcase 'start_date' :\n\t\t\t$query_args['orderby'] = 'date';\n\t\t\tbreak;\n\t\tcase 'trial_end_date' :\n\t\tcase 'end_date' :\n\t\t\t// We need to orderby post meta value: http://www.paulund.co.uk/order-meta-query\n\t\t\t$date_type = str_replace( '_date', '', $args['orderby'] );\n\t\t\t$query_args = array_merge( $query_args, array(\n\t\t\t\t'orderby' => 'meta_value',\n\t\t\t\t'meta_key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'meta_type' => 'DATETIME',\n\t\t\t) );\n\t\t\t$query_args['meta_query'][] = array(\n\t\t\t\t'key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t'type' => 'DATETIME',\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t$query_args['orderby'] = $args['orderby'];\n\t\t\tbreak;\n\t}\n\n\t// Maybe filter to a specific user\n\tif ( 0 != $args['customer_id'] && is_numeric( $args['customer_id'] ) ) {\n\t\t$query_args['meta_query'][] = array(\n\t\t\t'key' => '_customer_user',\n\t\t\t'value' => $args['customer_id'],\n\t\t\t'type' => 'numeric',\n\t\t\t'compare' => ( is_array( $args['customer_id'] ) ) ? 'IN' : '=',\n\t\t);\n\t};\n\n\t// We need to restrict subscriptions to those which contain a certain product/variation\n\tif ( ( 0 != $args['product_id'] && is_numeric( $args['product_id'] ) ) || ( 0 != $args['variation_id'] && is_numeric( $args['variation_id'] ) ) ) {\n\t\t$query_args['post__in'] = wcs_get_subscriptions_for_product( array( $args['product_id'], $args['variation_id'] ) );\n\t}\n\n\tif ( ! empty( $query_args['meta_query'] ) ) {\n\t\t$query_args['meta_query']['relation'] = $args['meta_query_relation'];\n\t}\n\n\t$query_args = apply_filters( 'woocommerce_get_subscriptions_query_args', $query_args, $args );\n\n\t$subscription_post_ids = get_posts( $query_args );\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_post_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = wcs_get_subscription( $post_id );\n\t}\n\n\treturn apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $args );\n}", "public function getProduct()\n {\n return $this->getSubscription()->getProduct();\n }", "public static function searchOrderFilter(Request $request, $order_id) {\n\n if(strpos($order_id, 'tip') !== false) {\n\n }\n else {\n $subscription = Subscription::where('subscription_id', $order_id)->firstOrFail();\n if ($subscription) {\n\n $subscription['UNITPAY_orderSum'] = $subscription->subscription_price; // from your database\n $subscription['UNITPAY_orderCurrency'] = 'RUB'; // from your database\n\n // if the current_order is already paid in your database, return strict \"paid\";\n // if not, return something else\n if($subscription->status == 'Active')\n $status = 'paid';\n else\n $status = $subscription->status;\n $subscription['UNITPAY_orderStatus'] = $status;//$subscription->staus; // from your database\n\n return $subscription;\n }\n }\n\n return false;\n }", "function _recurring_globalcollect_get_subscription_by_order_id($order_id) {\n\n // Only return records if an order_id is given.\n if ( empty( $order_id ) ) {\n return false;\n }\n $order_id = intval( $order_id );\n\n // make sure we're using the default (civicrm) db\n $dbs = wmf_civicrm_get_dbs();\n $dbs->push( 'civicrm' );\n\n $query = <<<EOS\nSELECT\n civicrm_contribution_recur.*, civicrm_contact.display_name\nFROM civicrm_contribution_recur\nLEFT JOIN civicrm_contact ON\n civicrm_contribution_recur.contact_id = civicrm_contact.id\nWHERE\n civicrm_contribution_recur.trxn_id = CONCAT_WS( ' ', 'RECURRING GLOBALCOLLECT', :order_id )\n OR civicrm_contribution_recur.trxn_id LIKE CONCAT_WS( ' ', 'RECURRING GLOBALCOLLECT', :order_id, '%' )\nLIMIT 1\nEOS;\n\n $result = db_query( $query, array( ':order_id' => $order_id ) )->fetch();\n\n $record = is_object( $result ) ? (array) $result : false;\n\n return $record;\n}", "public function get_all_subscription_products(){\n\t\t\n\t\t$args = array(\n\t\t\t'type' => 'subscription',\n\t\t);\n\t\t$products = wc_get_products( $args );\n\t\treturn $products;\n \n\t}", "public function getSubscription($request);", "public function getProduct($id)\n {\n }", "public function get_order_from_recurly_subscription( $subscription ){\n\n\t\tglobal $wpdb;\n\n\t\t$sql = $wpdb->prepare( \"select * from wp_mequoda_orders where recurly_uuid = %s ORDER BY order_time\", $subscription );\n\n\t\t$orders = $wpdb->get_results( $sql );\n\n\t\treturn $orders;\n\n\t}", "public static function getorderProduct()\n {\n \n $value=DB::table('product_checkout')->join('users','users.id','product_checkout.user_id')->orderBy('product_checkout.cid', 'desc')->get(); \n return $value;\n\t\n }", "protected function order_contains_subscription( $order ) {\n\t\treturn WC_Subscriptions_Order::order_contains_subscription( $order );\n\t}", "public function getProductById(int $id);", "function find_by_account_id_and_product_id($account_id, $product_id)\r\n\t{\r\n\t\treturn $this->find_by_field_array(array('account_id' => $account_id, 'product_id' => $product_id));\r\n\t}", "public function subscription($userId)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->db->table(Config::get('throttle::tables.subscriptions'))\n\t\t\t\t->where('user_id', $userId)\n\t\t\t\t->where('is_active', '1')\n\t\t\t\t->select('id', 'user_id', 'plan_id', 'subscribed_at')\n\t\t\t\t->first();\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\tthrow new Exceptions\\InternalException;\n\t\t}\n\t}", "public function activated_subscription( $order ) {\n\n\t\t// set properties\n\t\t$properties = apply_filters( 'wc_kissmetrics_activated_subscription_properties',\n\t\t\tarray(\n\t\t\t\t'subscription_name' => WC_Subscriptions_Order::get_item_name( $order ),\n\t\t\t\t'total_initial_payment' => WC_Subscriptions_Order::get_total_initial_payment( $order ),\n\t\t\t\t'initial_sign_up_fee' => WC_Subscriptions_Order::get_sign_up_fee( $order ),\n\t\t\t\t'subscription_period' => WC_Subscriptions_Order::get_subscription_period( $order ),\n\t\t\t\t'subscription_interval' => WC_Subscriptions_Order::get_subscription_interval( $order ),\n\t\t\t\t'subscription_length' => WC_Subscriptions_Order::get_subscription_length( $order ),\n\t\t\t\t'subscription_trial_period' => WC_Subscriptions_Order::get_subscription_trial_period( $order ),\n\t\t\t\t'subscription_trial_length' => WC_Subscriptions_Order::get_subscription_trial_length( $order )\n\t\t\t), $order, $this\n\t\t);\n\n\t\t// record event\n\t\t$this->api_record_event( $this->event_name['activated_subscription'],\n\t\t\tarray(\n\t\t\t\t$this->property_name['subscription_name'] => $properties['subscription_name'],\n\t\t\t\t$this->property_name['total_initial_payment'] => $properties['total_initial_payment'],\n\t\t\t\t$this->property_name['initial_sign_up_fee'] => $properties['initial_sign_up_fee'],\n\t\t\t\t$this->property_name['subscription_period'] => $properties['subscription_period'],\n\t\t\t\t$this->property_name['subscription_interval'] => $properties['subscription_period'],\n\t\t\t\t$this->property_name['subscription_length'] => $properties['subscription_interval'],\n\t\t\t\t$this->property_name['subscription_trial_period'] => $properties['subscription_trial_period'],\n\t\t\t\t$this->property_name['subscription_trial_length'] => $properties['subscription_trial_length'],\n\t\t\t),\n\t\t\t$this->get_identity( $order->user_id )\n\t\t);\n\n\t}", "public function complete(int $id, SubscriptionProductContract $product, SubscriptionConsumerContract $consumer = null){\n\t\t$login = array_get($this->config, 'login');\n\t\t$key = array_get($this->config, 'key');\n\t\t$hash = md5(sprintf(\"%s^x_login^x_fp_arg_list^x_fp_sequence^x_amount^x_currency_code^%s^%s^USD^%s\", $login, $id, $product->getPrice(), $key));\n\n\t\t$frequency = $product->getFrequency();\n\t\t$recurrence = $product->getRecurrence();\n\n\t\t$params = [\n\t\t\t'x_version'=>'1.0',\n\t\t\t'x_fp_arg_list'=>'x_login^x_fp_arg_list^x_fp_sequence^x_amount^x_currency_code',\n\t\t\t'x_currency_code'=>'USD',\n\t\t\t'x_method'=>'CC',\n\t\t\t'x_shipping_amount'=>'0.00',\n\t\t\t'x_subscription_type'=>'A',\n\t\t\t'x_login'=>array_get($this->config, 'login'),\n\t\t\t'x_fp_sequence'=>$id,\n\t\t\t'x_invoice_num'=>$id,\n\t\t\t'x_ship_to_name'=>$consumer->getName(),\n\t\t\t'x_ship_to_address'=>$consumer->getAddress(),\n\t\t\t'x_ship_to_address2'=>'',\n\t\t\t'x_ship_to_city'=>$consumer->getCity(),\n\t\t\t'x_ship_to_state'=>$consumer->getState(),\n\t\t\t'x_ship_to_zip'=>$consumer->getZip(),\n\t\t\t'x_ship_to_country'=>$consumer->getCountry(),\n\t\t\t'x_ship_to_phone'=>$consumer->getPhone(),\n\t\t\t'x_email'=>$consumer->getEmail(),\n\t\t\t'x_product_sku_1'=>$id,\n\t\t\t'x_product_title_1'=>$product->getTitle(),\n\t\t\t'x_product_quantity_1'=>'1',\n\t\t\t'x_product_unitprice_1'=>$product->getPrice(),\n\t\t\t'x_product_url_1'=>array_get($this->config, 'url'),\n\t\t\t'x_amount'=>$product->getPrice(),\n\t\t\t'x_subscription_freq'=>($recurrence=='month') ? sprintf('%sM', $frequency) : (($recurrence=='year') ? sprintf('%sY', $frequency):''),\n\t\t\t'x_fp_hash'=>$hash\n\t\t];\n\n\t\t$url = sprintf('https://www.ccnow.com/cgi-local/transact.cgi?%s', http_build_query($params));\t\t\t\n\t\treturn redirect()->away($url);\n\t}", "function InfGetRecurringOrders($inf_contact_id, $inf_product_id = 0) {\n\t$object_type = \"RecurringOrder\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t\n\t$search_data['ContactId'] = $inf_contact_id;\n\t$search_data['Status'] = \"Active\";\n\tif ($inf_product_id) {\n\t\t$search_data['ProductId'] = $inf_product_id;\n\t}\n\t\n\t$objects = Infusionsoft_DataService::query(new $class_name(), $search_data);\n\n $subscriptions_array = array();\n foreach ($objects as $i => $object) {\n\t\t// Give it a userful index, ie, inf_sub_id\n\t\t$array = $object->toArray();\n $subscriptions_array[$array['Id']] = $array;\n }\n\treturn $subscriptions_array;\n}", "public function getProduct($id = 0, $next = 0, $pres = 0) {\t\t\t\t\n\t\t\n\t\t// set select from param\t\t\n\t\t$product = Product::find($id);\t\t\n\t\t$presId = Product::where('id', '<', $id)->where('is_active', '=', 1)->max('id');\t\t\n\t\t$nextId = Product::where('id', '>', $id)->where('is_active', '=', 1)->min('id');\t\t\t\t\t\t\t\n\t\t\n\t\tif(!empty($product))\n\t\t$returnJSON['product'] = $product->toArray();\n\t\t$returnJSON['presId'] = $presId;\n\t\t$returnJSON['nextId'] = $nextId;\n\n\t\treturn Response::json($returnJSON);\n\t}", "function get_product_by_id($product_id) {\r\n try {\r\n $params[0] = array(\"name\" => \":prod_id\", \"value\" => &$product_id);\r\n return $this->DBObject->readCursor(\"product_actions.get_product_by_id(:prod_id)\", $params);\r\n } catch (Exception $ex) {\r\n echo \">>\" . ex;\r\n }\r\n }", "public function subscription($subscription = 'default')\n {\n return $this->subscriptions->sortByDesc(function ($value) {\n return $value->created_at->getTimestamp();\n })->first(function ($value) use ($subscription) {\n return $value->name === $subscription;\n });\n }", "public function getSubscriptionByReference(string $subscription_reference): SubscriptionInterface;", "function get_product($product_id){\n\t\t\n\t\treturn $this->_make_api_call($product_id,'products');\n\t}", "function getOrderProducts($order_id){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM `order_products`\n\t\t\t\t\t\t\t\t\t\tWHERE `order_id` = ? ');\n\t\t$sth \t-> execute(array($order_id));\n\t\treturn \t$sth;\n\t}", "public function getProduct();", "public function retrieveSubscription() {\n // Adrian: Get user subscription details from the database\n /**$subscription = Subscription::where('user_id', $this->model->id)\n ->where('plan_id', $this->plan)\n ->first();**/\n\n $result = ChargeBee_Subscription::retrieve($this->user->subscription_id);\n\n return $result;\n }", "function inspire_get_list_purchased_product_by_user_object( WP_User $user_obj ) {\n\t$customer_orders = get_posts( array(\n\t\t'numberposts' => - 1,\n\t\t'meta_key' => '_customer_user',\n\t\t'meta_value' => $user_obj->ID,\n\t\t'post_type' => wc_get_order_types(),\n\t\t'post_status' => array_keys( wc_get_is_paid_statuses() ),\n\t) );\n\n\t// LOOP THROUGH ORDERS AND GET PRODUCT IDS\n\tif ( ! $customer_orders ) {\n\t\treturn;\n\t}\n\t$product_ids = array();\n\tforeach ( $customer_orders as $customer_order ) {\n\t\t$order = wc_get_order( $customer_order->ID );\n\t\t$items = $order->get_items();\n\t\tforeach ( $items as $item ) {\n\t\t\t$product_id = $item->get_product_id();\n\t\t\t$product_ids[] = $product_id;\n\t\t}\n\t}\n\t$product_ids = array_unique( $product_ids );\n\n\treturn $product_ids;\n}", "public function onSubscriptionActivate(SubscriptionInterface $subscription, OrderInterface $order);", "public function getSubscriptionId();", "public function _getProduct() {\n \n // get website id from request\n $websiteId = ( int ) $this->getRequest ()->getParam ( static::WEBSITE_ID );\n if ($websiteId <= 0) {\n $websiteId = Mage::app ()->getWebsite ( 'base' )->getId ();\n }\n \n // get store id from request\n $storeId = ( int ) $this->getRequest ()->getParam ( static::STORE_ID );\n if ($storeId <= 0) {\n $storeId = Mage::app ()->getWebsite ( $websiteId )->getDefaultGroup ()->getDefaultStoreId ();\n }\n if (is_null ( $this->_product )) {\n $productId = $this->getRequest ()->getParam ( 'id' );\n /**\n *\n * @var $productHelper Mage_Catalog_Helper_Product\n */\n $productHelper = Mage::helper ( 'catalog/product' );\n $product = $productHelper->getProduct ( $productId, $storeId );\n if (! ($product->getId ())) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n // check if product belongs to website current\n if ($this->_getStore ()->getId ()) {\n $isValidWebsite = in_array ( $websiteId, $product->getWebsiteIds () );\n if (! $isValidWebsite) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n // Check display settings for customers & guests\n if ($this->getApiUser ()->getType () != Mage_Api2_Model_Auth_User_Admin::USER_TYPE) {\n // check if product assigned to any website and can be shown\n if ((! Mage::app ()->isSingleStoreMode () && ! count ( $product->getWebsiteIds () )) || ! $productHelper->canShow ( $product )) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n $this->_product = $product;\n }\n return $this->_product;\n }", "public function show(){\n\n $orders = DB::table('orders')->distinct()->whereUserId(Auth::id())->get(['product_id']);\n\n $p = [];\n\n foreach($orders as $order){\n array_push($p, $order->product_id);\n \n }\n\n $products = DB::table('products')->whereIn('id', $p)->get();\n\n return view('orders', compact('products'));\n }", "public function findById($product_id)\n {\n return Product::find($product_id);\n }", "public static function getOrderPurchase($id)\n {\n $orders = DB::query(\"SELECT orderproducts.*, products.strName, products.strDescription, products.strFeatures, products.price, products.category_id, products.status_id, orders.totalAmount, orders.date, inventoryproducts.name AS inventoryproductsname\n FROM orderproducts\n LEFT JOIN orders ON orderproducts.orderId=orders.id\n LEFT JOIN products ON orderproducts.productId=products.id\n LEFT JOIN inventoryproducts ON products.inventoryproductsId=inventoryproducts.id\n WHERE orderproducts.orderId=\".$id);\n //if no id given\n if($orders == \"\"){\n $ordersArray =(object) array(\n \"id\" => \"0\",\n \"userId\" => \"0\",\n \"orderId\" => \"0\",\n 'productId' => '0',\n 'quantity' => \"0\",\n 'total' => \"0\",\n 'strName' => 'No patch',\n 'strDescription' => '',\n 'strFeatures' => '',\n 'price' => '',\n 'countryId' => '',\n 'category_id' => '',\n 'status_id' => '',\n 'totalAmount' => '',\n 'date' => '',\n 'inventoryproductsname'=>'',\n );\n return $ordersArray;\n }\n\n // acting as a factory\n // empty array to avoid errors when nothing was found\n $ordersArray = array();\n foreach($orders as $order)\n {\n // create an instance / object for this SPECIFIC \n $ordersArray[] = new OrdersAdmin($order); // put this object onto the array\n }\n // return the list of objects\n return $ordersArray;\n }", "public function subscription(): SubscriptionReceiptInterface;", "public function getProductForPurchaseRequest($purchaseOrderId)\n {\n return Product::select(\n DB::raw(\n 'id, productName as prDescription, IFNULL(abs(reorderAmount - amount),1) as prQty,reorderAmount, \"Write a descriptive Purpose for this request\" as prPurpose'\n )\n )\n ->whereId($purchaseOrderId)\n ->first();\n }", "public function subscription()\n {\n return $this->hasOne('App\\Subscription');\n }", "function subscriptions ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `subscription` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n }", "public function is_subscription( $order_id ) {\n\t\treturn ( function_exists( 'wcs_order_contains_subscription' ) && ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) );\n\t}", "public function getMatchingProductForId($request);", "public function get_purchased_products( $user_id = null ){\n\n\t\tglobal $wpdb;\n\t\t\n\t\tif(empty($user_id)){\n\t\t\t$current_user = wp_get_current_user();\n\t\t\t$user_id = $current_user->ID;\n\t\t}\n\t\t\n\t\t$products = [];\n\t\t\n\t\t/* Not logged in */\n\t\tif ( 0 == $user_id ) return;\n\t\t\n\t\t$user = get_userdata($user_id);\n\t\t\n\t\t$transient_name = $this->get_user_transient_name('liod_purchased_products');\n\t\t$transient_value = get_transient( $transient_name );\n\t\t\n\t\tif ( isset( $transient_value['value'] ) ) {\n\t\t\t\n\t\t\t$products = $transient_value['value'];\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\t$all_subscription_products = $this->get_all_subscription_products();\n\t\t\t$all_event_products = $this->get_all_event_products();\n\t\t\t\n\t\t\t/* If admin or editor, this gives access to all products */\n\t\t\tif( current_user_can('editor') || current_user_can('administrator') ) {\t\t\n\t\t\t\t$products = array_merge($products, $all_subscription_products, $all_event_products);\n\t\t\t\t\n\t\t\t/* Otherwise get a list of all products the user has purchased */\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t/* Push Subscription products purchased if valid */\n\t\t\t\tforeach($all_subscription_products as $product){\n\n\t\t\t\t\t$order_id = wc_order_where_customer_bought_product( $user->user_email, $user->ID, $product->get_id() );\n\t\t\t\t\t\n\t\t\t\t\tif($order_id){\n\t\t\t\t\t\t$order = wc_get_order($order_id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$order_date = $order->get_date_created();\n\t\t\t\t\t\t$subscription_valid = $product->get_meta('subscription_duration');\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* If Subscription purchased is within it's allowed timespan */\n\t\t\t\t\t\tif (strtotime($order_date) >= strtotime('-' . $subscription_valid . ' days'))\n\t\t\t\t\t\t\tarray_push($products,$product); \n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/* Push event products purchased */\n\t\t\t\tforeach($all_event_products as $product){\n\t\t\t\t\tif ( wc_customer_bought_product( $current_user->user_email, $current_user->ID, $product->get_id() ) ) array_push($products,$product); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$products = array_unique( $products );\n\t\t\t\t\n\t\t\t\t$transient_value = array(\n\t\t\t\t\t'value' => $products\n\t\t\t\t);\t\t\t \n\t\t\t\t \n\t\t\t\tset_transient( $transient_name, $transient_value, 12 * HOUR_IN_SECONDS );\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn $products;\n\n\t}", "public function getUserSubscriptionWithId(int $userSubscriptionId);", "protected function maybe_handle_subscription( $order ) {\n\t\tif ( ! class_exists( 'WC_Subscriptions' ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\tif ( ! wcs_order_contains_subscription( $order ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\t$subscription = current( wcs_get_subscriptions_for_order( $order->get_id() ) );\n\t\t$subscription_id = $subscription->get_id();\n\n\t\t$ppec_billing = get_post_meta( $subscription_id, '_ppec_billing_agreement_id', true );\n\n\t\tif ( empty( $ppec_billing ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\tif ( $subscription->has_status( apply_filters( 'woocommerce_paypal_express_checkout_privacy_eraser_subs_statuses', array( 'on-hold', 'active' ) ) ) ) {\n\t\t\treturn array( false, true, array( sprintf( __( 'Order ID %d contains an active Subscription' ), $order->get_id() ) ) );\n\t\t}\n\n\t\t$renewal_orders = WC_Subscriptions_Renewal_Order::get_renewal_orders( $order->get_id() );\n\n\t\tforeach ( $renewal_orders as $renewal_order_id ) {\n\t\t\tdelete_post_meta( $renewal_order_id, '_woo_pp_txnData' );\n\t\t\tdelete_post_meta( $renewal_order_id, '_ppec_billing_agreement_id' );\n\t\t\tdelete_post_meta( $renewal_order_id, '_paypal_status' );\n\t\t}\n\n\t\tdelete_post_meta( $subscription_id, '_woo_pp_txnData' );\n\t\tdelete_post_meta( $subscription_id, '_ppec_billing_agreement_id' );\n\t\tdelete_post_meta( $subscription_id, '_paypal_status' );\n\n\t\treturn array( true, false, array( __( 'PayPal Checkout Subscriptions Data Erased.', 'woocommerce-gateway-paypal-express-checkout' ) ) );\n\t}", "function buy_annual_subscription_action() {\n // Annual subscription + membership product ID: 11327\n $product_id = 11326;\n $added_product = WC()->cart->add_to_cart($product_id);\n\n if ($added_product !== '') {\n echo \"Subscription added to cart!\";\n } else {\n echo \"Subscription not add to cart!\";\n }\n\n wp_die();\n }", "public function getOrderProduct($id)\n\t {\n\t\t $this->db->select(\"COP.*\");\n\t\t $this->db->from(\"client_order_prodcts AS COP\");\n\t\t $this->db->where(\"COP.id\", $id);\n\t\t $this->db->limit(1);\n\t\t $query_order_prod_row = $this->db->get();\n\t\t\t\n\t\t\tif($query_order_prod_row->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $query_order_prod_row->result_array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t }", "public function getProductsByUserId($id)\n {\n if($id==0){\n $product = UserProduct::distinct()->pluck('product_id');\n }else{\n $product = UserProduct::where(\"user_id\",$id)->distinct()->pluck('product_id');\n }\n\n if (count($product)>0){\n $res['product_ids']=$product;\n return response()->json(['status_code' => 200, 'message' => 'product list', 'data' => $res]);\n\n }else{\n return response()->json(['status_code' => 404, 'message' => 'Record not found']);\n }\n\n }", "function LoadProduct($orderid) {\n\t$proids = array();\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"orderproduct\",array('id','orderid','proid','number','price','returnnow','modlcharge'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$idobj = $factory->getIdentityObject()->field('orderid')->eq($orderid);\n\t$order_pro = $finder->find($idobj);\n\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"product\",array('id','classid','length','width','think','unitlen','unitwid','unitthi','unit','sharp','note'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$pro = $order_pro->next();\n\t$i = 0;\n\t$data = array();\n\twhile($pro){\n\t\t$data[$i][0] = $i+1;\n\t\t$idobj = $factory->getIdentityObject()->field('id')->eq($pro->getProid());\n\t\t$collection = $finder->find($idobj);\n\t\t$product = $collection->current();\n\t\t$data[$i][1] = $product->getSize();\n\t\t$data[$i][2] = $pro->getNumber();\n\t\t$price = $pro->getPrice()-$pro->getReturnnow();\n\t\t$data[$i][3] = sprintf(\"%.2f\",$price);\n\t\t$data[$i][4] = sprintf(\"%.2f\",$price*$data[$i][2]);\n\t\t$i++;\n\t\t$pro = $order_pro->next();\n\t}\n\treturn $data;\n}", "function &getSubscription($subscriptionId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT s.*, iss.*\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st,\n\t\t\tinstitutional_subscriptions iss\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = iss.subscription_id\n\t\t\tAND s.subscription_id = ?',\n\t\t\t$subscriptionId\n\t\t);\n\n\t\t$returner = null;\n\t\tif ($result->RecordCount() != 0) {\n\t\t\t$returner =& $this->_returnSubscriptionFromRow($result->GetRowAssoc(false));\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function getChildOrderIds(Customweb_Subscription_Model_Subscription $object){\n\t\t$adapter = $this->_getReadAdapter();\n\t\t$bind = array(\n\t\t\t':subscription_id' => $object->getId() \n\t\t);\n\t\t$select = $adapter->select()->from(array(\n\t\t\t'main_table' => $this->getTable('customweb_subscription/subscription_order') \n\t\t), array(\n\t\t\t'order_id' \n\t\t))->where('subscription_id=:subscription_id');\n\t\t\n\t\treturn $adapter->fetchCol($select, $bind);\n\t}", "public function getOrderProductData($sellerId,$orderId,$productId){\r\n \t/**\r\n \t * Load commission model\r\n \t */\r\n $productData = Mage::getModel('marketplace/commission')->getCollection()\r\n ->addFieldToFilter('seller_id',$sellerId)\r\n ->addFieldToFilter('order_id',$orderId) \r\n ->addFieldToFilter('product_id',$productId)->getFirstItem();\r\n /**\r\n * Return product data\r\n */\r\n return $productData; \r\n }", "public function getProductBySku($sku);", "public function subscription($id) {\n\n if (!isset($this->account_details['access_token'])) {\n throw new GoCardless_ClientException('Access token missing');\n }\n\n return GoCardless_Subscription::find_with_client($this, $id);\n\n }", "public function subscriptions()\n {\n return Subscription::byCustomer($this->id);\n }", "public function regretProduct_get() {\n extract($_GET);\n $result = $this->feeds_model->regretProduct($prod_no, $order_id);\n return $this->response($result);\n }", "public function do_process_subscription_payment( $subscription ) {\n\t\t\t$subscription_id = $subscription;\n\t\t\tif ( is_object( $subscription ) ) {\n\t\t\t\t$subscription_id = $subscription->ID;\n\t\t\t}\n\n\t\t\t$subscription_ord = wcs_get_subscription( $subscription_id );\n\t\t\t$subscription_orders = $subscription_ord->get_related_orders();\n\n\t\t\t$order_id = current( $subscription_orders );\n\t\t\t$order = new WC_Order( $order_id );\n\n\t\t\t$user_id = $subscription_ord->get_user_id();\n\t\t\tif ( ! $user_id ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$billing_email = version_compare( WC_VERSION, '3.0', '<' ) ? $subscription_ord->billing_email : $subscription_ord->get_billing_email();\n\n\t\t\t$renewal = false;\n\t\t\t// Its first subscription\n\t\t\t$event_sale_name = apply_filters( 'do_woo_drip_action_order', __( 'Subscription', 'do_woo_drip' ) );\n\t\t\t// Its renewal\n\t\t\tif ( count( $subscription_orders ) > 1 ) {\n\t\t\t\t$renewal = true;\n\t\t\t\t$event_sale_name = apply_filters( 'do_woo_drip_action_order_renew', __( 'Renew', 'do_woo_drip' ) );\n\t\t\t}\n\n\t\t\t// Subscriber Parameters\n\t\t\t$subscriber_params = array(\n\t\t\t\t'account_id' => $this->_drip_account_id,\n\t\t\t\t'email' => $billing_email,\n\t\t\t\t'time_zone' => wc_timezone_string(),\n\t\t\t\t'custom_fields' => $this->drip_custom_fields( $order, $user_id, $renewal ),\n\t\t\t\t'tags' => apply_filters( 'do_woo_drip_tag_customer', array(\n\t\t\t\t\t__( 'WooSubscriber', 'do_woo_drip' ),\n\t\t\t\t) )\n\t\t\t);\n\n\t\t\t$this->_drip_api->drip_create_or_update_subscriber( $this->_drip_account_id, array( 'subscribers' => array( $subscriber_params ) ) );\n\n\t\t\t// Product name\n\t\t\t$products = implode( ', ', array_map( function ( $product ) {\n\t\t\t\treturn version_compare( WC_VERSION, '3.0', '<' ) ? $product['name'] : $product->get_name();\n\t\t\t}, $order->get_items() ) );\n\n\t\t\t// Product ID\n\t\t\t$product_ids = implode( ', ', array_filter( array_map( function ( $product ) {\n\t\t\t\tif ( is_a( $product, 'WC_Order_Item_Product' ) ) {\n\t\t\t\t\treturn $product->get_product_id();\n\t\t\t\t}\n\t\t\t}, $order->get_items() ) ) );\n\n\t\t\t// Billing cycle & Variation ID\n\t\t\t$billing_cycle = $variation_id = $product_type = array();\n\t\t\tforeach ( $order->get_items() as $key => $val ) {\n\t\t\t\t$bill_type = wc_get_order_item_meta( $key, 'pa_billingcycle', true );\n\t\t\t\tif ( $bill_type ) {\n\t\t\t\t\tarray_push( $billing_cycle, $bill_type );\n\t\t\t\t}\n\n\t\t\t\t$variation = wc_get_order_item_meta( $key, '_variation_id', true );\n\t\t\t\tif ( $variation > 0 ) {\n\t\t\t\t\tarray_push( $variation_id, $variation );\n\t\t\t\t}\n\n\t\t\t\t$prodtype = wc_get_order_item_meta( $key, 'pa_producttype', true );\n\t\t\t\tif ( $prodtype ) {\n\t\t\t\t\tarray_push( $product_type, $prodtype );\n\t\t\t\t} elseif ( $variation > 0 ) {\n\t\t\t\t\t$variation_name = get_post_meta( $variation, 'attribute_pa_producttype', true );\n\t\t\t\t\tif ( $variation_name ) {\n\t\t\t\t\t\tarray_push( $product_type, $variation_name );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$billing_cycle = implode( ', ', array_filter( $billing_cycle ) );\n\t\t\t$variation_id = implode( ', ', array_filter( $variation_id ) );\n\t\t\t$product_type = implode( ', ', array_filter( $product_type ) );\n\n\t\t\tif ( empty( $billing_cycle ) ) {\n\t\t\t\t$billing_cycle = $subscription_ord->get_billing_period();\n\t\t\t}\n\n\t\t\t// $is_subscriber Variable\n\t\t\t$is_sub_action = $this->_drip_api->drip_fetch_subscriber( $this->_drip_account_id, $billing_email );\n\n\t\t\tif ( $is_sub_action ) {\n\t\t\t\t$is_subscriber = $is_sub_action['id'];\n\t\t\t} else {\n\t\t\t\t$is_subscriber = false;\n\t\t\t}\n\n\t\t\t$event_params = array(\n\t\t\t\t'account_id' => $this->_drip_account_id,\n\t\t\t\t'email' => $billing_email,\n\t\t\t\t'action' => $event_sale_name,\n\t\t\t\t'properties' => $this->drip_event_properties( $order->get_total(), $products, $order_id, $product_ids, $product_type, $billing_cycle, $variation_id ),\n\t\t\t);\n\n\n\t\t\t// Check if subscriber exists and if so, send data to Drip\n\t\t\tif ( $is_subscriber ) {\n\n\t\t\t\t$this->_drip_api->drip_record_event( $this->_drip_account_id, array( 'events' => array( $event_params ) ) );\n\n\t\t\t}\n\t\t}", "public function createSubscription(CustomerInterface $customer, PaymentMethodInterface $payment_method, $product_name, string $period, ...$arguments): SubscriptionInterface;", "public function getProducto(){\n $sql='SELECT idProducto, nombre, precio, descripcion, foto, estado, idCategoria, cantidad, idProveedor from producto WHERE idProducto = ?';\n $params=array($this->id);\n return Database::getRow($sql,$params);\n }", "public function getProductById($product_id)\n {\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.\"products/$product_id/detail/\");\n $client->setMethod(\\Zend_Http_Client::GET);\n $client->setHeaders([\n 'Content-Type: application/json', \n 'Accept: application/json',\n \"Authorization: Token $this->token\"\n ]);\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $product_data=json_decode($string);\n \n return $product_data;\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos Product save helper', [\"Get product error\"=>$e->getMessage()]);\n return false;\n }\n }", "public function getProduct() {\r\n\t\t$id = $this->getRequest()->getParam('id');\r\n\t\t$products = Mage::getModel('catalog/product')->load($id);\r\n\t\treturn $products;\r\n\t}", "public function getSubscriptionForIssue( $issue )\n {\n $subscriptionId = $issue[ 'subscription_id' ];\n\n if ( $subscriptionId == null )\n throw new System_Api_Error( System_Api_Error::UnknownSubscription );\n\n return $this->getSubscription( $subscriptionId );\n }", "public function subscription($customer_id)\n {\n $customer = \\Stripe\\Customer::retrieve([\n 'id' => $customer_id,\n ]);\n $collection = new Collection($customer->subscriptions->data);\n return $collection->sortByDesc(function ($value) {\n return $value->created;\n })->first();\n }", "static function get_orders_by_product_id($product_id, $offset = null, $per_page = null ) {\n\n global $wpdb;\n $tabelaOrderItemMeta = $wpdb->prefix . 'woocommerce_order_itemmeta';\n $tabelaOrderItems = $wpdb->prefix . 'woocommerce_order_items';\n $limiter_str = '';\n\n if( $offset !== null && $per_page !== null ) {\n $limiter_str = \" LIMIT $offset, $per_page \";\n }\n\n if( is_array( $product_id ) ) {\n\n echo \"SELECT b.order_id, a.meta_value as product_id\nFROM {$tabelaOrderItemMeta} a, {$tabelaOrderItems} b\nWHERE a.meta_key = '_product_id'\nAND a.meta_value IN (%s)\nAND a.order_item_id = b.order_item_id\nORDER BY b.order_id DESC $limiter_str\";\n\n $results = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT b.order_id, a.meta_value as product_id\nFROM {$tabelaOrderItemMeta} a, {$tabelaOrderItems} b\nWHERE a.meta_key = '_product_id'\nAND a.meta_value IN (%s)\nAND a.order_item_id = b.order_item_id\nORDER BY b.order_id DESC $limiter_str\",\n\n implode(',', $product_id ) //array('336','378')\n )\n );\n } else {\n $results = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT b.order_id\nFROM {$tabelaOrderItemMeta} a, {$tabelaOrderItems} b\nWHERE a.meta_key = '_product_id'\nAND a.meta_value = %s\nAND a.order_item_id = b.order_item_id\nORDER BY b.order_id DESC $limiter_str\",\n $product_id\n )\n );\n }\n\n\n if ($results) {\n\n $order_ids = array();\n foreach ($results as $item)\n array_push($order_ids, $item->order_id);\n\n if ($order_ids) {\n $args = array(\n 'post_type' => 'shop_order',\n 'post_status' => array('wc-processing', 'wc-completed'),\n 'posts_per_page' => -1,\n 'post__in' => $order_ids,\n 'fields' => 'ids'\n );\n $query = new WP_Query($args);\n return $query;\n }\n }\n\n return false;\n }", "public function getConfigurableBySimple($idProduct);", "public function getSubscriptionsByIdPerson($id_person){\n $this->db->where('ID_PERSON', $id_person);\n $this->db->order_by(\"DATE_SUBSCRIPTION\",\"DESC\");\n $query = $this->db->get($this->table);\n if ($query->num_rows() > 0) {\n return $query->result();\n }else{\n return false;\n }\n}", "public function createSubscription(\n $productId = 0,\n $billingType = null,\n $stripePaymentProcessId = null,\n $strpeOrderId = null\n ) {\n\n $userInformation = $this->userRepository->basicInfoById(Auth::user()->id);\n $stipeObj = $this->paymentService\n ->getCustomerDefaultCardDetails(Auth::user()->email);\n $customerId = $this->wooCommerceService->getCustomerId();\n\n if (empty($customerId)) {\n\n $customerId = $this->createWooCustomer($userInformation);\n if(gettype($customerId) == \"string\"){\n return [\n 'flag' => false,\n 'message' => $customerId\n ];\n\n }\n\n }\n\n $billing_period = null;\n\n if ($billingType == \"Monthly\" || $billingType == \"Monthly Billing\") {\n $billing_period = \"month\";\n $billingInterval = 1;\n $next_payment_date = $this->recurringDate(date('Y-m-d H:i:s'));\n\n }\n\n if ($billingType == \"Annual\" || $billingType == \"Annual Billing\") {\n $billing_period = \"year\";\n $billingInterval = 2;\n $next_payment_date = $this->recurringDate(date('Y-m-d H:i:s'), 12);\n }\n\n $startTime = strtotime(\"+0 minutes\", strtotime(gmdate(\"Y-m-d H:i:s\")));\n $startTime = date(\"Y-m-d H:i:s\", $startTime);\n\n $data = array(\n 'customer_id' => $customerId,\n 'status' => 'active',\n 'billing_period' => $billing_period,\n 'billing_interval' => $billingInterval,\n 'start_date' => $startTime,\n 'next_payment_date' => $next_payment_date,\n 'payment_method' => 'stripe',\n 'payment_details' =>\n array(\n 'post_meta' =>\n array(\n '_stripe_customer_id' => $stipeObj['customer'],\n '_stripe_card_id' => $stipeObj['card_id'],\n ),\n ),\n 'billing_address' =>\n array(\n 'first_name' => $userInformation['first_name'],\n 'last_name' => $userInformation['last_name'],\n 'address_1' => $userInformation['street_address1'],\n 'address_2' => $userInformation['street_address2'],\n 'city' => $userInformation['city'],\n 'state' => $userInformation['state'],\n 'postcode' => \"\" . $userInformation['zip'] . \"\",\n 'country' => $userInformation['country'],\n 'email' => $userInformation['email'],\n 'phone' => $userInformation['phone_number'],\n ),\n\n 'line_items' =>\n array(\n 0 =>\n array(\n 'product_id' => $productId,\n 'quantity' => 1,\n ),\n ),\n );\n\n $order = $this->storeJsonWooData('subscriptions', $data);\n \\Log::info(\"===== Subscription\", ['order' => $order]);\n\n if (empty($order)) {\n return [\n 'flag' => false,\n 'message' => Auth::user()->email . \"Create Subscription Fail\"\n ];\n\n } else {\n\n $paid_subscription_start = date('Y-m-d H:i:s', strtotime($order->start_date));\n $paid_subscription_end = date('Y-m-d H:i:s', strtotime($order->next_payment_date));\n $trial = 1;\n $subscription_level = Helper::stringContain(strstr($order->line_items[0]->name, '-', true));\n if(empty($subscription_level))\n {\n $subscription_level = Helper::stringContain(($order->line_items[0]->name));\n }\n\n $this->userStripeRepository->updateUserStripe($stripePaymentProcessId, true);\n DB::table(\"users\")\n ->where('id', Auth::user()->id)\n ->update(['paid_subscription_start' => $paid_subscription_start,\n 'paid_subscription_end' => $paid_subscription_end,\n 'subscription_level' => $subscription_level,\n 'trial' => $trial,\n 'subscription_renewal' => 'y',\n 'no_renewal_reason' => ''\n ]);\n\n $description = '';\n if (isset($order->line_items[0]->name) && isset($order->id)) {\n $description = \"WooOrderId-\" . $order->id . \",\" . $productId . \"-\" . $order->line_items[0]->name;\n if (isset($strpe_order_id)) {\n $this->paymentService->setChargeDescription($strpeOrderId, $description, Config::get('custom_config.Payment_TYPE')[2]);\n }\n\n }\n\n return true;\n }\n }", "public function subscription($name = 'default')\n {\n return $this->subscriptions->sortByDesc(function (Subscription $subscription) {\n return $subscription->created_at->getTimestamp();\n })->first(function (Subscription $subscription) use ($name) {\n return $subscription->name === $name;\n });\n }", "function get ($id) {\n // PARAM $id : order ID\n\n $order = $this->fetch(\n \"SELECT * FROM `orders` WHERE `order_id`=?\", [$id]\n );\n $order['items'] = $this->fetch(\n \"SELECT * FROM `orders_items` LEFT JOIN `products` USING (`product_id`) WHERE `orders_items`.order_id=?\", \n [$id], \"product_id\"\n );\n return $order;\n }", "public function GetSubscription()\n {\n \t$this->SetCulture();\n \t \n \t$rs = mysql_query(\"SELECT subscription_id, \" . $this->lang_name_field . \" FROM subscriptions WHERE subscription_id=\" . $this->subscription_id);\n \t \n \t$row = mysql_fetch_array($rs);\n \n \t$this->subscription_id\t\t= $row['subscription_id'];\n \t$this->subscription_name\t= $row[$this->lang_name_field];\n \t\n \n \tif (mysql_errno())\n \t{\n \t\treturn \"MySQL error \".mysql_errno().\": \".mysql_error().\"\\n<br>When executing:<br>\\n$rs\\n<br>\";\n \t}\n }", "public function GetProduct($product_id) {\n\n //set up the query\n $this->sql = \"SELECT *\n FROM products\n WHERE productID = :product_id\";\n \n //execute the query\n $this->RunAdvancedQuery([\n ':product_id' => $product_id,\n ]);\n }", "public function subscribeBy($userId = null);", "public function getOrderProductAction (Request $request)\r\n {\r\n $orderId = (int) $request->query->get('orderId', 0);\r\n $em = $this->getDoctrine()->getManager();\r\n $orderProducts = array();\r\n $userEntity = $this->getUser();\r\n\r\n if ($orderId !== 0) {\r\n $orderProducts = $em->getRepository('YilinkerCoreBundle:UserOrder')\r\n ->getTransactionOrderProducts (\r\n $orderId,\r\n null,\r\n null,\r\n $userEntity->getUserId(),\r\n OrderProductStatus::STATUS_ITEM_RECEIVED_BY_BUYER\r\n );\r\n }\r\n\r\n return new JsonResponse(compact('orderProducts'));\r\n }", "protected function order_contains_subscription( $order_id ) {\n\t\treturn class_exists( 'WC_Subscriptions_Order' ) && ( WC_Subscriptions_Order::order_contains_subscription( $order_id ) || WC_Subscriptions_Renewal_Order::is_renewal( $order_id ) );\n\t}", "public function getTransactionOrderProduct($txn)\n\t{\n\t\t$query=$this->db->query(\"SELECT ordr.*,os.name order_status_value,op.order_product_id,op.product_key,op.transaction_id as product_transaction_id,op.name as product_name,quantity as product_quantity,op.order_product_status_id,op.total as product_total FROM `customer_transaction` ct, `order` ordr, `order_status` os,`order_product` op where op.transaction_id = ct.transaction_id and os.order_status_id=op.order_product_status_id and ordr.order_id = op.order_id and op.transaction_id = \".$txn);\n\t\t$product = $query->result_array();\n\t\tif(!$product){\t\t\n\t\t\t$query=$this->db->query(\"SELECT ordr.*,os.name order_status_value,op.order_product_id,op.product_key,op.transaction_id as product_transaction_id,op.name as product_name,quantity as product_quantity,op.order_product_status_id,op.total as product_total,om.* FROM `customer_transaction` ct, `order` ordr, `order_status` os,`order_product` op , order_milestone om where om.transaction_id = ct.transaction_id and os.order_status_id=op.order_product_status_id and ordr.order_id = op.order_id and ordr.order_id = om.order_id and om.transaction_id =\".$txn);\n\t\t\t$product = $query->result_array();\n\t\t}\n\t\treturn $product;\n\t}", "function obtainReportForSubscription(string $id){\nreturn $this->get(\"/subscription/report/{$id}\");\n}", "function get_subscriber($id){\n $query = selectRecord(TAB_SUBSCRIBERS, \"id = $id\");\n return $query;\n}", "public function getSubscriptions();", "public static function getPurchaseable(string $type, mixed $id) : mixed\n {\n return Product::findOrFail($id);\n }", "public static function purchasedProducts( \\Users\\Models\\Users $user, $options=array() )\r\n\t{\r\n\t\t$options = $options + array(\r\n\t\t\t'limit' => 10,\r\n\t\t\t'offset' => 0,\r\n\t\t\t'keyword' => null\r\n\t\t);\r\n\r\n\t\t$limit = $options['limit'];\r\n\t\t$offset = $options['offset'];\r\n\r\n\t\t$model = (new \\Shop\\Models\\Orders)\r\n\t\t->setState('filter.keyword', $options['keyword'])\r\n\t\t->setState('filter.user', $user->id)\r\n\t\t->setState('filter.status_excludes', \\Shop\\Constants\\OrderStatus::cancelled)\r\n\t\t->setState('filter.financial_status', array( \\Shop\\Constants\\OrderFinancialStatus::paid, \\Shop\\Constants\\OrderFinancialStatus::authorized, \\Shop\\Constants\\OrderFinancialStatus::pending ) )\r\n\t\t;\r\n\r\n\t\t$conditions = $model->conditions();\r\n\r\n\t\t$pipeline = array(\r\n\t\t\tarray(\r\n\t\t\t\t'$match' => $conditions\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'$sort' => array( 'metadata.created.time' => -1 )\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'$unwind' => '$items'\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'$project' => array(\r\n\t\t\t\t\t'_id' => 0,\r\n\t\t\t\t\t'title' => '$items.product.title',\r\n\t\t\t\t\t'slug' => '$items.product.slug',\r\n\t\t\t\t\t'product_id' => '$items.product_id',\r\n\t\t\t\t\t'variant_id' => '$items.variant_id',\r\n\t\t\t\t\t'price' => '$items.price',\r\n\t\t\t\t\t'quantity' => '$items.quantity',\r\n\t\t\t\t\t'attribute_title' => '$items.attribute_title',\r\n\t\t\t\t\t'sku' => '$items.sku',\r\n\t\t\t\t\t'model_number' => '$items.model_number',\r\n\t\t\t\t\t'order_created' => '$metadata.created',\r\n\t\t\t\t\t'order_id' => '$_id',\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'$match' => array(\r\n\t\t\t\t\t'product_id' => array(\r\n\t\t\t\t\t\t'$nin' => array('', null)\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\tif (!empty($options['keyword']))\r\n\t\t{\r\n\t\t\t$key = new \\MongoRegex('/'.$options['keyword'].'/i');\r\n\r\n\t\t\t$pipeline[] = array(\r\n\t\t\t\t'$match' => array(\r\n\t\t\t\t\t'$or' => array(\r\n\t\t\t\t\t\tarray( 'title' => $key ),\r\n\t\t\t\t\t\tarray( 'sku' => $key ),\r\n\t\t\t\t\t\tarray( 'order_id' => $key ),\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t}\r\n\r\n\t\tif (isset($options['is_reviewed']) && is_bool($options['is_reviewed']))\r\n\t\t{\r\n\t\t\t// get the product_ids that have been reviewed\r\n\t\t\t$reviewed_product_ids = \\Shop\\Models\\ProductReviews::collection()->distinct('product_id', array(\r\n\t\t\t\t'user_id' => $user->id\r\n\t\t\t));\r\n\r\n\t\t\tif ($options['is_reviewed']) {\r\n\t\t\t\t// Add an $in filter to the pipeline for product_id\r\n\t\t\t\t$pipeline[] = array(\r\n\t\t\t\t\t'$match' => array(\r\n\t\t\t\t\t\t'product_id' => array(\r\n\t\t\t\t\t\t\t'$in' => $reviewed_product_ids\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Add an $nin filter to the pipeline for product_id\r\n\t\t\t\t$pipeline[] = array(\r\n\t\t\t\t\t'$match' => array(\r\n\t\t\t\t\t\t'product_id' => array(\r\n\t\t\t\t\t\t\t'$nin' => $reviewed_product_ids\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$count_pipeline = $pipeline;\r\n\t\t$count_pipeline[] = array(\r\n\t\t\t'$group' => array(\r\n\t\t\t\t'_id' => null,\r\n\t\t\t\t'count' => array(\r\n\t\t\t\t\t'$sum' => 1\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$pipeline[] = array(\r\n\t\t\t'$skip' => $offset * $limit\r\n\t\t);\r\n\r\n\t\t$pipeline[] = array(\r\n\t\t\t'$limit' => $limit\r\n\t\t);\r\n\r\n\t\t$agg = \\Shop\\Models\\Orders::collection()->aggregate($pipeline);\r\n\r\n\t\t$result = null;\r\n\t\t//\\Dsc\\System::addMessage(\\Dsc\\Debug::dump($agg));\r\n\t\tif (!empty($agg['ok']) && !empty($agg['result']))\r\n\t\t{\r\n\t\t\t$agg_count = \\Shop\\Models\\Orders::collection()->aggregate($count_pipeline);\r\n\t\t\t$total = isset($agg_count['result'][0]['count']) ? $agg_count['result'][0]['count'] : \\Shop\\Models\\Orders::collection()->count($conditions);\r\n\r\n\t\t\t$result = new \\Dsc\\Pagination( $total, $limit );\r\n\t\t\t$items = array();\r\n\t\t\tforeach ($agg['result'] as $doc)\r\n\t\t\t{\r\n\t\t\t\tif (empty($doc['product_id']))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$item = (new \\Shop\\Models\\Products)->setState('filter.id', $doc['product_id'])->getItem();\r\n\t\t\t\tif (!empty($item->id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$item->order_item = $doc;\r\n\t\t\t\t\tif (empty($item->order_item['variant_id'])) {\r\n\t\t\t\t\t\t$item->order_item['variant_id'] = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$item->order_item['image'] = $item->variantImage( $item->order_item['variant_id'] );\r\n\t\t\t\t\t$items[] = $item;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$result->items = $items;\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "protected static function get_worldpay_subscriptions_args( $order ) {\n\n\t\t// WooCommerce 3.0 compatibility \n $order_id = is_callable( array( $order, 'get_id' ) ) ? $order->get_id() : $order->id;\n\n\t\t$subscription \t\t\t= wcs_get_subscriptions_for_order( $order_id );\n\t\t$subscription_id \t\t= key( $subscription );\n\n\t\t$_billing_period \t\t= strtolower( get_post_meta( $subscription_id, '_billing_period', TRUE ) );\n\t\t$_trial_period \t\t\t= strtolower( get_post_meta( $subscription_id, '_trial_period', TRUE ) );\n\t\t$_schedule_trial_end\t= strtolower( get_post_meta( $subscription_id, '_schedule_trial_end', TRUE ) );\n\t\t$_schedule_next_payment = strtolower( get_post_meta( $subscription_id, '_schedule_next_payment', TRUE ) );\n\t\t$_schedule_end \t\t\t= strtolower( get_post_meta( $subscription_id, '_schedule_end', TRUE ) );\n\n\t\tswitch ( $_billing_period ) {\n\t\t\t\t\n\t\t\tcase 'day' :\n\t\t\t\t$subscription_period = '1';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\tcase 'week' :\n\t\t\t\t$subscription_period = '2';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\tcase 'month' :\n\t\t\t\t$subscription_period = '3';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'year' :\n\t\t\t\t$subscription_period = '4';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tswitch ( $_trial_period ) {\n\t\t\t\t\n\t\t\tcase 'day' :\n\t\t\t\t$trial_period = '1';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\tcase 'week' :\n\t\t\t\t$trial_period = '2';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\tcase 'month' :\n\t\t\t\t$trial_period = '3';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'year' :\n\t\t\t\t$trial_period = '4';\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\t\t\t\t$trial_period = $subscription_period;\n\t\t\t\t\n\t\t}\n\n\t\t/**\n\t\t * Billing period \"mult\"\n\t\t * eg every 2 weeks, every 3 months\n\t\t */\n\t\t$intervalMult = self::get_subscription_product_meta( $subscription_id, '_subscription_period_interval' );\n\n\t\t// Number of payments\n\t\t$noOfPayments = self::get_subscription_number_of_payments( $_schedule_end, $_schedule_next_payment, $_billing_period, $intervalMult );\n\n\t\t/**\n\t\t * If subscription is for one period (1 month, 1 day, 1 year etc) and there is no trial period then we don't need to set up Future Pay\n\t\t */\n\t\t// if( $_schedule_trial_end == '0' && $noOfPayments == '1' ) {\n\t\tif( $_schedule_trial_end == '0' && $_schedule_next_payment == '0' ) {\n\t\t\treturn;\n\t\t} else {\n\n\t\t\t// Build the Subscription $worldpay_args\n\t\t\t$worldpay_args['futurePayType'] = 'regular';\n\n\t\t\t/**\n\t\t\t * If the subscription period is less than 2 weeks the option must be 0 which means no modifications\n\t\t\t */\n\t\t\tif ( $subscription_period == '1' || ( $subscription_period == '2' && $noOfPayments <= '2' ) ) {\n\t\t\t\t$worldpay_args['option'] = 0;\n\t\t\t} else {\n\t\t\t\t$worldpay_args['option'] = 1;\n\t\t\t}\n\t\t\t\t\n\t\t\t/**\n\t\t\t * Set start date if there is a trial period or use subscription period settings\n\t\t\t * \n\t\t\t * Use strtotime because subscriptions passes an INT for the length and a word for period\n\t\t\t * doing it any other way means a messy calculation\n\t\t\t */\n\t\t\tif ( $_schedule_trial_end != '0' || ( class_exists( 'WC_Subscriptions_Synchroniser' ) && WC_Subscriptions_Synchroniser::subscription_contains_synced_product( $subscription_id ) ) ) {\n\n\t\t\t\t$start_date = strtotime( $_schedule_next_payment );\n\t\t\t\t$worldpay_args['startDate'] = date( \"Y-m-d\", $start_date );\n\n\t\t\t} else {\n\n\t\t\t\t$worldpay_args['startDelayMult'] = $intervalMult;\n\t\t\t\t$worldpay_args['startDelayUnit'] = $subscription_period;\t\t\t\t\t\t\t\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Set the number of payments\n\t\t\t */\n\t\t\t$worldpay_args['noOfPayments'] = $noOfPayments;\n\n\t\t\t/**\n\t\t\t * Set subscription length\n\t\t\t *\n\t\t\t * WorldPay does not count the intial payment in the noOfPayments setting\n\t\t\t *\n\t\t\t * Includes work around for 2 payment subscriptions with no free trial.\n\t\t\t */\n\t\t\tif( $_schedule_trial_end == '0' && $noOfPayments == 1 ) {\n\n\t\t\t\t/**\n\t\t\t\t * Two payment subscriptions with no free trial\n\t\t\t\t * \n\t\t\t\t * Set the start date to be tomorrow, no payment will be taken initially\n\t\t\t\t *\n\t\t\t\t * Why do it this way?\n\t\t\t\t * WorldPay takes 1 payment now so the number of payments in a subscription needs to be reduced by 1 BUT, \n\t\t\t\t * for a 2 payment subscription that means 1 payment now and 1 payment in the future - WorldPay does not allow only 1 payment in the future, the minimum is 2\n\t\t\t\t * This work around means that the initial payment is take tomorrow at 3:00 AM, essentially forcing a free trial of 1 day.\n\t\t\t\t *\n\t\t\t\t * Further problems arise if the initial payment is not the same as the recurring payments.\n\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\tif ( get_post_meta( $subscription_id, '_order_total', TRUE ) == $order->order_total ) {\n\t\t\t\t\t$worldpay_args['amount'] = '0.00';\n\t\t\t\t\tunset( $worldpay_args['startDelayMult'] );\n\t\t\t\t\tunset( $worldpay_args['startDelayUnit'] );\n\t\t\t\t\t$worldpay_args['startDate'] = date( \"Y-m-d\", strtotime(date( \"Y-m-d\" ) . ' + 1 day') );\n\t\t\t\t} else {\n\t\t\t\t\t$worldpay_args['amount'] = $order->order_total - get_post_meta( $subscription_id, '_order_total', TRUE );\n\t\t\t\t}\n\n\t\t\t\t// Increase the number of payments by 1 since we now have a 1 day free trial\n\t\t\t\t$worldpay_args['noOfPayments'] = $noOfPayments + 1;\n\n\t\t\t}\n\n\t\t\tif ( $noOfPayments === 1 ) {\n\n\t\t\t} else {\n\t\t\t\t$worldpay_args['intervalMult'] = $intervalMult;\n\t\t\t\t$worldpay_args['intervalUnit'] = $subscription_period;\t\n\t\t\t}\n\n\t\t\t$worldpay_args['normalAmount'] = get_post_meta( $subscription_id, '_order_total', TRUE );\n\n/*\n\t\t\tfuturePayType\n\t\t\tstartDate\n\t\t\tstartDelayUnit\n\t\t\tstartDelayMult\n\t\t\n\t\t\tintervalUnit\n\t\t\tintervalMult\n\t\t\tinitialAmount\n\t\t\tnormalAmount\n\t\t\toption\n*/\n\n\t\t\t$worldpay_args['intervalMult'] = $intervalMult;\n\t\t\t$worldpay_args['intervalUnit'] = $subscription_period;\n\t\t\t// $worldpay_args['noOfPayments'] = $noOfPayments;\n\n\t\t\t$debugger = array(\n\t\t\t\t'_billing_period' \t\t => $_billing_period,\n\t\t\t\t'_trial_period' \t\t => $_trial_period,\n\t\t\t\t'_schedule_trial_end' \t => $_schedule_trial_end,\n\t\t\t\t'_schedule_next_payment' => $_schedule_next_payment,\n\t\t\t\t'_schedule_end' \t\t => $_schedule_end,\n\t\t\t\t'noOfPayments' \t\t\t => $worldpay_args['noOfPayments'],\n\t\t\t);\n\t\t\t\n\t\t} // if( WC_Subscriptions_Order::get_subscription_trial_length( $order ) == '0' && WC_Subscriptions_Order::get_subscription_length( $order ) == '1' )\n\n\t\treturn $worldpay_args;\n\n\t}", "public function getPaymentUrl($id_order)\n {\n \n $x_fp_timestamp = time();\n $order = new Order($id_order);\n $cart = new Cart($order->id_cart);\n \n $currency = new Currency($order->id_currency);\n $order_id = $order->id;\n $description = $this->l('Payment order ') . ' №' . $order_id;\n $paysto_merchant_id = ConfPPM::getConf('paysto_merchant_id');\n $x_relay_url = _PS_BASE_URL_.__PS_BASE_URI__.'module/paysto/result';\n \n $order_amount = number_format(($order->total_products_wt + $order->total_shipping_tax_incl), 2, '.', '');\n \n // Not right RUR for rubles iso_code = RUB\n $iso_code = $currency->iso_code;\n if ($iso_code == 'RUR') {\n $iso_code = 'RUB';\n }\n \n $address = new Address($cart->id_address_delivery);\n $customer = new Customer($order->id_customer);\n \n $products = $cart->getProducts(true);\n \n foreach ($products as &$product) {\n $price_item_with_tax = Product::getPriceStatic(\n $product['id_product'],\n true,\n $product['id_product_attribute']\n );\n $price_item_with_tax = number_format(\n $price_item_with_tax,\n 2,\n '.',\n ''\n );\n \n $product['price_item_with_tax'] = $price_item_with_tax;\n \n \n if (!ConfPPM::getConf('disable_tax_shop')) {\n if (Configuration::get('PS_TAX')) {\n $rate = $product['rate'];\n switch ($rate) {\n case 10:\n $product['tax_value'] = 'Y';\n break;\n case 18:\n $product['tax_value'] = 'Y';\n break;\n case 20:\n $product['tax_value'] = 'Y';\n break;\n default:\n $product['tax_value'] = 'N';\n }\n } else {\n $product['tax_value'] = 'N';\n }\n } else {\n $product['tax_value'] = $this->getProductTax($product['id_product']);\n }\n }\n \n $params = [\n 'x_description' => $description,\n 'x_login' => $paysto_merchant_id,\n 'x_amount' => $order_amount,\n 'x_email' => $customer->email,\n 'x_currency_code' => $iso_code,\n 'x_fp_sequence' => $order_id,\n 'x_fp_timestamp' => $x_fp_timestamp,\n 'x_fp_hash' => $this->get_x_fp_hash($paysto_merchant_id, $order_id, $x_fp_timestamp,\n $order_amount, $iso_code),\n 'x_invoice_num' => $order_id,\n 'x_relay_response' => \"TRUE\",\n 'x_relay_url' => $x_relay_url\n ];\n \n $params['x_line_item'] = '';\n \n if (is_array($products) && count($products)) {\n $tax_value_shipping = ConfPPM::getConf('tax_delivery');\n $products = $cart->getProducts(true);\n foreach ($products as $pos => $product) {\n if (!ConfPPM::getConf('disable_tax_shop')) {\n $carrier = new Carrier((int)$cart->id_carrier);\n \n $tax_value = 'no_vat';\n if (Configuration::get('PS_TAX')) {\n $rate = $carrier->getTaxesRate($address);\n switch ($rate) {\n case 10:\n $tax_value = 'Y';\n break;\n case 18:\n $tax_value = 'Y';\n break;\n case 20:\n $tax_value = 'Y';\n break;\n default:\n $tax_value = 'N';\n }\n }\n } else {\n $tax_value = ConfPPM::getConf('tax_delivery');\n }\n \n $lineArr = array();\n $lineArr[] = '№' . $pos . \" \";\n $lineArr[] = substr($product['id_product'], 0, 30);\n $lineArr[] = substr($product['name'], 0, 254);\n $lineArr[] = substr($product['cart_quantity'], 0, 254);\n $lineArr[] = number_format($product['price_wt'], 2, '.', '');\n $lineArr[] = $tax_value;\n $params['x_line_item'] .= implode('<|>', $lineArr) . \"0<|>\\n\";\n }\n \n if ($order->total_shipping_tax_incl) {\n $pos++;\n $lineArr = array();\n $lineArr[] = '№' . $pos . \" \";\n $lineArr[] =$this->l('Shipping');\n $lineArr[] = $this->l('Shipping') .' '. $order_id;\n $lineArr[] = 1;\n $lineArr[] =number_format($order->total_shipping_tax_incl, 2,\n '.', '');\n $lineArr[] = $tax_value_shipping;\n $params['x_line_item'] .= implode('<|>', $lineArr) . \"0<|>\\n\";\n }\n }\n \n return ['url' => $this->url, 'params' => $params];\n \n }", "public function get($id){\n $product=Product::find($id);\n return $product;\n }", "function getPurchase($id_purchase) {\n $data = $this->db\n ->join('division','division.id_division=purchase.id_division','left')\n ->where('purchase.id_purchase',$id_purchase)\n ->where('purchase.is_delete',0)\n ->limit(1)\n ->get('purchase')\n ->row_array();\n if ($data) {\n $product = $this->db\n ->join('item','item.id_item=purchase_production.id_item','left')\n ->where('purchase_production.id_purchase',$data['id_purchase'])\n ->get('purchase_production')\n ->result_array();\n $data['production'] = $product;\n }\n \n return $data;\n }", "public function getSubscription( $subscriptionId )\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT subscription_id, issue_id, user_id, stamp_id'\n . ' FROM {subscriptions}'\n . ' WHERE subscription_id = %d AND user_id = %d';\n\n if ( !( $subscription = $this->connection->queryRow( $query, $subscriptionId, $principal->getUserId() ) ) )\n throw new System_Api_Error( System_Api_Error::UnknownSubscription );\n\n return $subscription;\n }", "public function show($id)\n {\n return ProductPurchaseLog::where('id_product', $id)->get();\n }", "public static function paidOrderFilter(Request $request, $order)\n {\n $subscriber = User::findOrFail( $order->subscriber_id);\n $subscription = Subscription::where('subscription_id', $order->subscription_id)->firstOrFail();\n\n // validate amount\n /*if ($r->mc_gross != $subscription->subscription_price) {\n \\Log::error('On subscription #' . $subscription->id . ' received amount was ' . $r->mc_gross . ' while the cost of subscription is ' . $subscription->subscription_price);\n exit;\n }*/\n\n // update expires\n $subscription->subscription_expires = now()->addMonths(1);\n $subscription->status = 'Active';\n $subscription->save();\n\n // notify creator on site & email\n $creator = $subscription->creator;\n $creator->notify(new NewSubscriberNotification($subscriber));\n\n // update creator balance\n $creator->balance += $subscription->creator_amount;\n $creator->save();\n\n // create invoice to be able to have stats in admin\n $i = new Invoice;\n $i->invoice_id = $subscription->subscription_id;\n $i->user_id = $subscription->subscriber_id;\n $i->subscription_id = $subscription->id;\n $i->amount = $subscription->subscription_price;\n $i->payment_status = 'Paid';\n $i->invoice_url = '#';\n $i->save();\n\n //YourOrderController::saveOrderAsPaid($order);\n\n // Return TRUE if the order is saved as \"paid\" in the database or FALSE if some error occurs.\n // If you return FALSE, then you can repeat the failed paid requests on the unitpay website manually.\n return true;\n }", "function ciniki_customers_productGet($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'product_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Membership Products'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'checkAccess');\n $rc = ciniki_customers_checkAccess($ciniki, $args['tnid'], 'ciniki.customers.productGet');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Load tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'dateFormat');\n $date_format = ciniki_users_dateFormat($ciniki, 'php');\n\n //\n // Return default for new Membership Products\n //\n if( $args['product_id'] == 0 ) {\n $product = array('id'=>0,\n 'name'=>'',\n 'short_name'=>'',\n 'code'=>'',\n 'permalink'=>'',\n 'type'=>'10',\n 'status'=>'10',\n 'flags'=>'0',\n 'months'=>12,\n 'sequence'=>'1',\n 'primary_image_id'=>'',\n 'synopsis'=>'',\n 'description'=>'',\n 'unit_amount'=>'',\n );\n }\n\n //\n // Get the details for an existing Membership Products\n //\n else {\n $strsql = \"SELECT ciniki_customer_products.id, \"\n . \"ciniki_customer_products.name, \"\n . \"ciniki_customer_products.short_name, \"\n . \"ciniki_customer_products.code, \"\n . \"ciniki_customer_products.permalink, \"\n . \"ciniki_customer_products.type, \"\n . \"ciniki_customer_products.status, \"\n . \"ciniki_customer_products.flags, \"\n . \"ciniki_customer_products.months, \"\n . \"ciniki_customer_products.sequence, \"\n . \"ciniki_customer_products.primary_image_id, \"\n . \"ciniki_customer_products.synopsis, \"\n . \"ciniki_customer_products.description, \"\n . \"ciniki_customer_products.unit_amount \"\n . \"FROM ciniki_customer_products \"\n . \"WHERE ciniki_customer_products.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_customer_products.id = '\" . ciniki_core_dbQuote($ciniki, $args['product_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.customers', array(\n array('container'=>'products', 'fname'=>'id', \n 'fields'=>array('name', 'short_name', 'code', 'permalink', 'type', 'status', 'flags', 'months', 'sequence',\n 'primary_image_id', 'synopsis', 'description', 'unit_amount',\n ),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.403', 'msg'=>'Membership Products not found', 'err'=>$rc['err']));\n }\n if( !isset($rc['products'][0]) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.418', 'msg'=>'Unable to find Membership Products'));\n }\n $product = $rc['products'][0];\n $product['unit_amount'] = '$' . number_format($product['unit_amount'], 2);\n }\n\n return array('stat'=>'ok', 'product'=>$product);\n}", "function tx_commerce_product() {\n\t\tif ((func_num_args()>0) && (func_num_args()<=2)){\n\t\t\t$uid = func_get_arg(0); \n\t\t\tif (func_num_args()==2){\n\t\t\t\t$lang_uid=func_get_arg(1);\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$lang_uid=0;\n\t\t\t}\n\t\t\treturn $this->init($uid,$lang_uid);\n\t\t}\n\t}", "public function getSubscription($subscriptionId)\n {\n $url = $this->host . '/v1/billing/subscriptions/' . $subscriptionId;\n $authorization = 'Authorization: Bearer ' . $this->clientCredentials->access_token;\n\n $curl = curl_init();\n try {\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json;charset=UTF-8', $authorization));\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_HTTPGET, 1);\n } catch (\\Exception $e) {\n $this->getLogger()->log(\\TYPO3\\CMS\\Core\\Log\\LogLevel::ERROR, sprintf('An error occurred while trying to make following api call \"%s\". Please check the configuration. Error: %s', $url, $e->getMessage()));\n }\n\n\n $this->cUrl = $curl;\n\n return $this->sendRequest();\n //===\n }", "public function getCatelogsByProductId($shop_product_id)\n {\n\n $shop_elements = $this->shop_elements\n ->where('shop_product_id', $shop_product_id);\n\n\n /* if ($shop_elements == null)\n return false;\n $shop_element_ids = array_map(function ($a) {\n return $a->id;\n }, $shop_elements);*/\n\n if ($shop_elements == null)\n return false;\n $shop_element_ids = $shop_elements->map(function ($a) {\n return $a->id;\n });\n\n\n /* $shop_catalogs = ShopCatalog::find()\n ->where([\n 'shop_element_id' => $shop_element_ids\n ])->all();*/\n\n\n $shop_catalogs = $this->shop_catalogs\n ->whereIn('shop_element_id', $shop_element_ids);\n\n // vdd($shop_catalogs);\n return $shop_catalogs;\n }", "public function getSubscription()\n {\n return $this->subscription;\n }", "public function getById($id)\n {\n return $this->product->find($id);\n \n }", "protected static function get_subscription_product_meta( $subscription_id, $meta ) {\n\n\t\t$subscription = wcs_get_subscription( $subscription_id );\n\t\tforeach( $subscription->get_items() as $item ) {\n \t\t\treturn get_post_meta( $item['product_id'],$meta, TRUE );\n\t\t}\n\n\t}", "public function getProductById($id){\n $query = $this->db->get_where('product',array('id' => $id));\n return $query->row(); \n }", "public function listSubscriptions($request);", "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function get($idUser = 0, $idProduct = 0)\n {\n //FROM `cart` JOIN products ON cart.id_product = products.id WHERE cart.id_user = 11\n\n // $sql = \"SELECT `$this->table`.*, products.id as `products_id`, products.name as `products_name`, products.price, products.price_sale, products.file \n // from `$this->table` JOIN `products` ON $this->table.id_product = products.id where `id_user` = $idUser\";\n $sql = \"SELECT * from `$this->table`\";\n if ($idUser != 0) {\n $sql = \"SELECT `$this->table`.*, `products`.`id` as `products_id`, `products`.`name` as `products_name`, `products`.`price`, `products`.`price_sale`, `products`.`file` \n from `$this->table` JOIN `products` ON `$this->table`.`id_product` = `products`.`id` where `id_user` = $idUser\";\n }\n if ($idProduct != 0) {\n $sql .= \" AND `id_product`=$idProduct\";\n }\n // dd($sql);\n return $this->query($sql);\n }", "function getProduct($params = array()){\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::GET , '/multivendor/product/id/'.(int)$params['id'].'.json'),true);\n\t}" ]
[ "0.6971286", "0.6262788", "0.6170137", "0.6138212", "0.61123526", "0.60727227", "0.5949016", "0.59223175", "0.58436775", "0.58203864", "0.5770421", "0.5740939", "0.5735021", "0.57200074", "0.5719754", "0.5700169", "0.56704336", "0.56655544", "0.5649731", "0.56309545", "0.5626783", "0.5614822", "0.5610455", "0.5596599", "0.5591872", "0.5578425", "0.5539277", "0.55375874", "0.55134684", "0.5482285", "0.54732215", "0.54445463", "0.542747", "0.5423062", "0.54014605", "0.53986955", "0.53961176", "0.5386698", "0.5379503", "0.53751606", "0.53730786", "0.5360617", "0.5358542", "0.53547305", "0.53536695", "0.5349798", "0.53380543", "0.5332683", "0.5323513", "0.53181565", "0.53163266", "0.5305901", "0.5304346", "0.5300229", "0.5296462", "0.5292085", "0.5289021", "0.5282558", "0.52766097", "0.527419", "0.5270647", "0.5268838", "0.52629936", "0.5261593", "0.5252452", "0.5244913", "0.52404", "0.5236919", "0.52261925", "0.5219013", "0.52151823", "0.52063984", "0.52033764", "0.52023184", "0.52021664", "0.5196347", "0.51930195", "0.518224", "0.5173515", "0.5169655", "0.5166818", "0.5160627", "0.514931", "0.5141992", "0.5141511", "0.51405627", "0.51122797", "0.5112227", "0.51050115", "0.5104784", "0.5097031", "0.50963616", "0.509452", "0.50927716", "0.5087535", "0.50669026", "0.5064704", "0.50632894", "0.5062919", "0.5058954" ]
0.6532087
1
Get a Subscription from a User Membership
public function get_subscription_from_membership( $user_membership ) { $user_membership_id = is_object( $user_membership ) ? $user_membership->id : $user_membership; $subscription_key = $this->get_user_membership_subscription_key( (int) $user_membership_id ); if ( ! $subscription_key ) { return null; } $user_membership = wc_memberships_get_user_membership( $user_membership_id ); // It seems that the order has been deleted if ( false === get_post_status( $user_membership->get_order_id() ) ) { return null; } // It seems the subscription product has been removed from the order if ( ! WC_Subscriptions_Order::get_item_id_by_subscription_key( $subscription_key ) ) { return null; } return WC_Subscriptions_Manager::get_subscription( $subscription_key ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveSubscription() {\n // Adrian: Get user subscription details from the database\n /**$subscription = Subscription::where('user_id', $this->model->id)\n ->where('plan_id', $this->plan)\n ->first();**/\n\n $result = ChargeBee_Subscription::retrieve($this->user->subscription_id);\n\n return $result;\n }", "public function getUserSubscriptionWithId(int $userSubscriptionId);", "public function getSubscription($request);", "public function getSubscriptionWithId(int $subscriptionId);", "public function getSubscriptionById($id_subscription) {\n $this->db->where('ID_SUBSCRIPTION', $id_subscription);\n $query = $this->db->get($this->table);\n return $query->row();\n}", "public function subscription($userId)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->db->table(Config::get('throttle::tables.subscriptions'))\n\t\t\t\t->where('user_id', $userId)\n\t\t\t\t->where('is_active', '1')\n\t\t\t\t->select('id', 'user_id', 'plan_id', 'subscribed_at')\n\t\t\t\t->first();\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\tthrow new Exceptions\\InternalException;\n\t\t}\n\t}", "public function getSubscription()\n {\n return $this->subscription;\n }", "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === '[email protected]') {\n // check wallet\n $wallets = $this->mangopay->listWallets($member->Id);\n foreach ($wallets as $wallet) {\n if ($wallet->Balance->Amount > 10) {\n $this->createUserSubscription($member->Id, $wallet);\n return true;\n }\n }\n }\n }\n $page++;\n }\n\n return false;\n }", "public function subscription()\n {\n return $this->hasOne('App\\Subscription');\n }", "public function getSubscription()\n {\n $recruiter = RecruiterProfile::where(['user_id' => Auth::user()->id])->first();\n if ($recruiter['is_subscribed'] == config('constants.ZeroValue')) {\n $result = view('web.subscription', ['activeTab' => '4']);\n } else {\n $result = redirect('jobtemplates');\n }\n return $result;\n }", "function getSubscriptionId(){\n\n $isSubsId = $this->common_model->getsingle(USERS,array('userId'=>$this->session->userdata('userId')));\n\n return !empty($isSubsId) ? $isSubsId->bizSubscriptionId : FALSE;\n \n }", "public function GetSubscription()\n {\n \t$this->SetCulture();\n \t \n \t$rs = mysql_query(\"SELECT subscription_id, \" . $this->lang_name_field . \" FROM subscriptions WHERE subscription_id=\" . $this->subscription_id);\n \t \n \t$row = mysql_fetch_array($rs);\n \n \t$this->subscription_id\t\t= $row['subscription_id'];\n \t$this->subscription_name\t= $row[$this->lang_name_field];\n \t\n \n \tif (mysql_errno())\n \t{\n \t\treturn \"MySQL error \".mysql_errno().\": \".mysql_error().\"\\n<br>When executing:<br>\\n$rs\\n<br>\";\n \t}\n }", "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function subscription($id) {\n\n if (!isset($this->account_details['access_token'])) {\n throw new GoCardless_ClientException('Access token missing');\n }\n\n return GoCardless_Subscription::find_with_client($this, $id);\n\n }", "public function getSubscriptionByReference(string $subscription_reference): SubscriptionInterface;", "function subscriptions ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `subscription` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n }", "public function getSubscriptionId();", "public function getSubscription( $subscriptionId )\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT subscription_id, issue_id, user_id, stamp_id'\n . ' FROM {subscriptions}'\n . ' WHERE subscription_id = %d AND user_id = %d';\n\n if ( !( $subscription = $this->connection->queryRow( $query, $subscriptionId, $principal->getUserId() ) ) )\n throw new System_Api_Error( System_Api_Error::UnknownSubscription );\n\n return $subscription;\n }", "function &getSubscription($subscriptionId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT s.*, iss.*\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st,\n\t\t\tinstitutional_subscriptions iss\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = iss.subscription_id\n\t\t\tAND s.subscription_id = ?',\n\t\t\t$subscriptionId\n\t\t);\n\n\t\t$returner = null;\n\t\tif ($result->RecordCount() != 0) {\n\t\t\t$returner =& $this->_returnSubscriptionFromRow($result->GetRowAssoc(false));\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}", "public function getSubscriber()\n {\n return UserPeer::retrieveByPk($this->getSubscriberId());\n }", "public function getSubscription()\n {\n /** @var \\ParadoxLabs\\Subscriptions\\Api\\Data\\SubscriptionInterface $subscription */\n $subscription = $this->registry->registry('current_subscription');\n\n return $subscription;\n }", "public function subscription($subscription = 'default')\n {\n return $this->subscriptions->sortByDesc(function ($value) {\n return $value->created_at->getTimestamp();\n })->first(function ($value) use ($subscription) {\n return $value->name === $subscription;\n });\n }", "public function subscriptions()\n {\n return Subscription::byCustomer($this->id);\n }", "public function index()\n {\n $user_id = Auth::id();\n $subscribes = User::findOrFail($user_id)->subscriptions;\n // return $subscribes;\n return view('profile.subscription')->with('subscribes', $subscribes);\n }", "public function getSubscriptionId()\n\t{\n\t\treturn $this->_subscriptionId;\n\t}", "public function getSubscriptionDetails($request);", "public function getSubscriptions();", "public function subscribeBy($userId = null);", "public function subscribe_member( $user_id, $group_id, $subsribe_mode ) {\n $m = $this->call( \"membershipSubscribe\", [\n \"userId\" => $user_id,\n \"groupId\" => $group_id,\n \"subscriptionMode\" => $subsribe_mode ] );\n return ( isset( $m ) && $m != false ) ? true : false;\n }", "public function getActiveSchoolSubscription()\n {\n $subscription = School::find(ActiveSession::school());\n return $subscription;\n }", "public function getSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id = %1d AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function getSubscriptionDetails()\n {\n try {\n $subscriptions = $this->fetchSubscription(Auth::user()->id);\n $this->response['success'] = true;\n $this->response['data'] = $subscriptions;\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n $this->response['success'] = false;\n $this->response['message'] = $e->getMessage();\n }\n return $this->response;\n }", "public function getSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n // if the subscription had proberties\n if (0 < count($subscriptionResourceProperties)) {\n $modelIri = $this->_selectedModelInstance->getModelIri();\n $subscriptionResourceProperties = $subscriptionResourceProperties[$modelIri];\n\n // init subscriber data array an save the proberties plain\n $data = array();\n $data['resourceProperties'] = $subscriptionResourceProperties;\n // fill the subscriber data array with the subscription resource content\n foreach ($this->_propertyMatching as $dataKey => $propertyKey) {\n // get property content\n $propertyUri = $this->_subscriptionConfig->get($propertyKey);\n $propertyArray = isset($subscriptionResourceProperties[$propertyUri]) ?\n $subscriptionResourceProperties[$propertyUri] :\n null;\n\n // if property content exists write it to the subscriber data array\n if (isset($propertyArray) && \"\" != $propertyArray[0]['content']) {\n $data[$dataKey] = $propertyArray[0]['content'];\n } else {\n $data[$dataKey] = null;\n }\n }\n return $data;\n }\n return false;\n }", "public function get_subscriptions_from_uid($uid) {\r\n $query = '\r\n -- get sections where the user is subcribed\r\n SELECT user_subscr.sid\r\n FROM user_subscr INNER JOIN user ON user.uid=user_subscr.uid\r\n WHERE user.uid=:uid;\r\n ';\r\n return $this->dbh->fetch_list($query, [ ':uid' => $uid ]);\r\n }", "public function getSubscriptions() {\n\t\t$urlSubscriptions = \"http://www.reddit.com/reddits/mine.json\";\n\t\treturn $this->runCurl ( $urlSubscriptions );\n\t}", "public function retrieve_subscription( $subscription_id ) {\n\t\t// First check cache.\n\t\t$subscription = wp_cache_get( 'stripe_subscription_' . $subscription_id, 'membership-stripe' );\n\n\t\t// Get from API.\n\t\tif ( empty( $subscription ) ) {\n\t\t\ttry {\n\t\t\t\t$subscription = StripeCheckoutSubscription::retrieve( $subscription_id );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$subscription = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $subscription;\n\t}", "function &getSubscriptionsByUser($userId, $rangeInfo = null) {\n\t\t$result =& $this->retrieveRange(\n\t\t\t'SELECT s.*, iss.*\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st,\n\t\t\tinstitutional_subscriptions iss\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = iss.subscription_id\n\t\t\tAND s.user_id = ?',\n\t\t\t$userId,\n\t\t\t$rangeInfo\n\t\t);\n\n\t\t$returner = new DAOResultFactory($result, $this, '_returnSubscriptionFromRow');\n\n\t\treturn $returner;\n\t}", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "function fanwood_dim_subscription () {\n\tif ( !bbp_is_subscriptions_active() )\n\t\treturn;\n\n\t$user_id = bbp_get_current_user_id();\n\t$id = intval( $_POST['id'] );\n\n\tif ( !current_user_can( 'edit_user', $user_id ) )\n\t\tdie( '-1' );\n\n\tif ( !$topic = bbp_get_topic( $id ) )\n\t\tdie( '0' );\n\n\tcheck_ajax_referer( \"toggle-subscription_$topic->ID\" );\n\n\tif ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {\n\t\tif ( bbp_remove_user_subscription( $user_id, $topic->ID ) )\n\t\t\tdie( '1' );\n\t} else {\n\t\tif ( bbp_add_user_subscription( $user_id, $topic->ID ) )\n\t\t\tdie( '1' );\n\t}\n\n\tdie( '0' );\n}", "private function subscribeUser()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['subscribed_to']) || $request['subscribed_to']==\"\" )\n throw_error_msg(\"subscribed to not provided\");\n\n if( !is_numeric($request['subscribed_to']) )\n throw_error_msg(\"invalid subscribed to\");\n\n global $userquery;\n $userquery->subscribe_user($request['subscribed_to']);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'subscribed successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public static function getActiveForThisApp() : Subscription\n {\n return self::getByDefaultCompany(Di::getDefault()->get('userData'));\n }", "public function asStripeSubscription() : StripeSubscription\n {\n $entity = $this->getSubscriberEntity();\n\n return $entity->getStripeCustomerInfo()->subscriptions->retrieve($this->stripe_id);\n }", "public function getSubscriptions($options = NULL, $customClient = NULL) {\n\t\treturn Bf_Subscription::getByRatePlanID($this->id, $options, $customClient);\n\t}", "public function ajax_subscription() {\n\n\t\t// Bail if subscriptions are not active\n\t\tif ( ! bbp_is_subscriptions_active() ) {\n\t\t\tbbp_ajax_response( false, __( 'Subscriptions are no longer active.', 'bbpress' ), 300 );\n\t\t}\n\n\t\t// Bail if user is not logged in\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\tbbp_ajax_response( false, __( 'Please login to subscribe to this topic.', 'bbpress' ), 301 );\n\t\t}\n\n\t\t// Get user and topic data\n\t\t$user_id = bbp_get_current_user_id();\n\t\t$id = intval( $_POST['id'] );\n\n\t\t// Bail if user cannot add favorites for this user\n\t\tif ( ! current_user_can( 'edit_user', $user_id ) ) {\n\t\t\tbbp_ajax_response( false, __( 'You do not have permission to do this.', 'bbpress' ), 302 );\n\t\t}\n\n\t\t// Get the topic\n\t\t$topic = bbp_get_topic( $id );\n\n\t\t// Bail if topic cannot be found\n\t\tif ( empty( $topic ) ) {\n\t\t\tbbp_ajax_response( false, __( 'The topic could not be found.', 'bbpress' ), 303 );\n\t\t}\n\n\t\t// Bail if user did not take this action\n\t\tif ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toggle-subscription_' . $topic->ID ) ) {\n\t\t\tbbp_ajax_response( false, __( 'Are you sure you meant to do that?', 'bbpress' ), 304 );\n\t\t}\n\n\t\t// Take action\n\t\t$status = bbp_is_user_subscribed( $user_id, $topic->ID ) ? bbp_remove_user_subscription( $user_id, $topic->ID ) : bbp_add_user_subscription( $user_id, $topic->ID );\n\n\t\t// Bail if action failed\n\t\tif ( empty( $status ) ) {\n\t\t\tbbp_ajax_response( false, __( 'The request was unsuccessful. Please try again.', 'bbpress' ), 305 );\n\t\t}\n\n\t\t// Put subscription attributes in convenient array\n\t\t$attrs = array(\n\t\t\t'topic_id' => $topic->ID,\n\t\t\t'user_id' => $user_id\n\t\t);\n\n\t\t// Action succeeded\n\t\tbbp_ajax_response( true, bbp_get_user_subscribe_link( $attrs, $user_id, false ), 200 );\n\t}", "public function subscription($name = 'default')\n {\n return $this->subscriptions->sortByDesc(function (Subscription $subscription) {\n return $subscription->created_at->getTimestamp();\n })->first(function (Subscription $subscription) use ($name) {\n return $subscription->name === $name;\n });\n }", "public function subscribeService()\n\t{\n\t\t$serviceid = $this->db->select('*')\n\t\t\t\t\t\t\t->get('subscriber');\n\t\treturn $serviceid->result();\n\t}", "public function getCurrentSubscription($companyId);", "public function get_subscription( $customer, $membership ) {\n\t\t$plan_id = MS_Gateway_StripeCheckout::get_the_id(\n\t\t\t$membership->id,\n\t\t\t'plan'\n\t\t);\n\n\t\t/*\n\t\t * Check all subscriptions of the customer and find the subscription\n\t\t * for the specified membership.\n\t\t */\n\t\t$last_checked = false;\n\t\t$has_more = false;\n\t\t$subscription = false;\n\n\t\tdo {\n\t\t\t$args = array();\n\t\t\tif ( $last_checked ) {\n\t\t\t\t$args['starting_after'] = $last_checked;\n\t\t\t}\n\t\t\t$active_subs = $customer->subscriptions->all( $args );\n\t\t\t$has_more = $active_subs->has_more;\n\n\t\t\tforeach ( $active_subs->data as $sub ) {\n\t\t\t\tif ( $sub->plan->id == $plan_id ) {\n\t\t\t\t\t$subscription = $sub;\n\t\t\t\t\t$has_more = false;\n\t\t\t\t\tbreak 2;\n\t\t\t\t}\n\t\t\t\t$last_checked = $sub->id;\n\t\t\t}\n\t\t} while ( $has_more );\n\n\t\treturn $subscription;\n\t}", "function _culturefeed_mailing_check_user_subscription($user_id, $mailing_id) {\n try {\n $subscriptions = DrupalCultureFeed::getMailingSubscriptions($user_id)->objects;\n $newsletters = array();\n foreach ($subscriptions as $subscription) {\n $newsletters[$subscription->id] = $subscription->id;\n }\n return in_array($mailing_id, $newsletters);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_mailing', $e);\n return FALSE;\n }\n}", "public function get(string $id): Subscription\n {\n $response = $this->performApiCall(\n 'GET',\n \"subscriptions/{$id}\"\n );\n\n return new Subscription(collect($response));\n }", "function &getSubscription($subscriptionId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function getActiveSubscriptionsForUserId(int $userId);", "static function getMembershipPlan($sub_id){\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query->select('plan_id')->from('#__osmembership_subscribers')->where('id = \"'.$sub_id.'\"');\n $db->setQuery($query);\n return $db->loadResult();\n }", "public function subscription()\n {\n return $this->belongsToMany('App\\SubscriptionList');\n }", "public function subscriptions()\n {\n return $this->hasMany('DragonLancers\\Subscription');\n }", "function createObject() {\n\t\treturn new InstitutionalSubscription();\n\t}", "public function subscriptions()\n {\n return $this->hasMany(Subscription::class);\n }", "public function subscriptions()\n {\n return $this->hasMany(Subscription::class);\n }", "public function listSubscriptions($request);", "public function get_memberships_from_subscription( $subscription_key ) {\n\n\t\t$user_memberships = array();\n\n\t\t$user_membership_ids = new WP_Query( array(\n\t\t\t'post_type' => 'wc_user_membership',\n\t\t\t'post_status' => array_keys( wc_memberships_get_user_membership_statuses() ),\n\t\t\t'fields' => 'ids',\n\t\t\t'nopaging' => true,\n\t\t\t'suppress_filters' => 1,\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => '_subscription_key',\n\t\t\t\t\t'value' => $subscription_key,\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\n\t\tif ( ! empty( $user_membership_ids->posts ) ) {\n\n\t\t\t$user_memberships = array();\n\n\t\t\tforeach ( $user_membership_ids->posts as $user_membership_id ) {\n\t\t\t\t$user_memberships[] = wc_memberships_get_user_membership( $user_membership_id );\n\t\t\t}\n\t\t}\n\n\t\treturn $user_memberships;\n\t}", "function register_subscription ($user_id, $subscription) {\n global $sql;\n if (empty($subscription['note']) || $subscription['note']['status'] !== 'COMPLETED') {\n return false;\n }\n $result = false;\n $current = $sql->sql_select_array_query(\"SELECT * FROM `subscription` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n if (!empty($current)) {\n if($subscription['subscription_type'] <= $current[0]['subscription_type']) {\n $days_remaining = strtotime($current[0]['end_date']) > time() ? date_diff(date_create($current[0]['end_date']), date_create(date('Y-m-d H:i:s')))->format('%a') : 0;\n $end_date = $subscription['end_date'];\n $subscription['end_date'] = date('Y-m-d H:i:s', strtotime(\"{$end_date} + {$days_remaining} days\"));\n }\n $result = $sql->sql_update('subscription', $subscription, ['user_id' => $user_id]);\n } else {\n $result = $sql->sql_insert('subscription', $subscription);\n }\n $user = $sql->sql_select_array_query(\"SELECT email FROM `user` WHERE id = '{$user_id}' LIMIT 1\");\n if (count($user) === 1) {\n $this->send_email(\n EMAIL['email'], \n $user[0]['email'], \n 'Thank you for subscribing on IPTV-Tools.com', \n $this->subscription_body(date('j M Y', strtotime($subscription['end_date'])))\n );\n }\n return $result;\n }", "public function subscription($name)\n {\n return $this->subscriptionFactory($name);\n }", "public function show(SubscribedUser $subscribedUser)\n {\n //\n }", "public function getSubscriptions($userId = null, $sessionId = null)\n\t{\n\t\t// no user_id provided, get one from the auth service\n\t\tif (!isset($user_id)) {\n\t\t\tif ($auth = Zend_Auth::getInstance()->getIdentity()) {\n\t\t\t\t$userId = ($userId) ? $userId : $auth->user_id;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// no session id provided, get all sessions user is subscribed to\n\t\tif (!isset($sessionId)) {\n\t\t\treturn $this->getAdapter()->fetchCol(\n\t\t\t\t$this->select()\n\t\t\t\t->from($this->_name, 'session_id')\n\t\t\t\t->where('user_id = ?', $userId)\n\t\t\t);\n\t\t}\n\n\t\t// session_id provided, get all users who are subscribed to specific session\n\t\treturn $this->getAdapter()->fetchAll(\n\t\t\t\"select u.fname, u.lname, u.email from subscribers_sessions ss left join users u on (u.user_id = ss.user_id)\n\t\t\twhere ss.session_id=\".$sessionId\n\t\t);\n\t}", "public function getSubscriptionId() {\n\t\treturn $this->container['subscription_id'];\n\t}", "function listActiveSubscriptions(int $pageSize = 50, int $offset = 0){\nreturn $this->get(\"/subscription?pageSize={$pageSize}&offset={$offset}\");\n}", "public function subscribe()\n {\n $url = 'https://api.instagram.com/v1/subscriptions/';\n $params = [\n 'client_id' => $this->getClientId(),\n 'client_secret' => $this->getClientSecret(),\n 'object' => 'user',\n 'aspect' => 'media',\n 'verify_token' => '592180',\n 'callback_url' => $this->_url->sessionUrlVar(\n $this->_url->getUrl($this->subscribe_redirect)\n )\n ];\n $this->_httpRequest($url, 'POST', $params);\n }", "public function action_subscriptions()\n\t{\n\t\tglobal $context, $txt;\n\n\t\t// Load the paid template anyway.\n\t\ttheme()->getTemplates()->load('ManagePaid');\n\t\tTxt::load('ManagePaid');\n\n\t\t$memID = currentMemberID();\n\t\t$context['member']['id'] = $memID;\n\n\t\t// Load all of the subscriptions in the system (loads in to $context)\n\t\trequire_once(SUBSDIR . '/PaidSubscriptions.subs.php');\n\t\tloadSubscriptions();\n\n\t\t// Remove any invalid ones, ones not properly set up\n\t\t$this->_remove_invalid();\n\n\t\t// Work out what payment gateways are enabled.\n\t\t$this->_gateways = loadPaymentGateways();\n\t\tforeach ($this->_gateways as $id => $gateway)\n\t\t{\n\t\t\t$this->_gateways[$id] = new $gateway['display_class']();\n\n\t\t\tif (!$this->_gateways[$id]->gatewayEnabled())\n\t\t\t{\n\t\t\t\tunset($this->_gateways[$id]);\n\t\t\t}\n\t\t}\n\n\t\t// No gateways yet, no way to pay then, blame the admin !\n\t\tif (empty($this->_gateways))\n\t\t{\n\t\t\tthrow new Exception($txt['paid_admin_not_setup_gateway']);\n\t\t}\n\n\t\t// Get the members current subscriptions.\n\t\t$context['current'] = loadMemberSubscriptions($memID, $context['subscriptions']);\n\n\t\t// Find the active subscribed ones\n\t\tforeach ($context['current'] as $id => $current)\n\t\t{\n\t\t\tif ($current['status'] == 1)\n\t\t\t{\n\t\t\t\t$context['subscriptions'][$id]['subscribed'] = true;\n\t\t\t}\n\t\t}\n\n\t\t// Simple \"done\"?\n\t\tif (isset($this->_req->query->done))\n\t\t{\n\t\t\t$this->_orderDone($memID);\n\t\t}\n\t\t// They have selected a subscription to order.\n\t\telseif (isset($this->_req->query->confirm, $this->_req->post->sub_id) && is_array($this->_req->post->sub_id))\n\t\t{\n\t\t\t$this->_confirmOrder($memID);\n\t\t}\n\t\t// Show the users whats available and what they have\n\t\telse\n\t\t{\n\t\t\t$context['sub_template'] = 'user_subscription';\n\t\t}\n\t}", "function subscriptionsEndpointContent()\n{\n $user = wp_get_current_user();\n if (!$user) {\n throw new RmeException(sprintf(\"[%s::%s] User is null\", __CLASS__, __FUNCTION__));\n }\n\n $factory = new SubsPageFactory();\n $factory->showSubscriptionsTable($user);\n}", "public function profileSettingsAction()\r\n {\r\n $authenticatedUser = $this->getAuthenticatedUser();\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $smsSubcription = $em->getRepository('YilinkerCoreBundle:SmsNewsletterSubscription')\r\n ->findOneBy(array(\r\n 'userId' => $authenticatedUser->getUserId(),\r\n 'isActive' => true,\r\n ));\r\n\r\n return $this->render('YilinkerFrontendBundle:Profile:profile_settings.html.twig', array(\r\n 'isSubscribed' => $smsSubcription !== null,\r\n ));\r\n }", "function bizSubsDetail($userId){\n\n $getSubsId = $this->common_model->getsingle(USERS,array('userId'=>$userId));\n if($getSubsId){\n return $getSubsId->bizSubscriptionId;\n }else{\n return FALSE;\n }\n\n }", "private function fetchSubscription($userId)\n {\n try {\n $customerId = RecruiterProfile::where(['user_id' => $userId])->pluck('customer_id');\n $customerWithSubscription = $this->fetchUser($customerId[0]);\n if ($customerWithSubscription['success'] == false) {\n $this->response['success'] = false;\n $this->response['data'] = null;\n $this->response['message'] = trans('messages.no_customer');\n } else {\n $this->response['success'] = true;\n $this->response['data'] = $customerWithSubscription;\n $this->response['message'] = trans('messages.customer_fetched');\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n $this->response['success'] = false;\n $this->response['message'] = $e->getMessage();\n }\n return $this->response;\n }", "public function getSubscriptionsByIdPerson($id_person){\n $this->db->where('ID_PERSON', $id_person);\n $this->db->order_by(\"DATE_SUBSCRIPTION\",\"DESC\");\n $query = $this->db->get($this->table);\n if ($query->num_rows() > 0) {\n return $query->result();\n }else{\n return false;\n }\n}", "public function subscriptionAction()\n {\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n\n // disable layout for Ajax requests\n $this->_helper->layout()->disableLayout();\n\n // get the subscription storage\n $subscriptionStorage = new PubSubHubbub_Subscription(\n $this->_subscriptionModelInstance,\n $this->_privateConfig->get('subscriptions')\n );\n\n // get the POST parameter\n $hubUrl = $this->getParam('hubUrl');\n $topicUrl = $this->getParam('topicUrl');\n $callBackUrl = $this->getParam('callBackUrl');\n $subscriptionMode = $this->getParam('subscriptionMode');\n $verifyMode = $this->getParam('verifyMode');\n $sourceResource = $this->getParam('sourceResource');\n\n // get the current user and model URI\n $subscribingUserUri = $this->_owApp->getUser()->getUri();\n $subscriptionModelIri = $this->_owApp->selectedModel->getModelIri();\n\n // check if required urls are filled\n if (\"\" != $hubUrl && \"\" != $topicUrl && \"\" != $callBackUrl) {\n // get the Subscriber and hand over the parameter\n $subscriber = new PubSubHubbub_Subscriber;\n $subscriber->setStorage($subscriptionStorage);\n $subscriber->addHubUrl($hubUrl);\n $subscriber->setTopicUrl($topicUrl);\n $subscriber->setCallbackUrl($callBackUrl);\n $subscriber->setPreferredVerificationMode($verifyMode);\n\n /**\n * start the subscribing process\n */\n if (\"subscribe\" == $subscriptionMode) {\n $subscriber->subscribeAll();\n if (\"\" != $sourceResource) {\n $subscriber->addSourceResourceUri($sourceResource);\n }\n if (\"\" != $subscribingUserUri) {\n $subscriber->addSubscribingUserUri($subscribingUserUri);\n }\n\n // add model iri to the subscription\n $subscriber->addModelIri($subscriptionModelIri);\n\n /**\n * start the unsubscribing process\n */\n } else if (\"unsubscribe\" == $subscriptionMode) {\n $subscriber->unsubscribeAll();\n\n /**\n * if no 'subscriptionMode' were given\n */\n } else {\n echo 'FAILURE: missing parameter';\n $this->_response->setHttpResponseCode(500);\n return;\n }\n\n // check the subscriber, if the subscribtion was successful, else output the errors\n if ($subscriber->isSuccess() && 0 == count($subscriber->getErrors())) {\n $this->_response->setBody('')->setHttpResponseCode(200);\n } else {\n foreach ($subscriber->getErrors() as $error) {\n $this->_response->appendBody($error);\n }\n $this->_response->setHttpResponseCode(404);\n }\n\n // if the required urls are wrong or empty\n } else {\n echo 'FAILURE: wrong Urls';\n }\n }", "public function subscribed( $user, $list_id )\n\t{\n\t\tif ( empty( $user->user_email ) || empty( $list_id ) )\n\t\t{\n\t\t\tdo_action( 'go_slog', 'go-mailchimp', __FUNCTION__ . ': Invalid email or list id passed in.' );\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$member = $this->member( $user, $list_id );\n\t\tif ( ! $member )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ( 'subscribed' != $member['status'] )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $member;\n\t}", "public function subscriptions(Request $request) {\n\n try {\n\n $base_query = Subscription::BaseResponse()->where('subscriptions.status' , APPROVED);\n\n if ($request->id) {\n\n $user_details = User::find($request->id);\n\n if ($user_details) {\n\n if ($user_details->one_time_subscription == DEFAULT_TRUE) {\n\n $base_query->where('subscriptions.amount','>', 0);\n\n }\n\n } \n\n }\n\n $subscriptions = $base_query->orderBy('amount' , 'asc')->get();\n\n if($subscriptions) {\n\n foreach ($subscriptions as $key => $subscription_details) {\n \n $subscription_details->plan = $subscription_details->plan <= 1 ? $subscription_details->plan .\" month\" : $subscription_details->plan.\" months\";\n }\n\n }\n\n $response_array = ['success' => true, 'data' => $subscriptions];\n\n return response()->json($response_array, 200);\n\n } catch (Exception $e) {\n\n $message = $e->getMessage();\n\n $code = $e->getCode();\n\n $response_array = ['success' => false, 'error_messages' => $message, 'error_code' => $code];\n\n return response()->json($response_array);\n\n }\n }", "function wpcf7_knews_subscription ($WPCF7_ContactForm) {\n\t\n\t$submission = WPCF7_Submission::get_instance();\n\t$posted_data =& $submission->get_posted_data();\t \n\n\tif(isset($posted_data['knews-subscription'])) {\n\n\t\t$email = $posted_data['email'];\n\t\t\n\t\t$id_list_news = $posted_data['knews-subscription'];\n\t\t$lang = ICL_LANGUAGE_CODE;\n\t\t$lang_locale = get_locale();\n\t\t\n\t\t$extra_fields = $posted_data;\n\t\t$custom_fields = array();\n\t\t\tforeach ($extra_fields as $field) {\n\t\t\t\t$custom_fields[1]=$posted_data['name'];\n\t\t\t\t$custom_fields[2]=$posted_data['surname'];\n\t\t\t}\n\t\n\t\t$bypass_confirmation = true;\n\t\t\n\t\tapply_filters('knews_add_user_db', 0, $email, $id_list_news, $lang, $lang_locale, $custom_fields, $bypass_confirmation);\n\t\t\t\n\t}\t\n}", "public function ajax_forum_subscription() {\n\n\t\t// Bail if subscriptions are not active\n\t\tif ( ! bbp_is_subscriptions_active() ) {\n\t\t\tbbp_ajax_response( false, __( 'Subscriptions are no longer active.', 'bbpress' ), 300 );\n\t\t}\n\n\t\t// Bail if user is not logged in\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\tbbp_ajax_response( false, __( 'Please login to subscribe to this forum.', 'bbpress' ), 301 );\n\t\t}\n\n\t\t// Get user and forum data\n\t\t$user_id = bbp_get_current_user_id();\n\t\t$id = intval( $_POST['id'] );\n\n\t\t// Bail if user cannot add favorites for this user\n\t\tif ( ! current_user_can( 'edit_user', $user_id ) ) {\n\t\t\tbbp_ajax_response( false, __( 'You do not have permission to do this.', 'bbpress' ), 302 );\n\t\t}\n\n\t\t// Get the forum\n\t\t$forum = bbp_get_forum( $id );\n\n\t\t// Bail if forum cannot be found\n\t\tif ( empty( $forum ) ) {\n\t\t\tbbp_ajax_response( false, __( 'The forum could not be found.', 'bbpress' ), 303 );\n\t\t}\n\n\t\t// Bail if user did not take this action\n\t\tif ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toggle-subscription_' . $forum->ID ) ) {\n\t\t\tbbp_ajax_response( false, __( 'Are you sure you meant to do that?', 'bbpress' ), 304 );\n\t\t}\n\n\t\t// Take action\n\t\t$status = bbp_is_user_subscribed( $user_id, $forum->ID ) ? bbp_remove_user_subscription( $user_id, $forum->ID ) : bbp_add_user_subscription( $user_id, $forum->ID );\n\n\t\t// Bail if action failed\n\t\tif ( empty( $status ) ) {\n\t\t\tbbp_ajax_response( false, __( 'The request was unsuccessful. Please try again.', 'bbpress' ), 305 );\n\t\t}\n\n\t\t// Put subscription attributes in convenient array\n\t\t$attrs = array(\n\t\t\t'forum_id' => $forum->ID,\n\t\t\t'user_id' => $user_id\n\t\t);\n\n\t\t// Action succeeded\n\t\tbbp_ajax_response( true, bbp_get_forum_subscription_link( $attrs, $user_id, false ), 200 );\n\t}", "private function isSubscribed()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['userid']) || $request['userid']==\"\" )\n throw_error_msg(\"userid not provided\");\n\n if( !is_numeric($request['userid']) )\n throw_error_msg(\"invalid userid\");\n\n global $userquery;\n $is_subscribed = $userquery->is_subscribed($request['userid'],$uid);\n \n if(!$is_subscribed)\n {\n throw_error_msg(\"user is not subscribed\"); \n }\n else\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'user is subscribed', \"data\" => $is_subscribed);\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function getSubscription($subscriptionId)\n {\n $url = $this->host . '/v1/billing/subscriptions/' . $subscriptionId;\n $authorization = 'Authorization: Bearer ' . $this->clientCredentials->access_token;\n\n $curl = curl_init();\n try {\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json;charset=UTF-8', $authorization));\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_HTTPGET, 1);\n } catch (\\Exception $e) {\n $this->getLogger()->log(\\TYPO3\\CMS\\Core\\Log\\LogLevel::ERROR, sprintf('An error occurred while trying to make following api call \"%s\". Please check the configuration. Error: %s', $url, $e->getMessage()));\n }\n\n\n $this->cUrl = $curl;\n\n return $this->sendRequest();\n //===\n }", "public static function retrieve_subscribe($forum_id, $user_id)\n {\n $conditions = array();\n\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(ForumSubscribe::class_name(), ForumSubscribe::PROPERTY_FORUM_ID),\n new StaticConditionVariable($forum_id));\n\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(ForumSubscribe::class_name(), ForumSubscribe::PROPERTY_USER_ID),\n new StaticConditionVariable($user_id));\n\n $condition = new AndCondition($conditions);\n\n return self::retrieve(ForumSubscribe::class_name(), new DataClassRetrieveParameters($condition));\n }", "public function getSubscriptionDetails($request)\n {\n //require_once (dirname(__FILE__) . '/Model/GetSubscriptionDetailsResponse.php');\n return MarketplaceWebServiceWebstore_Model_GetSubscriptionDetailsResponse::fromXML($this->_invoke('GetSubscriptionDetails'));\n }", "public function getSubscriptionForIssue( $issue )\n {\n $subscriptionId = $issue[ 'subscription_id' ];\n\n if ( $subscriptionId == null )\n throw new System_Api_Error( System_Api_Error::UnknownSubscription );\n\n return $this->getSubscription( $subscriptionId );\n }", "public function subscriber()\n {\n return $this->belongsTo(\n __NAMESPACE__ . '\\Subscriber', 'subscriber_id', 'id'\n );\n }", "function &getSubscribedUsers($journalId, $rangeInfo = null) {\n\t\t$result =& $this->retrieveRange(\n\t\t\t'SELECT\tu.*\n\t\t\tFROM\tsubscriptions s,\n\t\t\t\tsubscription_types st,\n\t\t\t\tusers u\n\t\t\tWHERE\ts.type_id = st.type_id AND\n\t\t\t\tst.institutional = 1 AND\n\t\t\t\ts.user_id = u.user_id AND\n\t\t\t\ts.journal_id = ?\n\t\t\tORDER BY u.last_name ASC, s.subscription_id',\n\t\t\tarray((int) $journalId),\n\t\t\t$rangeInfo\n\t\t);\n\n\t\t$userDao =& DAORegistry::getDAO('UserDAO');\n\t\t$returner = new DAOResultFactory($result, $userDao, '_returnUserFromRow');\n\n\t\treturn $returner;\n\t}", "public function getSubscriptionKey() { return $this->subscriptionKey; }", "function wcs_get_subscriptions( $args ) {\n\tglobal $wpdb;\n\n\t$args = wp_parse_args( $args, array(\n\t\t\t'subscriptions_per_page' => 10,\n\t\t\t'paged' => 1,\n\t\t\t'offset' => 0,\n\t\t\t'orderby' => 'start_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'customer_id' => 0,\n\t\t\t'product_id' => 0,\n\t\t\t'variation_id' => 0,\n\t\t\t'order_id' => 0,\n\t\t\t'subscription_status' => array( 'any' ),\n\t\t\t'meta_query_relation' => 'AND',\n\t\t)\n\t);\n\n\t// if order_id is not a shop_order\n\tif ( 0 !== $args['order_id'] && 'shop_order' !== get_post_type( $args['order_id'] ) ) {\n\t\treturn array();\n\t}\n\n\t// Ensure subscription_status is an array.\n\t$args['subscription_status'] = $args['subscription_status'] ? (array) $args['subscription_status'] : array();\n\n\t// Grab the native post stati, removing pending and adding any.\n\t$builtin = get_post_stati( array( '_builtin' => true ) );\n\tunset( $builtin['pending'] );\n\t$builtin['any'] = 'any';\n\n\t// Make sure status starts with 'wc-'\n\tforeach ( $args['subscription_status'] as &$status ) {\n\t\tif ( isset( $builtin[ $status ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$status = wcs_sanitize_subscription_status_key( $status );\n\t}\n\n\t// Prepare the args for WP_Query\n\t$query_args = array(\n\t\t'post_type' => 'shop_subscription',\n\t\t'post_status' => $args['subscription_status'],\n\t\t'posts_per_page' => $args['subscriptions_per_page'],\n\t\t'paged' => $args['paged'],\n\t\t'offset' => $args['offset'],\n\t\t'order' => $args['order'],\n\t\t'fields' => 'ids',\n\t\t'meta_query' => isset( $args['meta_query'] ) ? $args['meta_query'] : array(), // just in case we need to filter or order by meta values later\n\t);\n\n\t// Maybe only get subscriptions created by a certain order\n\tif ( 0 != $args['order_id'] && is_numeric( $args['order_id'] ) ) {\n\t\t$query_args['post_parent'] = $args['order_id'];\n\t}\n\n\t// Map subscription specific orderby values to internal/WordPress keys\n\tswitch ( $args['orderby'] ) {\n\t\tcase 'status' :\n\t\t\t$query_args['orderby'] = 'post_status';\n\t\t\tbreak;\n\t\tcase 'start_date' :\n\t\t\t$query_args['orderby'] = 'date';\n\t\t\tbreak;\n\t\tcase 'trial_end_date' :\n\t\tcase 'end_date' :\n\t\t\t// We need to orderby post meta value: http://www.paulund.co.uk/order-meta-query\n\t\t\t$date_type = str_replace( '_date', '', $args['orderby'] );\n\t\t\t$query_args = array_merge( $query_args, array(\n\t\t\t\t'orderby' => 'meta_value',\n\t\t\t\t'meta_key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'meta_type' => 'DATETIME',\n\t\t\t) );\n\t\t\t$query_args['meta_query'][] = array(\n\t\t\t\t'key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t'type' => 'DATETIME',\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t$query_args['orderby'] = $args['orderby'];\n\t\t\tbreak;\n\t}\n\n\t// Maybe filter to a specific user\n\tif ( 0 != $args['customer_id'] && is_numeric( $args['customer_id'] ) ) {\n\t\t$query_args['meta_query'][] = array(\n\t\t\t'key' => '_customer_user',\n\t\t\t'value' => $args['customer_id'],\n\t\t\t'type' => 'numeric',\n\t\t\t'compare' => ( is_array( $args['customer_id'] ) ) ? 'IN' : '=',\n\t\t);\n\t};\n\n\t// We need to restrict subscriptions to those which contain a certain product/variation\n\tif ( ( 0 != $args['product_id'] && is_numeric( $args['product_id'] ) ) || ( 0 != $args['variation_id'] && is_numeric( $args['variation_id'] ) ) ) {\n\t\t$query_args['post__in'] = wcs_get_subscriptions_for_product( array( $args['product_id'], $args['variation_id'] ) );\n\t}\n\n\tif ( ! empty( $query_args['meta_query'] ) ) {\n\t\t$query_args['meta_query']['relation'] = $args['meta_query_relation'];\n\t}\n\n\t$query_args = apply_filters( 'woocommerce_get_subscriptions_query_args', $query_args, $args );\n\n\t$subscription_post_ids = get_posts( $query_args );\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_post_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = wcs_get_subscription( $post_id );\n\t}\n\n\treturn apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $args );\n}", "public function getSubscriptions($idUser)\n {\n if (!$subscriptions = Subscription::getSubscriptions($idUser)) {\n throw new PushApiException(PushApiException::NOT_FOUND);\n }\n\n $this->send($subscriptions);\n }", "public function incscribe($subscribe_to) {\n\t\t$user_id=$this->Auth->user('id');\n\t\t$userstatrow=$this->Userstat->find('first',array('conditions'=>array('Userstat.user_id'=>$user_id),'contain'=>false,'fields'=>array('Userstat.id')));\n\t\tif($userstatrow!=NULL)\n\t\t{\n\t\t$this->Userstat->id=$userstatrow['Userstat']['id'];\n\t }else{\n\t\t$this->Userstat->id=NULL;\n\t\t}\n\t\t$subscribe=$this->Subscription->find('count',array('conditions'=>array('Subscription.subscriber_id'=>$user_id)));\n\t\t$this->request->data['Userstat']['user_id']=$user_id;\n\t\t$this->request->data['Userstat']['subscribe']=$subscribe;\n\t\tif($this->Userstat->save($this->request->data)){$this->potential($user_id);}\n\t\t//recoded ends\t\n\t\t//recoded begins for subscribeto of channel\n\t\t$userstatrow=$this->Userstat->find('first',array('conditions'=>array('Userstat.user_id'=>$subscribe_to),'contain'=>false,'fields'=>array('Userstat.id')));\n\t\tif($userstatrow!=NULL)\n\t\t{\n\t\t$this->Userstat->id=$userstatrow['Userstat']['id'];\n\t }else{\n\t\t$this->Userstat->id=NULL;\n\t\t}\n\t\t$this->request->data=NULL;\n\t\t$subscribeto=$this->Subscription->find('count',array('conditions'=>array('Subscription.subscriber_to_id'=>$subscribe_to)));\n\t\t$this->request->data['Userstat']['user_id']=$subscribe_to;\n\t\t$this->request->data['Userstat']['subscribeto']=$subscribeto;\n\t\tif($this->Userstat->save($this->request->data)){$this->potential($subscribe_to);}\n\t\t//recoded ends\t\n\t}", "function &_returnSubscriptionFromRow(&$row) {\n\t\t$subscription = $this->createObject();\n\t\t$subscription->setId($row['subscription_id']);\n\t\t$subscription->setJournalId($row['journal_id']);\n\t\t$subscription->setUserId($row['user_id']);\n\t\t$subscription->setTypeId($row['type_id']);\n\t\t$subscription->setDateStart($this->dateFromDB($row['date_start']));\n\t\t$subscription->setDateEnd($this->dateFromDB($row['date_end']));\n\t\t$subscription->setDateRemindedBefore($this->datetimeFromDB($row['date_reminded_before']));\n\t\t$subscription->setDateRemindedAfter($this->datetimeFromDB($row['date_reminded_after']));\n\t\t$subscription->setStatus($row['status']);\n\t\t$subscription->setMembership($row['membership']);\n\t\t$subscription->setReferenceNumber($row['reference_number']);\n\t\t$subscription->setNotes($row['notes']);\n\n\t\tHookRegistry::call('SubscriptionDAO::_returnSubscriptionFromRow', array(&$subscription, &$row));\n\n\t\treturn $subscription;\n\t}", "public function getUserIdsWithSubscriptionId(int $subscriptionId);", "public function subscribe_user(){\n if( ! $this->is_valid_nonce( 'mpp_ajax_nonce' ) ){\n die();\n }\n $subscription = new Subscription( $this->plugin, $_POST );\n if( $subscription->has_fields() ){\n $subscription->execute();\n }\n wp_send_json( $subscription->result );\n }", "function get_subscriber($id){\n $query = selectRecord(TAB_SUBSCRIBERS, \"id = $id\");\n return $query;\n}", "function og_simplenews_get_subscriptions($tid) {\n $emails = array();\n\n $result = db_query('\n SELECT ss.mail\n FROM {simplenews_subscriptions} ss\n INNER JOIN {simplenews_snid_tid} sn\n ON ss.snid = sn.snid\n WHERE sn.tid = %d', $tid);\n\n while ($row = db_fetch_array($result)) {\n $emails[] = $row['mail'];\n }\n\n return $emails;\n}", "public static function getSubscribedProfiles()\n\t{\n\n\t\treturn self::where('status', '=', 'subscribed');\n\n\t}", "public function isSubscribed()\n {\n // TODO there seems to be an inconsistency when getting database records via Repository or via ObjectStorage\n // TODO when getting via Repository, a Typo3bb-FrontendUser is returned\n // TODO when getting via ObjectStorage, IglarpTemplate-FrontendUser is returned\n $user = FrontendUserUtility::getCurrentUser();\n if (is_null($user)) {\n return false;\n } else {\n return $this->subscribers->contains($user);\n }\n }", "function _getSubscriberInfo($id){\n \t$subscriber = '';\n\n \t$subscriber = jNews_Subscribers::getSubscriberInfoFromUserId($id);//we get subscriber info if this user is a subscriber of jnews\n\n\t\t\tif(empty($subscriber)){//if there is no record for the user\n\t\t\t\tjNews_Subscribers::syncSubscribers(true);//we sync the user as subscriber\n\t\t\t\t$subscriber = jNews_Subscribers::getSubscriberInfoFromUserId($id);//we get the subscriber info\n\n\n\t\t\t}\n\n \treturn $subscriber;\n }", "public function getMembership()\n {\n return Member::getByID($this->site_members_id);\n }", "function obtainReportForSubscription(string $id){\nreturn $this->get(\"/subscription/report/{$id}\");\n}" ]
[ "0.7232933", "0.6808315", "0.6746692", "0.66606724", "0.6619575", "0.6616385", "0.66081494", "0.65625155", "0.6535004", "0.63948035", "0.63909614", "0.633904", "0.63147914", "0.6301561", "0.6296257", "0.6286196", "0.6265362", "0.61987484", "0.6194313", "0.6155398", "0.61035705", "0.6067145", "0.6013494", "0.5953655", "0.59381276", "0.5937762", "0.5928034", "0.5915848", "0.5912722", "0.5885235", "0.5872932", "0.5872536", "0.58469296", "0.5828619", "0.5827401", "0.5820008", "0.58076084", "0.5797666", "0.57973504", "0.5794414", "0.57694566", "0.5760519", "0.57532954", "0.57507575", "0.5747475", "0.57456094", "0.5717575", "0.5712215", "0.5691999", "0.56766397", "0.56660557", "0.56602055", "0.56593686", "0.5657174", "0.565346", "0.5633785", "0.56229025", "0.56142163", "0.56142163", "0.56085926", "0.5604488", "0.5592401", "0.5588239", "0.55849344", "0.55775446", "0.5573983", "0.55727637", "0.5571648", "0.55680895", "0.5568088", "0.55637896", "0.5559267", "0.55581015", "0.5557242", "0.55559963", "0.55549467", "0.5553069", "0.5550191", "0.55458844", "0.5542802", "0.55378354", "0.5532906", "0.5524403", "0.5508926", "0.54897815", "0.548887", "0.5474742", "0.546487", "0.54551005", "0.54545355", "0.54499406", "0.5443388", "0.54361147", "0.54222393", "0.54213053", "0.5413358", "0.54101944", "0.54032177", "0.5397138", "0.5379338" ]
0.6763251
2
Get user memberships by subscription key
public function get_memberships_from_subscription( $subscription_key ) { $user_memberships = array(); $user_membership_ids = new WP_Query( array( 'post_type' => 'wc_user_membership', 'post_status' => array_keys( wc_memberships_get_user_membership_statuses() ), 'fields' => 'ids', 'nopaging' => true, 'suppress_filters' => 1, 'meta_query' => array( array( 'key' => '_subscription_key', 'value' => $subscription_key, ), ), ) ); if ( ! empty( $user_membership_ids->posts ) ) { $user_memberships = array(); foreach ( $user_membership_ids->posts as $user_membership_id ) { $user_memberships[] = wc_memberships_get_user_membership( $user_membership_id ); } } return $user_memberships; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === '[email protected]') {\n // check wallet\n $wallets = $this->mangopay->listWallets($member->Id);\n foreach ($wallets as $wallet) {\n if ($wallet->Balance->Amount > 10) {\n $this->createUserSubscription($member->Id, $wallet);\n return true;\n }\n }\n }\n }\n $page++;\n }\n\n return false;\n }", "public function getUserIdsWithSubscriptionId(int $subscriptionId);", "public function getSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n // if the subscription had proberties\n if (0 < count($subscriptionResourceProperties)) {\n $modelIri = $this->_selectedModelInstance->getModelIri();\n $subscriptionResourceProperties = $subscriptionResourceProperties[$modelIri];\n\n // init subscriber data array an save the proberties plain\n $data = array();\n $data['resourceProperties'] = $subscriptionResourceProperties;\n // fill the subscriber data array with the subscription resource content\n foreach ($this->_propertyMatching as $dataKey => $propertyKey) {\n // get property content\n $propertyUri = $this->_subscriptionConfig->get($propertyKey);\n $propertyArray = isset($subscriptionResourceProperties[$propertyUri]) ?\n $subscriptionResourceProperties[$propertyUri] :\n null;\n\n // if property content exists write it to the subscriber data array\n if (isset($propertyArray) && \"\" != $propertyArray[0]['content']) {\n $data[$dataKey] = $propertyArray[0]['content'];\n } else {\n $data[$dataKey] = null;\n }\n }\n return $data;\n }\n return false;\n }", "function get_profiles_for_subscription( $action_key, $role = '', $status = '' ) {\n\t\tif( !( $users = get_transient( '_um_mailchimp_users_' . $action_key . '_' . $role . '_' . $status ) ) ) {\n\t\t\t//get all users with selected role and status\n\t\t\t$args = array(\n\t\t\t\t'fields' => array( 'user_email', 'ID' )\n\t\t\t);\n\n\t\t\tif ( ! empty( $role ) ) {\n\t\t\t\t$args['role'] = $role;\n\t\t\t}\n\n\t\t\tif ( ! empty( $status ) ) {\n\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t'key' => 'account_status',\n\t\t\t\t\t'value' => $status,\n\t\t\t\t\t'compare' => '=',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$query_users = new \\WP_User_Query( $args );\n\t\t\t$users = $query_users->get_results();\n\n\t\t\t//set users list cache\n\t\t\tset_transient( '_um_mailchimp_users_' . $action_key . '_' . $role . '_' . $status, $users, 24 * 3600 );\n\t\t}\n\t\treturn $users;\n\t}", "public function _list() {\n\t\t// assign user based on api key\n\t\tif (empty($this->params[0])) {\n\t\t\t$json = [\n\t\t\t\t'error' => 'No channel specified'\n\t\t\t];\n\t\t\treturn $json;\n\t\t}\n\t\t$account = filter_var($this->params[0], FILTER_SANITIZE_STRING);\n\t\t$params = array($account);\n\t\t$sql = \"SELECT * FROM \" . $this->db->sub_table . \" WHERE subscriber = $1 OR host_account = $1\";\n\t\t$result = pg_query_params($this->db->link, $sql, $params);\n\t\t$subscribed = [];\n\t\t$subscribers = [];\n\t\twhile ($row = pg_fetch_assoc($result)) {\n\t\t\tif ($row['host_account'] === $account) {\n\t\t\t\t$subscribers[] = $row['subscriber'];\n\t\t\t} \n\t\t\tif ($row['subscriber'] === $account) {\n\t\t\t\t$subscribed[] = $row['host_account'];\n\t\t\t}\n\t\t}\n\t\t$json = [\n\t\t\t'subscribed' => $subscribed,\n\t\t\t'subscribers' => $subscribers\n\t\t];\n\t\treturn json_encode($json);\n\t}", "public function get_subscriptions_from_uid($uid) {\r\n $query = '\r\n -- get sections where the user is subcribed\r\n SELECT user_subscr.sid\r\n FROM user_subscr INNER JOIN user ON user.uid=user_subscr.uid\r\n WHERE user.uid=:uid;\r\n ';\r\n return $this->dbh->fetch_list($query, [ ':uid' => $uid ]);\r\n }", "public function getSubscriptions() {\n\t\t$urlSubscriptions = \"http://www.reddit.com/reddits/mine.json\";\n\t\treturn $this->runCurl ( $urlSubscriptions );\n\t}", "public function get_invited_users( $subscription_id ){\n return pms_get_member_subscription_meta( $subscription_id, 'pms_gm_invited_emails' );\n }", "function &getSubscribedUsers($journalId, $rangeInfo = null) {\n\t\t$result =& $this->retrieveRange(\n\t\t\t'SELECT\tu.*\n\t\t\tFROM\tsubscriptions s,\n\t\t\t\tsubscription_types st,\n\t\t\t\tusers u\n\t\t\tWHERE\ts.type_id = st.type_id AND\n\t\t\t\tst.institutional = 1 AND\n\t\t\t\ts.user_id = u.user_id AND\n\t\t\t\ts.journal_id = ?\n\t\t\tORDER BY u.last_name ASC, s.subscription_id',\n\t\t\tarray((int) $journalId),\n\t\t\t$rangeInfo\n\t\t);\n\n\t\t$userDao =& DAORegistry::getDAO('UserDAO');\n\t\t$returner = new DAOResultFactory($result, $userDao, '_returnUserFromRow');\n\n\t\treturn $returner;\n\t}", "public static function getSubscribedProfiles()\n\t{\n\n\t\treturn self::where('status', '=', 'subscribed');\n\n\t}", "public function memberships_get()\n {\n\n $em = $this->doctrine->em;\n\n $maembershipRepo = $em->getRepository('Entities\\Membership');\n $memberships = $maembershipRepo->findAll();\n $result[\"desc\"] = \"Listado de membresias\";\n $result[\"data\"] = $memberships;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }", "public function getSubscriptionKey() { return $this->subscriptionKey; }", "public function getUserSubscriptionWithId(int $userSubscriptionId);", "function lobby_membersapi_getMemberships($args)\r\n{\r\n\t$uid = (int)$args['uid'];\r\n\tif ($uid == 0) {\r\n\t\treturn false;\r\n\t} else {\r\n\t \t$tables = pnDBGetTables();\r\n\t \t$column = $tables['lobby_members_column'];\r\n\t \t$where = $column['uid'].\" = '\".$uid.\"'\";\r\n\t\t$result = DBUtil::selectObjectArray('lobby_members',$where);\r\n\t\t$r = array();\r\n\t\tforeach ($result as $item) {\r\n\t\t\t$r[]=$item['gid'];\r\n\t\t}\r\n\t\treturn $r;\r\n\t}\r\n}", "public function getSubscriptionWithId(int $subscriptionId);", "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "function og_simplenews_get_subscriptions($tid) {\n $emails = array();\n\n $result = db_query('\n SELECT ss.mail\n FROM {simplenews_subscriptions} ss\n INNER JOIN {simplenews_snid_tid} sn\n ON ss.snid = sn.snid\n WHERE sn.tid = %d', $tid);\n\n while ($row = db_fetch_array($result)) {\n $emails[] = $row['mail'];\n }\n\n return $emails;\n}", "public function userFromKey($key){\r\n $query = $this->conn->prepare('SELECT `user_id` FROM `user` WHERE confirmationKey = :key'); // Création de la requête + utilisation order by pour ne pas utiliser sort\r\n $query->execute([':key' => $key ]); // Exécution de la requête\r\n return $query->fetch(\\PDO::FETCH_ASSOC);\r\n\r\n }", "function subscriptions ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `subscription` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n }", "public function getAccount($key = null);", "public function getSubscriptions($userId = null, $sessionId = null)\n\t{\n\t\t// no user_id provided, get one from the auth service\n\t\tif (!isset($user_id)) {\n\t\t\tif ($auth = Zend_Auth::getInstance()->getIdentity()) {\n\t\t\t\t$userId = ($userId) ? $userId : $auth->user_id;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// no session id provided, get all sessions user is subscribed to\n\t\tif (!isset($sessionId)) {\n\t\t\treturn $this->getAdapter()->fetchCol(\n\t\t\t\t$this->select()\n\t\t\t\t->from($this->_name, 'session_id')\n\t\t\t\t->where('user_id = ?', $userId)\n\t\t\t);\n\t\t}\n\n\t\t// session_id provided, get all users who are subscribed to specific session\n\t\treturn $this->getAdapter()->fetchAll(\n\t\t\t\"select u.fname, u.lname, u.email from subscribers_sessions ss left join users u on (u.user_id = ss.user_id)\n\t\t\twhere ss.session_id=\".$sessionId\n\t\t);\n\t}", "public function hasSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n if (0 < count($subscriptionResourceProperties)) {\n return true;\n } else {\n return false;\n }\n }", "public static function getSubscriptionProductsList() {\n $sku = array();\n $query = db_select('commerce_product', 'cp');\n $query->fields('cp', array('sku'));\n $query->leftJoin('field_data_field_product', 'pr', 'cp.product_id = pr.entity_id');\n $query->condition('pr.bundle', 'subscription', '=');\n $result = $query->execute();\n while ($product = $result->fetchAssoc()) {\n $sku[] = $product['sku'];\n }\n return new Response(TRUE, $sku, NULL);\n }", "public function get_vendor_memberships() {\n $this->db->select('*');\n $this->db->from('vendor_membership');\n $query = $this->db->get();\n $query_result = $query->result();\n\n return $query_result;\n }", "public function memberList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "protected function getTagsByKey($key){\n return $this->getAdapter()->sMembers($this->_keyFromId($key));\n }", "private static function getUserFromKey() {\n\t\tstatic $user;\n\t\t\n\t\tif ($user === null) {\n\t\t\t$user = false;\n\t\t\tif ($key = Request::getGET('key')) {\n\t\t\t\t$l = User::getUsers();\n\t\t\t\t$l = $l->filter($l->exprEqual($l->exprMember('unconfirmedEmailKey'),\n\t\t\t\t\t$key));\n\t\t\t\tif ($l->getCount() == 1)\n\t\t\t\t\t$user = $l->get(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($user === false)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn $user;\n\t}", "public function retrieveSubscription() {\n // Adrian: Get user subscription details from the database\n /**$subscription = Subscription::where('user_id', $this->model->id)\n ->where('plan_id', $this->plan)\n ->first();**/\n\n $result = ChargeBee_Subscription::retrieve($this->user->subscription_id);\n\n return $result;\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(memberProfilePeer::ID, $key, Criteria::EQUAL);\n }", "function flashcard_get_participants($flashcardid) {\n global $DB;\n\n $sql = \"\n SELECT DISTINCT\n userid,\n userid\n FROM\n {flashcard_card}\n WHERE\n flashcardid = ?\n \";\n $userids = $DB->get_records_sql_menu($sql, array('flashcardid' => $flashcardid));\n if ($userids) {\n $users = $DB->get_records_list('user', 'id', array_keys($userids));\n }\n\n if (!empty($users)) {\n return $users;\n }\n\n return false;\n}", "public function index()\n {\n $user_id = Auth::id();\n $subscribes = User::findOrFail($user_id)->subscriptions;\n // return $subscribes;\n return view('profile.subscription')->with('subscribes', $subscribes);\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function subscriptions()\n {\n return Subscription::byCustomer($this->id);\n }", "public function getMembers ()\n {\n $userIds = (array) $this['users']->getValue ();\n\n // Users should already be in the instance pool, so we retrieve them\n // one by one with findPk\n $users = array ();\n foreach ($userIds as $uid)\n $users[] = UserQuery::create ()->findPk($uid);\n\n return $users;\n }", "public function get_user_info($key, $id) {\r\n $connection = DB::connect();\r\n $stmt = \"SELECT $key FROM users WHERE `id` = '$id'\";\r\n $result = $connection->query($stmt);\r\n\r\n return $result->fetch_assoc()[$key];\r\n }", "public function getMembers($group_id);", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function getSubscriptions();", "public function getSubscriptionById($id_subscription) {\n $this->db->where('ID_SUBSCRIPTION', $id_subscription);\n $query = $this->db->get($this->table);\n return $query->row();\n}", "public function get_memberships() {\n \n $active_memberships = pmpro_getMembershipLevelForUser($this->user_id);\n \n if (is_object($active_memberships)) {\n $return[$active_memberships->ID] = $active_memberships->name;\n return $return;\n }\n\n $return = [];\n if (is_array($active_memberships)) {\n foreach ($active_memberships as $membership) {\n $return[$membership->ID] = $membership->name;\n }\n }\n \n return $return;\n }", "public function getSubusers()\n\t{\n\t\treturn $this->getObjectArray('subusers', null, 'user', array());\n\t}", "function getUserListWithID($ac_token, $twitter_id, $slug) {\n return self::getInstance()->_getUserListWithID($ac_token, $twitter_id, $slug);\n }", "function fetchPermissionUsers($permission_id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id, user_id FROM user_permission_matches WHERE permission_id = ?\",array($permission_id));\n\t$results = $query->results();\n\treturn ($results);\n\t$row[$user] = array('id' => $id, 'user_id' => $user);\n\tif (isset($row)){\n\t\treturn ($row);\n\t}\n}", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function GetSubscriptionsList()\n {\n \t$output = array();\n \n \t$rs = mysql_query(\"SELECT subscription_id, \" . $this->lang_name_field . \" FROM subscriptions ORDER BY \" . $this->lang_name_field . \" ASC\");\n \n \tif(mysql_num_rows($rs)==0)\n \t{\n \t\t$output = 0;\n \t}\n \telse\n \t{\n \t\twhile($row=mysql_fetch_array($rs))\n \t\t{\n \t\t\t$output[] = array(\n\t \t\t\t\t\t\"subscription_id\" => $row['subscription_id'],\n\t \t\t\t\t\t\"subscription_name\"\t=> $row[$this->lang_name_field]\n \t\t\t);\n \t\t}\n \t}\n \n \treturn $output;\n }", "public function getSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id = %1d AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function index(GetSubuserRequest $request, Server $server)\n {\n return $this->fractal->collection($server->subusers)\n ->transformWith($this->getTransformer(SubuserTransformer::class))\n ->toArray();\n }", "public function subscription($userId)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->db->table(Config::get('throttle::tables.subscriptions'))\n\t\t\t\t->where('user_id', $userId)\n\t\t\t\t->where('is_active', '1')\n\t\t\t\t->select('id', 'user_id', 'plan_id', 'subscribed_at')\n\t\t\t\t->first();\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\tthrow new Exceptions\\InternalException;\n\t\t}\n\t}", "public function getByExpiredUsers($paymentGateway='')\n\t{\n\t\t$today = time();\n\t\t$startat = 1477060836;\n $queryBuilder = $this->createQueryBuilder('s');\n $query = $queryBuilder\n ->select('s')\n ->innerJoin('Api\\\\V1\\\\Entity\\\\User', 'u')\n ->where('u.subscriptionId = s.id')\n ->andWhere('s.paymentGateway = :paymentGateway')\n ->andWhere('u.subscriptionExpireAt > 0')\n ->andWhere('u.subscriptionExpireAt <= :today')\n ->andWhere('u.subscriptionStartAt >= :startat')\n ->andWhere('u.flags <> :status')\n ->setParameter('paymentGateway', $paymentGateway)\n ->setParameter('today', $today)\n ->setParameter('startat', $startat)\n ->setParameter('status', User::STATUS_SUSPENDED)\n\t\t\t->getQuery();\n\t\t/*$sql =\"select * from subscription as s INNER JOIN user as u where u.subscription_id=s.id and u.subscription_start_at>=$start_at and u.subscription_expire_at >0 and u.subscription_expire_at<=$today and u.flags!=1 and s.payment_gateway='$paymentGateway'\";\n\t\t$stmt = $this->getEntityManager()->getConnection()->prepare($sql);\n $stmt->execute();\n\t\t$subscriptions = $stmt->fetchAll();*/\n\t//\t$q=$query->getSQL();\n\t//\terror_log(\"Query: \".$q.\"\\n\" , 3, \"/volumes/log/api/test-log.log\");\n\t//\terror_log(\"Parameters: \".print_r($query->getParameters(), TRUE).\"\\n\" , 3, \"/volumes/log/api/test-log.log\");\n $subscriptions = $query->getResult();\n\n return $subscriptions;\n }", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RegistrationPeer::ID, $key, Criteria::EQUAL);\n\t}", "public function subscribers()\n { \n return $this->contracts()->inProgress()->with('auth')->get()->map->auth->push($this->auth);\n }", "function getProfileInfo($member)\n\t\t{\n\t\n\t\t $query = \"SELECT * FROM tbl_member WHERE `user_name` = '\".$member.\"'\";\n\t\t $rs\t\t=\t$this->Execute($query);\n\t\t return $this->_getPageArray($rs, 'Subscriber');\n\t\t}", "private function itemsList()\n {\n /**\n * Defined variables\n */\n $request = $this->getRequest();\n $publicKey = $request->getServer('PHP_AUTH_USER');\n\n $searchCriteriaBuilder = $this->searchCriteria;\n $searchCriteria = $searchCriteriaBuilder->addFilter(\n 'auth_key',\n $publicKey,\n 'eq'\n )->create();\n $authenticationList = $this->customerAuthRepository->getList($searchCriteria);\n $items = $authenticationList->getItems();\n\n return $items;\n }", "protected function get() {\n $subc = \"get_\".$this->sub_collection;\n if ($subc !== null && method_exists($this, $subc)) {\n $this->im_here();\n if ($this->sub_collection == \"users\") {\n $current_users = intval($this->params->number);\n while (1) {\n $this->clear_inactive_users();\n $users = $this->get_users();\n if (sizeof($users) !== $current_users) {\n return $users;\n }else {\n sleep(1);\n }\n }\n }\n return $this->$subc();\n }else {\n $this->write_error(\"Request error!\");\n }\n }", "function j2_get_yt_subs() {\n $api_key = get_option('youtube_api_key');\n $channel_id = get_option('youtube_api_channel_id');\n\n // Return if the option fields do not exist\n if(!$api_key || !$channel_id)\n return false;\n\n $youtube_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key;\n $data = @file_get_contents($youtube_url);\n $json_data = json_decode($data);\n\n if(!$json_data)\n return false;\n\n $subs = $json_data->items\n }", "public function getMembers()\n {\n \t$companyId = session('company_id');\n \t$userRepo = $this->em->getRepository('App\\Entity\\Management\\User');\n \t$users = $userRepo->getUsersByCompany($companyId);\n\n echo json_encode($users);\n\n }", "public function getUserInfo($id)\n {\n $qry = \"SELECT users.* FROM `users` WHERE users.id = \".$id;\n// JOIN `subscription` ON users.id = subscription.user_id\n// JOIN `packages` ON subscription.p_id = packages.id\n\n\n $dbcon = new DatabaseClass();\n $result = mysqli_query($dbcon->conn, $qry);\n if (mysqli_num_rows($result) > 0) {\n return mysqli_fetch_assoc($result);\n }\n }", "public static function fetch_subscribed_users($reactforum, $groupid = 0, $context = null, $fields = null,\n $includediscussionsubscriptions = false) {\n global $CFG, $DB;\n\n if (empty($fields)) {\n $allnames = get_all_user_name_fields(true, 'u');\n $fields =\"u.id,\n u.username,\n $allnames,\n u.maildisplay,\n u.mailformat,\n u.maildigest,\n u.imagealt,\n u.email,\n u.emailstop,\n u.city,\n u.country,\n u.lastaccess,\n u.lastlogin,\n u.picture,\n u.timezone,\n u.theme,\n u.lang,\n u.trackforums,\n u.mnethostid\";\n }\n /// JLH u.trackreactforums above changed to u.trackforums\n \n // Retrieve the reactforum context if it wasn't specified.\n $context = reactforum_get_context($reactforum->id, $context);\n\n if (self::is_forcesubscribed($reactforum)) {\n $results = \\mod_reactforum\\subscriptions::get_potential_subscribers($context, $groupid, $fields, \"u.email ASC\");\n\n } else {\n // Only active enrolled users or everybody on the frontpage.\n list($esql, $params) = get_enrolled_sql($context, '', $groupid, true);\n $params['reactforumid'] = $reactforum->id;\n\n if ($includediscussionsubscriptions) {\n $params['sreactforumid'] = $reactforum->id;\n $params['dsreactforumid'] = $reactforum->id;\n $params['unsubscribed'] = self::REACTFORUM_DISCUSSION_UNSUBSCRIBED;\n\n $sql = \"SELECT $fields\n FROM (\n SELECT userid FROM {reactforum_subscriptions} s\n WHERE\n s.reactforum = :sreactforumid\n UNION\n SELECT userid FROM {reactforum_discussion_subs} ds\n WHERE\n ds.reactforum = :dsreactforumid AND ds.preference <> :unsubscribed\n ) subscriptions\n JOIN {user} u ON u.id = subscriptions.userid\n JOIN ($esql) je ON je.id = u.id\n ORDER BY u.email ASC\";\n\n } else {\n $sql = \"SELECT $fields\n FROM {user} u\n JOIN ($esql) je ON je.id = u.id\n JOIN {reactforum_subscriptions} s ON s.userid = u.id\n WHERE\n s.reactforum = :reactforumid\n ORDER BY u.email ASC\";\n }\n $results = $DB->get_records_sql($sql, $params);\n }\n\n // Guest user should never be subscribed to a reactforum.\n unset($results[$CFG->siteguest]);\n\n // Apply the activity module availability resetrictions.\n $cm = get_coursemodule_from_instance('reactforum', $reactforum->id, $reactforum->course);\n $modinfo = get_fast_modinfo($reactforum->course);\n $info = new \\core_availability\\info_module($modinfo->get_cm($cm->id));\n $results = $info->filter_user_list($results);\n\n return $results;\n }", "public function hasAccount($key);", "public static function retrieve_subscribed_forum_users($forum_id)\n {\n $condition = new EqualityCondition(\n new PropertyConditionVariable(ForumSubscribe::class_name(), ForumSubscribe::PROPERTY_FORUM_ID),\n new StaticConditionVariable($forum_id));\n\n $subscriptions = DataManager::retrieves(\n ForumSubscribe::class_name(),\n new DataClassRetrievesParameters($condition));\n\n $users = array();\n\n while ($subscription = $subscriptions->next_result())\n {\n $user = \\Chamilo\\Core\\User\\Storage\\DataManager::retrieve_by_id(\n User::class_name(),\n (int) $subscription->get_user_id());\n $users[$user->get_id()] = $user;\n }\n\n return $users;\n }", "public static function get_users_in($itemids) {}", "public function getMembershipList($token, $id)\n {\n return $this->getQuery($this->getFullUrl('/groups/' . $id . '/memberships'), $token);\n }", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(UserPeer::UID, $key, Criteria::EQUAL);\n\t}", "function fetchPermissionUsers($permission_id) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"SELECT id, user_id\n\t\tFROM \" . $db_table_prefix . \"user_permission_matches\n\t\tWHERE permission_id = ?\n\t\t\");\n $stmt->bind_param(\"i\", $permission_id);\n $stmt->execute();\n $stmt->bind_result($id, $user);\n while ($stmt->fetch()) {\n $row[$user] = array('id' => $id, 'user_id' => $user);\n }\n $stmt->close();\n if (isset($row)) {\n return ($row);\n }\n}", "public function getMembers()\n {\n if (!is_null($this->members_relation)) {\n return array_keys($this->members_relation);\n }\n\n if ($this->members_objs == null) {\n // load members\n $response = Helper::get('group/'.$this->unique_id);\n if (isset($response->body['result']['members'])) {\n $this->__construct($response->body['result']);\n }\n }\n\n if ($this->members_objs != null) {\n $list = array();\n foreach ($this->members_objs as $user) {\n $list[] = $user instanceof User ? $user->username : $user;\n }\n\n return $list;\n }\n }", "public function get_my_tribe_member_list($post_data){\n $searchId = $post_data['searchId'];\n $loginUserId = $post_data['loginUserId']; \n \n $sql = \"SELECT * FROM tribe WHERE searchId= $searchId AND fromuserId= $loginUserId AND deleteFlag !=1 AND status = 'accept'\";\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->result_array();\n } \n }", "public function index(Request $request)\n {\n //\n $requestData = $request->all();\n\n if(isset($requestData['user_id']))\n {\n $decryptedID = Crypt::decryptString($requestData['user_id']);\n }\n else {\n $user = JWTAuth::User(); \n $decryptedID = $user['id'];\n }\n\n $subscribers = DB::table('hashtag_subscribers')\n ->join('users', 'users.id', '=', 'user_id')\n ->join('hashtags', 'hashtag_id', '=', 'hashtags.id')\n ->select('users.username','hashtag_id','user_id','hashtags.hashtag','users.profile_image')\n ->where('user_id','=',$decryptedID)\n ->get();\n\n return SubscriberResource::collection($subscribers);\n }", "public function getMembership()\n {\n return Member::getByID($this->site_members_id);\n }", "function hcml_wp_ajax_hc_memberslist_csv() {\n // check user capabilities\n /* if (!current_user_can('manage_options') ||\n ! current_user_can('pmpro_memberslist')) {\n return;\n * }*/\n global $wpdb, $pmpro_currency_symbol, $woocommerce;\n // returns $s, $l, $pn, $limit, $start, $end\n extract(hcml_parse_request($_REQUEST, \"list-users-csv\"));\n $theusers = get_members($l, $s, $limit, $start);\n require_once( HC_ML_PLUGIN_PATH . '/views/list-users-csv.php');\t\n exit;\t\n\n}", "public function getMembers($gid)\n {\n // Session key is *required*\n if ($this->_facebook->auth->getSessionKey()) {\n throw new Horde_Service_Facebook_Exception(\n 'session_key is required',\n Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);\n }\n\n return $this->_facebook->callGraphApi($gid . '/members');\n }", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public function subscribe_member( $user_id, $group_id, $subsribe_mode ) {\n $m = $this->call( \"membershipSubscribe\", [\n \"userId\" => $user_id,\n \"groupId\" => $group_id,\n \"subscriptionMode\" => $subsribe_mode ] );\n return ( isset( $m ) && $m != false ) ? true : false;\n }", "public function subscription($id) {\n\n if (!isset($this->account_details['access_token'])) {\n throw new GoCardless_ClientException('Access token missing');\n }\n\n return GoCardless_Subscription::find_with_client($this, $id);\n\n }", "public function getActiveSubscriptionsForUserId(int $userId);", "public function index()\n {\n return MembersResource::collection(Member::latest()->get());\n }", "public function user($key = null) {\n return $this->getUser($key);\n }", "public function getSubscriptionList()\n {\n $recruiterOffice = RecruiterOffice::getAllOffices();\n $subscription['data'] = [];\n $customerId = RecruiterProfile::where(['user_id' => Auth::user()->id])->pluck('customer_id');\n if ($customerId[0] == null) {\n $subscription['customer'] = [];\n } else {\n $customer = \\Stripe\\Customer::retrieve($customerId[0]);\n $subscription['customer'] = [$customer];\n }\n foreach ($recruiterOffice as $office) {\n if ($office['free_trial_period'] != config('constants.ZeroValue')) {\n $subscription['data'] = $office;\n break;\n }\n }\n return $subscription;\n }", "function getAllMembers() {\r\n $api = new wlmapiclass($api_adres, $api_m);\r\n $api->return_format = 'php'; // <- value can also be xml or json\r\n\r\n $data = array();\r\n// $data['user_login'] = $name;\r\n// $data['user_email'] = $email;\r\n// // $data['custom_exp_date']=$expDate;\r\n $response = $api->get('/members');\r\n $response = unserialize($response);\r\n\r\n // $response = $api->post('/levels',$data)\r\n\r\n if (secssesResponce($response)) {\r\n\r\n $mem = $response['members']['member']; //hold array of all members \r\n\r\n return($mem);\r\n }\r\n}", "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "private function showPremiumMembers() {\n $query = \"SELECT DISTINCT u.id, n.nhc_pin, u.user_login, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um ON um.user_id = u.id AND um.meta_key = 'member_level' AND um.meta_value IN ('paid-75', 'paid-95')\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um7 ON um7.user_id = u.id AND um7.meta_key = 'expiration_date' AND um7.meta_value {$this->expireDateClause}\n ORDER BY um.meta_value\";\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n foreach($membersArr as $key => $m) {\n $tmp = get_user_meta($m['id']);\n $membersArr[$key]['addr1'] = $tmp['addr1'][0];\n $membersArr[$key]['addr2'] = $tmp['addr2'][0];\n $membersArr[$key]['city'] = $tmp['city'][0];\n $membersArr[$key]['thestate'] = $tmp['thestate'][0];\n $membersArr[$key]['zip'] = $tmp['zip'][0];\n $membersArr[$key]['country'] = $tmp['country'][0];\n $membersArr[$key]['level'] = $tmp['member_level'][0];\n }\n \n $this->showResults($membersArr, 'premium', true);\n }", "public function getUserChannels($uid){\n\n $channels = DB::table('channels')\n ->join('rights','rights.pagepath','=','channels.channel_id')\n ->join('user_rights', 'user_rights.rights_id','=','rights.rights_id')\n ->select('channels.*')\n ->where('rights.label', '=', 'channel')\n ->where('user_rights.user_id', '=', $uid)\n ->get();\n\n return $channels;\n }", "public function get_subscription_from_membership( $user_membership ) {\n\n\t\t$user_membership_id = is_object( $user_membership ) ? $user_membership->id : $user_membership;\n\t\t$subscription_key = $this->get_user_membership_subscription_key( (int) $user_membership_id );\n\n\t\tif ( ! $subscription_key ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$user_membership = wc_memberships_get_user_membership( $user_membership_id );\n\n\t\t// It seems that the order has been deleted\n\t\tif ( false === get_post_status( $user_membership->get_order_id() ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// It seems the subscription product has been removed from the order\n\t\tif ( ! WC_Subscriptions_Order::get_item_id_by_subscription_key( $subscription_key ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn WC_Subscriptions_Manager::get_subscription( $subscription_key );\n\t}", "public function getSubscription($request);", "function user_data($key){\n global $mysqli;\n @$token = addslashes($_SESSION['user']['token']);\n @$username = addslashes($_SESSION['user']['name']);\n\n if(!isset($token) && !isset($username)){\n return false;\n } else {\n\n $sql = \"SELECT * FROM user WHERE username = '\" . $username . \"' AND token = '\" . $token . \"'\";\n $result = $mysqli->query($sql);\n\n $result = $result->fetch_object();\n return @$result->$key;\n }\n }", "function _getUserListWithID($ac_token, $twitter_id, $slug) {\n $api = 'https://api.twitter.com/1/lists/show.json';\n $data = array('slug' => $slug, 'owner_id' => $twitter_id);\n return $this->_execTwApi($ac_token, $api, $data, 'get');\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserPeer::ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserPeer::ID, $key, Criteria::EQUAL);\n }", "function getMemberInfoBySessionId($sessionId){\n\t\n\t\t$dbname = \"forums\";\n\t\t$conn = new PDO(\"mysql:host=\".servername.\";dbname=$dbname\", username, password);\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t$stmt = $conn->prepare(\"SELECT m.member_id, m.donator_points_overall, m.donator_points_current FROM `sessions` s, `members` m where s.id = :sessionId and s.member_id = m.member_id\");\n\t\t$stmt->execute(array(':sessionId'=> $sessionId));\n\n\t\t$rows = $stmt->fetchAll();\n\n\t\t\t\t\t\t\t\t\t\t\n\t\treturn $rows;\n\t}", "public function getUserslistToInvite()\n\t{\n\t\t//get current login user session\n\t\t$results = array();\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options = array('course'=>$course_name,'section'=>$sections_list,'userName !='=>$user);\n\t\t$results = $this->PleUser->find('all',array('conditions'=>$options,'fields'=>array('userName','name'),'order' => array('PleUser.name ASC')));\n\t\tif ($results) {\n\t\t\treturn $results;\n\t\t}\n\t\treturn $results;\n\t}", "function getUsersWithUserRights() {\n\n $userRightsUsers = array();\n $allUsers = REDCap::getUsers();\n foreach($allUsers as $cnt => $user) {\n $rights = REDCap::getUserRights($user);\n if ($rights[$user][\"user_rights\"] == 1) {\n $userRightsUsers[] = $user;\n }\n }\n\n return $userRightsUsers;\n\n}", "function sync_list_users( $list_id ) {\n\t\tif( !( $users = get_transient( '_um_mailchimp_sync_users' ) ) ) {\n\t\t\t//get all users with selected role and status\n\t\t\t$query_users = new \\WP_User_Query( array(\n\t\t\t\t'fields' => array( 'user_email', 'ID' )\n\t\t\t) );\n\t\t\t$users = $query_users->get_results();\n\t\t\t//set users list cache\n\t\t\tset_transient( '_um_mailchimp_sync_users', $users, 24 * 3600 );\n\t\t}\n\n\t\tif( count( $users ) > 0 ) {\n\t\t\t//get subscribers from mailchimp list\n\t\t\t$mailchimp_members = $this->get_external_list_users( $list_id );\n\n\t\t\t$subscribe = get_transient('_um_mailchimp_subscribe_users');\n\t\t\tforeach ( $users as $key => $user ) {\n\t\t\t\t$internal_user_lists = isset( $user->internal_lists ) ? $user->internal_lists : get_user_meta( $user->ID, \"_mylists\", true );\n\t\t\t\tif( is_array( $internal_user_lists ) && count( $internal_user_lists ) ) {\n\n\t\t\t\t\t//check if user isn't mailchimp subscriber for list with id $list_id but subscribed on current site\n\t\t\t\t\tif( !in_array( $user->user_email, $mailchimp_members ) && isset( $internal_user_lists[ $list_id ] ) ) {\n\t\t\t\t\t\t/*$this->mailchimp_subscribe()*/\n\n\t\t\t\t\t//check if user is mailchimp subscriber for list with id $list_id but didn't subscribed on current site\n\t\t\t\t\t} else if( in_array( $user->user_email, $mailchimp_members ) && !isset( $internal_user_lists[ $list_id ] ) ) {\n\t\t\t\t\t\tif( !is_array( $subscribe[ $list_id ] ) ) $subscribe[ $list_id ] = array();\n\t\t\t\t\t\t$subscribe[ $list_id ][] = $user;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif( !is_array( $subscribe[ $list_id ] ) ) $subscribe[ $list_id ] = array();\n\t\t\t\t\t$subscribe[ $list_id ][] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_transient( '_um_mailchimp_subscribe_users', $subscribe, 24 * 3600 );\n\t\t}\n\t}", "public static function user($key=false){\n if(self::isLoggedIn()){\n return self::getUser($_SESSION['logged_user_id'], $key);\n } else {\n return false;\n }\n }", "function get_conversations_list($request)\n{\n global $redis_server;\n\n if(!validate_fields($request, array('user'))) {\n die(bad_request('missing field'));\n }\n\n $client = new Predis\\Client($redis_server);\n $convs = $client->smembers(\"user-{$request->data['user']}-conversations-list\");\n\n return json_encode(array('code' => '1', 'conversations' => $convs, 'user' => $request->data['user']));\n}", "function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }", "public function getUsersGroups($token, $id)\n {\n return $this->getQuery($this->getFullUrl('/users/' . $id . '/memberships'), $token);\n }", "function wcs_get_subscriptions( $args ) {\n\tglobal $wpdb;\n\n\t$args = wp_parse_args( $args, array(\n\t\t\t'subscriptions_per_page' => 10,\n\t\t\t'paged' => 1,\n\t\t\t'offset' => 0,\n\t\t\t'orderby' => 'start_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'customer_id' => 0,\n\t\t\t'product_id' => 0,\n\t\t\t'variation_id' => 0,\n\t\t\t'order_id' => 0,\n\t\t\t'subscription_status' => array( 'any' ),\n\t\t\t'meta_query_relation' => 'AND',\n\t\t)\n\t);\n\n\t// if order_id is not a shop_order\n\tif ( 0 !== $args['order_id'] && 'shop_order' !== get_post_type( $args['order_id'] ) ) {\n\t\treturn array();\n\t}\n\n\t// Ensure subscription_status is an array.\n\t$args['subscription_status'] = $args['subscription_status'] ? (array) $args['subscription_status'] : array();\n\n\t// Grab the native post stati, removing pending and adding any.\n\t$builtin = get_post_stati( array( '_builtin' => true ) );\n\tunset( $builtin['pending'] );\n\t$builtin['any'] = 'any';\n\n\t// Make sure status starts with 'wc-'\n\tforeach ( $args['subscription_status'] as &$status ) {\n\t\tif ( isset( $builtin[ $status ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$status = wcs_sanitize_subscription_status_key( $status );\n\t}\n\n\t// Prepare the args for WP_Query\n\t$query_args = array(\n\t\t'post_type' => 'shop_subscription',\n\t\t'post_status' => $args['subscription_status'],\n\t\t'posts_per_page' => $args['subscriptions_per_page'],\n\t\t'paged' => $args['paged'],\n\t\t'offset' => $args['offset'],\n\t\t'order' => $args['order'],\n\t\t'fields' => 'ids',\n\t\t'meta_query' => isset( $args['meta_query'] ) ? $args['meta_query'] : array(), // just in case we need to filter or order by meta values later\n\t);\n\n\t// Maybe only get subscriptions created by a certain order\n\tif ( 0 != $args['order_id'] && is_numeric( $args['order_id'] ) ) {\n\t\t$query_args['post_parent'] = $args['order_id'];\n\t}\n\n\t// Map subscription specific orderby values to internal/WordPress keys\n\tswitch ( $args['orderby'] ) {\n\t\tcase 'status' :\n\t\t\t$query_args['orderby'] = 'post_status';\n\t\t\tbreak;\n\t\tcase 'start_date' :\n\t\t\t$query_args['orderby'] = 'date';\n\t\t\tbreak;\n\t\tcase 'trial_end_date' :\n\t\tcase 'end_date' :\n\t\t\t// We need to orderby post meta value: http://www.paulund.co.uk/order-meta-query\n\t\t\t$date_type = str_replace( '_date', '', $args['orderby'] );\n\t\t\t$query_args = array_merge( $query_args, array(\n\t\t\t\t'orderby' => 'meta_value',\n\t\t\t\t'meta_key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'meta_type' => 'DATETIME',\n\t\t\t) );\n\t\t\t$query_args['meta_query'][] = array(\n\t\t\t\t'key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t'type' => 'DATETIME',\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t$query_args['orderby'] = $args['orderby'];\n\t\t\tbreak;\n\t}\n\n\t// Maybe filter to a specific user\n\tif ( 0 != $args['customer_id'] && is_numeric( $args['customer_id'] ) ) {\n\t\t$query_args['meta_query'][] = array(\n\t\t\t'key' => '_customer_user',\n\t\t\t'value' => $args['customer_id'],\n\t\t\t'type' => 'numeric',\n\t\t\t'compare' => ( is_array( $args['customer_id'] ) ) ? 'IN' : '=',\n\t\t);\n\t};\n\n\t// We need to restrict subscriptions to those which contain a certain product/variation\n\tif ( ( 0 != $args['product_id'] && is_numeric( $args['product_id'] ) ) || ( 0 != $args['variation_id'] && is_numeric( $args['variation_id'] ) ) ) {\n\t\t$query_args['post__in'] = wcs_get_subscriptions_for_product( array( $args['product_id'], $args['variation_id'] ) );\n\t}\n\n\tif ( ! empty( $query_args['meta_query'] ) ) {\n\t\t$query_args['meta_query']['relation'] = $args['meta_query_relation'];\n\t}\n\n\t$query_args = apply_filters( 'woocommerce_get_subscriptions_query_args', $query_args, $args );\n\n\t$subscription_post_ids = get_posts( $query_args );\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_post_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = wcs_get_subscription( $post_id );\n\t}\n\n\treturn apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $args );\n}" ]
[ "0.6504515", "0.62734777", "0.6230953", "0.6120904", "0.59495854", "0.59205645", "0.5730152", "0.567319", "0.5672288", "0.5550507", "0.55431294", "0.55325675", "0.55160296", "0.5474513", "0.54615414", "0.54485065", "0.54293877", "0.54163957", "0.54128474", "0.5389833", "0.53354293", "0.5313734", "0.5281147", "0.5244318", "0.5208563", "0.5202443", "0.5183852", "0.51759624", "0.5173457", "0.5168946", "0.5151892", "0.5146631", "0.5143316", "0.51421905", "0.5125635", "0.51154", "0.5113069", "0.5106082", "0.51019555", "0.51006144", "0.5094045", "0.5093001", "0.5080081", "0.5071886", "0.5066656", "0.5066656", "0.5066656", "0.5051466", "0.5044919", "0.50362164", "0.5021991", "0.50217885", "0.5018603", "0.5017262", "0.5005657", "0.5002701", "0.4997768", "0.49961644", "0.4986308", "0.49823925", "0.49693635", "0.49684447", "0.4967521", "0.49610117", "0.49480063", "0.4947848", "0.49477348", "0.49433276", "0.49426913", "0.4937459", "0.4936088", "0.4931145", "0.49229708", "0.49220014", "0.49206197", "0.4900934", "0.48983553", "0.48975554", "0.4892773", "0.48920843", "0.4888812", "0.48842722", "0.48835215", "0.48790973", "0.48703527", "0.48604536", "0.48543853", "0.48536292", "0.4852795", "0.48485515", "0.48485515", "0.48481888", "0.48451635", "0.4844565", "0.48443156", "0.4841368", "0.48409608", "0.48405793", "0.48383185", "0.4837668" ]
0.7590308
0
Check if order contains a Subscription
protected function order_contains_subscription( $order ) { return WC_Subscriptions_Order::order_contains_subscription( $order ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_subscription( $order_id ) {\n\t\treturn ( function_exists( 'wcs_order_contains_subscription' ) && ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) );\n\t}", "protected function order_contains_subscription( $order_id ) {\n\t\treturn class_exists( 'WC_Subscriptions_Order' ) && ( WC_Subscriptions_Order::order_contains_subscription( $order_id ) || WC_Subscriptions_Renewal_Order::is_renewal( $order_id ) );\n\t}", "public function hasRecurringOrders();", "public function hasRecurringOrder(OrderInterface $order);", "function wcs_do_subscriptions_exist() {\n\tglobal $wpdb;\n\t$sql = $wpdb->prepare( \"SELECT ID FROM {$wpdb->posts} WHERE post_type = %s LIMIT 1;\", 'shop_subscription' );\n\n\t// query is the fastest, every other built in method uses this. Plus, the return value is the number of rows found\n\t$num_rows_found = $wpdb->query( $sql );\n\n\treturn ( 0 !== $num_rows_found ) ? true: false;\n}", "protected function maybe_handle_subscription( $order ) {\n\t\tif ( ! class_exists( 'WC_Subscriptions' ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\tif ( ! wcs_order_contains_subscription( $order ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\t$subscription = current( wcs_get_subscriptions_for_order( $order->get_id() ) );\n\t\t$subscription_id = $subscription->get_id();\n\n\t\t$ppec_billing = get_post_meta( $subscription_id, '_ppec_billing_agreement_id', true );\n\n\t\tif ( empty( $ppec_billing ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\tif ( $subscription->has_status( apply_filters( 'woocommerce_paypal_express_checkout_privacy_eraser_subs_statuses', array( 'on-hold', 'active' ) ) ) ) {\n\t\t\treturn array( false, true, array( sprintf( __( 'Order ID %d contains an active Subscription' ), $order->get_id() ) ) );\n\t\t}\n\n\t\t$renewal_orders = WC_Subscriptions_Renewal_Order::get_renewal_orders( $order->get_id() );\n\n\t\tforeach ( $renewal_orders as $renewal_order_id ) {\n\t\t\tdelete_post_meta( $renewal_order_id, '_woo_pp_txnData' );\n\t\t\tdelete_post_meta( $renewal_order_id, '_ppec_billing_agreement_id' );\n\t\t\tdelete_post_meta( $renewal_order_id, '_paypal_status' );\n\t\t}\n\n\t\tdelete_post_meta( $subscription_id, '_woo_pp_txnData' );\n\t\tdelete_post_meta( $subscription_id, '_ppec_billing_agreement_id' );\n\t\tdelete_post_meta( $subscription_id, '_paypal_status' );\n\n\t\treturn array( true, false, array( __( 'PayPal Checkout Subscriptions Data Erased.', 'woocommerce-gateway-paypal-express-checkout' ) ) );\n\t}", "public function hasSubscribers(){\n return $this->subscriber_count > 1;\n }", "private function has_publisher_subscription()\n {\n $has_subscription = false;\n if (isset($this->options['subscription']) && $this->options['subscription'] == 1)\n {\n $has_subscription = true;\n }\n return $has_subscription;\n }", "protected function subscriptionIsPresent($items)\n {\n if ($items instanceof Collection) {\n foreach ($items as $item) {\n if ($this->quoteItemHelper->hasSubscription($item)) {\n return true;\n }\n }\n }\n return false;\n }", "function wcs_is_subscription( $subscription ) {\n\n\tif ( is_object( $subscription ) && is_a( $subscription, 'WC_Subscription' ) ) {\n\t\t$is_subscription = true;\n\t} elseif ( is_numeric( $subscription ) && 'shop_subscription' == get_post_type( $subscription ) ) {\n\t\t$is_subscription = true;\n\t} else {\n\t\t$is_subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_is_subscription', $is_subscription, $subscription );\n}", "public function hasActiveSubscription()\n {\n return $this->user->hasActiveSubscription();\n }", "function pgm_subscriber_has_subscription($subscriber_id, $list_id){\n //set default value\n $has_subscription = false;\n\n //get the subscriber from database\n $subscriber = get_post($subscriber_id);\n\n //get subscriptions from database\n $subscriptions = pgm_get_subscriptions($subscriber_id);\n\n //check subscriptions for $list_id\n if(in_array($list_id,$subscriptions)){\n\n $has_subscription = true;\n } else{\n\n //leave to default\n }\n\n return $has_subscription;\n}", "public function hasOrder()\n {\n return $this->_has('_order');\n }", "public function everSubscribed()\n {\n return !empty($this->billing_subscription);\n }", "function subscriptionExists($subscriptionId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = ?',\n\t\t\t$subscriptionId\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function existSubscription(Users $customer, Services $service) {\n $subscription = Subscriptions::where([\n 'user_id' => $customer->id,\n 'service_id' => $service->id\n ])->orderBy('id', 'desc')->first();\n \n return $subscription?$subscription:false;\n }", "function subscriptionExists($subscriptionId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function hasShoporder(){\n return $this->_has(27);\n }", "function is_subscribed($thread, $subs) {\n foreach ($subs as $sub) {\n if ($sub->threadid == $thread->id) return true;\n }\n return false;\n}", "public function isSubscribed()\n {\n // TODO there seems to be an inconsistency when getting database records via Repository or via ObjectStorage\n // TODO when getting via Repository, a Typo3bb-FrontendUser is returned\n // TODO when getting via ObjectStorage, IglarpTemplate-FrontendUser is returned\n $user = FrontendUserUtility::getCurrentUser();\n if (is_null($user)) {\n return false;\n } else {\n return $this->subscribers->contains($user);\n }\n }", "function subscriptionExistsByUser($subscriptionId, $userId){ \n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = ?\n\t\t\tAND s.user_id = ?',\n\t\t\tarray(\n\t\t\t\t$subscriptionId,\n\t\t\t\t$userId\n\t\t\t)\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function hasSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n if (0 < count($subscriptionResourceProperties)) {\n return true;\n } else {\n return false;\n }\n }", "public static function is_subscription($items)\n {\n $is_subscription = false;\n if (sizeof($items) == 1) {\n foreach ($items as $cart_item_key => $cart_item) {\n $is_recurrent = (method_exists($cart_item, 'get_meta')) ?\n $cart_item->get_meta('_used_gateway') : get_post_meta($cart_item['product_id'], '_mp_recurring_is_recurrent', true);\n if ($is_recurrent == 'yes') {\n $is_subscription = true;\n }\n }\n }\n return $is_subscription;\n }", "public function isSubscribed()\n {\n return null !== $this->queue;\n }", "public function subscribed()\n {\n if ($this->billing_free) {\n if (!$this->billing_subscription_ends_at\n || time() < strtotime($this->billing_subscription_ends_at)\n ) {\n return true;\n }\n }\n \n if (!isset($this->cardUpFront) || $this->cardUpFront) {\n return $this->billingIsActive() || $this->onGracePeriod();\n }\n \n return $this->billingIsActive() || $this->onGracePeriod() || $this->onTrial();\n }", "function checkSubscriptionRenewal($order)\n {\n $plan = & $order['PaidOrder']['plan_info']['plan_array'];\n if($order['PaidOrder']['order_status'] == 'Complete') /* The order had already been procesed in the past */\n {\n $PaidTxnLog = ClassRegistry::getClass('PaidTxnLogModel');\n $PaidTxnLog->addNote(\"Subscription Renewal\");\n $new_expiration = PaidOrderModel::getExpirationDate($plan['duration_period'],$plan['duration_number'],$order['PaidOrder']['order_expires']);\n $order['PaidOrder']['order_expires'] = $new_expiration;\n $plan['moderation'] = 0; // If it was published before no need to moderate it again\n }\n\n return $order;\n }", "function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}", "public function canHandleSubscriptions():bool\n {\n return false;\n }", "public function checkIfOrderExist($orderId);", "public function getIsSubscribedToAttribute()\n {\n return $this->subscriptions()\n ->where('user_id', auth()->id())\n ->exists();\n }", "public function addSubscription()\n {\n $custId = $this->request->id;\n $customerObj = $this->_customer->find($custId);\n if (! is_object($customerObj)) {\n return false;\n }\n $fromDate = $this->request->start_date;\n $planId = $this->request->subscription_plan;\n $orderId = $this->request->orderid;\n $getPlan = SubscriptionPlan::where('id', $planId)->first();\n $duration = $getPlan->duration;\n $planName = $getPlan->name;\n $date = Carbon::createFromFormat('d-m-Y', $fromDate);\n $fromDate = Carbon::createFromFormat('d-m-Y', $fromDate)->format('Y-m-d');\n $endDate = $date->addDays($duration);\n $customerObj->expires_at = $endDate;\n $customerObj->save();\n $subscriber = new Subscribers();\n $subscriber->subscription_plan_id = $planId;\n $subscriber->customer_id = $custId;\n $subscriber->start_date = $fromDate;\n $subscriber->end_date = $endDate;\n $subscriber->is_active = 1;\n $subscriber->save();\n $paymentTrans = new PaymentTransactions();\n $paymentTrans->payment_method_id = 2;\n $paymentTrans->customer_id = $custId;\n $paymentTrans->status = \"Success\";\n $paymentTrans->transaction_message = \"Success\";\n $paymentTrans->transaction_id = $orderId;\n $paymentTrans->response = \"Success\";\n $paymentTrans->plan_name = $planName;\n $paymentTrans->subscriber_id = $custId;\n $paymentTrans->subscription_plan_id = $planId;\n $paymentTrans->save();\n return true;\n }", "public function test_payOrder_called_withSubscriptionShouldRemoveWalletSubscription()\n {\n $expected = Wallet::create(0,0,9800);\n $user = UserMother::aUserWith50EurInItsSubscriptionWallet()->build();\n $order = OrderMother::aJustOrderWithSubscription()->buildWithWallet();\n $entityManager_stub = $this->getEntityManagerDouble();\n $entityManager_stub->persist($user)->shouldBeCalled();\n $entityManager_stub->flush($user)->shouldBeCalled();\n $sut = new WalletService($this->getEntityManagerRevealed(), $this->currencyConversionService_double->reveal(),$this->transactionService_double->reveal());\n $actual = $sut->payOrder($user,$order);\n $this->assertEquals($expected,$actual->getWallet());\n }", "function _culturefeed_mailing_check_user_subscription($user_id, $mailing_id) {\n try {\n $subscriptions = DrupalCultureFeed::getMailingSubscriptions($user_id)->objects;\n $newsletters = array();\n foreach ($subscriptions as $subscription) {\n $newsletters[$subscription->id] = $subscription->id;\n }\n return in_array($mailing_id, $newsletters);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_mailing', $e);\n return FALSE;\n }\n}", "function harvest_in_order( $order ) {\n\n\t$items = $order->get_items(); \n\n\tforeach ( $items as $item_id => $item ) {\n\n\t\tif ( $item->get_product_id() === 37592 ) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\n\t}\n\t\n\treturn false;\n\n}", "public function hasOrder() {\n return $this->_has(2);\n }", "public function isSubscribed(): bool;", "function wcs_is_view_subscription_page() {\n\tglobal $wp;\n\n\treturn ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['view-subscription'] ) ) ? true : false;\n}", "function subscriptionExistsByUser($subscriptionId, $userId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "function subscriptionExistsByUserForJournal($userId, $journalId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.user_id = ?\n\t\t\tAND s.journal_id = ?',\n\t\t\tarray(\n\t\t\t\t$userId,\n\t\t\t\t$journalId\n\t\t\t)\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "function subscriptionExistsByUserForJournal($userId, $journalId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function canStoreOrder();", "public function hasActiveOrders()\n {\n }", "public function status_subscription(){\n\t\t\treturn true;\n\t\t}", "public function isOrder();", "protected function hasCreatedPackSubscription(): bool\n {\n return !!$this->packSubscription;\n }", "public function onSubscriptionActivate(SubscriptionInterface $subscription, OrderInterface $order);", "public function hasOrderid(){\n return $this->_has(8);\n }", "public static function paidOrderFilter(Request $request, $order)\n {\n $subscriber = User::findOrFail( $order->subscriber_id);\n $subscription = Subscription::where('subscription_id', $order->subscription_id)->firstOrFail();\n\n // validate amount\n /*if ($r->mc_gross != $subscription->subscription_price) {\n \\Log::error('On subscription #' . $subscription->id . ' received amount was ' . $r->mc_gross . ' while the cost of subscription is ' . $subscription->subscription_price);\n exit;\n }*/\n\n // update expires\n $subscription->subscription_expires = now()->addMonths(1);\n $subscription->status = 'Active';\n $subscription->save();\n\n // notify creator on site & email\n $creator = $subscription->creator;\n $creator->notify(new NewSubscriberNotification($subscriber));\n\n // update creator balance\n $creator->balance += $subscription->creator_amount;\n $creator->save();\n\n // create invoice to be able to have stats in admin\n $i = new Invoice;\n $i->invoice_id = $subscription->subscription_id;\n $i->user_id = $subscription->subscriber_id;\n $i->subscription_id = $subscription->id;\n $i->amount = $subscription->subscription_price;\n $i->payment_status = 'Paid';\n $i->invoice_url = '#';\n $i->save();\n\n //YourOrderController::saveOrderAsPaid($order);\n\n // Return TRUE if the order is saved as \"paid\" in the database or FALSE if some error occurs.\n // If you return FALSE, then you can repeat the failed paid requests on the unitpay website manually.\n return true;\n }", "public function isSubscribedBy($userId = null): bool;", "public static function searchOrderFilter(Request $request, $order_id) {\n\n if(strpos($order_id, 'tip') !== false) {\n\n }\n else {\n $subscription = Subscription::where('subscription_id', $order_id)->firstOrFail();\n if ($subscription) {\n\n $subscription['UNITPAY_orderSum'] = $subscription->subscription_price; // from your database\n $subscription['UNITPAY_orderCurrency'] = 'RUB'; // from your database\n\n // if the current_order is already paid in your database, return strict \"paid\";\n // if not, return something else\n if($subscription->status == 'Active')\n $status = 'paid';\n else\n $status = $subscription->status;\n $subscription['UNITPAY_orderStatus'] = $status;//$subscription->staus; // from your database\n\n return $subscription;\n }\n }\n\n return false;\n }", "protected function hasSuccessfullySubscribedAccounts(): bool\n {\n return $this->getSubscribedSubscriptions()->count() === $this->accounts->count();\n }", "function comment_subscription_status() {\n\tglobal $comment;\n\treturn !!_stc()->is_subscribed( $comment->comment_ID );\n}", "public function hasSub()\n {\n if(is_null($this->items) || !count($this->items)) return false;\n return true;\n }", "public function hasInvoiceNeedsCapture($order)\n {\n foreach ($order->getInvoiceCollection() as $invoice) {\n /* @var $invoice Mage_Sales_Model_Order_Invoice */\n if ($invoice->canCapture()) {\n return true;\n }\n }\n\n return false;\n }", "public function hasItems () {\n\n $order = $this->getOrder();\n\n if ( !$order ) {\n return false;\n }\n\n return $order->hasItems();\n }", "function isSubscribed($number, $service) {\n\t\t$sql = \"SELECT * FROM \\\"Subscriptions\\\" WHERE \\\"Number\\\" = '$number' \" . \n\t\t\"AND \\\"Service\\\" = '$service'\";\n\t\t$result = pg_query($this->dbConnection, $sql);\n\t\tif (pg_num_rows($result) > 0) {\n\t\t\t$subscription = pg_fetch_array($result);\n\t\t\treturn $subscription[\"Status\"];\n\t\t} else {\n\t\t\treturn \"Not Subscribed\";\n\t\t}\n\t}", "public function supports($subjectOrOrderItem)\n {\n if ($subjectOrOrderItem instanceof SubscriptionInterface) {\n return true;\n }\n\n if ($subjectOrOrderItem instanceof OrderItemInterface) {\n return $subjectOrOrderItem->getSubjectType() === $this->getName()\n && array_key_exists('id', $subjectOrOrderItem->getSubjectData());\n }\n\n return false;\n }", "public function isSubscribed($key) {\n if (isset($this->notifications['all']) && !$this->notifications['all']) {\n return false;\n }\n if (isset($this->notifications[$key]) && !$this->notifications[$key]) {\n return false;\n }\n return true;\n }", "private function members_can_be_invited( $subscription ){\n return pms_gm_get_used_seats( $subscription->id ) >= pms_gm_get_total_seats( $subscription ) ? false : true;\n }", "function is_purchased($song){\n if (in_array($song, $this->purchased_songs)){\n return True;\n }\n return False;\n }", "function hasOrder($user_id, $order_id)\n {\n $order = $this->order($order_id)\n ->where('uzivatele_id', $user_id)\n ->fetch();\n\n return $order !== false;\n }", "public function canSubscribe()\n {\n if ($this->getDateLimitSigningUp() > date('Y-m-d H:i:s') && count($this->getParticipants())<$this->getNbSigningUpMax() && $this->getState()->getId() == 2)\n {\n return true;\n }\n return false;\n }", "public function canInvoice($order)\n {\n if ($order->getPayment()->canCapture()) {\n foreach ($order->getAllItems() as $item) {\n /* @var $item Mage_Sales_Model_Order_Item */\n if ($item->getQtyToInvoice() > 0) {\n return true;\n }\n }\n }\n\n return false;\n }", "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === '[email protected]') {\n // check wallet\n $wallets = $this->mangopay->listWallets($member->Id);\n foreach ($wallets as $wallet) {\n if ($wallet->Balance->Amount > 10) {\n $this->createUserSubscription($member->Id, $wallet);\n return true;\n }\n }\n }\n }\n $page++;\n }\n\n return false;\n }", "public function activated_subscription( $order ) {\n\n\t\t// set properties\n\t\t$properties = apply_filters( 'wc_kissmetrics_activated_subscription_properties',\n\t\t\tarray(\n\t\t\t\t'subscription_name' => WC_Subscriptions_Order::get_item_name( $order ),\n\t\t\t\t'total_initial_payment' => WC_Subscriptions_Order::get_total_initial_payment( $order ),\n\t\t\t\t'initial_sign_up_fee' => WC_Subscriptions_Order::get_sign_up_fee( $order ),\n\t\t\t\t'subscription_period' => WC_Subscriptions_Order::get_subscription_period( $order ),\n\t\t\t\t'subscription_interval' => WC_Subscriptions_Order::get_subscription_interval( $order ),\n\t\t\t\t'subscription_length' => WC_Subscriptions_Order::get_subscription_length( $order ),\n\t\t\t\t'subscription_trial_period' => WC_Subscriptions_Order::get_subscription_trial_period( $order ),\n\t\t\t\t'subscription_trial_length' => WC_Subscriptions_Order::get_subscription_trial_length( $order )\n\t\t\t), $order, $this\n\t\t);\n\n\t\t// record event\n\t\t$this->api_record_event( $this->event_name['activated_subscription'],\n\t\t\tarray(\n\t\t\t\t$this->property_name['subscription_name'] => $properties['subscription_name'],\n\t\t\t\t$this->property_name['total_initial_payment'] => $properties['total_initial_payment'],\n\t\t\t\t$this->property_name['initial_sign_up_fee'] => $properties['initial_sign_up_fee'],\n\t\t\t\t$this->property_name['subscription_period'] => $properties['subscription_period'],\n\t\t\t\t$this->property_name['subscription_interval'] => $properties['subscription_period'],\n\t\t\t\t$this->property_name['subscription_length'] => $properties['subscription_interval'],\n\t\t\t\t$this->property_name['subscription_trial_period'] => $properties['subscription_trial_period'],\n\t\t\t\t$this->property_name['subscription_trial_length'] => $properties['subscription_trial_length'],\n\t\t\t),\n\t\t\t$this->get_identity( $order->user_id )\n\t\t);\n\n\t}", "function jobsearch_pdf_pckg_is_subscribed($pckg_id = 0, $user_id = 0)\n{\n if ($user_id <= 0 && is_user_logged_in()) {\n $user_id = get_current_user_id();\n }\n $args = array(\n 'post_type' => 'shop_order',\n 'posts_per_page' => '-1',\n 'post_status' => 'wc-completed',\n 'order' => 'DESC',\n 'orderby' => 'ID',\n 'fields' => 'ids',\n 'meta_query' => array(\n array(\n 'key' => 'package_type',\n 'value' => 'cand_resume',\n 'compare' => '=',\n ),\n array(\n 'key' => 'jobsearch_order_package',\n 'value' => $pckg_id,\n 'compare' => '=',\n ),\n array(\n 'key' => 'jobsearch_order_user',\n 'value' => $user_id,\n 'compare' => '=',\n ),\n ),\n );\n $pkgs_query = new WP_Query($args);\n $pkgs_query_posts = $pkgs_query->posts;\n\n if (!empty($pkgs_query_posts)) {\n foreach ($pkgs_query_posts as $order_post_id) {\n return $order_post_id;\n }\n }\n return false;\n}", "public function isSubscribedToMailchimpList();", "public function containsProduct(Product $product): bool;", "function is_upsell_exists( $order ) {\n\n\t\t$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );\n\n\t\tif ( $flow_id ) {\n\n\t\t\t$navigation = false;\n\n\t\t\t$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );\n\n\t\t\t$next_step_id = wcf()->utils->get_next_step_id( $flow_id, $step_id );\n\n\t\t\tif ( $next_step_id && wcf()->utils->check_is_offer_page( $next_step_id ) ) {\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function is_renew_order_paid($original_order_id) {\n\t$sql = \"SELECT * from orders WHERE original_order_id='$original_order_id' AND status='renew_paid' \";\n\t$result = mysql_query ($sql) or die(mysql_error());\n\tif (mysql_num_rows($result)>0) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n}", "public function canOrderBySubscription( $project ): bool\n {\n if ( $project instanceof Project ) {\n $project = $project->code;\n }\n\n // get user's active subscriptions for this project\n $activeSubscriptionsForProject = in_array( $project, $this->activeSubscriptionsForProject )\n ? $this->activeSubscriptionsForProject[ $project ]\n : $this->activeSubscriptionsForProject( $project );\n\n $canOrderByMonthlySubscription = false;\n $canOrderByPayPerDownloadSubscription = false;\n foreach ( $activeSubscriptionsForProject as $userSubscription ) {\n // ask if the user can order by limited-monthly-downloads subscription\n $canOrderByMonthlySubscription = $userSubscription->canUseFeature( config( 'rinvex.subscriptions.features.limited-monthly-downloads' ) );\n\n if ( $canOrderByMonthlySubscription === true ) {\n $this->currentFeature = config( 'rinvex.subscriptions.features.limited-monthly-downloads' );\n $this->currentSubscription = $userSubscription;\n $this->canReleaseOrderBySubscription = true;\n break;\n }\n else {\n // ask if the user can order by pay-per-download subscription\n $canOrderByPayPerDownloadSubscription = $userSubscription->canUseFeature( config( 'rinvex.subscriptions.features.pay-per-download' ) );\n if ( $canOrderByPayPerDownloadSubscription === true ) {\n $this->currentFeature = config( 'rinvex.subscriptions.features.pay-per-download' );\n $this->currentSubscription = $userSubscription;\n $this->canReleaseOrderBySubscription = false;\n break;\n }\n }\n }\n\n if ( $canOrderByMonthlySubscription === true || $canOrderByPayPerDownloadSubscription === true ) {\n return true;\n }\n\n $this->canReleaseOrderBySubscription = false;\n return false;\n }", "public function checkIfSubscriptionIsPaid($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->status === Braintree_Subscription::ACTIVE || $subscription->status === Braintree_Subscription::PENDING){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private function has_token($hash) {\n\t\tif (!isset($this->tyk_subscriptions) || !is_array($this->tyk_subscriptions)) {\n\t\t\t$user_data = $this->fetch_from_tyk();\n\t\t\tif (!isset($user_data->subscriptions)) {\n\t\t\t\tthrow new Exception('Missing policy subscriptions');\n\t\t\t}\n\t\t\t$this->tyk_subscriptions = array_flip((array) $user_data->subscriptions);\n\t\t}\n\t\treturn isset($this->tyk_subscriptions[$hash]);\n\t}", "private function isSubscribed()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['userid']) || $request['userid']==\"\" )\n throw_error_msg(\"userid not provided\");\n\n if( !is_numeric($request['userid']) )\n throw_error_msg(\"invalid userid\");\n\n global $userquery;\n $is_subscribed = $userquery->is_subscribed($request['userid'],$uid);\n \n if(!$is_subscribed)\n {\n throw_error_msg(\"user is not subscribed\"); \n }\n else\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'user is subscribed', \"data\" => $is_subscribed);\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function hasInvoiceItems(): bool\n {\n return ($this->invoices()->count() !== 0) ? true : false;\n }", "protected function shouldAddPayment(): bool\r\n {\r\n return DocumentTypes::hasPayments($this->documentType);\r\n }", "protected function createBasicSubscriptionAndOrder() {\n $subscription = Subscription::create([\n 'type' => 'product_variation',\n 'store_id' => $this->store->id(),\n 'billing_schedule' => $this->billingSchedule,\n 'uid' => $this->user,\n 'payment_method' => $this->paymentMethod,\n 'purchased_entity' => $this->variation,\n 'title' => $this->variation->getOrderItemTitle(),\n 'unit_price' => new Price('2', 'USD'),\n 'state' => 'pending',\n 'starts' => \\Drupal::time()->getRequestTime() - 5,\n 'ends' => \\Drupal::time()->getRequestTime() + 1000,\n ]);\n $subscription->save();\n\n $order_storage = \\Drupal::entityTypeManager()->getStorage('commerce_order');\n $result = $order_storage->getQuery()\n ->condition('type', 'recurring')\n ->pager(1)\n ->execute();\n $this->assertEmpty($result);\n\n $subscription->getState()->applyTransition($subscription->getState()->getTransitions()['activate']);\n $subscription->save();\n\n $orders = $order_storage->loadMultiple($order_storage->getQuery()\n ->condition('type', 'recurring')\n ->execute());\n $this->assertCount(1, $orders);\n $order = reset($orders);\n\n return [$subscription, $order];\n }", "public function orderExists ( $orderId ) {\n\t\treturn $this->mapper->orderExist( $orderId );\n\t}", "public function hasOrders()\n {\n return $this->orders->count();\n }", "public function isAvailable(Order $order)\n {\n $availabilityPolicy = AvailabilityPolicyFactory::create($this, $order);\n\n return $availabilityPolicy->isAvailable();\n }", "public function isSubscribed($in)\n {\n $elt = $this->getElement($in);\n\n return ($elt && ($elt['a'] & self::ELT_IS_SUBSCRIBED));\n }", "abstract public function add_subscription( Payment_Subscription $subscription );", "public function has(ProductInterface $product);", "public function checkAndHandleWCSubscriptionTxnNotif( $midtrans_notification, $order ) {\n // @TAG: order-id-suffix-handling\n $order_id = \n WC_Midtrans_Utils::check_and_restore_original_order_id($midtrans_notification->order_id);\n // Process if this is a subscription transaction\n if ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) {\n // if not subscription and wc status pending, don't process (because that's a recurring transaction)\n if ( wcs_order_contains_renewal( $order_id) && $order->get_status() == 'pending' ) {\n return false;\n }\n $subscriptions = wcs_get_subscriptions_for_order( $order, array( 'order_type' => 'any' ) );\n foreach ( $subscriptions as $subscription ) {\n // Store card token to meta if customer choose save card on previous payment\n if ($midtrans_notification->saved_token_id ) {\n $subscription->update_meta_data('_mt_subscription_card_token',$midtrans_notification->saved_token_id);\n $subscription->save();\n }\n // Customer didn't choose save card option on previous payment\n else {\n $subscription->add_order_note( __( 'Customer didn\\'t tick <b>Save Card Info</b>. <br>The next payment on ' . $subscription->get_date('next_payment', 'site') . ' will fail.', 'midtrans-woocommerce'), 1 );\n $order->add_order_note( __('Customer didn\\'t tick <b>Save Card Info</b>, next payment will fail', 'midtrans-woocommerce'), 1 );\n $subscription->update_meta_data('_mt_subscription_card_token',$midtrans_notification->saved_token_id);\n $subscription->save();\n }\n }\n }\n }", "public function isInvoiced() {\n\t\treturn true;\n\t}", "public function subscriptionConfirmed()\n {\n return $this->status == 'CONFIRMED' ? true : false;\n }", "public function subscribedToPlan($plans, $subscription = 'default')\n {\n $subscription = $this->subscription($subscription);\n\n if ( ! $subscription || ! $subscription->valid()) {\n return false;\n }\n\n foreach ((array)$plans as $plan) {\n if ($subscription->paddle_plan_id === Cashier::getPlanId($plan)) {\n return true;\n }\n }\n\n return false;\n }", "function checkSubscriptions($subscriber,$keyword){\n\t$keyword = strtoupper($keyword);\n\t$sqlCheck=\"select count(*) as duplicates from subscriptions inner join infoChannels on infoChannels.channelID = subscriptions.channelID and keyword like '%$keyword%'and msisdn = '$subscriber'\";\n\t$results=mysql_query($sqlCheck);\n\t\n\t$subLogs=\"About to check whether $subscriber has already subscribed to $keyword \";\n\t$subLogs .= \"SQL CODE: \".$sqlCheck;\n\tlogSubs($subLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t\n\tif(!$results){\n\t\t\n\t\t$dbErr=\"SQL Error: \".mysql_error().\" SQL CODE: \".$sqlCheck;\n\t\tflog($dbErr, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t}else{\n\t\twhile($rows=mysql_fetch_array($results)){\n\t\t\t$duplicates=$rows['duplicates'];\n\t\t\tif($duplicates >= 1){\n\t\t\t\tduplicateSubscriptions($subscriber,$keyword);\n\t\t\t\t$subLogs=\"Duplicate Error: $subscriber has already subscribed to $keyword.\";\n\t\t\t\t#echo \"DUP:n \".$duplicates.\"\\n\";\n\t\t\t\tlogSubs($subLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t\t\t\treturn FALSE;\n\t\t\t}else{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n}", "protected function _maybe_register_callback_in_subscriptions() {\n\t\tif ( ! class_exists( 'WC_Subscriptions_Order' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'woocommerce_scheduled_subscription_payment_' . $this->id, array( $this, 'scheduled_subscription_payment' ), 10, 2 );\n\t\tadd_action( 'woocommerce_subscription_failing_payment_method_' . $this->id, array( $this, 'update_failing_payment_method' ) );\n\t}", "private function checkIsYourOrder($order)\n {\n $customerData = $this->sessionCustomer->getCustomer();\n $nameCustomerOrder = $order->getCustomerName();\n $nameCustomerSesstion = $customerData->getName();\n if ($nameCustomerOrder !== $nameCustomerSesstion) {\n return false;\n }\n return true;\n }", "public function testIsInscriptionsOpen()\n {\n \n }", "public function existsSubdominio(Shop $shop, \\stdClass $std);", "protected function _canViewOrder($order)\r\n {\r\n $currentOrder = Mage::registry('current_order');\r\n if ($order->getId() && ($order->getId() === $currentOrder->getId())) {\r\n return true;\r\n }\r\n return false;\r\n }", "function create_subscription($subscription) {\n\n // Get codeigniter object instance\n $CI = &get_instance();\n\n // Try to save the subscription\n if ( $CI->base_model->insert('subscriptions', $subscription) ) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n \n }", "public function hasQuantity(): bool;", "public function checkIfSubscriptionIsActive($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->status != Braintree_Subscription::CANCELED && $subscription->status != Braintree_Subscription::EXPIRED){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected function successfullySubscribedAccount(): bool\n {\n return $this->isRelatedAppPaid()\n && $this->isAccountCompatibleWithPlan()\n && $this->foundACustomer()\n && $this->createdASubscription();\n }", "public function testSubscriptionsList()\n {\n }", "public function hasOrdering()\n\t\t{\n\t\t\treturn count($this->order) > 0;\t\t\t\n\t\t}", "function wcs_get_subscriptions( $args ) {\n\tglobal $wpdb;\n\n\t$args = wp_parse_args( $args, array(\n\t\t\t'subscriptions_per_page' => 10,\n\t\t\t'paged' => 1,\n\t\t\t'offset' => 0,\n\t\t\t'orderby' => 'start_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'customer_id' => 0,\n\t\t\t'product_id' => 0,\n\t\t\t'variation_id' => 0,\n\t\t\t'order_id' => 0,\n\t\t\t'subscription_status' => array( 'any' ),\n\t\t\t'meta_query_relation' => 'AND',\n\t\t)\n\t);\n\n\t// if order_id is not a shop_order\n\tif ( 0 !== $args['order_id'] && 'shop_order' !== get_post_type( $args['order_id'] ) ) {\n\t\treturn array();\n\t}\n\n\t// Ensure subscription_status is an array.\n\t$args['subscription_status'] = $args['subscription_status'] ? (array) $args['subscription_status'] : array();\n\n\t// Grab the native post stati, removing pending and adding any.\n\t$builtin = get_post_stati( array( '_builtin' => true ) );\n\tunset( $builtin['pending'] );\n\t$builtin['any'] = 'any';\n\n\t// Make sure status starts with 'wc-'\n\tforeach ( $args['subscription_status'] as &$status ) {\n\t\tif ( isset( $builtin[ $status ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$status = wcs_sanitize_subscription_status_key( $status );\n\t}\n\n\t// Prepare the args for WP_Query\n\t$query_args = array(\n\t\t'post_type' => 'shop_subscription',\n\t\t'post_status' => $args['subscription_status'],\n\t\t'posts_per_page' => $args['subscriptions_per_page'],\n\t\t'paged' => $args['paged'],\n\t\t'offset' => $args['offset'],\n\t\t'order' => $args['order'],\n\t\t'fields' => 'ids',\n\t\t'meta_query' => isset( $args['meta_query'] ) ? $args['meta_query'] : array(), // just in case we need to filter or order by meta values later\n\t);\n\n\t// Maybe only get subscriptions created by a certain order\n\tif ( 0 != $args['order_id'] && is_numeric( $args['order_id'] ) ) {\n\t\t$query_args['post_parent'] = $args['order_id'];\n\t}\n\n\t// Map subscription specific orderby values to internal/WordPress keys\n\tswitch ( $args['orderby'] ) {\n\t\tcase 'status' :\n\t\t\t$query_args['orderby'] = 'post_status';\n\t\t\tbreak;\n\t\tcase 'start_date' :\n\t\t\t$query_args['orderby'] = 'date';\n\t\t\tbreak;\n\t\tcase 'trial_end_date' :\n\t\tcase 'end_date' :\n\t\t\t// We need to orderby post meta value: http://www.paulund.co.uk/order-meta-query\n\t\t\t$date_type = str_replace( '_date', '', $args['orderby'] );\n\t\t\t$query_args = array_merge( $query_args, array(\n\t\t\t\t'orderby' => 'meta_value',\n\t\t\t\t'meta_key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'meta_type' => 'DATETIME',\n\t\t\t) );\n\t\t\t$query_args['meta_query'][] = array(\n\t\t\t\t'key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t'type' => 'DATETIME',\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t$query_args['orderby'] = $args['orderby'];\n\t\t\tbreak;\n\t}\n\n\t// Maybe filter to a specific user\n\tif ( 0 != $args['customer_id'] && is_numeric( $args['customer_id'] ) ) {\n\t\t$query_args['meta_query'][] = array(\n\t\t\t'key' => '_customer_user',\n\t\t\t'value' => $args['customer_id'],\n\t\t\t'type' => 'numeric',\n\t\t\t'compare' => ( is_array( $args['customer_id'] ) ) ? 'IN' : '=',\n\t\t);\n\t};\n\n\t// We need to restrict subscriptions to those which contain a certain product/variation\n\tif ( ( 0 != $args['product_id'] && is_numeric( $args['product_id'] ) ) || ( 0 != $args['variation_id'] && is_numeric( $args['variation_id'] ) ) ) {\n\t\t$query_args['post__in'] = wcs_get_subscriptions_for_product( array( $args['product_id'], $args['variation_id'] ) );\n\t}\n\n\tif ( ! empty( $query_args['meta_query'] ) ) {\n\t\t$query_args['meta_query']['relation'] = $args['meta_query_relation'];\n\t}\n\n\t$query_args = apply_filters( 'woocommerce_get_subscriptions_query_args', $query_args, $args );\n\n\t$subscription_post_ids = get_posts( $query_args );\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_post_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = wcs_get_subscription( $post_id );\n\t}\n\n\treturn apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $args );\n}" ]
[ "0.71747226", "0.71717185", "0.6739315", "0.67205507", "0.65633047", "0.6429702", "0.6339807", "0.6261275", "0.61559397", "0.6135418", "0.611952", "0.6118669", "0.60814667", "0.6044969", "0.6043291", "0.60286", "0.6028257", "0.6006084", "0.59678966", "0.59616643", "0.5951888", "0.59506", "0.5900912", "0.58802", "0.5872384", "0.5866089", "0.5861931", "0.58499813", "0.5841494", "0.58389765", "0.58372784", "0.58302975", "0.5827775", "0.58239657", "0.58233696", "0.5818361", "0.5817224", "0.5807763", "0.5801209", "0.5799419", "0.5793267", "0.57883346", "0.5787651", "0.57059616", "0.57043576", "0.5701649", "0.56949824", "0.56834936", "0.5675987", "0.56652516", "0.56647706", "0.56407547", "0.5633988", "0.56324774", "0.5616773", "0.56158924", "0.55890805", "0.5576661", "0.5570864", "0.5565205", "0.55449986", "0.55447704", "0.55377764", "0.55343336", "0.55156195", "0.54898226", "0.5463602", "0.5445875", "0.54443276", "0.54393274", "0.5424556", "0.5420604", "0.541026", "0.54071486", "0.53955793", "0.5386775", "0.5379395", "0.5373951", "0.5364378", "0.5357159", "0.5355787", "0.53547096", "0.53372914", "0.533405", "0.53282225", "0.5324682", "0.53142613", "0.5309262", "0.52957654", "0.5295695", "0.52907205", "0.5290501", "0.5286389", "0.5285057", "0.52820164", "0.5280079", "0.5279234", "0.5271223", "0.5268452", "0.52651703" ]
0.7819213
0
Get a Subscription renewal url for a Subscriptiontied Membership
public function get_subscription_renewal_url( $user_membership ) { $subscription_key = $this->get_user_membership_subscription_key( $user_membership->get_id() ); $url = WC_Subscriptions_Renewal_Order::get_users_renewal_link( $subscription_key ); return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function new_subscription_url($params) {\n return $this->new_limit_url('subscription', $params);\n }", "public function getUrl()\n {\n return \\Util_HandyServerUtils::getCurrentServerRoot() . \"subs/\" . $this->auth_key;\n }", "public function get_subscription_url( $subscription_id, $api_mode = 'live' ) {\n\n\t\treturn add_query_arg(\n\t\t\tarray(\n\t\t\t\t'cmd' => '_profile-merchant-pull',\n\t\t\t\t'flag_flow' => 'merchant',\n\t\t\t\t'mp_id' => $subscription_id,\n\t\t\t),\n\t\t\t$this->get_dashboard_url( $api_mode )\n\t\t);\n\n\t}", "function ical_subscribe() {\n \t$this->wireframe->print_button = false;\n\n $ical_url = assemble_url('ical', array(\n 'token' => $this->logged_user->getToken(true),\n ));\n\n $ical_subscribe_url = str_replace(array('http://', 'https://'), array('webcal://', 'webcal://'), $ical_url);\n\n $this->smarty->assign(array(\n 'ical_url' => $ical_url . '&subscribe=no',\n 'ical_subscribe_url' => $ical_subscribe_url\n ));\n }", "public function get_subscribe_link() {\n\t\t$url = $this->get_subscribe_url();\n\t\treturn sprintf( '<a href=\"%s\">%s</a>', $url, $url );\n\t}", "protected function composeReentryURL()\n\t{\n\t\t$s = SERVER_URL\n\t\t\t\t. $this->model->director->getSiteUrl('account/password_reset_reentry')\n\t\t\t\t. '/' . $this->myAuthID . '/' . $this->myNewToken\n\t\t\t\t;\n//\t\t$this->debugLog( 'Created reentry URL [' . $s\n//\t\t\t\t. '] for email bound for [' . $this->myEmailAddr . '].'\n//\t\t\t\t);\n\t\treturn $s ;\n\t}", "public function getRechargeUrl()\n {\n return $this->get(self::_RECHARGE_URL);\n }", "public function getExternalUpdateProfileUrl();", "public function getUpdateSubscriberUrl()\n {\n return $this->UpdateSubscriberUrl;\n }", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "public function getUrl() {\n\t\treturn sprintf(self::ENDPOINT, $this->_account);\n\t}", "public static function profile_link( $subscription ) {\n\t\tif ( wcs_is_subscription( $subscription ) && 'paypal' == $subscription->get_payment_method() ) {\n\n\t\t\t$paypal_profile_id = wcs_get_paypal_id( $subscription );\n\n\t\t\tif ( ! empty( $paypal_profile_id ) ) {\n\n\t\t\t\t$url = '';\n\n\t\t\t\tif ( false === wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) {\n\t\t\t\t\t// Standard subscription\n\t\t\t\t\t$url = 'https://www.paypal.com/?cmd=_profile-recurring-payments&encrypted_profile_id=' . $paypal_profile_id;\n\t\t\t\t} else if ( wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) {\n\t\t\t\t\t// Reference Transaction subscription\n\t\t\t\t\t$url = 'https://www.paypal.com/?cmd=_profile-merchant-pull&encrypted_profile_id=' . $paypal_profile_id . '&mp_id=' . $paypal_profile_id . '&return_to=merchant&flag_flow=merchant';\n\t\t\t\t}\n\n\t\t\t\techo '<div class=\"address\">';\n\t\t\t\techo '<p class=\"paypal_subscription_info\"><strong>';\n\t\t\t\techo esc_html( __( 'PayPal Subscription ID:', 'woocommerce-subscriptions' ) );\n\t\t\t\techo '</strong>';\n\t\t\t\tif ( ! empty( $url ) ) {\n\t\t\t\t\techo '<a href=\"' . esc_url( $url ) . '\" target=\"_blank\">' . esc_html( $paypal_profile_id ) . '</a>';\n\t\t\t\t} else {\n\t\t\t\t\techo esc_html( $paypal_profile_id );\n\t\t\t\t}\n\t\t\t\techo '</p></div>';\n\t\t\t}\n\t\t}\n\n\t}", "function generateSubTokenUrl($nextUrl = null)\n{\n $secure = false;\n $session = true;\n\n if (!$nextUrl) {\n $nextUrl = OPERATIONS_URL;\n }\n\n $url = Zend_Gdata_AuthSub::getAuthSubTokenUri($nextUrl, GDATA_SCOPE, $secure, $session);\n \n return $url;\n}", "public function getUnsubcribeUrl() {\n\t\treturn $this->getEmailActionLink(\"email/unsubscribeWeeklyNews\");\n\t}", "public function getNewsletterUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/newsletter');\n }", "public function get_subscribe_url() {\n\n\t\t$podcast = \\Podlove\\Model\\Podcast::get_instance();\n\n\t\t$url = sprintf(\n\t\t\t'%s/feed/%s/',\n\t\t\tget_bloginfo( 'url' ),\n\t\t\t$this->slug\n\t\t);\n\n\t\treturn apply_filters( 'podlove_subscribe_url', $url );\n\t}", "public function subscription($attributes)\n {\n $attributes = shortcode_atts(array('id' => ''), $attributes, 'happyrsubscription');\n\n $id = $attributes['id'];\n if (empty($id)) {\n return 'You are missing company ID. See https://happyr.com/integration/doc/retrieveId';\n }\n\n return 'https://happyr.com/user/spontaneous/'.$id.'/start';\n }", "public function getBaseUrl()\n\t{\n\t\treturn self::URL_MANAGEMENT . '/' . $this->_subscriptionId;\n\t}", "public function getSubscription()\n {\n $recruiter = RecruiterProfile::where(['user_id' => Auth::user()->id])->first();\n if ($recruiter['is_subscribed'] == config('constants.ZeroValue')) {\n $result = view('web.subscription', ['activeTab' => '4']);\n } else {\n $result = redirect('jobtemplates');\n }\n return $result;\n }", "public function getSubscription($request);", "public function getSubscriptionId();", "public function getSubscriptionDetails($request);", "public function getBaseRevokeTokenUrl()\n {\n return 'https://oauth.accounting.sage.com/revoke';\n }", "public function getEditUrl()\n {\n return $this->_urlBuilder->getUrl('*/*/edit', ['id' => $this->getSubscription()->getId()]);\n }", "public function getUnsubscribeUrl() : string\n\t{\n\t\t$utils = $this->getUtilsObj();\n\n\t\treturn $utils->getUnsubscribeUrl($this);\n\t}", "function getAuthSubUrl()\n{\n $next = getCurrentUrl();\n $scope = 'https://docs.google.com/feeds/documents';\n $secure = false;\n $session = true;\n return Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure,\n $session);\n}", "function renewSubscription(&$institutionalSubscription) {\n\t\treturn $this->_renewSubscription($institutionalSubscription);\n\t}", "function create_new_listing_actions_renew_subscription($uid) {\r\n \r\n if (!is_numeric($uid)) {\r\n drupal_set_message(t('Invalid user id specified'), 'error');\r\n return;\r\n }\r\n\r\n // Find all recurring open orders\r\n $query = db_query('SELECT order_id FROM commerce_order WHERE status = :status AND type = :type AND uid = :uid ORDER BY order_id DESC LIMIT 1', array(':status' => 'canceled', ':type' => 'recurring', ':uid' => $uid));\r\n\r\n $result = $query->fetchField();\r\n\r\n if (!$result) {\r\n drupal_set_message(t('Unable to find billing cycle.'), 'error');\r\n return;\r\n }\r\n\r\n $order = commerce_order_load($result);\r\n $order->status = 'recurring_open';\r\n commerce_order_save($order);\r\n\r\n drupal_set_message(t('Your subscription will be renewed automatically.'));\r\n}", "public function getSponsorlink() {}", "public function getRssUrl()\n {\n return Mage::getUrl('tpl_eventsmanager/invitationstatus/rss');\n }", "function getUnsubscribeUrl($object) {\n return assemble_url('project_object_unsubscribe_user', array(\n 'project_id' => $object->getProjectId(),\n 'object_id' => $object->getId(),\n 'user_id' => $this->getId(),\n ));\n }", "protected function _getAuthUrl()\n {\n\t\t$url = CS_REST_General::authorize_url(\n\t\t\t$this->_getClientId(),\n\t\t\t$this->_getAuthRedirectUri(),\n\t\t\t'ImportSubscribers,ManageLists'\n\t\t);\n\t\t\n return $url;\n }", "public function getSubscriptionId()\n\t{\n\t\treturn $this->_subscriptionId;\n\t}", "public function getSubscription()\n {\n return $this->subscription;\n }", "public function getReinitUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/reinit');\n }", "function _renewSubscription(&$subscription) {\n\t\tif ($subscription->isNonExpiring()) return;\n\n\t\t$subscriptionTypeDao =& DAORegistry::getDAO('SubscriptionTypeDAO');\n\t\t$subscriptionType =& $subscriptionTypeDao->getSubscriptionType($subscription->getTypeId());\n\n\t\t$duration = $subscriptionType->getDuration();\n\t\t$dateEnd = strtotime($subscription->getDateEnd());\n\n\t\t// if the subscription is expired, extend it to today + duration of subscription\n\t\t$time = time();\n\t\tif ($dateEnd < $time ) $dateEnd = $time;\n\n\t\t$subscription->setDateEnd(mktime(23, 59, 59, date(\"m\", $dateEnd)+$duration, date(\"d\", $dateEnd), date(\"Y\", $dateEnd)));\n\n\t\t// Reset reminder dates\n\t\t$subscription->setDateRemindedBefore(null);\n\t\t$subscription->setDateRemindedAfter(null);\n\n\t\t$this->updateSubscription($subscription);\n\t}", "public function getSchedulesUrl()\n {\n if ($listKey = Mage::getStoreConfig('bs_register/schedule/url_rewrite_list')) {\n return Mage::getUrl('', array('_direct'=>$listKey));\n }\n return Mage::getUrl('bs_register/schedule/index');\n }", "public function onSubscriptionRenew(SubscriptionInterface $subscription, OrderInterface $order, OrderInterface $next_order);", "public function getBaseRefreshTokenUrl()\n {\n return \"https://$this->dataCenter.adobesign.com/oauth/refresh\";\n }", "public function getActivationUrl() {\n\t\t$activationUrl = '/registration/activation';\n\t\tif (isset ( $this->profile )) {\n\t\t\t$params ['key'] = $this->activationKey;\n\t\t\t$params ['email'] = $this->profile->email;\n\t\t\t\n\t\t\treturn Yii::app ()->controller->createAbsoluteUrl ( $activationUrl, $params );\n\t\t}\n\t}", "protected function verificationUrl($notifiable)\n {\n return URL::temporarySignedRoute(\n 'verificationapi.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey()]\n ); // this will basically mimic the email endpoint with get request\n }", "function user_subscription_plans()\n {\n global $ilance, $phrase, $ilconfig;\n \n $notice = $failedrenewalusernames = $noautopayrenewalusernames = $paidrenewalusernames = $freerenewalusernames = '';\n $failedrenewalcount = $noautopayrenewalcount = $paidrenewalcount = $freerenewalcount = 0;\n $slng = isset($_SESSION['ilancedata']['user']['slng']) ? $_SESSION['ilancedata']['user']['slng'] : 'eng'; \n \n\t\t// find all plans that have expired- don't include recurring subscriptions..\n $subscriptioncheck = $ilance->db->query(\"\n SELECT u.*, s.id, s.subscriptionid, s.user_id, s.paymethod, s.startdate, s.renewdate, s.autopayment as subscription_autopayment, s.active, s.cancelled, s.migrateto, s.migratelogic, s.recurring, s.invoiceid, s.roleid, s.autorenewal\n FROM \" . DB_PREFIX . \"subscription_user AS s,\n \" . DB_PREFIX . \"users AS u\n WHERE u.user_id = s.user_id\n AND s.renewdate <= '\" . DATETODAY . \" \" . TIMENOW . \"'\n AND s.cancelled = '0'\n AND s.recurring = '0'\n AND u.status = 'active'\n GROUP BY u.user_id\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($subscriptioncheck) > 0)\n {\n \t\n\t\t\t\n while ($res_subscription_check = $ilance->db->fetch_array($subscriptioncheck, DB_ASSOC))\n {\n // #### AUTO SUBSCRIPTION MIGRATION ############\n // did admin specify this subscription plan will migrate the user to another?\n if ($res_subscription_check['migrateto'] > 0)\n {\n $sql_subscription_plan = $ilance->db->query(\"\n SELECT subscriptionid, title_\" . $slng . \" AS title, description_\" . $slng . \" AS description, cost, length, units, subscriptiongroupid, roleid, active, canremove, visible_registration, visible_upgrade, icon, migrateto, migratelogic\n FROM \" . DB_PREFIX . \"subscription\n WHERE subscriptionid = '\" . $res_subscription_check['migrateto'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_subscription_plan) > 0)\n {\n $subscription_plan_result = $ilance->db->fetch_array($sql_subscription_plan, DB_ASSOC);\n $sql_user = $ilance->db->query(\"\n SELECT user_id, email, username\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_user) > 0)\n {\n $res_user = $ilance->db->fetch_array($sql_user, DB_ASSOC);\n switch ($res_subscription_check['migratelogic'])\n {\n\t\t\t\t\t\t\t\t// no transaction will be created\n case 'none':\n {\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '0'\n WHERE user_id = '\" . $res_user['user_id'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $freerenewalusernames .= $res_user['username'] . ', ';\n $freerenewalcount++;\n break;\n } \n // insert waived transaction & activate new subscription plan\n\t\t\t\t\t\t\t\tcase 'waived':\n {\n $renewed_invoice_id = $ilance->accounting->insert_transaction(\n intval($res_subscription_check['subscriptionid']),\n 0,\n 0,\n intval($res_user['user_id']),\n 0,\n 0,\n 0,\n '{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n '0.00',\n '0.00',\n 'paid',\n 'subscription',\n $res_subscription_check['paymethod'],\n DATETIME24H,\n DATEINVOICEDUE,\n DATETIME24H,\n '{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n 0,\n 0,\n 1\n );\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '\" . $renewed_invoice_id.\"'\n WHERE user_id = '\" . $res_user['user_id'].\"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $freerenewalusernames .= $res_user['username'] . ', ';\n $freerenewalcount++;\n break;\n } \n // insert unpaid transaction & deactivate new subscription plan\n\t\t\t\t\t\t\t\tcase 'unpaid':\n {\n\t\t\t\t\t\t\t\t\tif ($res_subscription_check['active'] == 'yes')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// customer may log-in and make payment via online account\n\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['subscriptionid'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t$res_user['user_id'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t\tsprintf(\"%01.2f\", $subscription_plan_result['cost']),\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'scheduled',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['paymethod'],\n\t\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\tSET active = 'no',\n\t\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $renewed_invoice_id . \"'\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// log subscription email for today so we do not resend\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// insert subscription invoice reminder so we don't resend again today\n\t\t\t\t\t\t\t\t\t\t$dateremind = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_daysafterfirstreminder']);\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $renewed_invoice_id . \"',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $dateremind . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t}\n $failedrenewalusernames .= $res_user['username'] . ', ';\n $failedrenewalcount++;\n break;\n } \n // create paid transaction\n\t\t\t\t\t\t\t\tcase 'paid':\n {\n $renewed_invoice_id = $ilance->accounting->insert_transaction(\n intval($res_subscription_check['subscriptionid']),\n 0,\n 0,\n intval($res_user['user_id']),\n 0,\n 0,\n 0,\n '{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n sprintf(\"%01.2f\", $subscription_plan_result['cost']),\n sprintf(\"%01.2f\", $subscription_plan_result['cost']),\n 'paid',\n 'subscription',\n $res_subscription_check['paymethod'],\n DATETIME24H,\n DATEINVOICEDUE,\n DATETIME24H,\n '{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n 0,\n 0,\n 1\n );\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '\" . $renewed_invoice_id . \"'\n WHERE user_id = '\" . $res_user['user_id'] . \"'\n \", 0, null, __FILE__, __LINE__);\n $paidrenewalusernames .= $res_user['username'] . ', ';\n $paidrenewalcount++;\n break;\n }\n }\n if ($res_subscription_check['migratelogic'] != 'none' AND $res_subscription_check['active'] == 'yes')\n {\n\t\t\t\t\t\t\t\t// obtain any unpaid subscription migration invoice\n\t\t\t\t\t\t\t\t$sql_new_invoice = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tSELECT amount, invoiceid, description\n\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . intval($renewed_invoice_id) . \"'\n\t\t\t\t\t\t\t\t\t\tAND (status = 'unpaid' OR status = 'scheduled')\n\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_new_invoice) > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$res_new_invoice = $ilance->db->fetch_array($sql_new_invoice, DB_ASSOC);\n\t\t\t\t\t\t\t\t\tif ($res_subscription_check['subscription_autopayment'] == '1')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// subscription log > did we already sent an email to this customer?\n\t\t\t\t\t\t\t\t\t\t$senttoday = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT subscriptionlogid\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t AND date_sent = '\" . DATETODAY . \"'\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($senttoday) == 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// log subscription email for today and send email to customer\n\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t// subscription renewal via online account balance\n\t\t\t\t\t\t\t\t\t\t\t$sq1_account_balance = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT available_balance, total_balance\n\t\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sq1_account_balance) > 0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$get_account_array = $ilance->db->fetch_array($sq1_account_balance, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($get_account_array['available_balance'] >= $res_new_invoice['amount'])\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$now_total = $get_account_array['total_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$now_avail = $get_account_array['available_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_total = ($now_total - $res_new_invoice['amount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_avail = ($now_avail - $res_new_invoice['amount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// re-adjust customers online account balance (minus subscription fee amount)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET available_balance = '\" . sprintf(\"%01.2f\", $new_avail) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotal_balance = '\" . sprintf(\"%01.2f\", $new_total) . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// pay existing subscription invoice via online account\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaid = '\" . sprintf(\"%01.2f\", $res_new_invoice['amount']) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND invoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adjust members total amount received for referral payments from admin\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->accounting_payment->insert_income_reported($res_user['user_id'], sprintf(\"%01.2f\", $res_new_invoice['amount']), 'credit');\n\t\t\t\t\t\t\t\t\t\t\t\t\t// update customer subscription table with new subscription information\n\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->get('subscription_payment_renewed');\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->set(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{customer}}' => $res_user['username'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{amount}}' => $ilance->currency->format($res_new_invoice['amount']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{description}}' => $res_new_invoice['description'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalusernames .= $res_user['username'] . ', ';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalcount++; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n }\n // #### REGULAR SUBSCRIPTION RENEWAL [NO AUTO-MIGRATION] #######\n else\n {\n $sql_user = $ilance->db->query(\"\n SELECT first_name, last_name, username, email, user_id\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_user) > 0)\n {\n $res_user = $ilance->db->fetch_array($sql_user, DB_ASSOC);\n $ilance->subscription_plan->deactivate_subscription_plan($res_subscription_check['user_id']);\n if ($res_subscription_check['autorenewal'] > 0)\n {\n\t\t\t\t\t\t\t// obtain customer subscription plan information\n\t\t\t\t\t\t\t$sql_subscription_plan = $ilance->db->query(\"\n\t\t\t\t\t\t\t\tSELECT cost, title_\" . $slng . \" AS title, length, units, migrateto, migratelogic, subscriptionid\n\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscription\n\t\t\t\t\t\t\t\tWHERE subscriptionid = '\" . $res_subscription_check['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_subscription_plan) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$subscription_plan_result = $ilance->db->fetch_array($sql_subscription_plan, DB_ASSOC);\n\t\t\t\t\t\t\t\t// if the subscription plan's cost is free, auto-renew subscription for this user\n\t\t\t\t\t\t\t\tif ($subscription_plan_result['cost'] > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$senttoday = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\tSELECT user_id\n\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t AND date_sent = '\" . DATETODAY . \"'\n\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($senttoday) == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// log subscription email for today and send email to customer\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// do we already have a scheduled subscription invoice for this customer?\n\t\t\t\t\t\t\t\t\t\t$sqlpaidchk = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT invoiceid\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\tAND subscriptionid = '\" . $res_subscription_check['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\tAND (status = 'scheduled' OR status = 'unpaid')\n\t\t\t\t\t\t\t\t\t\t\t\tAND invoicetype = 'subscription'\n\t\t\t\t\t\t\t\t\t\t\t\tAND (paid = '0.00' OR paid = '' OR paid = '0')\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sqlpaidchk) > 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// yes customer already has pending subscription transaction associated to this subscription id so use this instead\n\t\t\t\t\t\t\t\t\t\t\t$respaid = $ilance->db->fetch_array($sqlpaidchk, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $respaid['invoiceid'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\t\t\tintval($res_subscription_check['subscriptionid']),\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\tintval($res_user['user_id']),\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for}' . ' ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t\t\tsprintf(\"%01.2f\", $subscription_plan_result['cost']),\n\t\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t\t'scheduled',\n\t\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['paymethod'],\n\t\t\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// insert subscription invoice reminder so we don't resend again today\n\t\t\t\t\t\t\t\t\t\t$dateremind = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_daysafterfirstreminder']);\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . intval($renewed_invoice_id) . \"',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $dateremind . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// obtain invoice information once again\n\t\t\t\t\t\t\t\t\t\t$sql_new_invoice = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT totalamount, invoiceid, amount, description\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . intval($renewed_invoice_id) . \"'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_new_invoice) > 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$res_new_invoice = $ilance->db->fetch_array($sql_new_invoice, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t// auto-payments checkup (user sets this option via subscription menu)\n\t\t\t\t\t\t\t\t\t\t\tif ($res_subscription_check['subscription_autopayment'] == '1')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// subscription renewal via online account balance\n\t\t\t\t\t\t\t\t\t\t\t\t$sq1_account_balance = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tSELECT available_balance, total_balance\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sq1_account_balance) > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$get_account_array = $ilance->db->fetch_array($sq1_account_balance, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// #### ONLINE ACCOUNT BALANCE CHECK UP ####################################\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($get_account_array['available_balance'] >= $res_new_invoice['totalamount'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$now_total = $get_account_array['total_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$now_avail = $get_account_array['available_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$new_total = ($now_total - $res_new_invoice['totalamount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$new_avail = ($now_avail - $res_new_invoice['totalamount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// re-adjust customers online account balance (minus subscription fee amount)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET available_balance = '\" . sprintf(\"%01.2f\", $new_avail) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotal_balance = '\" . sprintf(\"%01.2f\", $new_total) . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// pay existing subscription invoice via online account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaid = '\" . sprintf(\"%01.2f\", $res_new_invoice['totalamount']) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND invoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// record spending habits for this user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->accounting_payment->insert_income_spent($res_user['user_id'], sprintf(\"%01.2f\", $res_new_invoice['totalamount']), 'credit');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// update customer subscription table with new subscription information\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->get('subscription_payment_renewed');\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->set(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{customer}}' => $res_user['username'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{amount}}' => $ilance->currency->format($res_new_invoice['amount']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{description}}' => $res_new_invoice['description'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalusernames .= $res_user['username'] . ', ';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalcount++; \n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// create waived transaction\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\tintval($res_subscription_check['subscriptionid']),\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\tintval($res_user['user_id']),\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for}' . ' ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t'0.00',\n\t\t\t\t\t\t\t\t\t\t'0.00',\n\t\t\t\t\t\t\t\t\t\t'paid',\n\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t'account',\n\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t'{_subscription_plan_was_renewed}',\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $renewed_invoice_id . \"'\n\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t$freerenewalusernames .= $res_subscription_check['username'] . ', ';\n\t\t\t\t\t\t\t\t\t$freerenewalcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n \t\t} \n\t }\n }\n }\n if (!empty($paidrenewalusernames))\n {\n $paidrenewalusernames = mb_substr($paidrenewalusernames, 0, -2);\n }\n else\n {\n $paidrenewalusernames = 'None';\n }\n $notice .= \"Renewed $paidrenewalcount paid subscription plans for the following users: $paidrenewalusernames. \";\n if (!empty($freerenewalusernames))\n {\n $freerenewalusernames = mb_substr($freerenewalusernames, 0, -2);\n }\n else\n {\n $freerenewalusernames = 'None';\n }\n $notice .= \"Renewed $freerenewalcount free subscription plans for the following users: $freerenewalusernames. \";\n }\n else\n {\n $notice .= \"No user subscription plans to expire at this time.\"; \n }\n return $notice;\n }", "public function getInscriptionURL(){\n return $this->rootUrl().\"inscription\";\n }", "abstract public function getPaymentPageUrl();", "public function getActivationUrl()\n\t{\n\t\treturn url('account/activate/'.$this->id.'/'.$this->activation_token);\n\t}", "public function createProfile()\n {\n $cart = session()->get('subscription_cart');\n\n if (! $cart) {\n return redirect()->route('admin.subscription.plan.index');\n }\n\n $nvpdo = \"&USER=\" . company()->getSuperConfigData('subscription.payment.paypal.user_name')\n . \"&PWD=\" . company()->getSuperConfigData('subscription.payment.paypal.password')\n . \"&SIGNATURE=\" . company()->getSuperConfigData('subscription.payment.paypal.signature')\n . \"&METHOD=CreateRecurringPaymentsProfile\" \n . \"&VERSION=108\" \n . \"&EMAIL=\" . urlencode($cart['address']['email'])\n . \"&FIRSTNAME=\" . urlencode($cart['address']['first_name'])\n . \"&LASTNAME=\" . urlencode($cart['address']['last_name'])\n . \"&STREET=\" . urlencode($cart['address']['address1'])\n . \"&CITY=\" . urlencode($cart['address']['city'])\n . \"&STATE=\" . urlencode($cart['address']['state'])\n . \"&ZIP=\" . urlencode($cart['address']['postcode'])\n . \"&COUNTRYCODE=\" . urlencode($cart['address']['country'])\n . \"&PAYMENTACTION=Sale\"\n . \"&TOKEN=\" . session()->get('token')\n . \"&PAYERID=\" . session()->get('PayerID')\n . \"&PROFILESTARTDATE=\" . gmdate(\"Y-m-d\\TH:i:s\\Z\")\n . \"&DESC=\" . $cart['plan']->name\n . \"&BILLINGPERIOD=\" . ucfirst($cart['period_unit'])\n . \"&BILLINGFREQUENCY=1\"\n . \"&AUTOBILLOUTAMT=AddToNextBilling\"\n . \"&PROFILEREFERENCE=BookingCommerce\"\n . \"&AMT=\" . round($cart['amount'], 2)\n . \"&CURRENCYCODE=\" . config('app.currency')\n . \"&L_PAYMENTREQUEST_0_ITEMCATEGORYn=Digital\" \n . \"&L_PAYMENTREQUEST_0_NAMEn=\" . $cart['plan']->name \n . \"&L_PAYMENTREQUEST_0_AMTn=\" . round($cart['amount'], 2)\n . \"&L_PAYMENTREQUEST_0_QTYn=1\"\n . \"&MAXFAILEDPAYMENTS=2\";\n \n $doEC = $this->paypalHelper->request($nvpdo);\n\n if ($doEC['ACK'] == \"Success\") {\n \n $recurringProfile = $this->subscriptionHelper->createRecurringProfile($doEC);\n\n $nextDueDate = $this->subscriptionHelper->getNextDueDate($recurringProfile);\n\n $invoice = $this->subscriptionHelper->createInvoice([\n 'recurring_profile' => $recurringProfile,\n 'saas_subscription_purchased_plan_id' => $recurringProfile->purchased_plan->id,\n 'saas_subscription_recurring_profile_id' => $recurringProfile->id,\n 'grand_total' => $recurringProfile->amount,\n 'cycle_expired_on' => $nextDueDate,\n 'customer_email' => $recurringProfile->company->email,\n 'customer_name' => $recurringProfile->company->username,\n 'payment_method' => 'Paypal',\n 'status' => 'Success',\n ]);\n\n $this->recurringProfileRepository->update([\n 'saas_subscription_invoice_id' => $invoice->id,\n 'cycle_expired_on' => $nextDueDate,\n 'next_due_date' => $nextDueDate,\n ], $recurringProfile->id);\n\n\n\n session()->forget('subscription_cart');\n\n session()->flash('success', trans('saassubscription::app.super-user.plans.profile-created-success'));\n\n return redirect()->route($this->_config['redirect']);\n } else {\n session()->flash('error', $doEC['L_LONGMESSAGE0']);\n\n return redirect()->route('admin.subscription.plan.index');\n }\n }", "function subscriptionPlan(){\n\n return view('auth.subscriptionPlan');\n }", "public function is_subscription_linked_to_membership_renewable( $subscription, $user_Membership ) {\n\t\treturn WC_Subscriptions_Renewal_Order::can_subscription_be_renewed( $this->get_user_membership_subscription_key( $user_Membership->get_id() ), $user_Membership->get_user_id() );\n\t}", "public function getRegistrationCompareUrl () {\n\t $date = date('Y-m-d H:i:s', $this->regisrtime);\n\t $date = urlencode($date);\n return 'http://'.$_SERVER['HTTP_HOST'].'/users/confirmregistration/?date='.$date.'&id='.$this->id.'&code='.$this->getRegistrationCode();\n }", "public function getSubscriptionDetails($request)\n {\n //require_once (dirname(__FILE__) . '/Model/GetSubscriptionDetailsResponse.php');\n return MarketplaceWebServiceWebstore_Model_GetSubscriptionDetailsResponse::fromXML($this->_invoke('GetSubscriptionDetails'));\n }", "function renewSubscription(&$subscription) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function getActivationUrl()\n\t{\n\t\tif (Yum::module('registration')) {\n\t\t\t$activationUrl = Yum::module('registration')->activationUrl;\n\t\t\tif (is_array($activationUrl) && isset($this->profile)) {\n\t\t\t\t$activationUrl = $activationUrl[0];\n\t\t\t\t$params['key'] = $this->activationKey;\n\t\t\t\t$params['email'] = $this->profile->email;\n\n\t\t\t\treturn Yii::app()->controller->createAbsoluteUrl($activationUrl, $params);\n\t\t\t}\n\t\t}\n\t\treturn Yum::t('Activation Url cannot be retrieved');\n\t}", "protected function verificationUrl()\n {\n return Url::temporarySignedRoute(\n 'verification.verify',\n Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),\n ['id' => $this->user->getKey()]\n );\n }", "protected function getApiUrl(): string\n {\n return preg_replace($this->regexPattern,$this->currencyDate,$this->apiEndpoint);\n }", "public function getRegistrationInitURL() {\n\t\treturn Mage::helper(\"adminhtml\")->getUrl(self::URL_REGISTRATION_INIT);\n\t}", "public function getBaseAuthorizationUrl()\n {\n return 'https://redbooth.com/oauth2/authorize';\n }", "public function getUri()\n {\n return 'https://'.$this->getAuth().'@'.self::BASE_URI.'/v1/';\n }", "public function getSubscriptionId() {\n\t\treturn $this->container['subscription_id'];\n\t}", "public function getURL()\n {\n return Config::get('URL') . 'auth/unl/';\n }", "private function getLicenseActivateUrl()\n {\n if (is_null($this->_licenseActivateUrl)) {\n $this->_licenseActivateUrl = ($this->_feedHelper->getStoreConfig(\\Ced\\Booking\\Block\\Extensions::LICENSE_USE_HTTPS_PATH) ? 'https://' : 'http://')\n . $this->_feedHelper->getStoreConfig(self::LICENSE_ACTIVATION_URL_PATH);\n }\n return $this->_licenseActivateUrl;\n }", "public function get_revoke_url() {\n\n $url = new moodle_url('/repository/repository_callback.php');\n $url->param('callback', 'yes');\n $url->param('repo_id', $this->id);\n $url->param('revoke', 'yes');\n $url->param('reloadparentpage', true);\n $url->param('sesskey', sesskey());\n return '<a target=\"_blank\" href=\"'.$url->out(false).'\">'.get_string('revokeyourgoogleaccount', 'repository_googledrive').'</a>';\n }", "function get_checkout_url() {\n\t\t\t$checkout_page_id = get_option('cmdeals_checkout_page_id');\n\t\t\tif ($checkout_page_id) :\n\t\t\t\tif (is_ssl()) return str_replace('http:', 'https:', get_permalink($checkout_page_id));\n\t\t\t\treturn get_permalink($checkout_page_id);\n\t\t\tendif;\n\t\t}", "function checkSubscriptionRenewal($order)\n {\n $plan = & $order['PaidOrder']['plan_info']['plan_array'];\n if($order['PaidOrder']['order_status'] == 'Complete') /* The order had already been procesed in the past */\n {\n $PaidTxnLog = ClassRegistry::getClass('PaidTxnLogModel');\n $PaidTxnLog->addNote(\"Subscription Renewal\");\n $new_expiration = PaidOrderModel::getExpirationDate($plan['duration_period'],$plan['duration_number'],$order['PaidOrder']['order_expires']);\n $order['PaidOrder']['order_expires'] = $new_expiration;\n $plan['moderation'] = 0; // If it was published before no need to moderate it again\n }\n\n return $order;\n }", "protected function getNotificationURL ()\n {\n return Mage::getUrl('securehosting/redirect/notify/', array('_secure' => true));\n }", "function generate_get_premium_url( $url = 'https://generatepress.com/premium' ) \r\n{\r\n\t// Get our URL\r\n\t$url = trailingslashit( $url );\r\n\t\r\n\t// Set up args\r\n\t$args = apply_filters( 'generate_premium_url_args', array(\r\n\t\t'ref' => null,\r\n\t\t'campaign' => null\r\n\t) );\r\n\t\r\n\t// Set up our URL if we have an ID\r\n\tif ( isset( $args[ 'ref' ] ) ) {\r\n\t\t$url = add_query_arg( 'ref', absint( $args[ 'ref' ] ), $url );\r\n\t}\r\n\t\r\n\t// Set up our URL if we have a campaign\r\n\tif ( isset( $args[ 'campaign' ] ) ) {\r\n\t\t$url = add_query_arg( 'campaign', sanitize_text_field( $args[ 'campaign' ] ), $url );\r\n\t}\r\n\t\r\n\t// Return our URL with the optional referral ID\r\n\treturn esc_url( $url );\r\n}", "public function getInvitationsstatusUrl()\n {\n if ($listKey = Mage::getStoreConfig('tpl_eventsmanager/invitationstatus/url_rewrite_list')) {\n return Mage::getUrl('', array('_direct'=>$listKey));\n }\n return Mage::getUrl('tpl_eventsmanager/invitationstatus/index');\n }", "public function getSubscriptionWithId(int $subscriptionId);", "public function getURL()\n {\n return $this->uRL;\n }", "function generateInviteLink(){\n\t\treturn \"https://app.healthlynked.com/#!/group_join_invite/\".$this->secret.\"?return_url=access_control\";\n\t}", "public function woo_slg_linkedin_auth_url() {\n\t\t\t\n\t\t\t//Remove unused scope for login\n\t\t\t\n\t\t\t$scope\t= array( 'r_emailaddress', 'r_liteprofile' );\n\t\t\t\n\t\t\t//load linkedin class\n\t\t\t$linkedin = $this->woo_slg_load_linkedin();\n\t\t\t\n\t\t\t//check linkedin loaded or not\n\t\t\tif( !$linkedin ) return false;\n\t\t\t\n\t\t\t//Get Linkedin config\n\t\t\t$config\t= $this->linkedinconfig;\n\t\t\t\n\t\t\ttry {//Prepare login URL\n\t\t\t\t$preparedurl\t= $this->linkedin->getAuthorizeUrl( $config['appKey'], $config['callbackUrl'], $scope );\n\t\t\t} catch( Exception $e ) {\n\t\t\t\t$preparedurl\t= '';\n\t }\n\t \n\t\t\treturn $preparedurl;\n\t\t}", "public function getSSLUrl()\n {\n return preg_replace('|^http://|i', 'https://', $this->getUrl());\n }", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "public function getUrl() {\n return $this->getProfileUri();\n }", "public function getBaseRefreshTokenUrl()\n {\n return $this->getBaseAccessTokenUrl([]);\n }", "function sendMembershipRenewalEmails($row, $config) {\r\n\t\t$jconfig = new JConfig();\r\n\t\t$db = & JFactory::getDBO();\r\n\t\t$fromEmail = $jconfig->mailfrom;\r\n\t\t$fromName = $jconfig->fromname;\r\n\t\t$sql = \"SELECT * FROM #__osmembership_plans WHERE id=\".$row->plan_id ;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$plan = $db->loadObject();\r\n\t\tif ($row->renew_option_id) {\r\n\t\t\t$numberDays = $row->subscription_length ;\r\n\t\t} else {\r\n\t\t\t$sql = 'SELECT number_days FROM #__osmembership_renewrates WHERE id='.$row->renew_option_id ;\r\n\t\t\t$db->setQuery($sql) ;\r\n\t\t\t$numberDays = $db->loadResult();\r\n\t\t}\t\t\r\n\t\t//Need to over-ridde some config options\r\n\t\t$emailContent = OSMembershipHelper::getEmailContent($config, $row);\r\n\t\t$replaces = array() ;\r\n\t\t$replaces['plan_title'] = $plan->title ;\r\n\t\t$replaces['first_name'] = $row->first_name ;\r\n\t\t$replaces['last_name'] = $row->last_name ;\r\n\t\t$replaces['organization'] = $row->organization ;\r\n\t\t$replaces['address'] = $row->address ;\r\n\t\t$replaces['address2'] = $row->address ;\r\n\t\t$replaces['city'] = $row->city ;\r\n\t\t$replaces['state'] = $row->state ;\r\n\t\t$replaces['zip'] = $row->zip ;\r\n\t\t$replaces['country'] = $row->country ;\r\n\t\t$replaces['phone'] = $row->phone ;\r\n\t\t$replaces['fax'] = $row->phone ;\r\n\t\t$replaces['email'] = $row->email ;\r\n\t\t$replaces['comment'] = $row->comment ;\r\n\t\t$replaces['amount'] = number_format($row->amount, 2) ;\r\n\t\t$replaces['discount_amount'] = number_format($row->discount_amount, 2) ;\r\n\t\t$replaces['tax_amount'] = number_format($row->tax_amount, 2) ;\r\n\t\t$replaces['gross_amount'] = number_format($row->gross_amount, 2) ;\r\n\t\t$replaces['end_date'] = JHTML::_('date', $row->to_date, $config->date_format);\r\n\t\t$replaces['number_days'] = $numberDays ;\r\n\t\t\t\r\n\t\t$replaces['transaction_id'] = $row->transaction_id ;\r\n\t\tif ($row->payment_method) {\r\n\t\t\t$replaces['payment_method'] = JText::_(os_payments::loadPaymentMethod($row->payment_method)->title) ;\r\n\t\t}\r\n\t\t//Should we create map to custom fields\r\n\t\t$sql = 'SELECT field_id, field_value FROM #__osmembership_field_value WHERE subscriber_id = '.$row->id;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowValues = $db->loadObjectList();\r\n\t\t$sql = 'SELECT a.id, a.name FROM #__osmembership_fields AS a WHERE a.published=1 AND (a.plan_id = 0 OR a.plan_id='.$row->plan_id.')';\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowFields = $db->loadObjectList();\r\n\t\t$fields = array() ;\r\n\t\tfor ($i = 0 , $n = count($rowFields) ; $i < $n ; $i++) {\r\n\t\t\t$rowField = $rowFields[$i] ;\r\n\t\t\t$fields[$rowField->id] = $rowField->name ;\r\n\t\t}\r\n\t\tfor ($i = 0 , $n = count($rowValues) ; $i < $n ; $i++) {\r\n\t\t\t$rowValue = $rowValues[$i] ;\r\n\t\t\t$replaces[$fields[$rowValue->field_id]] = $rowValue->field_value ;\r\n\t\t}\t\t\t\t\r\n\t\t$subject = $config->user_renew_email_subject ;\t\t\t\t\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = $config->user_renew_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body) ;\r\n\r\n\t\t\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\t\r\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\r\n\t\t\t$j3 = true ;\r\n\t\t\t$mailer = new JMail() ;\r\n\t\t} else {\r\n\t\t\t$j3 = false ;\r\n\t\t}\r\n\t\tif ($j3) {\r\n\t\t\t$mailer->sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t} else {\r\n\t\t\tJUtility::sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t}\t\t\t\t\r\n\t\t//Send emails to notification emails\r\n\t\tif ($config->notification_emails == '')\r\n\t\t\t$notificationEmails = $fromEmail;\r\n\t\telse\r\n\t\t\t$notificationEmails = $config->notification_emails;\r\n\t\t$notificationEmails = str_replace(' ', '', $notificationEmails);\r\n\t\t$emails = explode(',', $notificationEmails);\r\n\t\t$subject = $config->admin_renw_email_subject ;\t\t\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = $config->admin_renew_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body);\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\tfor ($i = 0, $n = count($emails); $i < $n ; $i++) {\r\n\t\t\t$email = $emails[$i];\r\n\t\t\tif ($j3) {\r\n\t\t\t\t$mailer->sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\t} else {\r\n\t\t\t\tJUtility::sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "public function getSubscriptionForLicense($licenseKey){\n $this->load->model('ls_api');\n $con = $this->getCon();\n $license = $this->getTableRowByKey(\"Licenses\",\"LicenseKey\",$licenseKey);\n echo \"Total Number of Licenses: $licCount<br>\\n\";\n// die();\n $selected = 0;\n $page = 100;\n $end = 180000;\n while($selected < $licCount){\n $res = $this->queryOLS(\"select * from Licenses order by licenseId limit $selected,$page\");\n $numI = mysqli_num_rows($res);\n echo \"Selected $selected, Number returned: $numI<br>\\n\";\n $i = $selected;\n $selected += $numI;\n if($selected > $end) die();\n \n $emails = [];\n while($license = $res->fetch_assoc()) {\n \n// var_dump($contact);\n $id = $license['licenseId'];\n $key = $license['licenseKey'];\n $ls_info = $this->ls_api->getLicenseInformation($key);\n $exp = $ls_info['UpgradeSubscriptionExpirationDate'];\n// echo \"$key expires on $exp\\n\";\n if(!$exp || $exp == '') continue;\n $exp = date(\"Y-m-d H:i:s\", strtotime($exp));\n echo \"$key expires on $exp\\n\";\n $this->updateOLS('Licenses', ['novaCareExpiration' => $exp], 'licenseId', $id);\n// die();\n \n }\n \n// die();\n }\n }", "public function getURL() {\n $defaultPorts= array(\n 'http' => 80,\n 'https' => 443\n );\n \n // Determine which settings we need to pass\n $xsr= array();\n if (\n ($this->getProduct() != $this->getDefaultProduct()) ||\n ($this->getLanguage() != $this->getDefaultLanguage())\n ) {\n $xsr[]= $this->getProduct();\n $xsr[]= $this->getLanguage();\n }\n if ($this->getSessionId()) $xsr[]= 'psessionid='.$this->getSessionId();\n\n $port= '';\n if (\n $this->getPort() &&\n (!isset($defaultPorts[$this->getScheme()]) ||\n $this->getPort() != $defaultPorts[$this->getScheme()])\n ) {\n $port= ':'.$this->getPort();\n }\n\n\n return sprintf(\n '%s://%s%s/xml/%s%s%s%s',\n $this->getScheme(),\n $this->getHost(),\n $port,\n (sizeof($xsr) ? implode('.', $xsr).'/' : ''),\n $this->getStateName(), \n $this->getQuery() ? '?'.$this->getQuery() : '',\n $this->getFragment() ? '#'.$this->getFragment() : ''\n );\n }", "public function getRevokeAccessTokenUrl() {\n return Mage::helper('adminhtml')->getUrl('adminhtml/aw_vidtest_authsub/revoke', array('api_model_code' => $this->getApiModelCode()));\n }", "protected function getAPIcreditUrl()\n {\n return \"api/credit\";\n }", "function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}", "public function getUrl()\n {\n return Mage::getUrl('magna_news', array('news_id' => $this->getId(), '_secure' => true));\n }", "abstract public function getAuthorizeUrl(): string;", "function getSubscriptionId(){\n\n $isSubsId = $this->common_model->getsingle(USERS,array('userId'=>$this->session->userdata('userId')));\n\n return !empty($isSubsId) ? $isSubsId->bizSubscriptionId : FALSE;\n \n }", "public function getAuthUrl();", "function createURLLink($purchase_id){\r\n\t\t$p_removed_id = substr($purchase_id, 1);\r\n\t\t$link = '<a href=\"https://www.trademe.co.nz/MyTradeMe/PurchaseSummary.aspx?asid='.$p_removed_id.'\">'.$purchase_id.'</a>';\r\n\t\treturn $link;\r\n\t}", "function wp_registration_url()\n {\n }", "protected function getFetchUrl() {\n $url = 'sites/' . $this->site->get('id') . '/authorizations';\n return $url;\n }", "public function get_subscribe_link( $args = array() ){\n\n\t\t$link = site_url() . '/?feed=wptticsfeeds';\n\n\t\tif ( isset( $args ) && is_array( $args ) ){\n\n\t\t\t// adding author feed links\n\t\t\tif ( isset( $args['author'] ) ){\n\t\t\t\t$user = get_userdata( (int) $args['author'] );\n\t\t\t\t$link = $link . '&wpttauthor=' . $user->user_login;\n\t\t\t}\n\n\t\t} // if\n\n\t\treturn esc_url( $link );\n\n\t}", "public function getSubscriptionKey() { return $this->subscriptionKey; }", "public function get_url()\n\t{\n\t\treturn append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, \"i=pm&amp;mode=view&amp;p={$this->item_id}\");\n\t}", "public function getBaseRevokeTokenUrl()\n {\n return \"https://$this->dataCenter.adobesign.com/oauth/revoke\";\n }", "function getResetPasswordUrl() {\n \treturn assemble_url('reset_password', array(\n \t 'user_id' => $this->getId(),\n \t 'code' => $this->getPasswordResetKey(),\n \t));\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "public function getApiUrl() \n {\n return ( $this->getSSL() ? 'https://' : 'http://' ) . $this->_api_url;\n }", "private static function _getUrl(String $resource)\n {\n if (null == static::$api_url) {\n static::$api_url = 'https://' .\n substr(\n static::$api_key,\n strrpos(static::$api_key, '-') + 1\n ) .\n '.api.mailchimp.com/3.0';\n }\n return rtrim(static::$api_url, '/') . \"/\" . $resource;\n }", "public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}", "public function getAccountUrl()\n {\n return $this->accountUrl;\n }", "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "function canRenewMembership($renewOptionId, $fromSubscriptionId) {\r\n\t\treturn true ;\r\n\t}" ]
[ "0.7509436", "0.6820527", "0.63464165", "0.61982125", "0.60496145", "0.604195", "0.6018879", "0.598256", "0.5924393", "0.5900339", "0.58577156", "0.58441734", "0.58365834", "0.58042365", "0.5786703", "0.5777251", "0.57770866", "0.5769336", "0.5738676", "0.5706045", "0.569512", "0.56929386", "0.5651787", "0.5641349", "0.563536", "0.56177694", "0.56022406", "0.55672103", "0.5530574", "0.5520577", "0.5495116", "0.54751897", "0.54577345", "0.54553425", "0.54519534", "0.5437824", "0.5425881", "0.5425704", "0.54118544", "0.5397835", "0.5377839", "0.5357216", "0.5354454", "0.53512734", "0.5340874", "0.5337697", "0.5335168", "0.5333204", "0.52867734", "0.52801335", "0.52789164", "0.5274937", "0.5269241", "0.52552706", "0.5240968", "0.5237664", "0.5224861", "0.52246964", "0.5222397", "0.5217163", "0.52135545", "0.5210641", "0.52044386", "0.5202866", "0.5202679", "0.5178938", "0.5173414", "0.5166851", "0.5152763", "0.51393896", "0.51349217", "0.5133837", "0.5133133", "0.5132702", "0.513101", "0.51296157", "0.5120987", "0.51173234", "0.5116112", "0.51158977", "0.5115743", "0.51128393", "0.51118374", "0.51059663", "0.5103556", "0.5095409", "0.5082906", "0.5075102", "0.507432", "0.5073134", "0.50702745", "0.50619644", "0.5049279", "0.50479585", "0.504741", "0.50463545", "0.5045571", "0.5042308", "0.50421846", "0.50323737" ]
0.7367929
1
Check if a Subscription associated to a Membership is renewable
public function is_subscription_linked_to_membership_renewable( $subscription, $user_Membership ) { return WC_Subscriptions_Renewal_Order::can_subscription_be_renewed( $this->get_user_membership_subscription_key( $user_Membership->get_id() ), $user_Membership->get_user_id() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_renewable() {\n\t\treturn isset( $this->data['subscriptions_renewable'] ) && $this->data['subscriptions_renewable'];\n\t}", "function canRenewMembership($renewOptionId, $fromSubscriptionId) {\r\n\t\treturn true ;\r\n\t}", "protected function renewal(): bool\n {\n // If we're not in a webhook, it's not possible to be an auto-renewal\n if (!$this->webhook) {\n return false;\n }\n\n // Check if the user's active sub is from before the current date\n /** @var \\Laravel\\Cashier\\Subscription $sub */\n $sub = \\Laravel\\Cashier\\Subscription::where('user_id', $this->user->id)->where('stripe_status', 'active')->first();\n if (empty($sub)) {\n return false;\n }\n return $sub->created_at->lessThan(Carbon::yesterday());\n }", "function checkSubscriptionRenewal($order)\n {\n $plan = & $order['PaidOrder']['plan_info']['plan_array'];\n if($order['PaidOrder']['order_status'] == 'Complete') /* The order had already been procesed in the past */\n {\n $PaidTxnLog = ClassRegistry::getClass('PaidTxnLogModel');\n $PaidTxnLog->addNote(\"Subscription Renewal\");\n $new_expiration = PaidOrderModel::getExpirationDate($plan['duration_period'],$plan['duration_number'],$order['PaidOrder']['order_expires']);\n $order['PaidOrder']['order_expires'] = $new_expiration;\n $plan['moderation'] = 0; // If it was published before no need to moderate it again\n }\n\n return $order;\n }", "function mc_do_not_allow_3_month_renewals( $subscription_can_be_renewed, $subscription, $subscription_key, $user_id ) {\n if( $subscription['product_id'] == 3622 ) {\n return false;\n }\n else {\n return $subscription_can_be_renewed;\n }\n}", "protected function needsRenewal(): bool\n {\n return $this->renewable() === true && $this->expiryTime() - time() < $this->duration() / 2;\n }", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "public function subscribed()\n {\n if ($this->billing_free) {\n if (!$this->billing_subscription_ends_at\n || time() < strtotime($this->billing_subscription_ends_at)\n ) {\n return true;\n }\n }\n \n if (!isset($this->cardUpFront) || $this->cardUpFront) {\n return $this->billingIsActive() || $this->onGracePeriod();\n }\n \n return $this->billingIsActive() || $this->onGracePeriod() || $this->onTrial();\n }", "private function members_can_be_invited( $subscription ){\n return pms_gm_get_used_seats( $subscription->id ) >= pms_gm_get_total_seats( $subscription ) ? false : true;\n }", "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === '[email protected]') {\n // check wallet\n $wallets = $this->mangopay->listWallets($member->Id);\n foreach ($wallets as $wallet) {\n if ($wallet->Balance->Amount > 10) {\n $this->createUserSubscription($member->Id, $wallet);\n return true;\n }\n }\n }\n }\n $page++;\n }\n\n return false;\n }", "public function canSubscribe()\n {\n if ($this->getDateLimitSigningUp() > date('Y-m-d H:i:s') && count($this->getParticipants())<$this->getNbSigningUpMax() && $this->getState()->getId() == 2)\n {\n return true;\n }\n return false;\n }", "public function status_subscription(){\n\t\t\treturn true;\n\t\t}", "public function hasActiveSubscription()\n {\n return $this->user->hasActiveSubscription();\n }", "public function isSubscribedInviteReminder(){\n\n\t\t// check if the object has been hydrated\n\t\tif(null === $this->id){\n\t\t\t$this->load();\n\t\t}\n\n\t\t// this method only available for email obj w/template = 'inviteReminder'\n\t\tif('inviteReminder' !== $this->template) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// look for the corresponding \"unsubscribe\" email record for this gift/email. If it exists, they have unsubscribed\n\t\t$sql = \"\n\t\t\tSELECT \t`id`\n\t\t\tFROM \t`emails`\n\t\t\tWHERE \t`emailDigest` = '$this->emailDigest'\n\t\t\tAND \t`giftId` = $this->giftId\n\t\t\tAND \t`template` = 'inviteReminderUnsubscribe'\n\t\t\";\n\n\t\t$result = db::query($sql);\n\t\t$recordCount = mysql_num_rows($result);\n\t\treturn (0 === $recordCount);\n\n\t}", "public function userHasModuleSubscription($moduleName);", "function pgm_subscriber_has_subscription($subscriber_id, $list_id){\n //set default value\n $has_subscription = false;\n\n //get the subscriber from database\n $subscriber = get_post($subscriber_id);\n\n //get subscriptions from database\n $subscriptions = pgm_get_subscriptions($subscriber_id);\n\n //check subscriptions for $list_id\n if(in_array($list_id,$subscriptions)){\n\n $has_subscription = true;\n } else{\n\n //leave to default\n }\n\n return $has_subscription;\n}", "function isEligibleToSubscribe($mid, $isVerified){\n\t\t// If free user restrict after 100 subscription form submission\n\t\t// Restrict per minute 5 submission\n\t\t// Restrict per day 100 submission\n\n\t\t$retVal = false;\n\t\tif(!$isVerified){\n\t\t\t$rsCountSignupContact = $this->db->query(\"Select count(subscriber_id) as totSubscribed from red_email_subscribers where subscriber_created_by='$mid' and is_signup=1 and date_format(subscriber_date_added,'%Y-%m-%d') = curdate()\");\n\t\t\t$intTotalSubscribed = $rsCountSignupContact->row()->totSubscribed;\n\t\t\t$rsCountSignupContact->free_result();\n\t\t\t//if($intTotalSubscribed < 26){\n\t\t\tif($intTotalSubscribed < 6){\n\t\t\t\t$retVal = true;\n\t\t\t}\n\t\t}else{\n\t\t\t$retVal = true;\n\n\t\t\t/* $user_packages_array=$this->UserModel->get_user_packages(array('member_id'=>$mid,'is_deleted'=>0));\n\t\t\t$package_id=$user_packages_array[0]['package_id'];\n\t\t\tif($package_id > 0){\n\t\t\t\t$retVal = true;\n\t\t\t}else{\n\t\t\t\t$rsCountSignupContact = $this->db->query(\"Select count(subscriber_id) as totSubscribed from red_email_subscribers where subscriber_created_by='$mid' and is_signup=1 and is_deleted=1\");\n\t\t\t\t$intTotalSubscribed = $rsCountSignupContact->row()->totSubscribed;\n\t\t\t\t$rsCountSignupContact->free_result();\n\t\t\t\tif($intTotalSubscribed < 3){\n\t\t\t\t\t$retVal = true;\n\t\t\t\t}\n\t\t\t} */\n\n\n\t\t}\n\t\treturn $retVal ;\n\t}", "public function everSubscribed()\n {\n return !empty($this->billing_subscription);\n }", "public static function is_subscription($items)\n {\n $is_subscription = false;\n if (sizeof($items) == 1) {\n foreach ($items as $cart_item_key => $cart_item) {\n $is_recurrent = (method_exists($cart_item, 'get_meta')) ?\n $cart_item->get_meta('_used_gateway') : get_post_meta($cart_item['product_id'], '_mp_recurring_is_recurrent', true);\n if ($is_recurrent == 'yes') {\n $is_subscription = true;\n }\n }\n }\n return $is_subscription;\n }", "function is_renew_order_paid($original_order_id) {\n\t$sql = \"SELECT * from orders WHERE original_order_id='$original_order_id' AND status='renew_paid' \";\n\t$result = mysql_query ($sql) or die(mysql_error());\n\tif (mysql_num_rows($result)>0) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n}", "function comment_subscription_status() {\n\tglobal $comment;\n\treturn !!_stc()->is_subscribed( $comment->comment_ID );\n}", "function _culturefeed_mailing_check_user_subscription($user_id, $mailing_id) {\n try {\n $subscriptions = DrupalCultureFeed::getMailingSubscriptions($user_id)->objects;\n $newsletters = array();\n foreach ($subscriptions as $subscription) {\n $newsletters[$subscription->id] = $subscription->id;\n }\n return in_array($mailing_id, $newsletters);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_mailing', $e);\n return FALSE;\n }\n}", "function stop_members_from_renewing($okay)\n{\n global $current_user;\n // If something else isn't okay, stop from running this code further.\n if (!$okay) {\n return $okay;\n }\n // If the user doesn't have a membership level carry on with checkout.\n if (!pmpro_hasMembershipLevel()) {\n return true;\n }\n // Check if the user's current membership level is the same for checking out.\n if (pmpro_hasMembershipLevel($_REQUEST['level'])) { // Change level ID to a different level.\n pmpro_setMessage('This is your current membership level. Please select a different membership level.', 'pmpro_error');\n return false;\n }\n if (PMPro_Alveoles::has_commitment_level()) {\n $user_id = $current_user->ID;\n $membership_levels = pmpro_getMembershipLevelsForUser( $user_id );\n /** @var PMPro_Membership_Level $level */\n foreach ($membership_levels as $l) {\n if (PMPro_Alveoles::is_with_commitment($l->ID)) {\n if ($date = PMPro_Alveoles::contracted($l->ID)) { //still engaged\n pmpro_setMessage(PMPro_Alveoles::getContractedMessage($date,$l->ID), 'pmpro_error');\n return false;\n }\n }\n }\n }\n return true;\n}", "function wcs_do_subscriptions_exist() {\n\tglobal $wpdb;\n\t$sql = $wpdb->prepare( \"SELECT ID FROM {$wpdb->posts} WHERE post_type = %s LIMIT 1;\", 'shop_subscription' );\n\n\t// query is the fastest, every other built in method uses this. Plus, the return value is the number of rows found\n\t$num_rows_found = $wpdb->query( $sql );\n\n\treturn ( 0 !== $num_rows_found ) ? true: false;\n}", "public function checkSubscribe()\n {\n return $this->request->checkSubscribe($this->config->webhookToken);\n }", "function renewSubscription(&$subscription) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "function subscriptionExists($subscriptionId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = ?',\n\t\t\t$subscriptionId\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "function lb_subscription_set_renewal_flag($account, $subscription, $payment_type) {\n if ($payment_type == 'check') {\n $renew = 0;\n }\n else {\n $renew = 1;\n }\n // The $account that rules passes contains the original information, which may have\n // changed as a result of an action that has run.\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n if ($account_subscription_data['delta'] === NULL) {\n lb_subscription_set_subscription($entity, $subscription);\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n }\n if ($account_subscription_data['delta'] !== NULL) {\n if ($account_subscription_data['renew'] != $renew) {\n $entity->field_subscription[LANGUAGE_NONE][$account_subscription_data['delta']]['field_renew'] = array(\n LANGUAGE_NONE => array(\n 0 => array(\n 'value' => $renew,\n ),\n ),\n );\n entity_save('user', $entity);\n }\n }\n}", "public function canGetRecurringProfileDetails()\r\n {\r\n return true;\r\n }", "public function getIsSubscribedAttribute()\n {\n if(!empty(authUser()->id)) {\n return authUser()->isExpires() ? 1 : 0;\n }\n else {\n return 0;\n }\n }", "public function subscriptionConfirmed()\n {\n return $this->status == 'CONFIRMED' ? true : false;\n }", "public function userHasModuleSubscription($moduleName){\n\t\treturn array_key_exists($moduleName, $this->auth->user()->moduleSubscriptions);\n\t}", "function wcs_is_subscription( $subscription ) {\n\n\tif ( is_object( $subscription ) && is_a( $subscription, 'WC_Subscription' ) ) {\n\t\t$is_subscription = true;\n\t} elseif ( is_numeric( $subscription ) && 'shop_subscription' == get_post_type( $subscription ) ) {\n\t\t$is_subscription = true;\n\t} else {\n\t\t$is_subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_is_subscription', $is_subscription, $subscription );\n}", "public function checkForAnuallyRecurring()\n {\n // not supported\n }", "public function isSubscribed()\n {\n // TODO there seems to be an inconsistency when getting database records via Repository or via ObjectStorage\n // TODO when getting via Repository, a Typo3bb-FrontendUser is returned\n // TODO when getting via ObjectStorage, IglarpTemplate-FrontendUser is returned\n $user = FrontendUserUtility::getCurrentUser();\n if (is_null($user)) {\n return false;\n } else {\n return $this->subscribers->contains($user);\n }\n }", "public function getIsSubscribedToAttribute()\n {\n return $this->subscriptions()\n ->where('user_id', auth()->id())\n ->exists();\n }", "public function isProductSubscriptionUpdatedSuccessfully($escrow_id,$member_id,$product_id){\n $model = new MemberSubscribedToProducts;\n return $model->isProductSubscriptionUpdatedSuccessfully($escrow_id,$member_id,$product_id);\n }", "function wcs_is_view_subscription_page() {\n\tglobal $wp;\n\n\treturn ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['view-subscription'] ) ) ? true : false;\n}", "function canUpgradeMembership($upgradeOptionId, $fromSubscriptionId) {\t\t\r\n\t\treturn true ;\t\r\n\t}", "public function canBeReincorporated()\n {\n return count(StudentFreePeer::retrieveCurrentAndIsFree(null, $this->getId())) > 0;\n\n }", "protected function renewDatabase($subscription,$nextRenewDate) {\n \n $day = 86400; // = 24h * 60m * 60s => 1 day in seconds\n \n\t $nextRenewDate = date('Y-m-d H:i:s',strtotime($subscription->nextRenewDate)+7*$day);\n \n $this->mapper->updateStatusById($subscription->id, 'active', $nextRenewDate);\n return true;\n }", "public function isSubscribed(): bool;", "public function isSupportRecurring() {\n return true;\n }", "function renewSubscription(&$institutionalSubscription) {\n\t\treturn $this->_renewSubscription($institutionalSubscription);\n\t}", "protected function successfullySubscribedAccount(): bool\n {\n return $this->isRelatedAppPaid()\n && $this->isAccountCompatibleWithPlan()\n && $this->foundACustomer()\n && $this->createdASubscription();\n }", "public function hasSubscribers(){\n return $this->subscriber_count > 1;\n }", "protected function hasSuccessfullySubscribedAccounts(): bool\n {\n return $this->getSubscribedSubscriptions()->count() === $this->accounts->count();\n }", "public function checkSubscription($intEvent, $intMember)\n\t{\n\t\t$objSubscription = $this->Database->prepare(\"SELECT id FROM tl_calendar_events_subscriptions WHERE pid=? AND member=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($intEvent, $intMember);\n\n\t\treturn $objSubscription->numRows ? false : true;\n\t}", "public function hasRecurringOrders();", "function _renewSubscription(&$subscription) {\n\t\tif ($subscription->isNonExpiring()) return;\n\n\t\t$subscriptionTypeDao =& DAORegistry::getDAO('SubscriptionTypeDAO');\n\t\t$subscriptionType =& $subscriptionTypeDao->getSubscriptionType($subscription->getTypeId());\n\n\t\t$duration = $subscriptionType->getDuration();\n\t\t$dateEnd = strtotime($subscription->getDateEnd());\n\n\t\t// if the subscription is expired, extend it to today + duration of subscription\n\t\t$time = time();\n\t\tif ($dateEnd < $time ) $dateEnd = $time;\n\n\t\t$subscription->setDateEnd(mktime(23, 59, 59, date(\"m\", $dateEnd)+$duration, date(\"d\", $dateEnd), date(\"Y\", $dateEnd)));\n\n\t\t// Reset reminder dates\n\t\t$subscription->setDateRemindedBefore(null);\n\t\t$subscription->setDateRemindedAfter(null);\n\n\t\t$this->updateSubscription($subscription);\n\t}", "function user_subscription_plans()\n {\n global $ilance, $phrase, $ilconfig;\n \n $notice = $failedrenewalusernames = $noautopayrenewalusernames = $paidrenewalusernames = $freerenewalusernames = '';\n $failedrenewalcount = $noautopayrenewalcount = $paidrenewalcount = $freerenewalcount = 0;\n $slng = isset($_SESSION['ilancedata']['user']['slng']) ? $_SESSION['ilancedata']['user']['slng'] : 'eng'; \n \n\t\t// find all plans that have expired- don't include recurring subscriptions..\n $subscriptioncheck = $ilance->db->query(\"\n SELECT u.*, s.id, s.subscriptionid, s.user_id, s.paymethod, s.startdate, s.renewdate, s.autopayment as subscription_autopayment, s.active, s.cancelled, s.migrateto, s.migratelogic, s.recurring, s.invoiceid, s.roleid, s.autorenewal\n FROM \" . DB_PREFIX . \"subscription_user AS s,\n \" . DB_PREFIX . \"users AS u\n WHERE u.user_id = s.user_id\n AND s.renewdate <= '\" . DATETODAY . \" \" . TIMENOW . \"'\n AND s.cancelled = '0'\n AND s.recurring = '0'\n AND u.status = 'active'\n GROUP BY u.user_id\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($subscriptioncheck) > 0)\n {\n \t\n\t\t\t\n while ($res_subscription_check = $ilance->db->fetch_array($subscriptioncheck, DB_ASSOC))\n {\n // #### AUTO SUBSCRIPTION MIGRATION ############\n // did admin specify this subscription plan will migrate the user to another?\n if ($res_subscription_check['migrateto'] > 0)\n {\n $sql_subscription_plan = $ilance->db->query(\"\n SELECT subscriptionid, title_\" . $slng . \" AS title, description_\" . $slng . \" AS description, cost, length, units, subscriptiongroupid, roleid, active, canremove, visible_registration, visible_upgrade, icon, migrateto, migratelogic\n FROM \" . DB_PREFIX . \"subscription\n WHERE subscriptionid = '\" . $res_subscription_check['migrateto'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_subscription_plan) > 0)\n {\n $subscription_plan_result = $ilance->db->fetch_array($sql_subscription_plan, DB_ASSOC);\n $sql_user = $ilance->db->query(\"\n SELECT user_id, email, username\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_user) > 0)\n {\n $res_user = $ilance->db->fetch_array($sql_user, DB_ASSOC);\n switch ($res_subscription_check['migratelogic'])\n {\n\t\t\t\t\t\t\t\t// no transaction will be created\n case 'none':\n {\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '0'\n WHERE user_id = '\" . $res_user['user_id'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $freerenewalusernames .= $res_user['username'] . ', ';\n $freerenewalcount++;\n break;\n } \n // insert waived transaction & activate new subscription plan\n\t\t\t\t\t\t\t\tcase 'waived':\n {\n $renewed_invoice_id = $ilance->accounting->insert_transaction(\n intval($res_subscription_check['subscriptionid']),\n 0,\n 0,\n intval($res_user['user_id']),\n 0,\n 0,\n 0,\n '{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n '0.00',\n '0.00',\n 'paid',\n 'subscription',\n $res_subscription_check['paymethod'],\n DATETIME24H,\n DATEINVOICEDUE,\n DATETIME24H,\n '{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n 0,\n 0,\n 1\n );\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '\" . $renewed_invoice_id.\"'\n WHERE user_id = '\" . $res_user['user_id'].\"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $freerenewalusernames .= $res_user['username'] . ', ';\n $freerenewalcount++;\n break;\n } \n // insert unpaid transaction & deactivate new subscription plan\n\t\t\t\t\t\t\t\tcase 'unpaid':\n {\n\t\t\t\t\t\t\t\t\tif ($res_subscription_check['active'] == 'yes')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// customer may log-in and make payment via online account\n\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['subscriptionid'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t$res_user['user_id'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t\tsprintf(\"%01.2f\", $subscription_plan_result['cost']),\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'scheduled',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['paymethod'],\n\t\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\tSET active = 'no',\n\t\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $renewed_invoice_id . \"'\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// log subscription email for today so we do not resend\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// insert subscription invoice reminder so we don't resend again today\n\t\t\t\t\t\t\t\t\t\t$dateremind = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_daysafterfirstreminder']);\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $renewed_invoice_id . \"',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $dateremind . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t}\n $failedrenewalusernames .= $res_user['username'] . ', ';\n $failedrenewalcount++;\n break;\n } \n // create paid transaction\n\t\t\t\t\t\t\t\tcase 'paid':\n {\n $renewed_invoice_id = $ilance->accounting->insert_transaction(\n intval($res_subscription_check['subscriptionid']),\n 0,\n 0,\n intval($res_user['user_id']),\n 0,\n 0,\n 0,\n '{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n sprintf(\"%01.2f\", $subscription_plan_result['cost']),\n sprintf(\"%01.2f\", $subscription_plan_result['cost']),\n 'paid',\n 'subscription',\n $res_subscription_check['paymethod'],\n DATETIME24H,\n DATEINVOICEDUE,\n DATETIME24H,\n '{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n 0,\n 0,\n 1\n );\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '\" . $renewed_invoice_id . \"'\n WHERE user_id = '\" . $res_user['user_id'] . \"'\n \", 0, null, __FILE__, __LINE__);\n $paidrenewalusernames .= $res_user['username'] . ', ';\n $paidrenewalcount++;\n break;\n }\n }\n if ($res_subscription_check['migratelogic'] != 'none' AND $res_subscription_check['active'] == 'yes')\n {\n\t\t\t\t\t\t\t\t// obtain any unpaid subscription migration invoice\n\t\t\t\t\t\t\t\t$sql_new_invoice = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tSELECT amount, invoiceid, description\n\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . intval($renewed_invoice_id) . \"'\n\t\t\t\t\t\t\t\t\t\tAND (status = 'unpaid' OR status = 'scheduled')\n\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_new_invoice) > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$res_new_invoice = $ilance->db->fetch_array($sql_new_invoice, DB_ASSOC);\n\t\t\t\t\t\t\t\t\tif ($res_subscription_check['subscription_autopayment'] == '1')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// subscription log > did we already sent an email to this customer?\n\t\t\t\t\t\t\t\t\t\t$senttoday = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT subscriptionlogid\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t AND date_sent = '\" . DATETODAY . \"'\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($senttoday) == 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// log subscription email for today and send email to customer\n\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t// subscription renewal via online account balance\n\t\t\t\t\t\t\t\t\t\t\t$sq1_account_balance = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT available_balance, total_balance\n\t\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sq1_account_balance) > 0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$get_account_array = $ilance->db->fetch_array($sq1_account_balance, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($get_account_array['available_balance'] >= $res_new_invoice['amount'])\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$now_total = $get_account_array['total_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$now_avail = $get_account_array['available_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_total = ($now_total - $res_new_invoice['amount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_avail = ($now_avail - $res_new_invoice['amount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// re-adjust customers online account balance (minus subscription fee amount)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET available_balance = '\" . sprintf(\"%01.2f\", $new_avail) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotal_balance = '\" . sprintf(\"%01.2f\", $new_total) . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// pay existing subscription invoice via online account\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaid = '\" . sprintf(\"%01.2f\", $res_new_invoice['amount']) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND invoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adjust members total amount received for referral payments from admin\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->accounting_payment->insert_income_reported($res_user['user_id'], sprintf(\"%01.2f\", $res_new_invoice['amount']), 'credit');\n\t\t\t\t\t\t\t\t\t\t\t\t\t// update customer subscription table with new subscription information\n\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->get('subscription_payment_renewed');\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->set(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{customer}}' => $res_user['username'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{amount}}' => $ilance->currency->format($res_new_invoice['amount']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{description}}' => $res_new_invoice['description'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalusernames .= $res_user['username'] . ', ';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalcount++; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n }\n // #### REGULAR SUBSCRIPTION RENEWAL [NO AUTO-MIGRATION] #######\n else\n {\n $sql_user = $ilance->db->query(\"\n SELECT first_name, last_name, username, email, user_id\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_user) > 0)\n {\n $res_user = $ilance->db->fetch_array($sql_user, DB_ASSOC);\n $ilance->subscription_plan->deactivate_subscription_plan($res_subscription_check['user_id']);\n if ($res_subscription_check['autorenewal'] > 0)\n {\n\t\t\t\t\t\t\t// obtain customer subscription plan information\n\t\t\t\t\t\t\t$sql_subscription_plan = $ilance->db->query(\"\n\t\t\t\t\t\t\t\tSELECT cost, title_\" . $slng . \" AS title, length, units, migrateto, migratelogic, subscriptionid\n\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscription\n\t\t\t\t\t\t\t\tWHERE subscriptionid = '\" . $res_subscription_check['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_subscription_plan) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$subscription_plan_result = $ilance->db->fetch_array($sql_subscription_plan, DB_ASSOC);\n\t\t\t\t\t\t\t\t// if the subscription plan's cost is free, auto-renew subscription for this user\n\t\t\t\t\t\t\t\tif ($subscription_plan_result['cost'] > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$senttoday = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\tSELECT user_id\n\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t AND date_sent = '\" . DATETODAY . \"'\n\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($senttoday) == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// log subscription email for today and send email to customer\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// do we already have a scheduled subscription invoice for this customer?\n\t\t\t\t\t\t\t\t\t\t$sqlpaidchk = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT invoiceid\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\tAND subscriptionid = '\" . $res_subscription_check['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\tAND (status = 'scheduled' OR status = 'unpaid')\n\t\t\t\t\t\t\t\t\t\t\t\tAND invoicetype = 'subscription'\n\t\t\t\t\t\t\t\t\t\t\t\tAND (paid = '0.00' OR paid = '' OR paid = '0')\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sqlpaidchk) > 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// yes customer already has pending subscription transaction associated to this subscription id so use this instead\n\t\t\t\t\t\t\t\t\t\t\t$respaid = $ilance->db->fetch_array($sqlpaidchk, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $respaid['invoiceid'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\t\t\tintval($res_subscription_check['subscriptionid']),\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\tintval($res_user['user_id']),\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for}' . ' ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t\t\tsprintf(\"%01.2f\", $subscription_plan_result['cost']),\n\t\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t\t'scheduled',\n\t\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['paymethod'],\n\t\t\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// insert subscription invoice reminder so we don't resend again today\n\t\t\t\t\t\t\t\t\t\t$dateremind = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_daysafterfirstreminder']);\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . intval($renewed_invoice_id) . \"',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $dateremind . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// obtain invoice information once again\n\t\t\t\t\t\t\t\t\t\t$sql_new_invoice = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT totalamount, invoiceid, amount, description\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . intval($renewed_invoice_id) . \"'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_new_invoice) > 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$res_new_invoice = $ilance->db->fetch_array($sql_new_invoice, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t// auto-payments checkup (user sets this option via subscription menu)\n\t\t\t\t\t\t\t\t\t\t\tif ($res_subscription_check['subscription_autopayment'] == '1')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// subscription renewal via online account balance\n\t\t\t\t\t\t\t\t\t\t\t\t$sq1_account_balance = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tSELECT available_balance, total_balance\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sq1_account_balance) > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$get_account_array = $ilance->db->fetch_array($sq1_account_balance, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// #### ONLINE ACCOUNT BALANCE CHECK UP ####################################\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($get_account_array['available_balance'] >= $res_new_invoice['totalamount'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$now_total = $get_account_array['total_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$now_avail = $get_account_array['available_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$new_total = ($now_total - $res_new_invoice['totalamount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$new_avail = ($now_avail - $res_new_invoice['totalamount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// re-adjust customers online account balance (minus subscription fee amount)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET available_balance = '\" . sprintf(\"%01.2f\", $new_avail) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotal_balance = '\" . sprintf(\"%01.2f\", $new_total) . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// pay existing subscription invoice via online account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaid = '\" . sprintf(\"%01.2f\", $res_new_invoice['totalamount']) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND invoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// record spending habits for this user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->accounting_payment->insert_income_spent($res_user['user_id'], sprintf(\"%01.2f\", $res_new_invoice['totalamount']), 'credit');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// update customer subscription table with new subscription information\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->get('subscription_payment_renewed');\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->set(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{customer}}' => $res_user['username'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{amount}}' => $ilance->currency->format($res_new_invoice['amount']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{description}}' => $res_new_invoice['description'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalusernames .= $res_user['username'] . ', ';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalcount++; \n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// create waived transaction\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\tintval($res_subscription_check['subscriptionid']),\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\tintval($res_user['user_id']),\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for}' . ' ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t'0.00',\n\t\t\t\t\t\t\t\t\t\t'0.00',\n\t\t\t\t\t\t\t\t\t\t'paid',\n\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t'account',\n\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t'{_subscription_plan_was_renewed}',\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $renewed_invoice_id . \"'\n\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t$freerenewalusernames .= $res_subscription_check['username'] . ', ';\n\t\t\t\t\t\t\t\t\t$freerenewalcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n \t\t} \n\t }\n }\n }\n if (!empty($paidrenewalusernames))\n {\n $paidrenewalusernames = mb_substr($paidrenewalusernames, 0, -2);\n }\n else\n {\n $paidrenewalusernames = 'None';\n }\n $notice .= \"Renewed $paidrenewalcount paid subscription plans for the following users: $paidrenewalusernames. \";\n if (!empty($freerenewalusernames))\n {\n $freerenewalusernames = mb_substr($freerenewalusernames, 0, -2);\n }\n else\n {\n $freerenewalusernames = 'None';\n }\n $notice .= \"Renewed $freerenewalcount free subscription plans for the following users: $freerenewalusernames. \";\n }\n else\n {\n $notice .= \"No user subscription plans to expire at this time.\"; \n }\n return $notice;\n }", "public function checkIfSubscriptionIsActive($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->status != Braintree_Subscription::CANCELED && $subscription->status != Braintree_Subscription::EXPIRED){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function create_new_listing_actions_renew_subscription($uid) {\r\n \r\n if (!is_numeric($uid)) {\r\n drupal_set_message(t('Invalid user id specified'), 'error');\r\n return;\r\n }\r\n\r\n // Find all recurring open orders\r\n $query = db_query('SELECT order_id FROM commerce_order WHERE status = :status AND type = :type AND uid = :uid ORDER BY order_id DESC LIMIT 1', array(':status' => 'canceled', ':type' => 'recurring', ':uid' => $uid));\r\n\r\n $result = $query->fetchField();\r\n\r\n if (!$result) {\r\n drupal_set_message(t('Unable to find billing cycle.'), 'error');\r\n return;\r\n }\r\n\r\n $order = commerce_order_load($result);\r\n $order->status = 'recurring_open';\r\n commerce_order_save($order);\r\n\r\n drupal_set_message(t('Your subscription will be renewed automatically.'));\r\n}", "public function isRegenerated(): bool;", "private function has_publisher_subscription()\n {\n $has_subscription = false;\n if (isset($this->options['subscription']) && $this->options['subscription'] == 1)\n {\n $has_subscription = true;\n }\n return $has_subscription;\n }", "public function canHandleSubscriptions():bool\n {\n return false;\n }", "function wcs_can_items_be_removed( $subscription ) {\n\t$allow_remove = false;\n\n\tif ( sizeof( $subscription->get_items() ) > 1 && $subscription->payment_method_supports( 'subscription_amount_changes' ) && $subscription->has_status( array( 'active', 'on-hold', 'pending' ) ) ) {\n\t\t$allow_remove = true;\n\t}\n\n\treturn apply_filters( 'wcs_can_items_be_removed', $allow_remove, $subscription );\n}", "private function isSubscribed()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['userid']) || $request['userid']==\"\" )\n throw_error_msg(\"userid not provided\");\n\n if( !is_numeric($request['userid']) )\n throw_error_msg(\"invalid userid\");\n\n global $userquery;\n $is_subscribed = $userquery->is_subscribed($request['userid'],$uid);\n \n if(!$is_subscribed)\n {\n throw_error_msg(\"user is not subscribed\"); \n }\n else\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'user is subscribed', \"data\" => $is_subscribed);\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "function renewMembership(&$user){\n\t\t$dateEnd = $user->getSetting('dateEndMembership', 0);\n\t\tif (!$dateEnd) $dateEnd = 0;\n\t\t\n\t\t// if the membership is expired, extend it to today + 1 year\n\t\t$time = time();\n\t\tif ($dateEnd < $time ) $dateEnd = $time;\n\n\t\t$dateEnd = mktime(23, 59, 59, date(\"m\", $dateEnd), date(\"d\", $dateEnd), date(\"Y\", $dateEnd)+1);\n\t\t$user->updateSetting('dateEndMembership', $dateEnd, 'date', 0);\n\t}", "public function addSubscription()\n {\n $custId = $this->request->id;\n $customerObj = $this->_customer->find($custId);\n if (! is_object($customerObj)) {\n return false;\n }\n $fromDate = $this->request->start_date;\n $planId = $this->request->subscription_plan;\n $orderId = $this->request->orderid;\n $getPlan = SubscriptionPlan::where('id', $planId)->first();\n $duration = $getPlan->duration;\n $planName = $getPlan->name;\n $date = Carbon::createFromFormat('d-m-Y', $fromDate);\n $fromDate = Carbon::createFromFormat('d-m-Y', $fromDate)->format('Y-m-d');\n $endDate = $date->addDays($duration);\n $customerObj->expires_at = $endDate;\n $customerObj->save();\n $subscriber = new Subscribers();\n $subscriber->subscription_plan_id = $planId;\n $subscriber->customer_id = $custId;\n $subscriber->start_date = $fromDate;\n $subscriber->end_date = $endDate;\n $subscriber->is_active = 1;\n $subscriber->save();\n $paymentTrans = new PaymentTransactions();\n $paymentTrans->payment_method_id = 2;\n $paymentTrans->customer_id = $custId;\n $paymentTrans->status = \"Success\";\n $paymentTrans->transaction_message = \"Success\";\n $paymentTrans->transaction_id = $orderId;\n $paymentTrans->response = \"Success\";\n $paymentTrans->plan_name = $planName;\n $paymentTrans->subscriber_id = $custId;\n $paymentTrans->subscription_plan_id = $planId;\n $paymentTrans->save();\n return true;\n }", "public function testSubscriptionPurchaseLifetimeSuccess()\n {\n $user = factory(\\App\\Models\\User::class)->make([\n 'id' => Str::uuid()->toString(),\n 'name' => 'Test User',\n 'email' => '[email protected]'\n ]);\n $user->tasksheetSubscription()->save(factory(\\App\\Models\\UserTasksheetSubscription::class)->make([\n 'type' => 'TRIAL',\n 'billingDayOfMonth' => null,\n 'subscriptionStartDate' => null,\n 'subscriptionEndDate' => null,\n 'trialStartDate' => CarbonImmutable::now()->addDays(-15),\n 'trialEndDate' => CarbonImmutable::now()->addDays(15),\n ]));\n\n $subscriptionStartDate = CarbonImmutable::now();\n\n $purchaseController = new UserSubscriptionPurchaseController;\n $purchaseController->subscriptionPurchaseLifetimeSuccess($user, $subscriptionStartDate);\n\n $userSubscriptionStartDate = new CarbonImmutable($user->tasksheetSubscription->subscriptionStartDate);\n $expectedUserSubscriptionStartDate = new CarbonImmutable($subscriptionStartDate); \n \n $this->assertSame(\n $user->tasksheetSubscription->type, \n 'LIFETIME'\n );\n $this->assertSame(\n $user->tasksheetSubscription->billingDayOfMonth, \n null\n );\n $this->assertSame(\n $userSubscriptionStartDate->dayOfYear, \n $expectedUserSubscriptionStartDate->dayOfYear\n );\n $this->assertSame(\n $user->tasksheetSubscription->subscriptionEndDate, \n null\n );\n }", "public function checkIfSubscriptionIsPaid($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->status === Braintree_Subscription::ACTIVE || $subscription->status === Braintree_Subscription::PENDING){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function isSubscribedToMailchimpList();", "public function getSubscription()\n {\n $recruiter = RecruiterProfile::where(['user_id' => Auth::user()->id])->first();\n if ($recruiter['is_subscribed'] == config('constants.ZeroValue')) {\n $result = view('web.subscription', ['activeTab' => '4']);\n } else {\n $result = redirect('jobtemplates');\n }\n return $result;\n }", "public function checkIfSubscriptionWasSuccessfullyBilled($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->currentBillingCycle > 0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n $this->setModel(Subscription::class);\n\n return $this->isAuthorized();\n }", "public function subscribed($subscription = 'default', $plan = null)\n {\n $subscription = $this->subscription($subscription);\n\n if (is_null($subscription)) {\n return false;\n }\n\n if (is_null($plan)) {\n return $subscription->valid();\n }\n\n return $subscription->valid() && $subscription->paddle_plan_id === Cashier::getPlanId($plan);\n }", "public function isRecurring()\n {\n return $this->getIsRecurring() == '1';\n }", "public function canceled()\n {\n return $this->everSubscribed() && !$this->billingIsActive();\n }", "public function isModifyingEscrowFacilityAtSubscriptionASuccess($product_id,$member_id,$quantity){\n $model = new MemberSubscribedToProducts;\n return $model->isModifyingEscrowFacilityAtSubscriptionASuccess($product_id,$member_id,$quantity);\n }", "function subscriptionExistsByUser($subscriptionId, $userId){ \n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = ?\n\t\t\tAND s.user_id = ?',\n\t\t\tarray(\n\t\t\t\t$subscriptionId,\n\t\t\t\t$userId\n\t\t\t)\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function hasSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n if (0 < count($subscriptionResourceProperties)) {\n return true;\n } else {\n return false;\n }\n }", "public function subscribedToPlan($plans, $subscription = 'default')\n {\n $subscription = $this->subscription($subscription);\n\n if ( ! $subscription || ! $subscription->valid()) {\n return false;\n }\n\n foreach ((array)$plans as $plan) {\n if ($subscription->paddle_plan_id === Cashier::getPlanId($plan)) {\n return true;\n }\n }\n\n return false;\n }", "public function needsToCreateInstallments()\n\t{\n\t\tif ($this->recurringChargeStatusId != Recurring_Charge_Status::getIdForSystemName('ACTIVE'))\n\t\t{\n\t\t\tthrow new Exception('Recurring Charge is not ACTIVE');\n\t\t}\n \t\t\n\t\tif (!$this->isAccountEligibleForChargeGeneration())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($this->service != null)\n\t\t{\n\t\t\tif (!$this->isServiceEligibleForChargeGeneration())\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$intNextInstallment\t= $this->totalRecursions + 1;\n\t\t$intTimesToCharge\t= $this->getTimesToCharge();\n\t\t$strTodaysDate\t\t= GetCurrentISODate();\n\t\t\n\t\tif ($intNextInstallment > $intTimesToCharge)\n\t\t{\n\t\t\t// All obligated installments have been created\n\t\t\t// Considering the RecurringCharge is still ACTIVE, then it must be continuable, otherwise it would have been set to COMPLETED\n\t\t\tif ($this->continuable == 0)\n\t\t\t{\n\t\t\t\t// This should never happen\n\t\t\t\tthrow new Exception_Assertion(\"All obligated charges have been produced and this recurring charge is not continuable, but still ACTIVE. It should be set to COMPLETED\", \"Method: \". __METHOD__ .\"\\nRecurringCharge object: \\n\". print_r($this, true), \"RecurringCharge Record Data Integrity Breach\");\n\t\t\t}\n\t\t}\n\n\t\t// Get the ChargedOn timestamp for the next installment\n\t\t$strChargedOnForNextInstallment = $this->getChargedOnDateForInstallment($intNextInstallment);\n\t\t\n\t\t// Don't bother checking the $strChargedOnForNextInstallment > $this->lastChargedOn\n\t\t\n\t\treturn ($strChargedOnForNextInstallment <= $strTodaysDate)? true : false;\n\t}", "public function checkForListSubscription()\n {\n $now = Carbon::now();\n $subscribers = $this->getNewSubscribersToFollow();\n foreach($subscribers as $subscriber) {\n if ($now->gte($subscriber->created_at->copy()->modify($this->getDelayInterval()))) {\n $this->fire(collect([$subscriber]));\n }\n }\n }", "function subscriptionExists($subscriptionId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function paid() : bool\n {\n if (!Di::getDefault()->get('app')->subscriptionBased()) {\n return true;\n }\n\n return (bool) $this->paid;\n }", "function getSubscriptionId(){\n\n $isSubsId = $this->common_model->getsingle(USERS,array('userId'=>$this->session->userdata('userId')));\n\n return !empty($isSubsId) ? $isSubsId->bizSubscriptionId : FALSE;\n \n }", "public function canOrderBySubscription( $project ): bool\n {\n if ( $project instanceof Project ) {\n $project = $project->code;\n }\n\n // get user's active subscriptions for this project\n $activeSubscriptionsForProject = in_array( $project, $this->activeSubscriptionsForProject )\n ? $this->activeSubscriptionsForProject[ $project ]\n : $this->activeSubscriptionsForProject( $project );\n\n $canOrderByMonthlySubscription = false;\n $canOrderByPayPerDownloadSubscription = false;\n foreach ( $activeSubscriptionsForProject as $userSubscription ) {\n // ask if the user can order by limited-monthly-downloads subscription\n $canOrderByMonthlySubscription = $userSubscription->canUseFeature( config( 'rinvex.subscriptions.features.limited-monthly-downloads' ) );\n\n if ( $canOrderByMonthlySubscription === true ) {\n $this->currentFeature = config( 'rinvex.subscriptions.features.limited-monthly-downloads' );\n $this->currentSubscription = $userSubscription;\n $this->canReleaseOrderBySubscription = true;\n break;\n }\n else {\n // ask if the user can order by pay-per-download subscription\n $canOrderByPayPerDownloadSubscription = $userSubscription->canUseFeature( config( 'rinvex.subscriptions.features.pay-per-download' ) );\n if ( $canOrderByPayPerDownloadSubscription === true ) {\n $this->currentFeature = config( 'rinvex.subscriptions.features.pay-per-download' );\n $this->currentSubscription = $userSubscription;\n $this->canReleaseOrderBySubscription = false;\n break;\n }\n }\n }\n\n if ( $canOrderByMonthlySubscription === true || $canOrderByPayPerDownloadSubscription === true ) {\n return true;\n }\n\n $this->canReleaseOrderBySubscription = false;\n return false;\n }", "public function isSellerSubscriptionEnabled() {\n return $this->scopeConfig->getValue ( static::XML_SUBSCRIPTION_REVIEW, ScopeInterface::SCOPE_STORE );\n }", "function is_subscribed($thread, $subs) {\n foreach ($subs as $sub) {\n if ($sub->threadid == $thread->id) return true;\n }\n return false;\n}", "function pgm_add_subscription( $subscriber_id, $list_id ) {\n\n // setup default return value\n $subscription_saved = false;\n\n // IF the subscriber does NOT have the current list subscription\n if( !pgm_subscriber_has_subscription( $subscriber_id, $list_id ) ){\n\n // get subscriptions and append new $list_id\n $subscriptions = pgm_get_subscriptions( $subscriber_id );\n $subscriptions[]=$list_id;\n\n // update pgm_subscriptions\n update_field( pgm_get_acf_key('pgm_subscriptions'), $subscriptions, $subscriber_id );\n\n // subscriptions updated!\n $subscription_saved = true;\n\n }\n\n // return result\n return $subscription_saved;\n\n}", "public function canGetRecurringProfileDetails()\n {\n\n /** @var Smart2Pay_Globalpay_Helper_Helper $helper_obj */\n $helper_obj = Mage::helper( 'globalpay/helper' );\n\n ob_start();\n echo \"\\n\\n\".'canGetRecurringProfileDetails';\n $buf = ob_get_clean();\n\n $helper_obj->logf( 'canGetRecurringProfileDetails: ['.$buf.']' );\n\n return true;\n }", "public function updateLicenseStatus()\n {\n $transient = get_transient($this->slug);\n\n // If set and valid, return.\n if (VALID === $transient) {\n error_log('Active...');\n return;\n }\n // If expired, do something to never req again.\n\n // If not then, perform a check\n // error_log('Checking ...');\n // $response = $this->checkLicenseKey();\n }", "public function subscribe_member( $user_id, $group_id, $subsribe_mode ) {\n $m = $this->call( \"membershipSubscribe\", [\n \"userId\" => $user_id,\n \"groupId\" => $group_id,\n \"subscriptionMode\" => $subsribe_mode ] );\n return ( isset( $m ) && $m != false ) ? true : false;\n }", "public function authorize()\n {\n return $this->user()->hasPermission('subscription-service-create-plan');\n }", "function is_purchasable() {\n\t\t$purchasable = WCS_Limiter::is_purchasable( parent::is_purchasable(), $this );\n\n\t\treturn apply_filters( 'woocommerce_subscription_is_purchasable', $purchasable, $this );\n\t}", "public function checkIfSubscriptionIsEnabled($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->status === Braintree_Subscription::ACTIVE){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif($subscription->status === Braintree_Subscription::CANCELED){\n\t\t\t\t$gracePeriod = $this->getGracePeriodFromSubscriptionInstance($subscription);\n\t\t\t\treturn $gracePeriod->active;\n\t\t\t}\n\t\t\tif($subscription->status === Braintree_Subscription::PAST_DUE && $this->allowAccessForPastDue){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function is_subscription( $order_id ) {\n\t\treturn ( function_exists( 'wcs_order_contains_subscription' ) && ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) );\n\t}", "public function filter_rcp_can_upgrade_subscription( $retval, $user_id ){\n\t\tif ( empty( $user_id ) ) {\n\t\t\t$user_id = get_current_user_id();\n\t\t}\n\n\t\tif( ! rcp_is_active( $user_id ) || ! rcp_is_recurring( $user_id ) || $this->user_can_upgrade( $user_id ) ) {\n\t\t\t$retval = true;\n\t\t}\n\n\t\treturn $retval;\n\t}", "public static function getSubscribersCount()\n {\n try {\n return Subscription::count();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }", "public function validateReminderEmails($subscriptionId) {\n $validate = false;\n $sub = new Cart66AccountSubscription($subscriptionId);\n $account = new Cart66Account($sub->account_id);\n \n // Check to see if the customer has opted out already\n if(!$account->opt_out) {\n $validate = true;\n }\n \n return $validate;\n }", "public function hasActiveSubscriptionsForProject( $project ): bool\n {\n if ( $project instanceof Project ) {\n $project = $project->code;\n }\n\n // get user's active subscriptions for this project\n $activeSubscriptionsForProject = in_array( $project, $this->activeSubscriptionsForProject )\n ? $this->activeSubscriptionsForProject[ $project ]\n : $this->activeSubscriptionsForProject( $project );\n\n return (bool)$activeSubscriptionsForProject->count();\n }", "public function getSubscriptionStatus() {\n return $this->subscription_status;\n\n }", "abstract function has_paid_plan();", "function isSubscribed($number, $service) {\n\t\t$sql = \"SELECT * FROM \\\"Subscriptions\\\" WHERE \\\"Number\\\" = '$number' \" . \n\t\t\"AND \\\"Service\\\" = '$service'\";\n\t\t$result = pg_query($this->dbConnection, $sql);\n\t\tif (pg_num_rows($result) > 0) {\n\t\t\t$subscription = pg_fetch_array($result);\n\t\t\treturn $subscription[\"Status\"];\n\t\t} else {\n\t\t\treturn \"Not Subscribed\";\n\t\t}\n\t}", "function CheckPurchaseRetur($id_purchase,$id_purchase_production) {\n $data = $this->db\n ->select('count(id_purchase_retur) as total')\n ->where('id_purchase',$id_purchase)\n ->where('id_purchase_production',$id_purchase_production)\n ->limit(1)\n ->get('purchase_retur')\n ->row_array();\n \n if ($data['total'] > 0) {\n // return false if already retured\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function is_recurring(){\n\t\treturn ! empty( $this->payment['recurring_period'] );\n\t}", "function subscribe($entity){\n\t\tif($entity instanceof ElggUser){\n\t\t\treturn $entity->setMetaData('isSubscribedNewsletter',true);\n\t\t}else{\n\t\t\tregister_error(elgg_echo('vazco_newsletter:notanuser'));\n\t\t\treturn false;\n\t\t}\n\t}", "public function expired()\n {\n return !$this->subscribed() && $this->billing_trial_ends_at && strtotime($this->billing_trial_ends_at) <= time();\n }" ]
[ "0.75324917", "0.733845", "0.71383333", "0.69350123", "0.6794024", "0.6766444", "0.67146343", "0.66176957", "0.66039103", "0.6461522", "0.6394426", "0.63808405", "0.6369964", "0.6360644", "0.63239557", "0.6235323", "0.62125516", "0.6202377", "0.61967516", "0.61682165", "0.6166576", "0.6149937", "0.6143124", "0.6140155", "0.612849", "0.6094684", "0.60716164", "0.6064878", "0.606249", "0.60604995", "0.6012127", "0.59990805", "0.5997835", "0.5986263", "0.5981284", "0.5979015", "0.59723276", "0.5957431", "0.5951874", "0.5946377", "0.59463096", "0.5941471", "0.59393305", "0.5925867", "0.58967876", "0.5895406", "0.58862555", "0.5879677", "0.58722985", "0.5849037", "0.58307815", "0.57969636", "0.5763431", "0.57547677", "0.5750057", "0.5742549", "0.57292604", "0.57159007", "0.569245", "0.56716615", "0.5647979", "0.564729", "0.5646176", "0.5641583", "0.56336445", "0.56277895", "0.5625614", "0.56230646", "0.56199676", "0.5608255", "0.5590188", "0.55843425", "0.55779624", "0.55673337", "0.5552543", "0.554667", "0.5546276", "0.5541899", "0.55366695", "0.5522914", "0.55227697", "0.55193734", "0.54832053", "0.5481412", "0.5477057", "0.5469364", "0.5462311", "0.54621553", "0.5461141", "0.54377645", "0.54321575", "0.5431854", "0.54293585", "0.54206693", "0.5416593", "0.540579", "0.5398239", "0.53975314", "0.5390677", "0.5389012" ]
0.6852856
4
Get a Subscription event date or time
protected function get_subscription_event( $subscription, $event, $format = 'mysql' ) { $date = ''; // sanity check if ( ! is_array( $subscription ) || empty( $subscription ) ) { return $date; } switch ( $event ) { case 'end' : case 'end_date' : case 'expiry_date' : $date = isset( $subscription['expiry_date'] ) ? $subscription['expiry_date'] : ''; break; case 'trial_end' : case 'trial_end_date' : case 'trial_expiry_date' : $date = isset( $subscription['trial_expiry_date'] ) ? $subscription['trial_expiry_date'] : ''; break; } return 'timestamp' === $format && ! empty( $date ) ? strtotime( $date ) : $date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventTimestamp();", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getSubscribeDate()\n {\n return $this->subscribeDate;\n }", "public function getTimeSend($event) \n {\n switch ($event) {\n case 1:\n return date('m/d', strtotime($this->online_date));\n break;\n \n case 2:\n return date('Y/m/d', $this->created_at);\n break;\n\n case 3:\n return $date('Y/m/d', $this->updated_at);\n break;\n }\n }", "public function getEventDate() \n {\n return $this->_fields['EventDate']['FieldValue'];\n }", "public function getUnsubscribeDate()\n {\n return $this->unsubscribeDate;\n }", "public function getInvoiceTimestamp();", "public function subscription(): EventSubscription;", "public function getEvent()\n {\n return $this->getData('event');\n }", "function getStartTime($event) {\n $timer = Filter::get(Timer::timers(), $event);\n if (!empty($timer)) {\n return Filter::get($timer, 'start');\n }\n return null;\n }", "public function getStartDateAndTime() {}", "public function getTimestamp();", "public function getTimestamp();", "public function getTimestamp();", "public function getEvent() {\n return $this->event;\n }", "function get_variable_time() {\n\t\t$datetime = $this->get_option( 'queue_datetime', true );\n\n\t\tif ( ! $datetime ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$timestamp = strtotime( $datetime, current_time( 'timestamp' ) );\n\n\t\t$date = new DateTime();\n\t\t$date->setTimestamp( $timestamp );\n\t\t$date->convert_to_utc_time();\n\n\t\treturn $date;\n\t}", "public function getSpeakTime()\n {\n return $this->get(self::_SPEAK_TIME);\n }", "public function getDateEvt()\n {\n return $this->dateEvt;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "function get_event_start_time($post_id){\n\t\treturn get_post_meta($post_id, '_start_time', true);\t\t\n\t}", "public function getDatetime();", "public function getEventSubscriber();", "public function getTimestamp()\n {\n return $this->baseEvent->getTimestamp();\n }", "public function getSubscriptionId();", "public function getEvent()\n {\n $result = new stdClass;\n\n if (!($kronolith_driver = $this->_getDriver($this->vars->cal)) ||\n !isset($this->vars->id)) {\n return $result;\n }\n\n try {\n $event = $kronolith_driver->getEvent($this->vars->id, $this->vars->date);\n $event->setTimezone(true);\n $result->event = $event->toJson(null, true, $GLOBALS['prefs']->getValue('twentyFour') ? 'H:i' : 'h:i A');\n // If recurring, we need to format the dates of this instance, since\n // Kronolith_Driver#getEvent will return the start/end dates of the\n // original event in the series.\n if ($event->recurs() && $this->vars->rsd) {\n $rs = new Horde_Date($this->vars->rsd);\n $result->event->rsd = $rs->strftime('%x');\n $re = new Horde_Date($this->vars->red);\n $result->event->red = $re->strftime('%x');\n }\n } catch (Horde_Exception_NotFound $e) {\n $GLOBALS['notification']->push(_(\"The requested event was not found.\"), 'horde.error');\n } catch (Exception $e) {\n $GLOBALS['notification']->push($e, 'horde.error');\n }\n\n return $result;\n }", "public function getReleaseTime();", "public function getEvent()\r\n {\r\n return $this->Event;\r\n }", "function getDateTime(){\r\n return date('jS F Y\\, g:ia',$this->timestamp);\r\n }", "function standard_event_time_full($date) {\n\t$timestamp = strtotime($date);\n\t$date=date('l d-m-Y H:i A', $timestamp);\n\treturn $date;\n\t}", "function wpfc_podcast_item_date ($time, $d = 'U', $gmt = false) {\n \n\t$time = wpfc_sermon_date('D, d M Y H:i:s O');\n\treturn $time;\n}", "public function getPublishTime()\n {\n return $this->publish_time;\n }", "public function getStartTime()\n {\n $time = $this->eventdatetime->starttime;\n\n if ($this->eventdatetime->isRecurring() &&\n isset($this->recurringdate) &&\n $this->recurringdate instanceof \\UNL\\UCBCN\\Event\\RecurringDate\n ) {\n $first_recurring_date = $this->recurringdate->getFirstRecordInOngoingSeries();\n if (isset($first_recurring_date->recurringdate)) {\n $time = $first_recurring_date->recurringdate . ' ' . substr($time, 11);\n }\n }\n\n return $time;\n }", "public function getOffer_timestamp()\n {\n return $this->offer_timestamp;\n }", "public function getEventStartDate() {\n\t\treturn ($this->eventStartDate);\n\t}", "public function getEvent()\n {\n $headers = $this->getHeaders();\n return isset($headers['X-NE-Event']) ? $headers['X-NE-Event'] : null;\n }", "public function getEvent()\n {\n return isset($this->event) ? $this->event : null;\n }", "public function getScheduleTime(){return $this->time_of_day;}", "public static function event() {\n return self::service()->get('events');\n }", "public function getDocTime()\n {\n return $this->doc_time;\n }", "public function getEvent();", "public function getEntry_time()\n {\n return $this->entry_time;\n }", "public function getTimestamp()\n { return $this->get('timestamp'); }", "public function get_time() {\r\n\t\t\t$date = $this->get_date( 'U' );\r\n\t\t\treturn is_numeric( $date ) ? $date : time(); //time wrong? use now\r\n\t\t}", "abstract public function getTstamp();", "function the_time() {\n\tglobal $discussion;\n\treturn $discussion['time'];\n}", "public function getPublishTime() {\n return $this->publish_time;\n }", "function iron_the_event_date ( $d = '' ) {\n\t$post = get_post();\n\n\t$show_time = get_field('event_show_time', $post->ID);\n\n\techo '<time class=\"datetime\" datetime=\"' . apply_filters( 'the_event_timestamp', ( $show_time ? get_the_time('c') : get_the_time('Y-m-d\\TZ') ), $d ) . '\">' . apply_filters( 'the_event_date', iron_get_the_event_date( $d ), $d ) . '</time>';\n}", "public function getTimestamp()\n {\n }", "public function getEvent()\n {\n return $this->getProperty(\"Event\",\n new Event($this->getContext(), new ResourcePath(\"Event\", $this->getResourcePath())));\n }", "public function getSubscriptionTracking()\n {\n return $this->subscription_tracking;\n }", "public function getDeliveryDateTime() {\n return $this->params[\"original\"][\"delivery_datetime\"];\n }", "public function getPresentationTimestamp() {}", "function getNotificationStartTime( $args = null)\n {\n list( $date, $time) = explode(' ', $GLOBALS['appshore']->local->localToDatetime($args['activity_start']));\n return $time;\n }", "public function getPurchaseDateCreated() {\n return $this->purchaseDateCreatedDate;\n }", "public function getSubscription()\n {\n return $this->subscription;\n }", "protected function getEvent(string $event) {\n return $this\n ->mailjet_webhook_events()\n ->where('event', $event)\n ->orderBy('created_at', 'desc')\n ->first();\n }", "public function getPublishedTime()\n {\n $this->initialRequest();\n if (isset($this->item['snippet']['publishedAt'])) {\n return date('Y-m-d H:i:s', strtotime($this->item['snippet']['publishedAt']));\n }\n else {\n $this->onApiBadInterpretation(\"snippet.publishedAt not found\");\n }\n }", "function getTimestamp(){\n return date('m/d/Y G:h');\n}", "function getTimestamp() {\n return $this->time_stamp;\n }", "private function getTimestamp() {\n\t$dateTime = new DateTime('now', new DateTimeZone(self::TIME_ZONE));\n\treturn $dateTime->format(self::DATE_FORMAT);\n }", "public function get_time() {\n return $this->_time;\n }", "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function getServerTimestamp();", "public function getEndDateAndTime() {}", "function date_get_date_time($timestamp) {\n return app_date($GLOBALS['i18']['formats']['date_time'], $timestamp);\n}", "function getsystime() {\n\n return date('Y-m-d H:i:s');\n\n}", "protected static function getTimestamp()\n\t{\n\t\treturn date(\"Y-m-d H:00:00\");\n\t}", "public function get_subscribed($id_event=0) {\n\t\t$sql = \"SELECT COUNT(DISTINCT id) AS num \";\n\t\t$sql .= \"FROM tl_calendar_events_subscribe \";\n\t\t$sql .= \"WHERE pid=? \";\n\t\t$tmp_event = $this->Database->prepare($sql)->execute($id_event);\n\t\t$event = $tmp_event ->fetchAssoc();\n\t\treturn $event['num'];\n\t}", "public function build(): SubscriptionEvent\n {\n return CoreHelper::clone($this->instance);\n }", "function getBroadCastDate() {\n\t\treturn $this->_BroadCastDate;\n\t}", "public function getSubscriptionId() {\n\t\treturn $this->container['subscription_id'];\n\t}", "public function getDateInTimestamp(){\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone'));\n $timestamp = strtotime($this->_getData('date'));\n date_default_timezone_set($defaultTimeZone);\n return $timestamp;\n }", "public function getDateTime()\n {\n return $this->dateTime;\n }", "public function getEvent() {\n $request = $this->getRequest();\n\n if (request('type') == 'event_callback') {\n $event = $request['event'];\n } else {\n $event = $request;\n }\n\n return $event;\n }", "public function getEventType(): string;", "public function getEventName() : String;", "public function getMessageDate()\n {\n return $this->messageDate;\n }", "public function getSubscriptionId()\n\t{\n\t\treturn $this->_subscriptionId;\n\t}", "function iron_get_the_event_date ( $d = '', $post = null ) {\n\t$post = get_post($post);\n\n\t$field = get_field_object('field_523b46ebe35ef', $post->ID, array( 'load_value' => false ));\n\t$value = get_post_meta($post->ID, 'event_show_time', true);\n\n\tif ( '' == $value )\n\t\t$show_time = $field['default_value'];\n\telse if ( 0 == $value )\n\t\t$show_time = false;\n\telse if ( 1 == $value )\n\t\t$show_time = true;\n\n\tif ( '' == $d )\n\t\t$the_time = '<span class=\"date\">' . date_i18n( get_option('date_format'), get_post_time()) . '</span>' . ( $show_time ? ' <span class=\"time\">' . date_i18n(get_option('time_format'), get_post_time()) . '</span>' : '' );\n\telse\n\t\t$the_time = get_post_time( $d, false, $post, true );\n\n\treturn apply_filters('get_the_event_date', $the_time, $d, $post);\n}", "function getTimestamp() {\r\r\n\t\treturn $this->timestamp;\r\r\n\t}", "private function _getDateTime()\r\n\t\t{\r\n\t\t\t\treturn getDateTime('%Y-%m-%d %H:%M:%S');\r\n\t\t}", "public function event()\n {\n return $this->event;\n }", "public function getEvent() {\n return $this->task['identifier'];\n }", "public function getSubscriptionKey() { return $this->subscriptionKey; }", "public function getDateEvt(): ?DateTime {\n return $this->dateEvt;\n }", "public function getProducedAt()\r\n\t{\r\n\t\treturn $this->producedAt ?? new \\DateTime(\"now\");\r\n\t}", "protected function _getDateTime()\n {\n return date('Y-m-d', time()) . 'T' . date('H:i:s', time());\n }", "final public function getLastEvent()\n\t\t{\n\n\t\t\treturn $this->getEventByTimeAlgo(\"last_event\");\n\n\t\t}", "public function getReceptionDate();", "function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}", "public function get()\n {\n return $this->date;\n }", "public function insertEvent(){\n //inset sql ;\n $type = strtolower($this ->event) == 'subscribe' ? 1 : 0;\n $sql = 'insert into '.$this->tableName[strtolower($this ->event)].\"(subscribe,openid,subscribe_time) values ('$type','$this->toUser','$this->createTime');\" ;\n error_log($sql);\n return $this->dbResult($sql);\n }", "private function getEventStartDate()\n {\n $startDate = $this->TicketPage()->getEventStartDate();\n $this->extend('updateEventStartDate', $startDate);\n return $startDate;\n }" ]
[ "0.65830815", "0.6512927", "0.6512927", "0.6419624", "0.6197726", "0.6095644", "0.5823512", "0.57241666", "0.55804104", "0.5556832", "0.54295284", "0.54208565", "0.5419405", "0.5419405", "0.5419405", "0.54192126", "0.5415985", "0.5409596", "0.5400543", "0.53901464", "0.53901464", "0.53901464", "0.53842026", "0.5378121", "0.5374935", "0.5353359", "0.53339744", "0.53244066", "0.53224057", "0.5320846", "0.5320368", "0.53197336", "0.52971077", "0.5284418", "0.5272038", "0.52641785", "0.5259842", "0.52508944", "0.52292836", "0.52263737", "0.52209556", "0.5213163", "0.5211626", "0.52089036", "0.519503", "0.51949614", "0.51865065", "0.5184422", "0.51713544", "0.5166466", "0.5159283", "0.51557285", "0.51556695", "0.51453906", "0.51345086", "0.5130686", "0.51272607", "0.5122034", "0.51202077", "0.5113947", "0.51113087", "0.51110303", "0.5110332", "0.5094745", "0.5094528", "0.5094317", "0.5094317", "0.5094317", "0.5094317", "0.5090651", "0.5088896", "0.508369", "0.50811785", "0.5077154", "0.50725865", "0.506659", "0.50659096", "0.50609463", "0.505586", "0.5054072", "0.5052008", "0.5051503", "0.50480425", "0.50456804", "0.5033284", "0.50301814", "0.5030007", "0.50141215", "0.50134563", "0.50017715", "0.49874362", "0.4987309", "0.49832624", "0.4981995", "0.4976892", "0.4974059", "0.49728593", "0.4972026", "0.4969321", "0.496233" ]
0.668442
0
What is this relationship's cardinality?
public function isPoly() { return $this->polyRelationship; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function subpropertyJoinSameTableCountTest() {}", "protected function getTotalRelevantRelationshipCount()\n {\n return count($this->getCombinedRelationships())\n + count( $this->data['relationships']['image'] )\n + count( $this->data['relationships']['file'] )\n + count( $this->data['relationships']['checkbox'] )\n + count( $this->data['relationships']['category'] );\n }", "public function fakeRelationships($count = 2);", "public function subpropertyJoinCountTest() {}", "public function hasRelationship() {\n return $this->_has(1);\n }", "public function getNumberOfRelations()\n {\n return count($this->relations);\n }", "public function getCardinality()\n {\n return $this->readOneof(1);\n }", "public function isRelationshipData();", "public function subpropertyInMultipleLeftJoinCountTest() {}", "public function getRelationshipUsagesAttribute()\n {\n return \\App\\Models\\RelationshipUsage::where('name_id', $this->id)\n ->whereHas('instance_type', function($query) {\n $query->where('relationship', true);\n })\n ->get();\n }", "protected static function _relations() {\n\n\t}", "public function isRelated();", "abstract function relations();", "function _related_max_size($object, $model, $size = 0)\r\n\t{\r\n\t\treturn ($this->_count_related($model, $object) > $size) ? FALSE : TRUE;\r\n\t}", "public function countEntities(): int;", "public function edgeCount();", "public function hasCount(){\n return $this->_has(2);\n }", "public function countDescendants();", "function count()\r\n\t{\r\n\t\t// Check if related object\r\n\t\tif ( ! empty($this->parent))\r\n\t\t{\r\n\t\t\t// Prepare model\r\n\t\t\t$model = ucfirst($this->parent['model']);\r\n\t\t\t$object = new $model();\r\n\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$this->db->where($this->parent['model'] . '_id', $this->parent['id']);\r\n\t\t\t$this->db->from($relationship_table);\r\n\r\n\t\t\t// Return count\r\n\t\t\treturn $this->db->count_all_results();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->db->from($this->table);\r\n\r\n\t\t\t// Return count\r\n\t\t\treturn $this->db->count_all_results();\r\n\t\t}\r\n\t}", "public function getQueueableRelations();", "public function getQueueableRelations();", "public function isReadRelationship();", "public function referencedEntities();", "public function hasCount() {\n return $this->_has(2);\n }", "public function getReferenceCount() {}", "public function hasAssociations()\n {\n return ($this->pairs->count() || $this->articulations->count() ||\n $this->refits->count() || $this->morphologys->count()) ? true : false;\n }", "public function hasCount(){\n return $this->_has(3);\n }", "public function getRepeatedFieldCount()\n {\n return $this->count(self::REPEATED_FIELD);\n }", "public function hasCounts(){\n return $this->_has(6);\n }", "public function hasRelations()\n {\n return 0 !== count($this->relations);\n }", "function size()\r\n\t{\r\n\t\t// Gets a MemModel by executing a find(null,null,null) to get a \r\n\t\t//inferable statements.\t\r\n\t\t// WARNING: might be slow\r\n\t \t$res = $this->getMemModel();\r\n\t \treturn $res->size();\r\n\t}", "public function isRelationship($name);", "public function count()\r\n {\r\n return count($this->attributes);\r\n }", "public function hasRelations()\r\n {\r\n return !empty($this->relations);\r\n }", "public function hasCount() {\n return $this->_has(4);\n }", "public function count()\n {\n $constrainedBuilder = clone $this->query;\n\n $constrainedBuilder = $constrainedBuilder->distinct();\n\n return $constrainedBuilder->count($this->relatedPivotKey);\n }", "public function incomming ()\n {\n $stock = 0;\n\n foreach ($this->batches as $batch) {\n $edge = $batch->article()->edge($this);\n\n $stock = $stock + $edge->count;\n }\n\n return $stock;\n }", "public function getAttributeCount();", "function _related_min_size($object, $model, $size = 0)\r\n\t{\r\n\t\treturn ($this->_count_related($model, $object) < $size) ? FALSE : TRUE;\r\n\t}", "public function hasCount() {\n return $this->_has(1);\n }", "public function isAddToRelationship();", "public function countOwnAttributes()\n {\n return $this->getAttributes(false, false)->count();\n }", "public function count(): int\n {\n return count($this->_qualifiers);\n }", "protected function get_descendents_count()\n\t{\n\t\t$n = 0;\n\n\t\tforeach ($this->children as $child)\n\t\t{\n\t\t\t$n += 1 + $child->descendents_count;\n\t\t}\n\n\t\treturn $n;\n\t}", "public function testAlbumPictureRelations()\n {\n $album = Album::all()->first();\n // Check if album owns 5 pictures..\n $this->assertEquals($album->pictures->count(), Picture::all()->count());\n }", "public function size()\n {\n $count = 0;\n foreach ($this->identityMap as $documentSet) {\n $count += count($documentSet);\n }\n return $count;\n }", "public function size()\n {\n return count($this->models);\n }", "public function countAncestors();", "public function loadCount($relations);", "public function hasObjectives() {\n return $this->_has(8);\n }", "public function hasCount() {\n return $this->_has(3);\n }", "public function getChildrenRelationIndex();", "protected function relationship() {\n \n $this->message(__METHOD__);\n\n $t = $this->peek();\n if ($t != EPL_T_HAS && $t != EPL_T_COMPOSED_OF) {\n $this->syntax_error(\"'has' or 'composed_of' is expected\");\n return false;\n }\n $this->next();\n\n // fix bug 179: allow date type keywords to be class names\n $this->_lexer->toggleDataTypeTokens();\n\n // get type\n $type = epFieldMap::DT_HAS;\n if ($t == EPL_T_COMPOSED_OF) {\n $type = epFieldMap::DT_COMPOSED_OF;\n }\n\n // create a relationship field map\n $this->map['type'] = $type;\n $this->map['params'] = array();\n\n // one?\n $this->map['params']['is_many'] = false;\n if ($this->peek() == EPL_T_ONE) {\n $this->next();\n } \n // many?\n else if ($this->peek() == EPL_T_MANY) {\n $this->next();\n $this->map['params']['is_many'] = true;\n }\n\n // class\n $this->map['params']['class'] = false;\n if ($this->peek() == EPL_T_IDENTIFIER) {\n $this->next();\n $this->map['params']['class'] = $this->t->value;\n } else {\n $this->syntax_error(\"Class name is expected\");\n return false;\n }\n \n // toggle data types back\n $this->_lexer->toggleDataTypeTokens();\n\n // inverse\n $this->map['params']['inverse'] = false;\n if ($this->peek() == EPL_T_INVERSE) {\n \n // consume inverse\n $this->next();\n \n // get inverse parameters\n $params = $this->params();\n if (!$params || count($params) != 1) {\n $this->syntax_error(\"Invalid parameters for inverse\");\n return false;\n }\n $this->map['params']['inverse'] = $params[0];\n }\n\n return true;\n }", "protected function relationships(): array\n {\n return [];\n }", "public function size() {\n return n(count($this->value()));\n }", "public function isRequiredForCount() {\n return 'INNER JOIN' == $this->joinType;\n }", "public function getLinkCollectionCount()\n {\n return count($this->getLinkCollection()->getItems());\n }", "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "#[\\ReturnTypeWillChange]\n public function count() {\n return count($this->all());\n }", "public function getSize(){\n return count($this->sides);\n }", "public abstract function countObjects();", "function length() {\r\n return $this->count();\r\n }", "protected function default_type() {\n\t\t$src_multiple = false;\n\t\t$trg_multiple = false;\n\t\tforeach($this->joins as $trg_entity => $arr1) {\n\t\t\tforeach($arr1 as $src_entity => $arr2) {\n\t\t\t\t// Check trg cardinality :\n\t\t\t\tif ( ! $trg_multiple) {\n\t\t\t\t\t$fields\t= array_keys($arr2);\n\t\t\t\t\t$pk\t\t= glue::entity($trg_entity)->pk();\n\t\t\t\t\tif (count($pk) !== count($fields) || count(array_diff($fields, $pk)) !== 0)\n\t\t\t\t\t\t$trg_multiple = true;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Check src cardinality :\n\t\t\t\tif ( ! $src_multiple) {\n\t\t\t\t\t$fields\t= array_values($arr2);\n\t\t\t\t\t$pk\t\t= glue::entity($src_entity)->pk();\n\t\t\t\t\tif (count($pk) !== count($fields) || count(array_diff($fields, $pk)) !== 0)\n\t\t\t\t\t\t$src_multiple = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Compute relationship type :\n\t\tif ($src_multiple) {\n\t\t\tif ($trg_multiple)\n\t\t\t\t$type = self::MANY_TO_MANY;\n\t\t\telse\n\t\t\t\t$type = self::MANY_TO_ONE;\n\t\t}\n\t\telse {\n\t\t\tif ($trg_multiple)\n\t\t\t\t$type = self::ONE_TO_MANY;\n\t\t\telse\n\t\t\t\t$type = self::ONE_TO_ONE;\n\t\t}\n\n\t\treturn $type;\n\t}", "public function hasReferences(){\n return $this->_has(1);\n }", "public function count() {\n\t \treturn sizeof($this->links);\n\t}", "static public function setRelationCoef() {\n $link_db = Piwidict::getDatabaseConnection();\n \n $rk = array();\n $query = \"SELECT id, name FROM relation_type\";\n $res = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row = $res->fetch_object()){\n// if ($row->name == 'synonyms') \n if ($row->name != 'synonyms') \n\t $rk[$row->id] = 1;\n\t else \t\n\t $rk[$row->id] = 0.5;\n } \n return $rk;\n }", "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "public function getPossibleRelations()\n {\n return $this->possibleRelations;\n }", "function similarProductCount()\n {\n if($this->soap)\n return count($this->soap['SimilarProducts']);\n else\n return count($this->similarProducts);\n }", "public function getRelationships(): ?array;", "public function getMetaCount() {\n return sizeof($this->meta);\n }", "public function hasReferencedEntityType() {\n return $this->_has(12);\n }", "protected function getOperandCardinality() {\n\t\treturn static::UNARY;\n\t}", "public function count()\n {\n return count($this->entities);\n }", "public function count()\n {\n return count($this->entities);\n }", "public function NumberOfPrimaryKeyFields() {\n return 1;\n }", "public function NumberOfPrimaryKeyFields() {\n return 1;\n }", "public function count() {\n return count($this->cast);\n }", "public function count() {\n\t\treturn count($this->_aSet);\n\t}", "public function hasCount(){\n return $this->_has(13);\n }", "public function count(): int\n {\n return ($this->constraint !== null) ? $this->constraint->count() + 1 : 1;\n }", "#[Pure] public function size(): int\n {\n return sizeof($this->nodes);\n }", "public function hasObjectives() {\n return $this->_has(9);\n }", "public function countVertices() {\n\t\treturn count($this->inAdjacents);\n\t}", "public function count() {\n return $this->model->all()->count();\n }", "public function count()\n {\n return count($this->_joins);\n }", "public function fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne() {}", "protected function hasCascadeRelationDefined() {\n\n if ( ! is_array($this->relationships) || empty($this->relationships) ) {\n\n return false;\n }\n\n return true;\n }", "public function testProfilePrototypeCountQuarantines()\n {\n\n }", "public function getQueueableRelations()\n {\n return [];\n }", "abstract public static function relations() : ? array;", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_profile_publications($this->get_condition());\r\n }", "public function getNumberOfAssocValves()\n {\n return count($this->getAssocValves());\n }", "public static function idSize()\n\t{\n\t\treturn count( static::$id );\n\t}", "public function testCascadeDeleteHasMany()\n {\n $commentsCount = Comment::count();\n $post = Post::first();\n $post->delete();\n $this->assertNotEquals($commentsCount, Comment::count());\n }" ]
[ "0.6208943", "0.6102675", "0.59260505", "0.59096724", "0.5859425", "0.57703155", "0.5716724", "0.56861246", "0.5649465", "0.5418494", "0.5372346", "0.53556395", "0.5317869", "0.53014493", "0.5283449", "0.5267935", "0.5246251", "0.52366835", "0.5174098", "0.516543", "0.516543", "0.51547986", "0.5153588", "0.5132116", "0.51248527", "0.511923", "0.5114887", "0.5114193", "0.5105244", "0.5101114", "0.5095659", "0.5090701", "0.5072324", "0.5070558", "0.5061487", "0.50580597", "0.5023526", "0.5023006", "0.5019453", "0.50185025", "0.50156057", "0.50106204", "0.50066394", "0.5006412", "0.49964878", "0.49946123", "0.49849132", "0.49736053", "0.49706337", "0.4952506", "0.4952112", "0.4949563", "0.49479473", "0.49378556", "0.49369705", "0.49335718", "0.49271685", "0.49219355", "0.49162918", "0.4915034", "0.49134392", "0.49122462", "0.49000314", "0.4883879", "0.48682043", "0.4866486", "0.4865269", "0.4865269", "0.4865269", "0.4850089", "0.4850089", "0.4850089", "0.4850089", "0.48442996", "0.48416436", "0.48416203", "0.4838417", "0.4835764", "0.48289552", "0.48258886", "0.48258886", "0.4824661", "0.4824661", "0.48237386", "0.48064926", "0.4798143", "0.47978768", "0.47896525", "0.47860748", "0.47784343", "0.47741482", "0.47715086", "0.47705123", "0.47636244", "0.4761583", "0.4756819", "0.47558096", "0.47494", "0.47455287", "0.47448263", "0.473829" ]
0.0
-1
Eagerly loads relationships for $models. This method takes an array of models, collects PK or FK (whichever is needed for relationship), then queries the related table by PK/FK and attaches the array of returned relationships to the appropriately named relationship on $models.
protected function queryAndAttachRelatedModelsEagerly(Table $table, $models, $attributes, $includes=array(), $queryKeys=array(), $modelValuesKeys=array()) { $values = array(); $options = $this->options; $inflector = Inflector::instance(); $queryKey = $queryKeys[0]; $modelValuesKey = $modelValuesKeys[0]; foreach ($attributes as $column => $value) $values[] = $value[$inflector->variablize($modelValuesKey)]; $values = array($values); $conditions = SQLBuilder::createConditionsFromCameledString($table->conn, $queryKey, $values); if (isset($options['conditions']) && strlen($options['conditions'][0]) > 1) Utils::addCondition($options['conditions'], $conditions); else $options['conditions'] = $conditions; if (!empty($includes)) $options['include'] = $includes; if (!empty($options['through'])) { // save old keys as we will be reseting them below for inner join convenience $pk = $this->primaryKey; $fk = $this->foreignKey; $this->setKeys($this->getTable()->class->getName(), true); if (!isset($options['className'])) { $class = classify($options['through'], true); if (isset($this->options['namespace']) && !class_exists($class)) $class = $this->options['namespace'].'\\'.$class; $throughTable = $class::table(); } else { $class = $options['className']; $relation = $class::table()->getRelationship($options['through']); $throughTable = $relation->getTable(); } $options['joins'] = $this->constructInnerJoinSql($throughTable, true); $queryKey = $this->primaryKey[0]; // reset keys $this->primaryKey = $pk; $this->foreignKey = $fk; } $options = $this->unsetNonFinderOptions($options); $class = $this->className; $relatedModels = $class::find('all', $options); $usedModels = array(); $modelValuesKey = $inflector->variablize($modelValuesKey); $queryKey = $inflector->variablize($queryKey); foreach ($models as $model) { $matches = 0; $keyToMatch = $model->$modelValuesKey; foreach ($relatedModels as $related) { if ($related->$queryKey == $keyToMatch) { $hash = spl_object_hash($related); if (in_array($hash, $usedModels)) $model->setRelationshipFromEagerLoad(clone($related), $this->attributeName); else $model->setRelationshipFromEagerLoad($related, $this->attributeName); $usedModels[] = $hash; $matches++; } } if (0 === $matches) $model->setRelationshipFromEagerLoad(null, $this->attributeName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eagerLoadRelations(array $models) {\n foreach ($this->eagerLoad as $name => $constraints) {\n // For nested eager loads we'll skip loading them here and they will be set as an\n // eager load on the query to retrieve the relation so that they will be eager\n // loaded on that query, because that is where they get hydrated as models.\n if (!str_contains($name, '.')) {\n $models = $this->eagerLoadRelation($models, $name, $constraints);\n }\n }\n\n return $models;\n }", "public function eagerLoadRelations(array $models)\n\t{\n\t\tforeach ($this->eagerLoad as $relation => $constraints)\n\t\t{\n\t\t\t// For nested eager loads we'll skip loading them here and they will be set as an\n\t\t\t// eager load on the query to retrieve the relation so that they will be eager\n\t\t\t// loaded on that query, because that is where they get hydrated as models.\n\t\t\tif (strpos($relation, '.') === false)\n\t\t\t{\n\t\t\t\t$models = $this->eagerLoadRelation($models, $relation, $constraints);\n\t\t\t}\n\t\t}\n\n\t\treturn $models;\n\t}", "public function addEagerConstraints(array $models)\n {\n dd($models);\n $whereIn = $this->whereInMethod($this->parent, $this->localKey);\n\n $this->getRelationQuery()->{$whereIn}(\n $this->foreignKey, $this->getKeys($models, $this->localKey)\n );\n }", "public function addEagerConstraints(array $models)\n {\n /*\n * We'll grab the primary key name of the related models since it could be set to\n * a non-standard name and not \"id\". We will then construct the constraint for\n * our eagerly loading query so it returns the proper models from execution.\n */\n\n // Grab the parent node placeholder\n $parentNode = $this->query->getQuery()->modelAsNode($this->parent->nodeLabel());\n\n // Tell the builder to select both models of the relationship\n $this->query->select($this->relation, $parentNode);\n\n // Setup for their mutation so they don't breed weird stuff like... humans ?!\n $this->query->addMutation($this->relation, $this->related);\n $this->query->addMutation($parentNode, $this->parent);\n\n // Set the parent node's placeholder as the RETURN key.\n $this->query->getQuery()->from = array($parentNode);\n // Build the MATCH ()<-[]-() Cypher clause.\n $this->query->matchOut($this->parent, $this->related, $this->relation, $this->relationType, $this->otherKey, $this->parent->{$this->otherKey});\n // Add WHERE clause over the parent node's matching keys [values...].\n $this->query->whereIn($this->otherKey, $this->getEagerModelKeys($models));\n }", "public function eagerLoadRelations(array $models)\n {\n if ($this->_withDynamicOptionAttribute) {\n $collection = ModelDynamicAttribute::select('attribute', 'single')\n ->where('model', $this->getModel()->getTable())\n ->get()\n ->toArray();\n foreach($collection as $item) {\n if ($item['single']) {\n $this->withDynamicSingleAttribute($item['attribute']);\n } else {\n $this->withDynamicOptionAttribute($item['attribute']);\n }\n }\n }\n return parent::eagerLoadRelations($models);\n }", "public function addEagerConstraints(array $models)\n {\n $keys = $this->getKeys($models, $this->getFirstForeignKeyName());\n\n $this->query->whereIn($this->getQualifiedFirstLocalKeyName(), $keys);\n }", "public function addEagerConstraints(array $models)\n {\n // We'll grab the primary key name of the related models since it could be set to\n // a non-standard name and not \"id\". We will then construct the constraint for\n // our eagerly loading query so it returns the proper models from execution.\n $key = $this->ownerKey;\n\n $whereIn = $this->whereInMethod($this->related, $this->ownerKey);\n\n $this->query->where($key, 'IN', $this->getEagerModelKeys($models));\n }", "public function addEagerConstraints(array $models)\n {\n $this->query->whereIn($this->foreignKey, $this->getKeys($models, $this->localKey));\n }", "public function addEagerConstraints(array $models)\n {\n $this->query->whereIn ( $this->getForeignKey (), $this->getKeys ( $models ) );\n }", "public function addEagerConstraints(array $models)\n {\n $this->query->whereIn(\n $this->getQualifiedSecondOwnerKeyName(), $this->getKeys($models, $this->secondKey)\n );\n }", "public function addEagerConstraints(array $models)\n {\n $keys = $this->getKeys($models, $this->localKey);\n\n $filter = array_filter((array) $keys, function($v) { return !is_null($v); });\n\n if(empty($filter)) {\n $this->valid_request = false;\n return;\n }\n\n $this->query->whereIn($this->foreignKey, $keys);\n }", "protected function eagerLoadRelation(array $models, $relation, Closure $constraints)\n\t{\n\t\t// First we will simply get the relationship instances from the top-level model.\n\t\t// Then we can set the necessary constraints on that instance to get all of\n\t\t// the models for the eager load querys, hydrating those on each parent.\n\t\t$instance = $this->getRelation($relation);\n\n\t\tlist($wheres, $bindings) = $instance->getAndResetWheres();\n\n\t\t$instance->addEagerConstraints($models);\n\n\t\t$instance->mergeWheres($wheres, $bindings);\n\n\t\t// We allow the developers to specify constraints on eager loads and we'll just\n\t\t// call the constraints Closure, passing along the query so they can simply\n\t\t// do all they wish to the queriea, even specifying limits, orders, etc.\n\t\tcall_user_func($constraints, $instance);\n\n\t\t$models = $instance->initRelation($models, $relation);\n\n\t\t$results = $instance->get();\n\n\t\t// Once we have the results, we just match those back up to their parent models\n\t\t// using the relationship instance. Then we just return the finished arrays\n\t\t// of models that have been eagerly hydrated and are readied for return.\n\t\treturn $instance->match($models, $results, $relation);\n\t}", "protected function eagerLoadRelation(array $models, string $name, Closure $constraints): array {\n $relation = $this->getRelation($name);\n $constraints($relation);\n $relation->setKey($name);\n return $relation->get($models);\n }", "private function loadRelatedModels(Collection $models) {\n\t\t\t/** @var Model $model */\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->loadRelatedModels($this->request->getInclude());\n\t\t\t}\n\t\t}", "protected function hydratePivotRelation(array $models)\n {\n foreach ( $models as $model ) {\n $pivot = $this->newExistingPivot ( $this->cleanPivotAttributes ( $model ) );\n $model->setRelation ( 'pivot', $pivot );\n }\n }", "public function initRelation(array $models, $relation)\n {\n\n foreach ($models as $model) {\n $model->setRelation($relation, $this->related->newCollection());\n }\n\n return $models;\n }", "public function initRelation(array $models, $relation)\n {\n foreach ( $models as $model ) {\n $model->setRelation ( $relation, $this->related->newCollection () );\n }\n return $models;\n }", "protected function hydrateSimplePivotRelation(array &$models)\n {\n foreach ($models as &$model) {\n $pivot = $this->cleanSimplePivotAttributes($model);\n\n ModelAccessor::set($model, 'pivot', $pivot);\n }\n unset($model);\n }", "public function fill()\n {\n $relationships = $this->relationships;\n $modelRelations = $this->loadRequiredRelationships();\n\n return collect($relationships)->transform(function($relations, $key) use($modelRelations) {\n $merge = array_get($modelRelations, $key);\n return $merge ? $this->mergeRelations($merge, $relations) : $relations;\n })->all();\n }", "protected function attachRelations(Model $model)\n {\n $relations = array_filter($model->getRelations(), static function ($value, $key) {\n return $key !== 'pivot' ?: (bool) $value === false;\n }, ARRAY_FILTER_USE_BOTH);\n\n foreach ($relations as $relation => $relationObj) {\n if (config('json-api.normalize_relations', false)) {\n $relation = Str::snake($relation);\n }\n\n if ($relationObj instanceof DatabaseCollection) {\n /** @var \\Illuminate\\Database\\Eloquent\\Model $relationModel */\n foreach ($relationObj->all() as $relationModel) {\n $this->relationships[$relation]['data'][] = $this->processModelRelation(\n $relationModel\n );\n }\n }\n\n if ($relationObj instanceof Model) {\n $this->relationships[$relation]['data'] = $this->processModelRelation(\n $relationObj\n );\n }\n }\n }", "protected function condenseModels(array $models)\n {\n // Build dictionary of tertiary models, if `withTertiary` was called\n $dictionary = null;\n if ($this->tertiaryRelated) {\n $dictionary = $this->buildTertiaryDictionary($models);\n }\n\n // Remove duplicate models from collection\n $models = $this->related->newCollection($models)->unique();\n\n // If using withTertiary, use the dictionary to set the tertiary relation on each model.\n if (!is_null($dictionary)) {\n $this->matchTertiaryModels($dictionary, $models);\n }\n\n return $models->all();\n }", "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }", "public function match(array $models, EloquentCollection $results, $relation): array\n {\n $dictionary = $this->buildDictionary($results);\n\n foreach ($models as $model) {\n $key = $model[$this->getFirstForeignKeyName()];\n\n if (isset($dictionary[$key])) {\n $model->setRelation($relation, $dictionary[$key]);\n }\n }\n\n return $models;\n }", "protected function loadRequiredRelationships()\n {\n $model = $this->model;\n $relationships = $this->relationships;\n $relations = $this->filterRelationsToLoad($relationships);\n\n $model->load($relations);\n $relations = $model->getRelations();\n $model->setRelations([]);\n\n return $relations;\n }", "public function linkModels(Models $models, Models $foreign, Closure $yield)\n {\n foreach ($models as $model) {\n\n $linked = [];\n\n foreach ($foreign as $foreignModel) {\n if ($this->areLinked($model, $foreignModel)) {\n $linked []= $foreignModel;\n }\n }\n\n $link = $this->newLinkFrom($model, $linked);\n\n $yield($link);\n }\n }", "public function match(array $models, Collection $results, $relation)\n {\n\n $dictionary = $this->buildDictionary($results);\n\n // Once we have the dictionary we can simply spin through the parent models to\n // link them up with their children using the keyed dictionary to make the\n // matching very convenient and easy work. Then we'll just return them.\n foreach ($models as $model)\n {\n $key = $model->getAttribute($this->localKey);\n\n if (isset($dictionary[$key]))\n {\n $value = $this->related->newCollection($dictionary[$key]);\n\n $model->setRelation($relation, $value);\n }\n }\n\n return $models;\n }", "public function matchSimple(array &$models, Collection $results, $relation)\n {\n $foreign = $this->foreignPivotKey;\n\n $dictionary = [];\n\n foreach ($results as $result) {\n $dictionaryKey = ModelAccessor::get(ModelAccessor::get($result, 'pivot'), $foreign);\n\n $dictionary[$dictionaryKey][] = $result;\n }\n\n foreach ($models as &$model) {\n $collection = Collection::make();\n\n if (isset($dictionary[$key = ModelAccessor::get($model, $this->parent->getKeyName())])) {\n $collection = Collection::make($dictionary[$key]);\n }\n\n ModelAccessor::set($model, $relation, $collection);\n }\n unset($model);\n\n return $models;\n }", "private function _load_models()\n {\n foreach ($this->models as $model)\n {\n $this->load->model($this->_model_name($model), $model);\n }\n }", "private function _load_models()\r\n {\r\n foreach ($this->models as $model)\r\n {\r\n $this->load->model($this->_model_name($model), $model);\r\n }\r\n }", "public function match(array $models, Collection $results, $relation)\n {\n // Build dictionary of parent (e.g. user) to related (e.g. permission) models\n list($dictionary, $nestedTertiaryDictionary) = $this->buildDictionary($results, $this->foreignPivotKey);\n\n // Once we have an array dictionary of child objects we can easily match the\n // children back to their parent using the dictionary and the keys on the\n // the parent models. Then we will return the hydrated models back out.\n foreach ($models as $model) {\n if (isset($dictionary[$key = $model->getKey()])) {\n /** @var array */\n $items = $dictionary[$key];\n\n // Eliminate any duplicates\n $items = $this->related->newCollection($items)->unique();\n\n // If set, match up the tertiary models to the models in the related collection\n if (!is_null($nestedTertiaryDictionary)) {\n $this->matchTertiaryModels($nestedTertiaryDictionary[$key], $items);\n }\n\n $model->setRelation(\n $relation,\n $items\n );\n }\n }\n\n return $models;\n }", "protected function performJoins()\n {\n $query = $this->query;\n\n $predecessor = $this->related;\n\n $this->through_parents->each(function ($model) use ($query, &$predecessor) {\n $first = $predecessor->getQualifiedKeyName();\n $joined = $model->qualifyColumn($this->getForeignKeyName($predecessor));\n\n $query->join($model->getTable(), $first, '=', $joined);\n\n if ($this->hasSoftDeletes($model)) {\n $this->query->whereNull($model->getQualifiedDeletedAtColumn());\n }\n\n $predecessor = $model;\n });\n }", "function setModels($models) {\n\t\t$_models = array();\n\n\t\t// First clean array of models, applying implicit database ids when required\n\t\tforeach ($models as $model) {\n\t\t\tif (strpos($model, '/') !== false) {\n\t\t\t\tlist($id, $table) = explode('/', $model);\n\t\t\t} else {\n\t\t\t\t$id = urlize($this->_implicit, '_');\n\t\t\t\t$table = $model;\n\t\t\t}\n\n\n\t\t\tif (!ake($id, $_models)) {\n\t\t\t\t$_models[$id] = array();\n\t\t\t}\n\n\t\t\t$_models[$id][] = $table;\n\t\t}\n\n\t\t// Then actually load models\n\t\tforeach ($_models as $database => $models) {\n\t\t\t$tables = array();\n\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$tables[camelize($model, '_')] = $this->_loadModel($database, $model);\n\t\t\t}\n\t\t\t$this->_models[camelize($database, '_')] = new GetableCollection($tables);\n\t\t}\n\n\t\tif (!ake($this->_implicit, $this->_models)) {\n\t\t\t$this->_models[$this->_implicit] = new GetableCollection(array());\n\t\t}\n\t}", "protected function uses(array $models)\n {\n $this->container->get('loader')->loadModels($this, $models);\n }", "protected function collectForeignObjects(&$results)\n\t{\n\t\t$fkeys = $this->getRelationForeignKeys();\n\t\t$properties = array_values($fkeys);\n\t\t$fields = array_keys($fkeys);\n\n\t\t$indexValues = $this->getIndexValues($properties, $results);\n\t\t$fkObjects = $this->findForeignObjects($fields,$indexValues);\n\t\t$this->populateResult($results,$properties,$fkObjects,$fields);\n\t}", "public function initRelation(array $models, $relation): array\n {\n foreach ($models as $model) {\n $model->setRelation($relation, $this->getDefaultFor($model));\n }\n\n return $models;\n }", "protected function discoverRelations()\n {\n if ($this->relations === null) {\n $this->relations = [];\n\n Std::each(function ($name) {\n // Check that the relationship method is there.\n if (!method_exists($this->model, $name)) {\n throw new LackOfCoffeeException(vsprintf(\n 'The model declares a relationship named \"%s\" but' .\n ' there is no method with that name.',\n [$name]\n ));\n }\n\n $relationReflector = new ReflectionMethod(\n $this->model,\n $name\n );\n\n if (!$relationReflector->isPublic()) {\n throw new LackOfCoffeeException(vsprintf(\n 'The method for the relationship named \"%s\" should' .\n ' be public.',\n [$name]\n ));\n }\n\n $argumentCount = $relationReflector->getNumberOfParameters();\n if ($argumentCount > 0) {\n throw new LackOfCoffeeException(vsprintf(\n 'The method for the relationship named \"%s\" should' .\n ' take 0 arguments. However, it requires %d.',\n [$name, $argumentCount]\n ));\n }\n\n $relation = $this->model->$name();\n\n if (!$relation instanceof Relation) {\n throw new LackOfCoffeeException(vsprintf(\n 'The method for the relationship named \"%s\" should' .\n ' return an instance of %s. Got %s.',\n [$name, Relation::class, TypeHound::fetch($relation)]\n ));\n }\n\n $this->relations[$name] = $relation;\n }, $this->model->getRelated());\n }\n\n return $this->relations;\n }", "public function match(array $models, Collection $results, $relation)\n {\n $dictionary = $this->buildDictionary ( $results );\n foreach ( $models as $model ) {\n if ( isset ( $dictionary [$key = $model->getKey ()] ) ) {\n $collection = $this->related->newCollection ( $dictionary [$key] );\n $model->setRelation ( $relation, $collection );\n }\n }\n return $models;\n }", "private function set_relation_joins() {\n if(!$this->use_relations) return;\n $relations = [];\n foreach ($this->colmodel as $i => $col) {\n if (!isset($col['relation']))\n continue;\n foreach (explode('>', $col['relation']) as $relation) {\n if (!str_contains($relation, '.'))\n continue;\n list($model_name, $relation_name) = explode('.', $relation);\n if ($relation_name != '' && !in_array($relation, $relations)) {\n $this->set_relation_join($model_name, $relation_name);\n $relations[] = $relation;\n }\n }\n }\n }", "public function getRelations(array $modelsList): array\n {\n $result = [];\n\n foreach ($modelsList as $plugin => $models) :\n foreach ($models as $model) :\n if ($plugin === 'App') {\n $modelInstance = $this->tableLocator->get($model);\n } else {\n $modelInstance = $this->tableLocator->get($plugin . '.' . $model);\n }\n\n $this->io->out('Checking: ' . $model . ' (table ' . $modelInstance->getTable() . ')', 1, ConsoleIo::VERBOSE);\n\n /** @var \\Cake\\ORM\\Association[] $associations */\n $associations = $modelInstance->associations();\n foreach ($associations as $association) {\n $relationType = $association->type();\n $relationModel = $association->getAlias();\n $this->io->out(' - Relation detected: ' . $model . ' ' . $relationType . ' ' . $relationModel, 1, ConsoleIo::VERBOSE);\n\n $result[$plugin][$model]['relations'][$relationType][] = $association;\n }\n\n try {\n $result[$plugin][$model]['schema'] = $modelInstance->getSchema();\n } catch (DatabaseException $e) {\n $this->io->warning('Table for ' . $model . ' (' . $modelInstance->getTable() . ') from Plugin \"' . $plugin . '\" is not present');\n }\n endforeach;\n endforeach;\n\n return $result;\n }", "protected function addRelations($rows): ?array\n {\n // If there were no matches then reset per-query data and quit\n if (empty($rows)) {\n $this->resetTmp();\n\n return $rows;\n }\n\n // Likewise for empty singletons\n if (count($rows) === 1 && reset($rows) === null) {\n $this->resetTmp();\n\n return $rows;\n }\n\n // If no tmpWith was set then use this model's default\n if (! isset($this->tmpWith)) {\n $this->tmpWith = $this->getWith();\n }\n // If no tmpWithout was set then use this model's default\n if (! isset($this->tmpWithout)) {\n $this->tmpWithout = $this->getWithout();\n }\n // If no tmpReindex was set then use this model's default\n if (! isset($this->tmpReindex)) {\n $this->tmpReindex = $this->reindex;\n }\n\n // Remove any blocked tables from the request\n $this->tmpWith = array_diff($this->tmpWith, $this->tmpWithout);\n\n // If tmpWith ends up empty then reset and quit\n if (empty($this->tmpWith)) {\n $rows = $this->tmpReindex ? $this->simpleReindex($rows) : $rows;\n $this->resetTmp();\n\n return $rows;\n }\n\n // Harvest the IDs that want relations\n $ids = array_column($rows, $this->primaryKey);\n\n // Get the schema\n $schema = $this->_schema();\n\n // Find the relations for each table\n $relations = $singletons = [];\n\n foreach ($this->tmpWith as $tableName) {\n // Check for singletons\n $relation = $this->_getRelationship($tableName);\n $singletons[$tableName] = $relation->singleton ? singular($tableName) : false;\n\n $relations[$tableName] = $this->_getRelations($tableName, $ids);\n }\n unset($schema);\n\n // Inject related items back into the rows\n $return = [];\n\n foreach ($rows as $item) {\n $id = is_array($item) ? $item[$this->primaryKey] : $item->{$this->primaryKey};\n\n // Inject related items\n foreach ($relations as $tableName => $related) {\n // Assign singletons to a property named for the singular table\n if ($name = $singletons[$tableName]) {\n if (is_array($item)) {\n $item[$name] = $related[$id] ?? null;\n } else {\n $item->{$name} = $related[$id] ?? null;\n }\n } elseif (is_array($item)) {\n $item[$tableName] = $related[$id] ?? [];\n } else {\n $item->{$tableName} = $related[$id] ?? [];\n }\n }\n\n if ($this->tmpReindex) {\n $return[$id] = $item;\n } else {\n $return[] = $item;\n }\n }\n\n // Clear old data and reset per-query properties\n unset($rows);\n $this->resetTmp();\n\n return $return;\n }", "function eagerLoad(...$objects);", "private function loadModels()\n {\n $this->use = ( ! isset($this->use)) ? [$this->class] : $this->use;\n\n if ($this->use) {\n foreach ($this->use as $model) {\n self::load('model', $model);\n }\n }\n }", "public function initRelation(array $models, $relation)\n {\n foreach ($models as $model) {\n $model->setRelation($relation, $this->getDefaultFor($model));\n }\n\n return $models;\n }", "public function loadRelated()\n {\n return;\n }", "protected function getEagerModelKeys(array $models)\n {\n $keys = [];\n\n // First we need to gather all of the keys from the parent models so we know what\n // to query for via the eager loading query. We will add them to an array then\n // execute a \"where in\" statement to gather up all of those related records.\n foreach ($models as $model) {\n if (! is_null($value = $model->{$this->localKey})) {\n $keys[] = new ObjectID($value);\n }\n }\n\n // If there are no keys that were not null we will just return an array with null\n // so this query wont fail plus returns zero results, which should be what the\n // developer expects to happen in this situation. Otherwise we'll sort them.\n if (count($keys) === 0) {\n return [null];\n }\n\n sort($keys);\n\n return array_values(array_unique($keys));\n }", "public function fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne() {}", "protected function parseRelations(array $relations)\n\t{\n\t\t$results = array();\n\n\t\tforeach ($relations as $relation => $constraints)\n\t\t{\n\t\t\t// If the \"relation\" value is actually a numeric key, we can assume that no\n\t\t\t// constraints have been specified for the eager load and we'll just put\n\t\t\t// an empty Closure with the loader so that we can treat all the same.\n\t\t\tif (is_numeric($relation))\n\t\t\t{\n\t\t\t\t$f = function() {};\n\n\t\t\t\tlist($relation, $constraints) = array($constraints, $f);\n\t\t\t}\n\n\t\t\t$progress = array();\n\n\t\t\t// We need to separate out any nested includes. Which allows the developers\n\t\t\t// to load deep relatoinships using \"dots\" without stating each level of\n\t\t\t// the relationship with its own key in the array of eager load names.\n\t\t\tforeach (explode('.', $relation) as $segment)\n\t\t\t{\n\t\t\t\t$progress[] = $segment;\n\n\t\t\t\t$results[$last = implode('.', $progress)] = function() {};\n\t\t\t}\n\n\t\t\t// The eager load could have had constrains specified on it. We'll put them\n\t\t\t// on the last eager load segment, which means that for the nested eager\n\t\t\t// load include only the final segments will get constrained queries.\n\t\t\t$results[$last] = $constraints;\n\t\t}\n\n\t\treturn $results;\n\t}", "public function relations()\n {\n $hasOne = $this->hasOne();\n $hasMany = $this->hasMany();\n $belongsTo = $this->belongsTo();\n $objects = new stdClass();\n\n if ($hasOne && !empty($hasOne)) {\n foreach ($hasOne as $id => $value) {\n\n $objects->$id = Relationships::hasOne(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n }\n if ($hasMany && !empty($hasMany)) {\n foreach ($hasMany as $id => $value) {\n $objects->$id = Relationships::hasMany(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n\n }\n if ($belongsTo && !empty($belongsTo)) {\n foreach ($belongsTo as $id => $value) {\n $objects->$id = Relationships::belongsTo(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n }\n return $objects;\n }", "public function getEager()\n {\n return $this->getModels(['*'], false);\n }", "public function initRelation(array $models, $relation)\n {\n foreach ($models as $model)\n {\n $model->setRelation($relation, null);\n }\n\n return $models;\n }", "public function initRelation(array $models, $relation)\n {\n foreach ($models as $model) {\n $model->setRelation($relation, null);\n }\n\n return $models;\n }", "public function addEagerConstraints(array $results)\n {\n $this->buildDictionary($results);\n }", "protected function getTertiaryModels(array $models)\n {\n $tertiaryClass = $this->tertiaryRelated;\n\n $keys = [];\n foreach ($models as $model) {\n $keys[] = $model->getRelation('pivot')->{$this->tertiaryKey};\n }\n $keys = array_unique($keys);\n\n $query = $tertiaryClass->whereIn($tertiaryClass->getQualifiedKeyName(), $keys);\n\n // Add any additional constraints/eager loads to the tertiary query\n $callback = $this->tertiaryCallback;\n $callback($query);\n\n $tertiaryModels = $query\n ->get()\n ->keyBy($tertiaryClass->getKeyName());\n\n return $tertiaryModels;\n }", "protected function loadAnnotatedModels()\n {\n if ($this->app->environment('local') && $this->scanWhenLocal) {\n $this->scanModels();\n }\n\n $scans = $this->modelScans();\n\n if (!empty($scans) && $this->finder->modelsAreScanned()) {\n $this->loadScannedModels();\n }\n }", "protected function _getRelatedRecords($modelName, $method, $arguments) {}", "public function linkRelationships() {\n\t\t// Loop through the databases' tables, and use any FK information to build all the relationships.\n\t\t\n\t\t// Build one-to-one and one-to-many relationships\n\t\tforeach ($this->getDatabases() as $dbName => $database) {\n\t\t\tforeach ($database->getTables() as $tableName => $table) {\n\t\t\t\tforeach ($table->getForeignKeys() as $fk) {\n\t\t\t\t\t\n\t\t\t\t\t// Skip this fk if we've already linked it.\n\t\t\t\t\tif ($fk->isLinked()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference database\n\t\t\t\t\tif ($fk->hasRefDatabaseName()) {\n\t\t\t\t\t\t$refDatabase = $table->getSchema()->getDatabase($fk->getRefDatabaseName());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$refDatabase = $table->getDatabase();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference table\n\t\t\t\t\t$refTable = $refDatabase->getTable($fk->getRefTableName());\n\t\t\t\t\t\n\t\t\t\t\tif (is_null($refTable)) {\n\t\t\t\t\t\techo 'ERROR IN DATABASE SCHEMA: FK setup to non-existing table. Take a look at ' . $dbName . '.' . $tableName . \"\\n\";\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference columns\n\t\t\t\t\t$refKey = array();\n\t\t\t\t\tforeach ($fk->getRefKeyName() as $columnName) {\n\t\t\t\t\t\t$refKey[] = $refTable->getColumn($columnName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference \"object name\"\n\t\t\t\t\tif ($fk->hasRefObjectName()) {\n\t\t\t\t\t\t$refObjectName = $fk->getRefObjectName();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$refObjectName = $refTable->getTableName();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get local columns\n\t\t\t\t\t$localKey = array();\n\t\t\t\t\tforeach ($fk->getLocalKeyName() as $columnName) {\n\t\t\t\t\t\t$localKey[] = $table->getColumn($columnName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get local \"object name\"\n\t\t\t\t\tif ($fk->hasLocalObjectName()) {\n\t\t\t\t\t\t$localObjectName = $fk->getLocalObjectName();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$localObjectName = $table->getTableName();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If a table has an FK, two things happen:\n\t\t\t\t\t\n\t\t\t\t\t// 1. The local table can pull a \"has one\" relationship to the reference table\n\t\t\t\t\t\n\t\t\t\t\t$hasOne = new SchemaRelationshipHasOne();\n\t\t\t\t\t$hasOne->setRefTable($refTable);\n\t\t\t\t\t$hasOne->setRefObjectName($refObjectName);\n\t\t\t\t\t$hasOne->setRefKey($refKey);\n\t\t\t\t\t$hasOne->setLocalTable($table);\n\t\t\t\t\t$hasOne->setLocalObjectName($localObjectName);\n\t\t\t\t\t$hasOne->setLocalKey($localKey);\n\t\t\t\t\t\n\t\t\t\t\t$table->addHasOneRelationship($hasOne);\n\t\t\t\t\t\n\t\t\t\t\t// 2. The reference table can pull a \"has many\" relationship to the local table\n\t\t\t\t\t\n\t\t\t\t\t$hasMany = new SchemaRelationshipHasMany();\n\t\t\t\t\t$hasMany->setRefTable($table);\n\t\t\t\t\t$hasMany->setRefObjectName($localObjectName);\n\t\t\t\t\t$hasMany->setRefKey($localKey);\n\t\t\t\t\t$hasMany->setLocalTable($refTable);\n\t\t\t\t\t$hasMany->setLocalObjectName($refObjectName);\n\t\t\t\t\t$hasMany->setLocalKey($refKey);\n\t\t\t\t\t\n\t\t\t\t\t$refTable->addHasManyRelationship($hasMany);\n\t\t\t\t\t\n\t\t\t\t\t// Link the has one and has many together\n\t\t\t\t\t$hasOne->setHasManyRelationship($hasMany);\n\t\t\t\t\t$hasMany->setHasOneRelationship($hasOne);\n\t\t\t\t\t\n\t\t\t\t\t// Set the FK as linked so we don't link it up again.\n\t\t\t\t\t$fk->setIsLinked(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected static function _relations() {\n\n\t}", "public function load($relations);", "public function push() {\n\t\t$this->save();\n\n\t\t// To sync all of the relationships to the database, we will simply spin through\n\t\t// the relationships, calling the \"push\" method on each of the models in that\n\t\t// given relationship, this should ensure that each model is saved.\n\t\tforeach ($this->relationships as $name => $models) {\n\t\t\tif ( ! is_array($models)) {\n\t\t\t\t$models = array($models);\n\t\t\t}\n\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->push();\n\t\t\t}\n\t\t}\n\t}", "protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }", "public function saveMany(array $models, array $joinings = array())\n {\n foreach ( $models as $key => $model ) {\n $this->save ( $model, ( array ) array_get ( $joinings, $key ), false );\n }\n $this->touchIfTouching ();\n return $models;\n }", "private function serializeHasMany(Model $owner, array $models = null)\n {\n $serialized = [];\n if (!empty($models)) {\n $serialized = $this->serializeArray($models);\n }\n return $serialized;\n }", "public function associate($models, $callback = null)\n\t{\n\t\t$modelName = $this->model->getModelName();\n\t\t$shifter = $this->shifter;\n\n\t\tparent::associate($models, function($model) use ($modelName, $shifter)\n\t\t{\n\t\t\t$model->set($shifter, strtolower($modelName));\n\t\t});\n\n\t\treturn $models;\n\t}", "protected function matchOneOrMany(array $models, Collection $results, $relation, $type)\n {\n $dictionary = $this->buildDictionary($results);\n\n // Once we have the dictionary we can simply spin through the parent models to\n // link them up with their children using the keyed dictionary to make the\n // matching very convenient and easy work. Then we'll just return them.\n foreach ($models as $model)\n {\n $key = $model->getAttribute($this->localKey);\n\n if (isset($dictionary[$key]))\n {\n $value = $this->getRelationValue($dictionary, $key, $type);\n\n $model->setRelation($relation, $value);\n }\n }\n\n return $models;\n }", "protected function buildDictionary(Collection $models)\n {\n foreach ($models as $model) {\n if ($model->{$this->morphType}) {\n $key = $this->normalizeDictionaryKey($model->{$this->foreignKey});\n $this->dictionary[$model->{$this->morphType}][$key][] = $model;\n }\n }\n }", "public function getRelatedObjectsToPersist(&$objects = []) \n {\n return [];\n }", "public function getRelatedObjectsToPersist(&$objects = array()) {\n return array();\n }", "protected static function _addOneToManyRelation(array $params)\n {\n $name = $params['foreignClass'] . 's';\n\n $params['type'] = self::ONE_TO_MANY;\n\n static::$_relations[$name] = $params;\n }", "public function populateRelation($name, $records)\n {\n $this->_related[$name] = $records;\n }", "protected function fetchRelatedData($primaryKeys, $connections)\n {\n // get related collections\n $resourcesData = [];\n\n // no related keys, no fetching\n if(empty($primaryKeys)){\n return $resourcesData;\n }\n\n foreach($connections as $connection){\n $resource = $connection->getResource();\n\n // get current page related values keys\n $filters = [\n $connection->getSelfKey()=>[\n 'in'=>array_values($primaryKeys[$connection->getClassName()])\n ]\n ];\n\n // merge additional conditions on filters\n $filters = array_merge($filters, $connection->getFilters());\n\n // apply filters on resource\n $resource->filters($filters);\n\n // fetch collection for iteration\n $fetcher = new Fetcher($resource);\n $items = $fetcher->fetchAll();\n $wrapper = new CollectionWrapper($items);\n\n // inject connections data\n $class = $connection->getClassName();\n $resourcesData[$class] = $wrapper->getCollectionsArray($connection->getForeignKey());\n }\n\n return $resourcesData;\n }", "private static function relations()\n {\n $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];\n $folder = static::$root.'MVC/Relations'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyRelationException', 'ModelNotFindedException'];\n $folder = static::$root.'MVC/Relations/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "protected function getRelatedModels($relatedModel)\n {\n $retval = array();\n $relatedModel = $this->getModelName($relatedModel);\n\n if (array_key_exists($this->getForeignIdField(static::getModelName()), $relatedModel::getSchema())) {\n $retval = call_user_func(\n array(\n $relatedModel,\n 'find'\n ),\n array(\n 'conditions' => array(\n $this->getForeignIdField(static::getModelName()) => $this->id\n )\n )\n );\n }\n\n return $retval;\n }", "private function getRelatedHasManyModels(string $modelName)\n {\n $structures = SchemaStructure::get();\n\n $filtered = collect($structures)->filter(function ($schema, $modelKey) use ($modelName) {\n if (substr($modelKey, 0, 6) === 'pivot:') {\n return false;\n }\n $foreignKeyFields = collect($schema)\n ->filter(function ($fields, $schemaName) {\n return data_get($fields, 'foreign');\n });\n\n // check the 'on' is related to current model\n $ons = data_get($foreignKeyFields, '*.foreign.on');\n\n return collect($ons)->first(fn ($on) => Str::plural(Str::snake($modelName)) === Str::plural($on));\n });\n\n return $filtered->keys();\n }", "public function loadAll($data)\n {\n if (empty($data)) {\n return false;\n }\n\n $result = $this->load($data, '');\n\n foreach ($this->relations() as $relation) {\n $relAttr = $relation['attribute'];\n\n if (false === isset($data[$relAttr])) {\n continue;\n }\n\n $relData = $data[$relAttr];\n\n if (ArrayHelper::isAssociative($relData)) {\n $result = $this->$relAttr->load($relData, '') && $result;\n }\n\n // Related models with multiple values\n if (ArrayHelper::isIndexed($relData)) {\n $indexes = array_keys($relData);\n $models = [];\n\n foreach ($indexes as $index) {\n if (isset($this->$relAttr[$index])) {\n $models[$index] = $this->$relAttr[$index];\n } else {\n $models[$index] = new $relation['class'];\n }\n\n $result = $models[$index]->load($relData[$index], '') && $result;\n }\n\n $this->$relAttr = $models;\n }\n }\n\n return $result;\n }", "protected function matchOneOrMany(array $models, Collection $results, $relation, $type)\n {\n $dictionary = $this->buildDictionary($results);\n\n // Once we have the dictionary we can simply spin through the parent models to\n // link them up with their children using the keyed dictionary to make the\n // matching very convenient and easy work. Then we'll just return them.\n foreach ($models as $model) {\n if (isset($dictionary[$key = $model->getAttribute($this->localKey)])) {\n $model->setRelation(\n $relation, $this->getRelationValue($dictionary, $key, $type)\n );\n }\n }\n\n return $models;\n }", "public function loadRelated($name, $model)\n {\n // Create a Zend_Db_Table_Row from the data in $model\n $row = $this->getDbTable()->createRow($this->toArray($model));\n\n $parents = $model->getParentList();\n $dependents = $model->getDependentList();\n\n $method = 'find';\n $type = 'dependent';\n\n $name = ucfirst($name);\n\n // Determine what $name is: key name or table name. Try keys first\n if (array_key_exists($name, $parents)) {\n $property = $parents[$name]['property'];\n $object_table_name = $parents[$name]['table_name'];\n $table_class = 'Application_Model_DbTable_' . $object_table_name;\n $rule = $name;\n $type = 'parent';\n } elseif (array_key_exists($name, $dependents)) {\n $property = $dependents[$name]['property'];\n $object_table_name = $dependents[$name]['table_name'];\n $ref_table_name = 'Application_Model_DbTable_' . $object_table_name;\n $rule = $name;\n } /* elseif ($rule = array_search($name, $parents)) {\n \t// TODO: Do some unnice rules for table_class\n $property = $name;\n $type = 'parent';\n } elseif ($rule = array_search($name, $dependents)) {\n \t// TODO: Do some unnice rules for ref_table_name\n $property = $name;\n } */ else {\n throw new Exception(\"Relationship $name not found\");\n }\n\n if ($type == 'parent') {\n $method .= 'ParentRow';\n $ref_table = $this->getDbTable();\n $column_type = 'columns';\n $table_name = $table_class;\n } else {\n $method .= 'DependentRowset';\n $ref_table = new $ref_table_name();\n $column_type = 'refColumns';\n $table_name = get_class($this->getDbTable());\n }\n\n\n $reference = $ref_table->getReference($table_name, $rule);\n if (empty($reference)) {\n throw new Exception(\"Relationship not found: $table_name; rule: $rule\");\n }\n\n // Check to make sure the foreign key value is set\n // Return early as relationships cannot be joined against null values\n $columns = $reference[$column_type];\n if (is_array($columns)) {\n foreach ($columns as $column) {\n if ($model->$column === null) {\n return $model;\n /*$varName = $model->columnNameToVar($column);\n throw new Exception(\"Cannot load relationship because $varName is not set\");*/\n }\n }\n } else {\n if ($model->$columns === null) {\n return $model;\n /*$varName = $model->columnNameToVar($column);\n throw new Exception(\"Cannot load relationship because $varName is not set\");*/\n }\n }\n\n $obj = $row->$method('Application_Model_DbTable_' . $object_table_name, $rule);\n\n if (! empty($obj)) {\n $model_class = 'Application_Model_' . $object_table_name;\n\n if ($obj instanceof Zend_Db_Table_Rowset) {\n if (method_exists($model, 'add' . $property)) {\n $class_method = 'add' . $property;\n } else {\n $class_method = 'set' . $property;\n }\n\n foreach ($obj as $row_object) {\n $related = new $model_class();\n $related->setOptions($row_object->toArray());\n $model->$class_method($related);\n\n }\n } else {\n $related = new $model_class();\n $related->setOptions($obj->toArray());\n $method_name = 'set' . $property;\n $model->$method_name($related);\n }\n }\n\n return $model;\n }", "public function match(array $models, Collection $results, $relation)\n {\n $dictionary = $this->buildDictionary($results);\n\n // Once we have the dictionary we can simply spin through the children models to\n // link them up with their children using the keyed dictionary to make the\n // matching very convenient and easy work. Then we'll just return them.\n foreach ($models as $model) {\n if (isset($dictionary[$key = $model->getAttribute($this->secondKey)])) {\n $value = $dictionary[$key];\n $model->setRelation(\n $relation, reset($value)\n );\n }\n }\n\n return $models;\n }", "private function populateTranslations()\n {\n //translations\n $aRelated = $this->owner->getRelatedRecords();\n if (isset($aRelated[$this->relation]) && $aRelated[$this->relation] != null) {\n if (is_array($aRelated[$this->relation])) {\n foreach ($aRelated[$this->relation] as $model) {\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n } else {\n $model = $aRelated[$this->relation];\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n }\n }", "public function getRelatedObjectsToPersist(&$objects = [])\n {\n return [];\n }", "public function getModels($columns = ['*'], $condenseModels = true)\n {\n // First we'll add the proper select columns onto the query so it is run with\n // the proper columns. Then, we will get the results and hydrate out pivot\n // models with the result of those columns as a separate model relation.\n $columns = $this->query->getQuery()->columns ? [] : $columns;\n\n // Add any necessary pagination on the related models\n if ($this->limit || $this->offset) {\n $this->getPaginatedQuery($this->query, $this->limit, $this->offset);\n }\n\n // Apply scopes to the Eloquent\\Builder instance.\n $builder = $this->query->applyScopes();\n\n $builder = $builder->addSelect(\n $this->shouldSelect($columns)\n );\n\n $models = $builder->getModels();\n\n // Hydrate the pivot models so we can load the via models\n $this->hydratePivotRelation($models);\n\n if ($condenseModels) {\n $models = $this->condenseModels($models);\n }\n\n // If we actually found models we will also eager load any relationships that\n // have been specified as needing to be eager loaded. This will solve the\n // n + 1 query problem for the developer and also increase performance.\n if (count($models) > 0) {\n $models = $builder->eagerLoadRelations($models);\n }\n\n return $this->related->newCollection($models);\n }", "protected static function reflectRelationsFromModels($path) {\n // a mapping of \"resource type\" (front-end term for a model, which is\n // the Model subclass name, in lower case), to the set of immediate\n // relations.\n $resourceRelationsMap = [];\n\n foreach (File::allFiles($path) as $file) {\n $contents = $file->getContents();\n\n // Parse out the namespace\n preg_match('/.*namespace\\s*(.*);/', $contents, $matches);\n $namespace = (count($matches) === 2) ? $matches[1] : false;\n if (!$namespace) {\n continue;\n }\n\n // Parse out classname\n preg_match('/^\\s*class\\s*(\\S*)/m', $contents, $matches);\n $shortClassName = (count($matches) === 2) ? $matches[1] : false;\n if (!$shortClassName) {\n continue;\n }\n $qualifiedClass = \"\\\\$namespace\\\\$shortClassName\";\n\n // Filter out non-Model classes\n $reflection = new \\ReflectionClass($qualifiedClass);\n $isModel = $reflection->isSubclassOf(Model::class) && !$reflection->isAbstract();\n if (!$isModel) {\n continue;\n }\n\n $resourceType = strtolower($shortClassName);\n foreach (enumerateRelations($qualifiedClass, $reflection) as $relation) {\n $resourceRelationName = $relation['methodName'];\n $resourceRelationsMap[$resourceType][$resourceRelationName] = [\n 'type' => strtolower($relation['shortClassName']),\n 'cardinality' => $relation['cardinality']\n ];\n }\n }\n\n return $resourceRelationsMap;\n }", "public function relateToOtherTables(array $otherTables)\n {\n if ($calls = $this->getGenericCalls()) {\n $tablesByModelName = [];\n\n /** @var TableMigration $tableObject */\n foreach ($otherTables as $tableObject) {\n $tablesByModelName[$tableObject->getModelName()] = $tableObject;\n } // foreach\n\n /** @var ForeignKey $call */\n foreach ($calls as $call) {\n if ($on = $call->on) {\n /** @var TableMigration $otherTable */\n $otherTable = @$otherTables[$on];\n $call->on = $otherTable->getName();\n\n $otherCall = clone $call;\n\n if ($this->isPivotTable()) {\n $modelNames = array_map('ucfirst', explode('_', $tableName = $this->getName()));\n\n $matchedModelTables = array_intersect_key($tablesByModelName, array_flip($modelNames));\n unset($matchedModelTables[$otherTable->getModelName()]);\n\n $otherCall->isForMany(true);\n $otherCall->isForPivotTable(true);\n\n $call->on = current($matchedModelTables)->getName();\n $otherTable->addGenericCall($otherCall->setRelatedTable(current($matchedModelTables)));\n } // if\n else {\n $call->setRelatedTable($otherTable);\n $otherTable->addAsRelationSource($otherCall->setRelatedTable($this));\n } // else\n } // if\n } // foreach\n } // if\n\n return $this;\n }", "private static function _loadModels(){\n if (self::$_models == null){\n $sql = 'SELECT id, uuid, name, description, version_id, created FROM v_model WHERE 1';\n $models = Mysql::query($sql);\n if ($models){\n $_models = array();\n foreach($models as $model){\n $sql = \"SELECT id, model_id, uuid, name, description, type, list, instance_model_id, version_id, created FROM v_property WHERE model_id = '{$model->id}'\";\n $properties = Mysql::query($sql);\n if ($properties){\n $model->properties = $properties;\n $_models[] = $model;\n }\n }\n self::$_models = $_models;\n }\n }\n }", "protected function makeRelationSchemas()\n {\n $modelSchemas = $this->makeModelSchemas();\n\n }", "protected function parseWithRelations(array $relations): array {\n $results = [];\n\n foreach ($relations as $name => $constraints) {\n // If the \"relation\" value is actually a numeric key, we can assume that no\n // constraints have been specified for the eager load and we'll just put\n // an empty Closure with the loader so that we can treat all the same.\n if (is_numeric($name)) {\n $name = $constraints;\n\n list($name, $constraints) = Str::contains($name, ':')\n ? $this->createSelectWithConstraint($name)\n : [$name, function () {\n //\n }];\n }\n\n // We need to separate out any nested includes. Which allows the developers\n // to load deep relationships using \"dots\" without stating each level of\n // the relationship with its own key in the array of eager load names.\n $results = $this->addNestedWiths($name, $results);\n\n $results[$name] = $constraints;\n }\n\n return $results;\n }", "public function relations()\n\t{\n\t\t$relations = $this->defineRelations();\n\n\t\tforeach ($relations as $name => &$config)\n\t\t{\n\t\t\t$this->_normalizeRelation($name, $config);\n\n\t\t\t// Unset any keys that CActiveRecord isn't expecting\n\t\t\tunset($config['required'], $config['unique'], $config['onDelete']);\n\t\t}\n\n\t\treturn $relations;\n\t}", "public function findForeignIDs($model) \r\n {\r\n foreach($model->hasAndBelongsToMany as $assocKey => $assocData) {\r\n $assocModel = $model->{$assocData['className']};\r\n $field = Inflector::underscore($model->name) . '_count';\r\n if ($assocModel->hasField($field)) {\r\n $joinModel = $model->{$assocData['with']};\r\n $joinIDs = $joinModel->find('all', array(\r\n 'fields' => array(\r\n $assocData['associationForeignKey']\r\n ) ,\r\n 'conditions' => array(\r\n $assocData['foreignKey'] => $model->id\r\n ) ,\r\n 'group' => $assocData['associationForeignKey']\r\n ));\r\n $this->foreignTableIDs[$assocData['className']] = array_keys(Set::combine($joinIDs, '{n}.' . $assocData['with'] . '.' . $assocData['associationForeignKey']));\r\n }\r\n }\r\n }", "public function addModelsToIndex(\n $models,\n array $options = []\n ) {\n if (!(is_array($models) || $models instanceof Traversable)) {\n throw new Exception('Argument 1 passed to'.__METHOD__.'() must be of the type array or Traversable.');\n }\n\n $prefer = isset($options['preferer']) ? $options['preferer'] : false;\n $resolver = isset($options['resolver']) ? $options['resolver'] : false;\n $data = isset($options['data']) ? $options['data'] : false;\n /* @var $model Tx_Rnbase_Domain_Model_DomainInterface */\n foreach ($models as $model) {\n // only rnbase models with uid and tablename supported!\n if (!$model instanceof Tx_Rnbase_Domain_Model_DomainInterface\n // @TODO @deprecated fallback for old rnbase models versions\n && !$model instanceof Tx_Rnbase_Domain_Model_RecordInterface\n ) {\n continue;\n }\n $this->addRecordToIndex(\n $model->getTableName(),\n $model->getUid(),\n $prefer,\n $resolver,\n $data,\n $options\n );\n }\n }", "public function getRelations()\n\t{\n\t\t$relations = $this->resource->relations;\n\n\t\t$results = array();\n\t\tforeach($relations as $relation)\n\t\t{\n\t\t\t$other = $relation->other;\n\t\t\t$name = $relation->name;\n\n\t\t\t$otherClass = null;\n\t\t\tif( ! is_null($other))\n\t\t\t{\n\t\t\t\t$otherClass = $other->getNamespaceFor('model').'\\\\'.$other->name;\n\t\t\t}\n\n\t\t\t$stub = layla_module_stubs_path().'model/'.strtolower($relation->type).'.stub';\n\t\t\t$data = compact('name', 'otherClass');\n\n\t\t\t$content = eval_blade($stub, $data);\n\n\t\t\t$results[] = $this->increaseTabs($content);\n\t\t}\n\n\t\treturn $results;\n\t}", "public function testLoadRelatives()\n {\n $mapper = $this->makeMockDatabase();\n $relation = User::posts();\n\n /** @var User[] $users */\n $users = $mapper->model(Post::class)->find([6, 11, 15]);\n $relation->loadRelatives($mapper, 'posts', $users);\n foreach ($users as $user) {\n $this->assertInternalType('array', $user->posts);\n }\n $this->assertCount(4, $users[0]->posts);\n $this->assertCount(2, $users[1]->posts);\n $this->assertCount(0, $users[2]->posts);\n\n // With constraint\n $users = $mapper->model(Post::class)->find([6, 11, 15]);\n $relation->loadRelatives($mapper, 'posts', $users, function (ModelQuery $query) {\n $query\n ->where('key', '<', 10)\n ->orderBy('created_at', 'desc');\n });\n foreach ($users as $user) {\n $this->assertInternalType('array', $user->posts);\n }\n $this->assertCount(3, $users[0]->posts);\n $this->assertEquals(9, $users[0]->posts[0]->key);\n $this->assertEquals(5, $users[0]->posts[1]->key);\n $this->assertEquals(1, $users[0]->posts[2]->key);\n $this->assertCount(1, $users[1]->posts);\n $this->assertEquals(6, $users[1]->posts[0]->key);\n $this->assertCount(0, $users[2]->posts);\n\n // Empty models list\n $relation->loadRelatives($mapper, 'posts', []);\n\n // Models with null key value\n $user = new User();\n $relation->loadRelatives($mapper, 'posts', [$user]);\n $this->assertCount(0, $user->posts);\n }", "public static function renameModelsID($models) {\n foreach ($models as &$model) {\n foreach ($model->relations() as $relation => $properties) {\n if ($properties[0] === CActiveRecord::BELONGS_TO) {\n foreach (Renamer::$possibleLabel as $label) {\n if (isset($model[$relation]->attributes[$label])) {\n $model[$properties[2]] = $model[$relation]->attributes[$label];\n }\n }\n }\n }\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }", "function _get_relation($model, $id)\r\n\t{\r\n\t\t// No related items\r\n\t\tif (empty($model) OR empty($id))\r\n\t\t{\r\n\t\t\t// Reset query\r\n\t\t\t$this->db->_reset_select();\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Prepare model\r\n\t\t$model = ucfirst($model);\r\n\t\t$object = new $model();\r\n\r\n\t\t// Determine relationship table name\r\n\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t// Retrieve related records\r\n\t\tif (empty($this->db->ar_select))\r\n\t\t{\r\n\t\t\t$this->db->select($this->table . '.*');\r\n\t\t}\r\n\r\n\t\t// Check if self referencing\r\n\t\tif ($this->table == $object->table)\r\n\t\t{\r\n\t\t\t$this->db->from($this->table);\r\n\t\t\t$this->db->join($relationship_table, $object->table . '.id = ' . $relationship_table . '.' . $this->model . '_id', 'left');\r\n\t\t\t$this->db->where($relationship_table . '.' . $object->model . '_id = ' . $id);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->db->from($this->table);\r\n\t\t\t$this->db->join($relationship_table, $this->table . '.id = ' . $relationship_table . '.' . $this->model . '_id', 'left');\r\n\t\t\t$this->db->join($object->table, $object->table . '.id = ' . $relationship_table . '.' . $object->model . '_id', 'left');\r\n\t\t\t$this->db->where($object->table . '.id = ' . $id);\r\n\t\t}\r\n\r\n\t\t$query = $this->db->get();\r\n\r\n\t\t// Clear this object to make way for new data\r\n\t\t$this->clear();\r\n\r\n\t\tif ($query->num_rows() > 0)\r\n\t\t{\r\n\t\t\t// Populate all with records as objects\r\n\t\t\t$this->all = $this->_to_object($query->result(), $this->model);\r\n\r\n\t\t\t// Populate this object with values from first record\r\n\t\t\tforeach ($query->row() as $key => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->{$key} = $value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->_refresh_stored_values();\r\n\t}", "protected function getRelations($keys, $constraint = null)\n\t{\n\t\tif (isset($constraint))\n\t\t{\n\t\t\tcall_user_func_array($constraint, array($this->related));\n\t\t}\n\n\t\treturn $this->related\n\t\t ->whereIn($this->relatedKey, array_unique($keys))\n\t\t ->whereEquals($this->shifter, strtolower($this->model->getModelName()));\n\t}", "protected function _init_models($models) {\n if (!is_array($models)) return false;\n foreach ($models as $model_type => $model_config) {\n $model_config = $this->_normalize_model_config($model_type, $model_config);\n $values = $model_config['values'];\n $object_type = $model_config['object_type'];\n $linked_entities = $model_config['linked_entities'];\n $table_name = $model_config['table'];\n if ($table_name) $this->table_to_model_type[ $table_name ] = $model_type;\n if ($values) {\n $value_nicknames = $model_config['value_nicknames'];\n $v_arr = [ ];\n foreach ($values as $value_name => $id) {\n if (is_string($value_name)) {\n $nickname = Inflector::humanize(strtolower($value_nicknames[ $value_name ] ?? $value_name));\n $name = strtolower($value_name);\n $index = $object_type === 'Type' && 0 === strpos($name, 'relationship') ? Inflector::pluralize($name) : $name;\n $v_arr[ $index ] = [\n 'id' => $id,\n 'index' => $name,\n 'name' => $nickname,\n ];\n }\n };\n //::static\n $this->enum_values[ Inflector::underscore(Inflector::pluralize($model_type)) ] = $v_arr;\n }\n switch ($object_type) {\n case 'Map':\n if (!$linked_entities) {\n preg_match_all('/([A-Z]{1}[a-z]+)(?=[A-Z])/', $model_type, $linked_entities);\n $linked_entities = $linked_entities[0];\n }\n break;\n case 'Model':\n case 'Role':\n case 'Type':\n case 'Status':\n break;\n }\n $linked_entities = $this->_normalize_linked_entities($model_type, $linked_entities, $object_type);\n if ($linked_entities) {\n $linked_entity_types = $this->get_linked_entity_string($linked_entities);\n if (strpos($linked_entity_types, '|') === 0) Log::init($linked_entities)->log_it();\n $this->linked_entities_to_model_type[ $linked_entity_types ] = $this->linked_entities_to_model_type[ $linked_entity_types ] ?? [ ];\n if (!in_array($model_type, $this->linked_entities_to_model_type[ $linked_entity_types ]))\n $this->linked_entities_to_model_type[ $linked_entity_types ][] = $model_type;\n $this->model_type_to_linked_entity_properties[ $model_type ] = $linked_entities;\n }\n if ($model_config['prefix']) $this->prefix_to_model_type[ $model_config['prefix'] ] = $model_type;\n $this->model_type_to_properties[ $model_type ] = $this->_normalize_properties($model_config['properties']);\n }\n return true;\n }", "public function all($relations = null);", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "public function getWithRelations();", "public function saveRelations($attributes = [])\n {\n $this->categories()->sync(array_get($attributes, 'categories', []));\n $this->tags()->sync(array_get($attributes, 'tags', []));\n $this->upSellProducts()->sync(array_get($attributes, 'up_sells', []));\n $this->crossSellProducts()->sync(array_get($attributes, 'cross_sells', []));\n $this->relatedProducts()->sync(array_get($attributes, 'related_products', []));\n }", "public function buildRelations()\n {\n $this->addRelation('EmailManagerTrace', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerTrace', RelationMap::MANY_TO_ONE, array('trace_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('EmailManagerHistoryEmail', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerHistoryEmail', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', 'RESTRICT', 'EmailManagerHistoryEmails');\n }" ]
[ "0.75232476", "0.74894863", "0.7384571", "0.7327285", "0.7297339", "0.7284859", "0.72734815", "0.72084826", "0.72039855", "0.71796435", "0.70843273", "0.6917009", "0.668996", "0.6516232", "0.63871926", "0.62303543", "0.6213358", "0.61783874", "0.6052519", "0.5976807", "0.59708333", "0.58866346", "0.5863923", "0.5849351", "0.5758706", "0.5721031", "0.5694196", "0.5654799", "0.5610283", "0.56078565", "0.55607593", "0.5557391", "0.5526252", "0.5505146", "0.5488061", "0.54605633", "0.5459461", "0.5452114", "0.5443692", "0.5434966", "0.54303443", "0.54215556", "0.5418455", "0.5368476", "0.536572", "0.53638244", "0.5346297", "0.53457534", "0.5341823", "0.5336274", "0.5328259", "0.5305857", "0.5286061", "0.5267872", "0.5267704", "0.5267692", "0.52518487", "0.5249933", "0.5237881", "0.5212014", "0.5187688", "0.5168292", "0.5163785", "0.5149809", "0.5148419", "0.51298016", "0.5105783", "0.509699", "0.50958073", "0.50916916", "0.5091254", "0.5081254", "0.50772345", "0.50750136", "0.5073981", "0.50643814", "0.5056116", "0.50432885", "0.50400937", "0.5038182", "0.502612", "0.5016396", "0.5006108", "0.49969083", "0.49949786", "0.4994588", "0.49944714", "0.49662936", "0.4965446", "0.49445006", "0.4936005", "0.49291745", "0.49268338", "0.49160096", "0.49075666", "0.48780906", "0.48634315", "0.48589358", "0.48498225", "0.48485422" ]
0.5866062
22
Infers the $this>className based on $this>attributeName. Will try to guess the appropriate class by singularizing and uppercasing $this>attributeName.
protected function setInferredClassName() { $singularize = ($this instanceOf HasMany ? true : false); $this->setClassName(\ChickenTools\Str::classify($this->attributeName, $singularize)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }", "abstract protected function getAttributeName($attribute);", "public function getModelNameBasedOnClassName(): string\n {\n $fqn = explode(\"\\\\\", get_class($this));\n\n return strtolower(end($fqn));\n }", "private function _findModelName(){\n\t\tif($this->_source==''){\n $this->_source = Utils::uncamelize(get_class($this));\n }\n if($this->_source==''){\n\t\t\t$this->_source = get_class($this);\n\t\t}\n\t}", "function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}", "public function getAttributeByName($attributeName);", "public function getAttributeName()\n\t{\n\t\treturn 'ScoredClass';\n\t}", "public function getRelationName($attributeName);", "protected function formatAttribute($attributeName) {\n\t\t\treturn preg_replace_callback(\n\t\t\t\t'/(^|_|\\.)+(.)/',\n\t\t\t\tfunction ($match) {\n\t\t\t\t\treturn ('.' === $match[1] ? '_' : '') . strtoupper($match[2]);\n\t\t\t\t},\n\t\t\t\t$attributeName\n\t\t\t);\n\t\t}", "public function getModelClassName($className = NULL)\n\t{\n\n\t\tif (!$className) {\n\t\t\t$className = $this->getName();\n\t\t}\n\n\t\tif (!is_string($className)) {\n\t\t\tthrow new L8M_Doctrine_Import_Exception('Class name needs to be specified as a string.');\n\t\t}\n\n\t\t/**\n\t\t * @todo filter class name\n\t\t */\n\n\t\t$modelClassName = $this->getClassPrefix()\n\t\t\t\t\t\t. $className\n\t\t;\n\n\t\treturn $modelClassName;\n\n\t}", "function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}", "protected function _inflectClassNameSlug() {\n\t\t$className = get_class($this);\n\t\t$parts = explode('Shortcode', $className);\n\t\t$shortcodeName = end($parts);\n\t\t\n\t\t$regex = '/(^|[a-z])([A-Z])/';\t\t\t\n\t\t$slug = preg_replace($regex, '$1_$2', $shortcodeName);\n\t\t\n\t\t$slug = strtolower($slug);\n\t\t$slug = trim($slug, '_ ');\n\t\t\n\t\treturn $slug;\n\t}", "private static function tableName($className) {\n\t\treturn strtolower(Util::getSimpleClassName($className)) ;\n\t}", "protected function parseSpecialCaseAttribute($attributeName)\n {\n $this->debug('parseSpecialCaseAttribute');\n\n if ($attributeName === 'primaryitem') {\n\n /**\n * If 'primaryitem' is present without a '?' then the string following it is\n * the name of the primary item of the node type.\n * If 'primaryitem' is present with a '?' then the primary item is a variant.\n * If 'primaryitem' is absent then the node type has no primary item.\n *\n * PrimaryItem ::= ('primaryitem'| '!')(String | '?')\n */\n\n if ($this->checkAndExpectToken(Token::TK_SYMBOL, '?')) {\n return new SyntaxTreeNode('primaryitem', array('value' => '?'));\n }\n return new SyntaxTreeNode('primaryitem', array('value' => $this->parseCndString()));\n }\n\n if ($attributeName === 'queryops') {\n\n return $this->parseQueryOpsAttribute();\n }\n\n return false;\n }", "private function guessName () : string {\n return $this->inflector()->pluralize($this->inflector()->tableize(class_basename($this)));\n }", "public static function classify($table_name) {\n return self::camelize(self::singularize($table_name));\n }", "function class_name($str) {\n\treturn preg_replace('/(?:^|-)([a-zA-Z])/e', \"strtoupper('\\\\1')\", $str);\n}", "protected static function getLowerCaseClassName()\n {\n $refClass = new \\ReflectionClass(get_called_class());\n $className = $refClass->getShortName();\n\n return strtolower($className);\n }", "public function setNameAttribute ($name){\n $this->attributes['name'] = strtolower($name);\n}", "public function classify($table_name)\n\t{\n\t\treturn Inflector::camelize(Inflector::singularize($table_name));\n\t}", "protected function _lookupAttribute($attr)\n {\n if (preg_match('/^[0-9]+$/', $attr)) {\n $attr = (int)$attr;\n } else {\n $textLabels = $this->_getTextLabels();\n foreach ($textLabels as $index => $label) {\n $labels = array($label);\n $func = create_function('$c', 'return strtoupper($c[1]);');\n $camelCase = preg_replace_callback('/_([a-z])/', $func, $label);\n $labels[] = $camelCase;\n\n if (in_array($attr, $labels)) {\n $attr = $index;\n break;\n }\n }\n }\n\n return $attr;\n }", "public static function classify($table_name)\n {\n return self::camelize(self::singularize($table_name));\n }", "abstract protected function getFilterClassName($string);", "public function getSimpleClassName($classname);", "public function testClassName() {\n $this->assertEquals('CamelCase', Inflector::className('camel Cases'));\n $this->assertEquals('StudlyCase', Inflector::className('StuDly CaSes'));\n $this->assertEquals('TitleCase', Inflector::className('Title Cases'));\n $this->assertEquals('NormalCase', Inflector::className('Normal cases'));\n $this->assertEquals('Lowercase', Inflector::className('lowercases'));\n $this->assertEquals('Uppercase', Inflector::className('UPPERCASEs'));\n $this->assertEquals('UnderScore', Inflector::className('under_scores'));\n $this->assertEquals('DashE', Inflector::className('dash-es'));\n $this->assertEquals('123Number', Inflector::className('123 numbers'));\n $this->assertEquals('WithExtxml', Inflector::className('with EXT.xml'));\n $this->assertEquals('LotsOfWhiteSpace', Inflector::className('lots of white space'));\n }", "public function getAttributeByColumn( $colname )\n {\n // Si esta con el mismo nombre, lo retorno (son la mayoria de los casos)\n if ( array_key_exists( $colname, $this->attributeTypes ) ) return $colname;\n \n // Si no esta por el nombre exacto, busco normalizando los nombres de\n // los atributos por la columna que le toca en el ORM.\n foreach ( $this->attributeTypes as $classAttr => $type )\n {\n if ( DatabaseNormalization::col($classAttr) == $colname ) return $classAttr;\n }\n \n // Si no encuentra, devuelve NULL\n return NULL;\n }", "public function resolveClassName($className)\n {\n $className = Inflector::id2camel($className, '_');\n if (isset($this->aliases[$className])) {\n return $this->aliases[$className];\n }\n foreach ($this->namespaces as $namespace) {\n $resolvedClassName = $namespace . '\\\\' . $className;\n if (class_exists($resolvedClassName)) {\n return $this->aliases[$className] = $resolvedClassName;\n }\n }\n return $className;\n }", "protected function generateClassName($tableName)\r\n {\r\n if (isset($this->classNames[$tableName])) {\r\n return $this->classNames[$tableName];\r\n }\r\n\r\n if (($pos = strrpos($tableName, '.')) !== false) {\r\n $tableName = substr($tableName, $pos + 1);\r\n }\r\n\r\n $db = $this->getDbConnection();\r\n $patterns = [];\r\n $patterns[] = \"/^{$db->tablePrefix}(.*?)$/\";\r\n $patterns[] = \"/^(.*?){$db->tablePrefix}$/\";\r\n if (strpos($this->tableName, '*') !== false) {\r\n $pattern = $this->tableName;\r\n if (($pos = strrpos($pattern, '.')) !== false) {\r\n $pattern = substr($pattern, $pos + 1);\r\n }\r\n $patterns[] = '/^' . str_replace('*', '(\\w+)', $pattern) . '$/';\r\n }\r\n $className = $tableName;\r\n foreach ($patterns as $pattern) {\r\n if (preg_match($pattern, $tableName, $matches)) {\r\n $className = $matches[1];\r\n break;\r\n }\r\n }\r\n\r\n return $this->classNames[$tableName] = Inflector::id2camel($className, '_');\r\n }", "static public function classify($str)\n\t{\n\t\t$str = trim($str, '-');\n\t\t\n\t\t$result = preg_replace_callback('/(-\\w)/', function ($match) {\n\t\t\treturn strtoupper($match[1][1]);\n\t\t}, $str);\n\t\t\n\t\treturn ucfirst($result);\n\t}", "protected function qualifyClass($name)\n {\n $rootNamespace = $this->laravel->getNamespace();\n\n if (Str::startsWith($name, $rootNamespace)) {\n return $name;\n }\n\n if (Str::contains($name, '/')) {\n $name = str_replace('/', '\\\\', $name);\n }\n\n if (! Str::contains(Str::lower($name), 'datatable')) {\n $name .= $this->type;\n }\n\n return $this->getDefaultNamespace(trim($rootNamespace, '\\\\')) . '\\\\' . $name;\n }", "private function stringToClassName($string)\n {\n return\n str_replace('-', '', ucwords($string, '-'));\n }", "function getAttributeClass( $attribute )\r\n\t{\r\n\t\treturn $this->object->getAttributeObject( $attribute );\r\n\t}", "public static function classify($name)\n {\n return studly_case(str_singular($name));\n }", "protected function _getClassName()\n {\n $this->_checkAdapter();\n return static::$_classMap[$this->_adapter->getDialect()];\n }", "protected static function normalizeClassName($className) {\n\t\treturn $className[0] == '\\\\' ? substr($className,1) : $className;\n\t}", "function getRealClassName($type, $class) {\n\t\tif (strtolower($type) == 'model') {\n\t\t\treturn $class;\n\t\t}\n\t\treturn $class . $type;\n\t}", "public function getSingularName()\n {\n return str_singular(lcfirst(ucwords($this->getClass())));\n }", "public function getSingularName()\n {\n return str_singular(lcfirst(ucwords($this->getClass())));\n }", "protected function _handlerClassName($action, $className) {\n\t\tif (empty($className)) {\n\t\t\tif (strstr($action, '_') !== false) {\n\t\t\t\tlist($prefix, $className) = explode('_', $action, 2);\n\t\t\t\t$className = 'Crud.' . ucfirst($className);\n\t\t\t} else {\n\t\t\t\t$className = 'Crud.' . ucfirst($action);\n\t\t\t}\n\t\t} elseif (strpos($className, '.') === false) {\n\t\t\t$className = 'Crud.' . ucfirst($className);\n\t\t}\n\n\t\treturn ucfirst($className);\n\t}", "public static function stripClassType($className)\n {\n return preg_replace('/^(.*)[A-Z][^A-Z]+$/', '$1', $className);\n }", "function _get_classname($filename) {\n $directoriesAndFilename = explode('/', $filename);\n $filename = array_pop($directoriesAndFilename);\n $nameAndExtension = explode('.', $filename);\n $className = array_shift($nameAndExtension);\n\n return $className;\n }", "function getClassName($relativeClassName);", "public function getTypeNameAttribute();", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "public function getClassName() ;", "protected function parseTableName($className)\n {\n // We'll use the word that comes immediately before \"_table\"\n // create_users_table => users\n preg_match('/([a-zA-Z]+)_table/', $className, $matches);\n\n if ( empty($matches) ) \n {\n // Or, if the user doesn't write \"table\", we'll just use\n // the text at the end of the string\n // create_users => users\n preg_match('/_([a-zA-Z]+)$/', $className, $matches);\n }\n\n // Hmm - I'm stumped. Just use a generic name.\n return empty($matches)\n ? \"TABLE\"\n : $matches[1];\n }", "function setClassName($value) {\r\n $this->className = $value;\r\n }", "public function getAttributeName()\n {\n return 'AgriculturalInsuranceDiscountFactor';\n }", "public function setAttributeName($attributeName) {\n\t\t$this->attributes['attributeName'] = $attributeName;\n\t\t$this->attributeName = $attributeName;\n\t\treturn $this;\n\t}", "public function getAttribute(string $attributeName): ?string\n {\n\t $key = strtolower($attributeName);\n\n\t if('value' === $key) {\n\t return $this->getValue();\n }\n if('name' === $key) {\n return $this->getName();\n }\n return $this->attributes[$key] ?? null;\n }", "public function getModelName()\n {\n if (!$name = $this->modelName) {\n $tableName = $this->getName();\n\n $modelNames = [];\n foreach (explode('_', $tableName) as $word) {\n $modelNames[] = ucfirst(Inflector::singularize($word));\n } //foreach\n $modelName = implode('', $modelNames);\n\n $this->setModelName($name = ucfirst($this->isReservedPHPWord($modelName) ? $tableName : $modelName));\n } // if\n\n return $name;\n }", "private function _getPureModelNameField()\n {\n $name = explode('Mapper_', get_class($this));\n $name = explode('_', $name[1]);\n $out = '';\n foreach($name as $k => $part)\n {\n if($k == 0)\n {\n $out .= strtolower($part);\n }\n else\n {\n $out .= ucfirst($part);\n }\n }\n return $out;\n }", "protected function getModelName()\n {\n return ucwords(str_singular(camel_case($this->meta['table'])));\n }", "public function getClassName() {\n return $this->className;\n }", "function get_class_simple($object, $lower_case=false)\n{\n $array = explode('\\\\',get_class($object));\n $res = $array[count($array)-1];\n\treturn $lower_case?strtolower($res):$res;\n}", "protected static function classNameToCaoClassName($className, $caoDriver=false){\n\t\treturn $className;\n\t}", "function getName( $attribute )\r\n\t{\r\n\t\tswitch ( $attribute )\r\n\t\t{\r\n\t\t\tdefault:\r\n\t\t\t\treturn translate($this->object->getAttributeUserName( $attribute ));\r\n\t\t}\r\n\t}", "protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }", "public function transformClassName() {\n\t\t$that = $this;\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use (&$that) {\n\t\t\treturn $matches['modifiers'] . $that->convertClassName($that->getClassNamespace() . '\\\\' . $matches['className']) . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}", "public function getClass($className);", "public function getNameAttribute($value){\n return ucfirst($value);\n\n }", "public function get($attributeName);", "public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}", "public function getClassName();", "public function getClassName();", "public function classify($tableName);", "public static function model($className=__CLASS__)\r\n\t{\r\n return parent::className();\r\n\t}", "public static function get_class_name( $slug = '' ) {\n\t\t\t$slug = str_replace( '-', ' ', $slug );\n\t\t\t$class = str_replace( ' ', '_', ucwords( $slug ) );\n\n\t\t\treturn $class;\n\t\t}", "static function getClassNameFromRecordId($rid) {\n\n if(!ctype_digit(trim($rid)))\n throw new Exception(\"Invalid record ID!\");\n \n\n $id = IdaDB::select(\"_sys_classes_join\", array(\"subject\"=>$rid), \"property\",\"\",\"onecell\");\n \n if(!isset($id))\n throw new Exception('No classname found for record!');\n\n $res = XML::getClassID($id);\n\n return $res;\n }", "private function getClassSlug(string $className): string\n {\n $service = explode(\"\\\\\", $className);\n $service = array_pop($service);\n return strtolower($service);\n }", "protected function getClassName(): string\n {\n return $this->className;\n }", "private function retrieveClassName($name)\r\n {\r\n switch($name){\r\n case self::LABEL:\r\n case self::INPUT:\r\n case self::SUBIMIT:\r\n return 'Model\\\\Form\\\\Field' . ucfirst($name);\r\n default:\r\n throw new \\InvalidArgumentException(\"The $name field type does not exists\");\r\n }\r\n }", "private function realColumnAttribute($column_name)\r\n\t{\r\n\t\tif($this->pdo->options[LikePDO::ATTR_CASE] == LikePDO::CASE_LOWER)\r\n\t\t\treturn strtolower($column_name);\r\n\t\telseif($this->pdo->options[LikePDO::ATTR_CASE] == LikePDO::CASE_UPPER)\r\n\t\t\treturn strtoupper($column_name);\r\n\t\telse\r\n\t\t\treturn $column_name;\r\n\t}", "function biClass($tag, $renameTags){\n preg_match_all('/class[=\"]+([\\w]+)/i', $tag, $tagRow);\n if(isset($tagRow[1][0])){\n $biClass = $tagRow[1][0];\n if(isset($renameTags->$biClass)){\n return $biClass;\n }\n }\n\n}", "function __set($attributeToChange, $newValueToAssign) {\n //check that name is valid class attribute\n switch($attributeToChange) {\n case \"name\":\n $this->name = $newValueToAssign;\n break;\n case \"favoriteFood\":\n $this->favoriteFood = $newValueToAssign;\n break;\n case \"sound\":\n $this->sound = $newValueToAssign;\n break;\n default:\n echo $attributeToChange . \" was not found <br>\";\n }\n echo \"Set \" . $attributeToChange . \" to \" . $newValueToAssign . \"<br>\";\n }", "public function setNameAttribute($value){//\n $this->attributes['name'] = strtolower($value);\n }", "public function classToTableName($className);", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public static function class2var($name) {\n $nameWithoutNumber = preg_replace('/\\d/', '', $name);\n if (!ctype_upper($nameWithoutNumber)) {\n $name[0] = strtolower($name[0]);\n }\n return $name;\n }", "private function returnClassName($table) {\n $class = '';\n $className = explode('_', $table);\n if (count($className) <= 1) {\n $class = ucfirst($className[0]);\n }\n \n if (count($className) > 1) {\n foreach ($className as $name) {\n $class .= ucfirst($name);\n }\n }\n return $class;\n }", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function camelToClass() : Manipulator\n {\n return new static($this->capitalize()->toString());\n }", "public function getSingular()\n\t{\n\t\treturn empty($this->singular) ? strtolower($this->getClass()) : $this->singular;\n\t}", "public function getNameAttribute($value){\n return ucfirst($value);\n }", "public function getClassName() {\n\t\treturn $this->className;\n\t}", "public function getLastNameAttribute($val)\n {\n return ucfirst($val);\n \n }", "public static function classNameToTitle(string $className): string\n {\n if (strpos($className, Environment::NAMESPACE_SEPARATOR) === false) {\n return ucwords(str_replace(['_', '-'], ' ', \\Safe\\preg_replace('|([a-z])([A-Z])|', '\\1 \\2', $className)));\n }\n $className = str_replace(['Advantage\\Repository', 'Advantage\\Form'], '', $className);\n return trim(\n \\Safe\\preg_replace(\n '|([a-z])([A-Z])|',\n '\\1 \\2',\n str_replace(\n ['Repository', 'Query', 'Form', 'Edit'],\n '',\n str_replace(Environment::NAMESPACE_SEPARATOR, ' ', $className)\n )\n )\n );\n }", "private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}", "public function getAttribute($key)\n {\n // Check if the key is an array dot notation.\n if (str_contains($key, '.') and array_has($this->attributes, $key)) {\n return $this->getAttributeValue($key);\n }\n\n $camelKey = camel_case($key);\n\n // If the \"attribute\" exists as a method on the model, it may be an\n // embedded model. If so, we need to return the result before it\n // is handled by the parent method.\n if (method_exists($this, $camelKey)) {\n $method = new ReflectionMethod(get_called_class(), $camelKey);\n }\n\n return parent::getAttribute($key);\n }" ]
[ "0.61572564", "0.6152336", "0.5693837", "0.55937994", "0.53605855", "0.5350472", "0.533853", "0.53346974", "0.5283421", "0.521665", "0.5216016", "0.51824164", "0.51801217", "0.5172149", "0.51718843", "0.5143842", "0.514227", "0.51409215", "0.5131353", "0.5124402", "0.5109615", "0.5089375", "0.50859356", "0.50606525", "0.5048239", "0.5043079", "0.50406665", "0.5033433", "0.49963948", "0.49909693", "0.49901223", "0.49893507", "0.4978817", "0.49715304", "0.49673265", "0.49586713", "0.49281192", "0.49281192", "0.49227786", "0.4899672", "0.4878549", "0.48766565", "0.48752898", "0.48617572", "0.48599437", "0.48584622", "0.4858095", "0.48517182", "0.48463428", "0.4845163", "0.48360714", "0.48326483", "0.48192504", "0.48151624", "0.47879487", "0.47865304", "0.47844326", "0.47721124", "0.47679606", "0.47676426", "0.4766187", "0.47564453", "0.4756269", "0.47539774", "0.47539774", "0.47485703", "0.47467807", "0.47463667", "0.47400165", "0.47331876", "0.4727574", "0.4724966", "0.47248316", "0.47224227", "0.4721332", "0.47163886", "0.4700475", "0.46950197", "0.46950197", "0.46950197", "0.46950197", "0.46950197", "0.46950197", "0.46950197", "0.46950197", "0.46918127", "0.46811947", "0.46788436", "0.46788436", "0.46788436", "0.46788436", "0.4676147", "0.46745798", "0.4667074", "0.46636927", "0.46636823", "0.46597996", "0.46566445", "0.4654348", "0.4651979" ]
0.6888032
0
Creates INNER JOIN SQL for associations.
public function constructInnerJoinSql(Table $fromTable, $usingThrough=false, $alias=null) { if ($usingThrough) { $joinTable = $fromTable; $joinTableName = $fromTable->getFullyQualifiedTableName(); $fromTableName = Table::load($this->className)->getFullyQualifiedTableName(); } else { $joinTable = Table::load($this->className); $joinTableName = $joinTable->getFullyQualifiedTableName(); $fromTableName = $fromTable->getFullyQualifiedTableName(); } // need to flip the logic when the key is on the other table if ($this instanceof HasMany || $this instanceof HasOne) { $this->setKeys($fromTable->class->getName()); if ($usingThrough) { $foreignKey = $this->primaryKey[0]; $joinPrimaryKey = $this->foreignKey[0]; } else { $joinPrimaryKey = $this->foreignKey[0]; $foreignKey = $this->primaryKey[0]; } } else { $foreignKey = $this->foreignKey[0]; $joinPrimaryKey = $this->primaryKey[0]; } if (!is_null($alias)) { $aliasedJoinTableName = $alias = $this->getTable()->conn->quoteName($alias); $alias .= ' '; } else $aliasedJoinTableName = $joinTableName; return "INNER JOIN $joinTableName {$alias}ON($fromTableName.$foreignKey = $aliasedJoinTableName.$joinPrimaryKey)"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function sqlJoining() : string {\n $relations = self::getsRelationsHasOne();\n\n $baseTable = static::tableName();\n $baseProperties = self::getProperties();\n foreach ($baseProperties as &$property) {\n $property = $baseTable . '.' . $property;\n }\n $colsFromBaseTabel = implode(', ', $baseProperties);\n $colsFromJoinedTables = '';\n foreach ($relations as $relation) {\n $modelNamespace = '\\\\' . $relation['model'];\n $modelTableName = $modelNamespace::tableName();\n $modelProperties = $modelNamespace::getProperties();\n foreach ($modelProperties as $key => &$value) {\n $value = $modelTableName . '.' . $value . ' AS ' . $modelTableName . '_' . $value;\n }\n $colsFromJoinedTables .= ', ' . implode(', ', $modelProperties);\n\n }\n $sql = 'SELECT ' . $colsFromBaseTabel . ' ' . $colsFromJoinedTables . ' FROM ' . $baseTable;\n\n foreach ($relations as $relation) {\n $modelNamespace = '\\\\' . $relation['model'];\n $modelTableName = $modelNamespace::tableName();\n $sql .= ' INNER JOIN ' . $modelTableName . ' ON ' . $baseTable . '.' . $relation['column'] . ' = ' . $modelTableName . '.' . $relation['joined-table-column'];\n }\n\n return $sql . ' WHERE ' . $baseTable . '.';\n }", "protected function innerJoin() {\n return \" INNER JOIN ImageDetails ON MainPostImage = ImageID\n INNER JOIN Users ON Posts.UserID = Users.UserID\"; }", "protected function innerJoinImages(){\n return ' INNER JOIN ImageDetails ON PostImages.ImageID = ImageDetails.ImageID';\n }", "public function innerJoin($table);", "public function compile()\n {\n if (null !== $this->type) {\n $sql = strtoupper($this->type).' JOIN';\n } else {\n $sql = 'JOIN';\n }\n\n $sql .= ' '.$this->quoter->quoteTable($this->table);\n\n if (!empty($this->using)) {\n $sql .= ' USING ('.implode(', ', array_map(array($this->quoter, 'quoteColumn'), $this->using)).')';\n } else {\n $conditions = array();\n\n foreach ($this->on as $condition) {\n list($c1, $op, $c2) = $condition;\n\n if ($op) {\n $op = ' '.strtoupper($op);\n }\n\n $conditions[] = $this->quoter->quoteColumn($c1).$op.' '.$this->quoter->quoteColumn($c2);\n }\n\n $sql .= ' ON ('.implode(' AND ', $conditions).')';\n }\n\n return $sql;\n }", "public function innerJoin() {\r\n\t\t$args = func_get_args();\r\n\t\t$name = array_shift($args);\r\n\t\t$joined = array_shift($args);\r\n\t\tif (!$name) $name = '___' . $joined;\r\n\t\t//if (count(array_keys(self::$_joinStack, $joined)) > 1) {\r\n\t\tif (get_class($this) == $joined || in_array($joined, self::$_joinStack)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tself::$_joinStack[] = get_class($this);\r\n\t\tself::$_joinStack[] = $joined;\r\n\t\t$model = null;\r\n\t\tif (is_string($joined)) {\r\n\t\t\tif (is_subclass_of($joined, 'Dbi_Model')) {\r\n\t\t\t\t$model = new $joined();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (is_subclass_of($joined, 'Dbi_Model')) {\r\n\t\t\t\t$model = $joined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarray_pop(self::$_joinStack);\r\n\t\tarray_pop(self::$_joinStack);\r\n\t\tif (is_null($model)) {\r\n\t\t\tthrow new Exception('Queries can only join models.');\r\n\t\t}\r\n\t\t$this->_innerJoins[] = array(\r\n\t\t\t'name' => $name,\r\n\t\t\t'model' => $model,\r\n\t\t\t'args' => $args\r\n\t\t);\r\n\t}", "protected function buildJoinClause() {\r\n\t\t$sql='';\r\n\t\tif (count($this->_salt_joins)>0) {\r\n\t\t\tforeach($this->_salt_joins as $alias => $join) {\r\n\t\t\t\t$sql.=' '.$join['type'].' JOIN '.$join['table'].' ON '.implode(' ', $join['on']);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $sql;\r\n\t}", "function buildJoin()\n\t{\n\t\tif ($this->table_obj_reference)\n\t\t{\n\t\t\t// Use inner join instead of left join to improve performance\n\t\t\treturn \"JOIN \".$this->table_obj_reference.\" ON \".$this->table_tree.\".child=\".$this->table_obj_reference.\".\".$this->ref_pk.\" \".\n\t\t\t\t \"JOIN \".$this->table_obj_data.\" ON \".$this->table_obj_reference.\".\".$this->obj_pk.\"=\".$this->table_obj_data.\".\".$this->obj_pk.\" \";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use inner join instead of left join to improve performance\n\t\t\treturn \"JOIN \".$this->table_obj_data.\" ON \".$this->table_tree.\".child=\".$this->table_obj_data.\".\".$this->obj_pk.\" \";\n\t\t}\n\t}", "function to_str(){\n //\n //Get the name of the entity \n $ename= $this->entity->name;\n //\n //The type of the join eg inner join, outer join\n $join_str=\"$this->type\"\n //\n //The on clause\n . \"\\t `$ename` \\tON \\t{$this->get_ons()}\";\n return $join_str;\n }", "public function innerJoin($table, $conditions = []);", "function innerJoin($conditions)\n\t{\n\t\treturn $this->join('INNER', $conditions);\n\t}", "public function innerJoin($table, $alias = NULL, $condition = NULL, $arguments = []);", "function joinClause( $join ) {\n\t global $wpdb;\n\t $join .= \" INNER JOIN $wpdb->postmeta dm ON (dm.post_id = $wpdb->posts.ID AND dm.meta_key = '$this->orderby') \";\n\t return $join;\n\t}", "function get_ons(){\n //\n //Map for each and return an on clause \n $col_str=array_map(array($this, 'map'), $this->foreigns); //\n //\n //Return on joined on \n return implode(\"AND \\t\",$col_str);\n }", "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 }", "public function get_additional_joins()\n {\n return 'LEFT JOIN isys_catg_its_type_list AS cat_rel\n\t\t\tON cat_rel.isys_catg_its_type_list__isys_obj__id = obj_main.isys_obj__id';\n }", "protected function get_join_sql(array $filters=array()) {\n $joinsql = parent::get_join_sql($filters);\n $joinsql[] = 'JOIN {'.clusterassignment::TABLE.'} clstass\n ON clstass.clusterid='.$this->usersetid.'\n AND clstass.userid = element.id';\n return $joinsql;\n }", "final public static function innerJoin(string $table, string $primaryKey, string $foreignKey)\n {\n //inicia o select\n self::$query .= \" INNER JOIN \" . $table . \" ON $table.$primaryKey = \" . self::tableName() . \".$foreignKey \";\n return (new static);\n }", "public function getJoinExpression();", "private function buildJoins(): void {\r\n\r\n if(count($this -> joins) > 0) {\r\n\r\n $query = [];\r\n\r\n foreach($this -> joins as $join) {\r\n\r\n $parts = [];\r\n $parts[] = sprintf('%s JOIN', strtoupper($join['type']));\r\n $parts[] = $join['table'];\r\n\r\n if(null !== $join['alias']) {\r\n $parts[] = $join['alias'];\r\n }\r\n\r\n if(null !== $join['conditions']) {\r\n $parts[] = sprintf('ON %s', $join['conditions']);\r\n }\r\n\r\n $query[] = implode(' ', $parts);\r\n }\r\n\r\n $this -> query[] = implode(' ', $query);\r\n }\r\n }", "function sql_inner_join_statement(string $table_name, string $coloum_name, int $count)\n {\n $sql = \" FROM \" . $table_name . \" AS T1 \";\n for($i = 1; $i < $count; $i++){\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n \n $sql .= \"INNER JOIN $table_name AS $t_name USING ( \" . $coloum_name . \" ) \";\n }\n return $sql;\n }", "protected abstract function getJoinClause(array $joins);", "private static function selectAndJoins()\n {\n $sql = \"SELECT * FROM \" . dbPerformance::DBNAME;\n\n $sql .= \" INNER JOIN \" . dbCompetition::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::COMPETITOINID . \" = \" . dbCompetition::DBNAME . \".\" . dbCompetition::ID;\n $sql .= \" INNER JOIN \" . dbDisziplin::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::DISZIPLINID . \" = \" . dbDisziplin::DBNAME . \".\" . dbDisziplin::ID;\n $sql .= \" INNER JOIN \" . dbAthletes::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ATHLETEID . \" = \" . dbAthletes::DBNAME . \".\" . dbAthletes::ID;\n $sql .= \" LEFT JOIN \" . dbPerformanceDetail::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ID . \" = \" . dbPerformanceDetail::DBNAME . \".\" . dbPerformanceDetail::PERFORMANCEID;\n\n $sql .= \" INNER JOIN \" . dbCompetitionLocations::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::LOCATIONID . \" = \" . dbCompetitionLocations::DBNAME . \".\" . dbCompetitionLocations::ID;\n $sql .= \" INNER JOIN \" . dbCompetitionNames::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::NAMEID . \" = \" . dbCompetitionNames::DBNAME . \".\" . dbCompetitionNames::ID;\n return $sql;\n }", "protected function getJoinTable(): string\n {\n return \"{$this->define(SchemaInterface::TABLE)} AS {$this->getAlias()}\";\n }", "public function getJoins() {\n\t\t$sql = \"\";\n\t\tif (count($this->join) > 0) {\n\t\t\tforeach ($this->join as $j) {\n\t\t\t\t$sj = $j[2];\n\t\t\t\t$sql .= \" \".$j[0].\" JOIN \".$sj->getFrom().\" ON \".$sj->getTable().\".`\".$j[3].\"`=\".$this->getTable().\".`\".$j[1].\"`\";\n\t\t\t\t$sql .= $sj->getJoins();\n\t\t\t}\n\n\n\t\t}\n\t\treturn $sql;\n\t}", "function getAstroFilterJoin () {\n // Since the Object table doesn't have a filterID field, this will\n // never select the Object table to filter with.\n $filterTable;\n if (!empty ($this->checkTables)) {\n foreach ($this->checkTables as $table) {\n $columns = self::getTableColumns( $table );\n $checkColumns = self::getCheckTableColumns( $table );\n if ( $table != self::JOIN_TABLE && in_array( 'filterID', $columns ) && !empty($checkColumns)) {\n $filterTable = $table;\n break;\n }\n }\n }\n\n // In MSSQL it is *much* faster to use: filterID IN (1, 2, 3)\n // than: (filterID = 1 OR filterID = 2 OR filterID = 3)\n if (!empty ($this->checkAstroFilterIDs) && !empty ($filterTable)) {\n return sprintf (\" AND %s.filterID IN (%s) \",\n self::getTableAlias ($filterTable),\n join (', ', $this->checkAstroFilterIDs));\n }\n return;\n }", "function sql_inner_join_select_statement(int $count, array $keys)\n {\n $sql = \"\";\n for($i = 0; $i < $count; $i++ ) {\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n\n $sql .= $t_name . \".value AS \" . $keys[$i];\n $sql .= ($i != $count - 1) ? \", \" : \"\";\n }\n return $sql;\n }", "public function _complex_join()\n {\n // LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n // LEFT JOIN (SELECT a.* FROM `%1$sproout` as a INNER JOIN (SELECT max(`id`) as id FROM `%1$sproout` group by `jpid`) as b on a.id = b.id) as `%1$sproout` on `%1$spro`.`id` = `%1$sproout`.`jpid`\n // LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n\n $join = sprintf('LEFT JOIN `%1$sproin` ON `%1$spro`.`id` = `%1$sproin`.`jpid`\n LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n LEFT JOIN `%1$sproout` on `%1$sproout`.`jpid` = `%1$spro`.`id`\n LEFT JOIN `%1$sproout` tmp_out on tmp_out.`jpid` = `%1$sproout`.`jpid` and tmp_out.`id` > `%1$sproout`.`id`\n LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n return $join;\n }", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getName() .\" \n JOIN \".$this->_getPessoa()->getModel()->getTableName().\" cliente ON ( ca_cliente_contrato.id_cliente = cliente.id ) \n JOIN \".$this->_getContrato()->getModel()->getTableName().\" contrato ON ( ca_cliente_contrato.id_contrato = contrato.id ) \"; \n return $sql;\n }", "function sql_inner_join_where_clause(int $count, array $keys)\n {\n $sql = \" WHERE \";\n for($i = 0; $i < $count; $i++ ) {\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n\n $sql .= \"$t_name.field = '\" . $keys[$i];\n $sql .= ($i != $count - 1) ? \"' AND \" : \"'\";\n }\n $sql .= \") TmpTable\";\n return $sql;\n }", "public function testImplicitJoinInWhereOnSingleValuedAssociationPathExpression(): void\n {\n // SQL: SELECT ... FROM forum_user fu INNER JOIN forum_avatar fa ON fu.avatar_id = fa.id WHERE fa.id = ?\n $this->assertValidDQL('SELECT u FROM Doctrine\\Tests\\Models\\Forum\\ForumUser u JOIN u.avatar a WHERE a.id = ?1');\n }", "protected function toBaseSQL() {\r\n\t\t$sql=' FROM '.$this->resolveTable();\r\n\r\n\t\t$sql.=$this->buildJoinClause();\r\n\t\t$sql.=$this->buildWhereClause();\r\n\r\n\t\t$sql.=$this->buildGroupClause();\r\n\r\n\t\treturn $sql;\r\n\t}", "protected function get_join_sql(array $filters=array()) {\n $joinsql = parent::get_join_sql($filters);\n $joinsql[] = 'LEFT JOIN {'.clusterassignment::TABLE.'} clstass\n ON clstass.clusterid='.$this->usersetid.'\n AND clstass.userid = element.id';\n return $joinsql;\n }", "public function getJoinSql($data, $link) {\n $str = ' ';\n if ($data->joins) {\n foreach ($data->joins as $join) {\n $join['type'] = strtoupper($join['type']);\n if (strncmp('NATURAL', $join['type'], 7) === 0) {\n $str .= $join['type'] . ' JOIN ' . $this->formatTable($join['table']) . $this->parseIndexHint($join['index_hint']);\n } else {\n $str .= $join['type'] . ' JOIN ' . $this->formatTable($join['table']) . $this->parseIndexHint($join['index_hint']) . ($join['cond'] ? ' ON ' . $this->parseWhere($join['cond'], '', $link) : '');\n }\n }\n }\n\n return $str;\n }", "protected function _compile_join(array $joins)\n {\n foreach ($joins as $key=>$join) \n {\n $conditions = array();\n\n foreach ($this->_on[$key] as $condition)\n {\n // Split the condition\n list($c1, $op, $c2, $chaining) = $condition;\n\n // Add chain type\n $conditions[] = ' '.$chaining.' ';\n\n if ($op)\n {\n // Make the operator uppercase and spaced\n $op = ' '.strtoupper($op);\n }\n\n // Quote each of the identifiers used for the condition\n $c1 = $this->quote_identifier($c1);\n $c2 = $this->quote_identifier($c2);\n $conditions[] = $c1.$op.' '.(is_null($c2) ? 'NULL' : $c2);\n }\n\n // remove the first chain type\n array_shift($conditions);\n\n // if there are conditions, concat the conditions \"... AND ...\" and glue them on...\n empty($conditions) or $joins[$key] .= ' ON ('.implode('', $conditions).')';\n\n }\n\n $sql = implode(' ', $joins);\n return $sql;\n }", "public function build_join( $joins ) {\n $sql = '';\n\n if ( empty( $joins ) ) {\n return $sql;\n }\n\n foreach ( $joins as $index => $join ) {\n if ( ! is_array( $join ) ) {\n continue;\n }\n\n $table = $join['table'] . '_' . $index;\n\n $sql .= ' ' . strtoupper( $join['type'] ) . ' JOIN ' . $join['table'] . ' AS ' . $table;\n $sql .= $this->build_join_on( $join, $table );\n\n $this->query_args['fields'] = wp_parse_args(\n $this->query_args['fields'],\n $this->build_join_fields( $join, $table )\n );\n }\n\n return $sql;\n }", "function joinQuery()\n {\n }", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_item_pedido.id_pedido = pedido.id ) \n JOIN \".$this->_getProduto()->getModel()->getTableName().\" produto ON ( cv_item_pedido.id_produto = produto.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_inc ON ( cv_item_pedido.id_usu_inc = usu_inc.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_alt ON ( cv_item_pedido.id_usu_alt = usu_alt.id ) \"; \n return $sql;\n }", "public function __toString()\n {\n if (!isset($this->_from[0]['table']) || !$this->_from[0]['table']) {\n //sanity check\n return '';\n }\n\n $sql = \"SELECT \";\n\n $column_parts = array();\n $from_parts = array();\n\n foreach ($this->_from as $from) {\n $table_key = (is_array($from['table'])) ? key($from['table']) : $from['table'];\n\n foreach ($from['columns'] as $column_key => $column_name) {\n if (strpos($column_name, '(') === false && strpos($column_name, '.') === false) {\n //This is NOT an expression and does not yet have \".\", add tbl name\n $column_name = $table_key . '.' . $column_name;\n }\n\n if (!geoString::isInt($column_key)) {\n $column_name .= ' AS ' . $column_key;\n }\n $column_parts[] = $column_name;\n }\n\n //figure out from\n switch ($from['join_type']) {\n case 'primary':\n //special case, this is first table, don't need to add join type\n $from_str = '';\n break;\n\n case self::JOIN_LEFT:\n $from_str = 'LEFT JOIN ';\n break;\n\n case self::JOIN_INNER:\n //break ommitted on purpose\n default:\n $from_str = 'INNER JOIN ';\n break;\n }\n\n if (is_array($from['table'])) {\n //using array(table_alias => table_name)\n $table = $from['table'];\n reset($table);\n $from_str .= current($table) . ' AS ' . key($table);\n } else {\n //simple string for table\n $from_str .= $from['table'];\n }\n if ($from['on'] && is_array($from['on'])) {\n $from_str .= ' ON ' . implode(' AND ', $from['on']);\n } elseif ($from['on']) {\n $from_str .= ' ON ' . $from['on'];\n }\n $from_parts [] = $from_str;\n }\n $sql .= implode(', ', $column_parts) . \"\\n\\tFROM \" . implode(\"\\n\\t\\t\", $from_parts);\n\n $where = $this->_where;\n\n if ($this->_orWhere) {\n //add all the OR's to the thingy\n foreach ($this->_orWhere as $name => $orWhere) {\n $where[$name] = \"(\" . implode(' OR ', $orWhere) . \")\";\n }\n }\n\n if ($where) {\n $sql .= \"\\n\\tWHERE \" . implode(' AND ', $where);\n }\n\n if ($this->_group) {\n $sql .= \"\\n\\tGROUP BY \" . implode(', ', $this->_group);\n }\n\n if ($this->_order) {\n $sql .= \"\\n\\tORDER BY \" . implode(', ', $this->_order);\n }\n\n if ($this->_count || $this->_offset) {\n $sql .= \"\\n\\tLIMIT {$this->_count}\";\n if ($this->_offset) {\n $sql .= \", {$this->_offset}\";\n }\n }\n\n return $sql;\n }", "public static function doInnerJoin($table2, $params=NULL, $fields=array()) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$what = parent::_getSelectFields($fields);\n\t\t$conn->innerJoin(self::TABLE_NAME, $table2, $what);\n\t\treturn DbModel::doSelect($conn, new ProjectsListingsModel());\n\t}", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_pagto_pedido.id_pedido = pedido.id ) \n LEFT JOIN \".$this->_getFormaPagamento()->getModel()->getTableName().\" forma_pagto ON ( cv_pagto_pedido.id_forma_pagto = forma_pagto.id ) \n LEFT JOIN \".$this->_getParcela()->getModel()->getTableName().\" parcela ON ( cv_pagto_pedido.id_parcela = parcela.id ) \"; \n return $sql;\n }", "function getSQL(?GrammarInterface $grammar): string {\n if($grammar !== null) {\n $table = $grammar->quoteTable($this->table->getTable());\n \n $alias = $this->table->getAlias();\n if(!empty($alias)) {\n $table .= ' AS '.$alias;\n }\n } else {\n $table = $this->table;\n }\n \n $ons = (\n !empty($this->ons) ?\n ' ON '.\\implode(' AND ', $this->ons) :\n ''\n );\n \n return ($this->type ? $this->type.' ' : '').'JOIN '.$table.$ons;\n }", "private function formatJoins()\n\t{\n\t\t$value = '';\n\t\tforeach ($this->joins as $join)\n\t\t{\n\t\t\t$value .= ' ' . $join['type'];\n\t\t\t$value .= ' ' . $join['table'];\n\t\t\tif ($join['alias'] != '') $value .= ' AS ' . $join['alias'];\n\t\t\tif ($join['use_index'] != '') $value .= ' USE INDEX ' . $join['use_index'];\n\t\t\tif ($join['ignore_index'] != '') $value .= ' IGNORE INDEX ' . $join['ignore_index'];\n\t\t\tif ($join['on_statement'] != '') $value .= ' ON ' . $join['on_statement'];\n\t\t\tif ($join['using_statement'] != '') $value .= ' USING ' . $join['using_statement'];\n\t\t}\n\t\treturn $value;\n\t}", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n LEFT JOIN \".$this->_getPagamento()->getModel()->getTableName().\" pagto_pedido ON ( cv_pagto_lanc.id_pagto_pedido = pagto_pedido.id ) \n LEFT JOIN \".$this->_getLancamento()->getModel()->getTableName().\" lancamento ON ( cv_pagto_lanc.id_lancamento = lancamento.id ) \"; \n return $sql;\n }", "function __construct(\\entity $e, array $foreigns, $type='INNER JOIN'){\n //\n //Every join must have a type which is a string i.e inner join \n //outer join etc\n $this->type=$type;\n //\n //Get the join \n $this->entity= $e;\n //\n $this->foreigns=$foreigns;\n //\n //Formulate the on clauses \n $this->ons= $this->get_ons();\n }", "private function sql_join($filter, $structure) {\n\t\t$sql = \"\";\n\t\t$table = $structure['table'];\n\t\t$class = $structure['class'];\n\t\t$pool_class = $class . 'Pool_Model';\n\t\t$full_structure = $pool_class::get_full_structure();\n\t\tforeach ($structure['relations'] as $relation) {\n\t\t\tlist($foreign_key, $foreign_table, $key) = $relation;\n\t\t\t$foreign_structure = $full_structure[$foreign_table];\n\t\t\t$ftable = $foreign_structure['table'];\n\t\t\t$join_expr = ' LEFT JOIN '.$ftable.' AS '.$key;\n\t\t\t$join_expr .= ' ON '.implode(' AND ',array_map(function($fk,$lk) use($key,$table) {\n\t\t\t\treturn \"$key.$fk = $table.$lk\";\n\t\t\t}, $foreign_structure['key'], $foreign_key));\n\t\t\t$sql .= $join_expr;\n\t\t}\n\t\treturn $sql;\n\t}", "public function innerJoin($table, $on = null)\n {\n $this->joinTokens[$this->activeJoin = $table] = ['type' => 'INNER', 'on' => []];\n\n return call_user_func_array([$this, 'on'], array_slice(func_get_args(), 1));\n }", "public function innerJoin($table, array $fields = [], array $on = []) {\n return $this->_addJoin(Join::INNER, $table, $fields, $on);\n }", "abstract protected function appendJoins(QueryBuilder $queryBuilder);", "public function testImplicitJoinWithCartesianProductAndConditionInWhere(): void\n {\n $this->assertValidDQL('SELECT u, a FROM Doctrine\\Tests\\Models\\CMS\\CmsUser u, Doctrine\\Tests\\Models\\CMS\\CmsArticle a WHERE u.name = a.topic');\n }", "protected function compileJoins(Builder $builder, $joins): string\n {\n $sql = [];\n\n foreach ((array) $joins as $join) {\n $table = $this->wrapTable($join->table);\n\n $clauses = [];\n\n foreach ($join->clauses as $clause) {\n $clauses[] = $this->compileJoinContraint($clause);\n }\n\n foreach ($join->bindings as $binding) {\n $builder->addBinding($binding, 'join');\n }\n\n $clauses[0] = $this->removeStatementBoolean($clauses[0]);\n\n $clauses = implode(' ', $clauses);\n\n $sql[] = \"{$join->type} join {$table} on {$clauses}\";\n }\n\n return implode(' ', $sql);\n }", "public function build_relationship()\n {\n $joins = array();\n\n $main_table = strtolower($this->_model->clean_table());\n\n foreach ($this->associations as $one) {\n\n if (!!$one) {\n $table = strtolower(DB_SUFFIX.'_'.$one);\n\n $clean_one = str_replace( DB_SUFFIX .'_', '', $table );\n\n $joins[] = 'LEFT JOIN '.$table.' ON '.DB_SUFFIX.'_'.$main_table.'.'.$clean_one.'_id = '.$table.'.id';\n\n // Set the columns within the one loop\n $this->get_has_one_columns($one);\n }\n }\n\n if ( count($joins) > 0 ) {\n $result = implode( ' ', $joins );\n } else {\n $result = false;\n }\n\n return $result;\n }", "public function innerjoin($classname, $classnameon = \"\")\n {\n $this->join = strtolower(get_class($classname));\n\n if (!$classnameon)\n $classnameon = $this->objectName;\n\n $this->query .= \" inner join `\" . $this->join . \"` on \" . $this->join . \".id = \" . strtolower($classnameon) . \".\" . $this->join . \"_id\";\n// $this->query .= \" inner join `\" . $this->join . \"` \";\n\n return $this;\n }", "function editor_joins(){\n //\n //begin with an empty collection of joins \n $joins=[];\n //\n //Push the editor joins also\n foreach ($this->editor_joins as $join){\n array_push($joins, $join);\n }\n //\n //Set the new joins \n $this->joins=new joins($joins);\n }", "public function fullOuterJoin($table);", "function joins() {\n //\n //begin with an empty array of joins \n $joins=[];\n //\n //Clean the array to remove any dublicates\n //\n //Sort the array in order of dependency\n $unsorted_entities=[];\n foreach ($this->join_entities as $enames){\n //\n //Get the entities\n $entty= $this->entity->dbase->entities[$enames];\n array_push($unsorted_entities, $entty);\n }\n \n //loop through the sorted array creating a join from each \n foreach ($unsorted_entities as $entity){\n //\n //get the ands columns\n $foreigns= $this->get_foreigners($entity, $joins);\n //\n //Create a new join \n array_push($joins, new join($entity, $foreigns, 'INNER JOIN'));\n }\n //\n //Return the collection of the joins in an array \n return $joins;\n }", "protected function _getFetchJoins() {\n\t\treturn 'LEFT JOIN series se ON se.series_id = s.series_id\n\t\t\tLEFT JOIN series_settings stpl ON (se.series_id = stpl.series_id AND stpl.setting_name = ? AND stpl.locale = ?)\n\t\t\tLEFT JOIN series_settings stl ON (se.series_id = stl.series_id AND stl.setting_name = ? AND stl.locale = ?)\n\t\t\tLEFT JOIN series_settings sapl ON (se.series_id = sapl.series_id AND sapl.setting_name = ? AND sapl.locale = ?)\n\t\t\tLEFT JOIN series_settings sal ON (se.series_id = sal.series_id AND sal.setting_name = ? AND sal.locale = ?)';\n\t}", "public function naturalJoin($table);", "public function testBuildWhereWithJoin()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->alias('table1_alias')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->alias('table2_alias')\n ->joinOn('id', 'id')\n ->where('is_admin', 1)\n )\n ->where('id', 100)\n ;\n\n $this->assertSame(\n \"WHERE table1_alias.id = '100' AND table2_alias.is_admin = '1'\",\n $query->buildWhere()\n );\n }", "protected function _buildJoin(array $filter_data=array())\n {\n return \"\";\n }", "function query_main_join( $sql, $engine ) {\n\t\tglobal $wpdb;\n\n\t\tif ( isset( $engine ) ) {\n\t\t\t$engine = null;\n\t\t}\n\n\t\t// if WooCommerce is sorting results we need to tell SearchWP to return them in that order\n\t\tif ( $this->is_woocommerce_search() ) {\n\n\t\t\tif ( ! isset( $this->ordering['wc_orderby'] ) ) {\n\t\t\t\t$this->get_woocommerce_ordering();\n\t\t\t}\n\n\t\t\t// depending on the sorting we need to do different things\n\t\t\tif ( isset( $this->ordering['wc_orderby'] ) ) {\n\t\t\t\tswitch ( $this->ordering['wc_orderby'] ) {\n\t\t\t\t\tcase 'price':\n\t\t\t\t\tcase 'price-desc':\n\t\t\t\t\tcase 'popularity':\n\t\t\t\t\t\t$meta_key = 'price' === $this->ordering['wc_orderby'] ? '_price' : 'total_sales';\n\t\t\t\t\t\t$sql = $sql . $wpdb->prepare( \" LEFT JOIN {$wpdb->postmeta} AS swpwc ON {$wpdb->posts}.ID = swpwc.post_id AND swpwc.meta_key = %s\", $meta_key );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rating':\n\t\t\t\t\t\t$sql = $sql . \" LEFT OUTER JOIN {$wpdb->comments} swpwpcom ON({$wpdb->posts}.ID = swpwpcom.comment_post_ID) LEFT JOIN {$wpdb->commentmeta} swpwpcommeta ON(swpwpcom.comment_ID = swpwpcommeta.comment_id) \";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// for visibility we always need to join postmeta\n\t\t\tif ( function_exists( 'WC' ) && ! empty( WC()->version ) && version_compare( WC()->version, '2.6.0', '<' ) ) { // Moved to a taxonomy\n\t\t\t\t$sql = $sql . \" INNER JOIN {$wpdb->postmeta} as woovisibility ON {$wpdb->posts}.ID = woovisibility.post_id \";\n\t\t\t}\n\n\t\t}\n\n\t\treturn $sql;\n\t}", "public function getSQL()\n\t{\n\t\t// build the SELECT FROM part\n\t\t$sql = sprintf('SELECT * FROM `%s`', $this->from);\n\t\t// build the JOIN part\n\t\tforeach ($this->joins as $join) {\n\t\t\t$sql .= sprintf(' %s JOIN `%s` ON (%s)',\n\t\t\t\t$join['type'],\n\t\t\t\t$join['foreignTable'],\n\t\t\t\t$join['clause']\n\t\t\t);\n\t\t}\n\t\t// build the WHERE part\n\t\tif ($this->wheres) {\n\t\t\t$whereClauses = array();\n\t\t\tforeach ($this->wheres as $key => $where) {\n\t\t\t\t$whereClauses []= $where['clause'];\n\t\t\t}\n\t\t\t$sql .= ' WHERE ' . implode(' AND ', $whereClauses);\n\t\t}\n\t\t// build the LIMIT part\n\t\tif ($this->limit) {\n\t\t\t$sql .= ' LIMIT ' . $this->limit;\n\t\t}\n\t\treturn $sql;\n\t}", "protected function build_join_on( $join, $table ) {\n\n $field_1 = $table . '.' . $join['on']['field'];\n $compare = $join['on']['compare'];\n $field_2 = ( $this->table_short !== '' ) ? $this->table_short : $this->table;\n $field_2 .= '.' . $join['on']['join_field'];\n\n return ' ON ' . $field_1 . ' ' . $compare . ' ' . $field_2;\n }", "private function getJoinStr($joins=array()){\n\t\t$str = array();\n\t\tforeach($joins ?: $this->joins as $j){\n\t\t\tlist($table, $on, $type) = $j;\n\t\t\tswitch($type){\n\t\t\t\tcase self::LEFT_JOIN:\n\t\t\t\t\t$str[] = 'LEFT JOIN';\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::RIGHT_JOIN:\n\t\t\t\t\t$str[] = 'RIGHT JOIN';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::INNER_JOIN:\n\t\t\t\tdefault:\n\t\t\t\t\t$str[] = 'INNER JOIN';\n\t\t\t}\n\n\t\t\t$str[] = self::escapeKey($table);\n\t\t\tif($on){\n\t\t\t\t$str[] = \"ON $on\";\n\t\t\t}\n\t\t}\n\t\treturn join(\"\", $str);\n\t}", "function join($table, &$query) {\r\n $left = $query->get_table_info($this->left_table);\r\n $output = \" $this->type JOIN {\" . $this->table . \"} $table[alias] ON ($this->left_query) = $table[alias].$this->field\";\r\n\r\n // Tack on the extra.\r\n if (isset($this->extra)) {\r\n if (is_array($this->extra)) {\r\n $extras = array();\r\n foreach ($this->extra as $info) {\r\n $extra = '';\r\n // Figure out the table name. Remember, only use aliases provided\r\n // if at all possible.\r\n $join_table = '';\r\n if (!array_key_exists('table', $info)) {\r\n $join_table = $table['alias'] . '.';\r\n }\r\n elseif (isset($info['table'])) {\r\n $join_table = $info['table'] . '.';\r\n }\r\n\r\n // And now deal with the value and the operator. Set $q to\r\n // a single-quote for non-numeric values and the\r\n // empty-string for numeric values, then wrap all values in $q.\r\n $raw_value = $this->db_safe($info['value']);\r\n $q = (empty($info['numeric']) ? \"'\" : '');\r\n\r\n if (is_array($raw_value)) {\r\n $operator = !empty($info['operator']) ? $info['operator'] : 'IN';\r\n // Transform from IN() notation to = notation if just one value.\r\n if (count($raw_value) == 1) {\r\n $value = $q . array_shift($raw_value) . $q;\r\n $operator = $operator == 'NOT IN' ? '!=' : '=';\r\n }\r\n else {\r\n $value = \"($q\" . implode(\"$q, $q\", $raw_value) . \"$q)\";\r\n }\r\n }\r\n else {\r\n $operator = !empty($info['operator']) ? $info['operator'] : '=';\r\n $value = \"$q$raw_value$q\";\r\n }\r\n $extras[] = \"$join_table$info[field] $operator $value\";\r\n }\r\n\r\n if ($extras) {\r\n if (count($extras) == 1) {\r\n $output .= ' AND ' . array_shift($extras);\r\n }\r\n else {\r\n $output .= ' AND (' . implode(' ' . $this->extra_type . ' ', $extras) . ')';\r\n }\r\n }\r\n }\r\n else if ($this->extra && is_string($this->extra)) {\r\n $output .= \" AND ($this->extra)\";\r\n }\r\n }\r\n return $output;\r\n }", "public function innerJoin(Select $table, $alias, $on)\n {\n $this->joins[] = array(\"subject\"=>$table, \"ali\"=>$alias, \"on\"=>$on, \"join\"=>\"INNER JOIN\");\n //var_dump($this);\n return $this;\n \n }", "function xiliml_adjacent_join_filter( $join, $in_same_cat, $excluded_categories ) {\n\t\tglobal $post, $wpdb;\n\t\t$curlang = xiliml_get_lang_object_of_post( $post->ID );\n\n\t\tif ( $curlang ) { // only when language is defined !\n\t\t\t$join .= \" LEFT JOIN $wpdb->term_relationships as xtr ON (p.ID = xtr.object_id) LEFT JOIN $wpdb->term_taxonomy as xtt ON (xtr.term_taxonomy_id = xtt.term_taxonomy_id) \";\n\t\t}\n\t\treturn $join;\n\t}", "private function set_relation_joins() {\n if(!$this->use_relations) return;\n $relations = [];\n foreach ($this->colmodel as $i => $col) {\n if (!isset($col['relation']))\n continue;\n foreach (explode('>', $col['relation']) as $relation) {\n if (!str_contains($relation, '.'))\n continue;\n list($model_name, $relation_name) = explode('.', $relation);\n if ($relation_name != '' && !in_array($relation, $relations)) {\n $this->set_relation_join($model_name, $relation_name);\n $relations[] = $relation;\n }\n }\n }\n }", "public function join($table, $key, ?string $operator = null, $foreign = null, string $type = self::INNER_JOIN);", "public function addInnerJoinOn($table, $where)\n {\n //argument test\n Argument::i()\n //Argument 1 must be a string\n ->test(1, 'string')\n //Argument 2 must be a string\n ->test(2, 'string');\n \n $where = func_get_args();\n $table = array_shift($where);\n \n $this->join[] = array(self::INNER, $table, $where, false);\n \n return $this;\n }", "public function buildJoin($joins, array &$values)\n {\n if ($joins === null) {\n return '';\n }\n\n $sql = [];\n foreach ($joins as $join) {\n list($joinType, $table, $condition) = $join;\n\n if (is_array($table)) {\n foreach ($table as $alias => $tableName) {\n break;\n }\n } else {\n $alias = null;\n $tableName = $table;\n }\n\n if ($tableName instanceof Select) {\n $tableName = \"({$this->assembleSelect($tableName, $values)[0]})\";\n }\n\n if (is_array($condition)) {\n $condition = $this->buildCondition($condition, $values);\n }\n\n if (empty($alias) || $alias === $tableName) {\n $sql[] = \"$joinType JOIN $tableName ON $condition\";\n } else {\n $sql[] = \"$joinType JOIN $tableName $alias ON $condition\";\n }\n }\n\n return implode($this->separator, $sql);\n }", "public function joinOn($tableJoin, $columnJoin, $tableOn, $columnOn);", "protected function joining_table()\n {\n return $this->connection()->table($this->joining);\n }", "public function makeJoinBy(array $conditions) {\n if (0 == sizeof($conditions)) {\n throw new \\lang\\IllegalArgumentException('Conditions can not be empty');\n }\n\n $tableString= current($conditions)->getSource()->toSqlString();\n $conditionString= '';\n foreach ($conditions as $link) {\n $tableString.= ', '.$link->getTarget()->toSqlString();\n foreach ($link->getConditions() as $condition) $conditionString.= str_replace('=', '*=', $condition).' and ';\n }\n return $tableString.' where '.$conditionString;\n }", "public function innerJoin(string $tableName, string $tableAlias = null, string $conditions = null): self {\r\n return $this -> addJoin('inner', $tableName, $tableAlias, $conditions);\r\n }", "public function rightOuterJoin($table);", "public function joinAssociations()\n {\n return array_slice($this->_joins, 1);\n }", "public function addJoin($assocTable, $col1, $col2, $last = true, $type = \"left\") {\n // Joins will always be on selects\n list($this->sql, $this->from) = splitString($this->sql, \"FROM\");\n // Take care of aliased columns\n if (!empty($assocTable->aliases)) {\n $this->sql .= \", \";\n foreach($assocTable->aliases as $c => $a) {\n $this->sql .= $assocTable->name . \".$c as $a,\";\n }\n // Take the comma off the end\n $this->sql = trim($this->sql, \",\");\n }\n $type = strtoupper($type);\n $this->join .= \" $type JOIN \" . $assocTable->name;\n $this->join .= \" ON \" . $this->table->name . \".\" . $col1 . \" = \" . $assocTable->name . \".\" . $col2;\n if ($last) {\n $this->sql .= \" $this->from\";\n $this->sql .= $this->join;\n }\n }", "public function testBuildJoinDefaultWithTwoJoinOn()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->joinOn('id', 'id')\n ->joinOn('user_id', 'type_id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 ON table1.id = table2.id AND table1.user_id = table2.type_id',\n $query->buildJoin()\n );\n }", "public function resolveJoins($joins)\n {\n $all = \"\";\n if (is_array($joins)) {\n foreach ($joins as $join => $on) {\n $all .= \" \" . $join . \" ON (\" . $this->resolveConditionData($on) . \")\";\n }\n }\n return $all;\n }", "public function testBuildJoinDefault()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->joinOn('id', 'id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 ON table1.id = table2.id',\n $query->buildJoin()\n );\n }", "public function addInnerJoinUsing($table, $where)\n {\n //argument test\n Argument::i()\n //Argument 1 must be a string\n ->test(1, 'string')\n //Argument 2 must be a string\n ->test(2, 'string');\n \n $where = func_get_args();\n $table = array_shift($where);\n \n $this->join[] = array(self::INNER, $table, $where, true);\n \n return $this;\n }", "protected function genSelectsJoins ($map)\n\t{\n\t\t$joins = array_reverse($map[GlobalSystem::ExpJoin]);\n\t\t$from = $map[GlobalSystem::ExpFrom][GlobalSystem::ExpModel];\n\t\t$matcher = $map[GlobalSystem::ExpFrom][GlobalSystem::ExpMatcher];\n\t\t$matchValue = $map[GlobalSystem::ExpFrom][GlobalSystem::ExpMatchValue];\n\t\n\t\t$target = $joins[0][GlobalSystem::ExpModel];\n\t\t$sqlBase = \"SELECT {$target}.* FROM {$target} {join} WHERE {$from}.{$matcher} = {$matchValue}\";\n\n\t\t$joinBase = '';\n\t\tforeach($joins as $join) {\n\t\t\t$joinBase .= \"INNER JOIN {$join[GlobalSystem::ExpForeignKey][0]} ON {$join[GlobalSystem::ExpForeignKey][0]}.{$join[GlobalSystem::ExpForeignKey][1]} = {$join[GlobalSystem::ExpModel]}.`{$join[GlobalSystem::ExpProperty]}` \";\n\t\t}\n\n\t\treturn str_replace('{join}', $joinBase, $sqlBase);\n\t}", "public function testBuildSelectWithJoin()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->fields()\n ->addField('user@email', 'email')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->fields()\n ->addField('user@email', 'email')\n ->joinOn('id', 'id')\n )\n ;\n\n $this->assertSame(\n \"'user@email' AS table1__email, 'user@email' AS table2__email\",\n $query->buildSelectFields()\n );\n }", "function map_joins($join){\n //\n //return field to str\n return $join->to_str();\n }", "public function getSQL() {\n\t\t$o = $this->obj;\n\t\t$sql = \"SELECT\";\n\t\tif ($this->distinct) {\n\t\t\t$sql .= \" DISTINCT\";\n\t\t}\n\t\t$s = $this->getSelects();\n\t\tif ($s == \"\") {\n\t\t\t$sql .= \" \".$this->getTable().\".*\";\n\t\t} else {\n\t\t\t$sql .= \" \".$s;\n\t\t}\n\t\t$sql .= \" FROM \".$this->getFrom();\n\t\t$sql .= $this->getJoins();\n\t\t$where = $this->getFilters()->getSQL();\n\t\tif ($where != \"\") {\n\t\t\t$sql .= \" WHERE \".$where;\n\t\t}\n\n\n\n\t\tif ($this->group !== false) {\n\t\t\tif ($this->group[1] == false) {\n\t\t\t\t$sql .= \" GROUP BY \".$this->getTable().\".`\".$this->db->escape_string($this->group[0]).\"`\";\n\t\t\t} else {\n\t\t\t\t$sql .= \" GROUP BY \".$this->group[0];\n\t\t\t}\n\t\t}\n\t\t//if ($this->filter) {\n\t\t//\t$sql .= \" WHERE \".$this->filter->getSQL();\n\t\t//}\n\t\tif (count($this->order) > 0) {\n\t\t\tif ($this->order[0][0] === false) {\n\t\t\t\t$sql .= \" ORDER BY RAND()\";\n\t\t\t} elseif (isset($this->order[0][0])) {\n\t\t\t\t$sql .= \" ORDER BY \";\n\t\t\t\tforeach ($this->order as $cols) {\n\t\t\t\t\t$sql .= \"`\".$this->db->escape_string($cols[0]).\"`\";\n\t\t\t\t\tif ($this->orderAsc) {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \", \";\n\t\t\t\t}\n\t\t\t\t$sql = substr($sql, 0, -2);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->start !== false) {\n\t\t\t$sql .= \" LIMIT {$this->start}\";\n\t\t\tif ($this->end !== false) {\n\t\t\t\t$sql .= \",{$this->end}\";\n\t\t\t}\n\t\t}\n\t\treturn $sql;\n\t}", "public function getRelationTableForJoin($fullName) {\n if (!$this->tableName) {\n $class = $this->model;\n $this->tableName = $class::getTableName();\n }\n return \"`\" . $this->tableName . \"` as `\" . ($this->tableAlias = str_replace('.', '_', $fullName)) . \"`\";\n }", "function _buildAttributeQuery($glue, $criteria, $join = false)\n {\n /* Initialize the clause that we're building. */\n $clause = '';\n\n /* Get the table alias to use for this set of criteria. */\n if ($join) {\n $alias = $this->_getAlias(true);\n } else {\n $alias = $this->_getAlias();\n }\n\n foreach ($criteria as $key => $vals) {\n if (!empty($vals['OR']) || !empty($vals['AND'])) {\n if (!empty($clause)) {\n $clause .= ' ' . $glue . ' ';\n }\n $clause .= '(' . $this->_buildAttributeQuery($glue, $vals) . ')';\n } elseif (!empty($vals['JOIN'])) {\n if (!empty($clause)) {\n $clause .= ' ' . $glue . ' ';\n }\n $clause .= $this->_buildAttributeQuery($glue, $vals['JOIN'], true);\n } else {\n if (isset($vals['field'])) {\n if (!empty($clause)) {\n $clause .= ' ' . $glue . ' ';\n }\n $clause .= Horde_Sql::buildClause($this->_db, $alias . '.attribute_' . $vals['field'], $vals['op'], $vals['test']);\n } else {\n foreach ($vals as $test) {\n if (!empty($clause)) {\n $clause .= ' ' . $key . ' ';\n }\n $clause .= Horde_Sql::buildClause($this->_db, $alias . '.attribute_' . $test['field'], $test['op'], $test['test']);\n }\n }\n }\n }\n\n return $clause;\n }", "private static function joinSql($conj, $left, $right) {\n\n $left = trim($left);\n $right = trim($right);\n\n $leftLen = strlen($left);\n $rightLen = strlen($right);\n\n if (!($leftLen || $rightLen)) {\n return '';\n } else if ($leftLen && !$rightLen) {\n return $left;\n } else if ($rightLen && !$leftLen) {\n return $right;\n }\n\n if (!is_array($conj)) {\n return '(' . $left . ') ' . $conj . ' (' . $right . ')';\n }\n\n $left = \"($left) \";\n\n foreach($conj as $c) {\n $left .= \"$c (\";\n $right .= ')';\n }\n\n return $left . $right;\n }", "public function innerJoin($fromAlias, $join, $alias, $condition = null)\n {\n return $this->add('join', array(\n $fromAlias => array(\n 'joinType' => 'inner',\n 'joinTable' => $join,\n 'joinAlias' => $alias,\n 'joinCondition' => $condition\n )\n ), true);\n }", "private function addJoinOnClause($other, $type, $onClause) {\r\n\t\tif (is_array($onClause)) {\r\n\t\t\t$onClause=implode(' ', $onClause);\r\n\t\t}\r\n\t\tif (count($this->_salt_joins[$other->_salt_alias]['on'])>0) {\r\n\t\t\t$this->_salt_joins[$other->_salt_alias]['on'][]=$type.' '.$onClause;\r\n\t\t} else {\r\n\t\t\t$this->_salt_joins[$other->_salt_alias]['on'][]=$onClause;\r\n\t\t}\r\n\t}", "public function toSQL(Parameters $params, bool $inner_clause)\n {\n $drv = $params->getDriver();\n $clauses = $this->getClauses();\n\n $strs = array();\n foreach ($clauses as $clause)\n $strs[] = $drv->toSQL($params, $clause);\n\n if (count($strs) === 0)\n return;\n\n return \"ORDER BY \" . implode(\", \", $strs);\n }", "public function join($table, $alias = NULL, $condition = NULL, $arguments = []);", "public function extra_columns_joins($params, $fields = []) {\n $sqljoins = \"\";\n\n if (isset($params->extra_columns) and $params->extra_columns) {\n $extra_columns = explode(\",\", $params->extra_columns);\n\n foreach ($extra_columns as $index) {\n if (class_exists('\\local_intelliboard\\extra_columns\\column' . $index)) {\n $classname = '\\local_intelliboard\\extra_columns\\column' . $index;\n /** @var \\local_intelliboard\\extra_columns\\base_column $columnbuilder */\n $columnbuilder = new $classname($params, $fields);\n list($sql, $params) = $columnbuilder->get_join();\n $sqljoins .= \" {$sql}\";\n $this->params = array_merge($this->params, $params);\n } else {\n if ($index == 11) {\n $usertablealias = isset($fields[0]) ? $fields[0] : \"u.id\";\n\n $sqljoins .= \" LEFT JOIN (SELECT lg.objectid,\n CASE WHEN u.id IS NOT NULL THEN CONCAT(u.firstname, ' ', u.lastname) ELSE '' END AS name\n FROM {logstore_standard_log} lg\n JOIN {user} u ON u.id = lg.userid\n WHERE lg.component = 'core' AND lg.action = 'created' AND lg.target = 'user'\n ) creator ON creator.objectid = {$usertablealias}\";\n }else if ($index == 12){\n $usertablealias = isset($fields[0]) ? $fields[0] : \"u.id\";\n $coursetablealias = isset($fields[1]) ? $fields[1] : \"c.id\";\n $roles = get_operator('GROUP_CONCAT', \"DISTINCT(CASE WHEN r.name='' THEN r.shortname ELSE r.name END)\", ['separator' => ', ']);\n $course_filter = $this->get_filter_in_sql($params->courseid, \"c.instanceid\");\n\n $sqljoins .= \" LEFT JOIN (SELECT\n c.instanceid, ra.userid,\n $roles AS roles\n FROM {context} c\n LEFT JOIN {role_assignments} ra ON ra.contextid=c.id\n LEFT JOIN {role} r ON r.id=ra.roleid\n WHERE c.contextlevel=50\n {$course_filter}\n GROUP BY c.instanceid, ra.userid) course_roles ON course_roles.instanceid={$coursetablealias} AND course_roles.userid={$usertablealias}\";\n }else if ($index == 13){\n $usertablealias = isset($fields[0]) ? $fields[0] : \"u.id\";\n $roles = get_operator('GROUP_CONCAT', \"DISTINCT(CASE WHEN r.name='' THEN r.shortname ELSE r.name END)\", ['separator' => ', ']);\n $contextid = (defined('SYSCONTEXTID')) ? SYSCONTEXTID : 0;\n\n $sqljoins .= \" LEFT JOIN (SELECT\n ra.userid,\n $roles AS roles\n FROM {role_assignments} ra\n LEFT JOIN {role} r ON r.id=ra.roleid\n WHERE ra.contextid={$contextid}\n GROUP BY ra.userid) system_roles ON system_roles.userid={$usertablealias} \";\n } elseif ($index == 14) {\n $userEnrolTableAlias = isset($fields[2]) ? $fields[2] : \"ue.modifierid\";\n\n $sqljoins .= \" LEFT JOIN {user} enrol_by ON enrol_by.id={$userEnrolTableAlias} \";\n }\n }\n }\n }\n\n return $sqljoins;\n }", "public function join()\n {\n $this->defaultjoinsetted = true;\n if (!empty($this->entity_link_list)) {\n foreach ($this->entity_link_list as $entity_link) {\n $this->defaultjoin .= \" left join `\" . strtolower(get_class($entity_link)) . \"` on \" . strtolower(get_class($entity_link)) . \".id = \" . $this->table . \".\" . strtolower(get_class($entity_link)) . \"_id\";\n }\n }\n return $this;\n }", "public function buildDeleteSql() {\r\n $this->sql .= ' FROM ' . $this->sqlStrTables;\r\n $this->setConditions();\r\n $this->setLimit();\r\n }", "public static function posts_join( $join_sql, $query ) {\n\t\t\tglobal $wpdb;\n\t\t\t$joins = array();\n\n\t\t\t$postmeta_table = self::postmeta_table( $query );\n\n\t\t\t$event_start_key = '_EventStartDate';\n\t\t\t$event_end_key = '_EventEndDate';\n\n\t\t\t/**\n\t\t\t * When the \"Use site timezone everywhere\" option is checked in events settings,\n\t\t\t * the UTC time for event start and end times will be used. This filter allows the\n\t\t\t * disabling of that in certain contexts, so that local (not UTC) event times are used.\n\t\t\t *\n\t\t\t * @since 4.6.10\n\t\t\t *\n\t\t\t * @param boolean $force_local_tz Whether to force the local TZ.\n\t\t\t */\n\t\t\t$force_local_tz = apply_filters( 'tribe_events_query_force_local_tz', false );\n\n\t\t\tif ( Tribe__Events__Timezones::is_mode( 'site' ) && ! $force_local_tz ) {\n\t\t\t\t$event_start_key .= 'UTC';\n\t\t\t\t$event_end_key .= 'UTC';\n\t\t\t}\n\n\t\t\t// if it's a true event query then we want create a join for where conditions\n\t\t\tif ( $query->tribe_is_event || $query->tribe_is_event_category || $query->tribe_is_multi_posttype ) {\n\t\t\t\tif ( $query->tribe_is_multi_posttype ) {\n\t\t\t\t\t// if we're getting multiple post types, we don't need the end date, just get the start date\n\t\t\t\t\t// for events-only post type queries, the start date postmeta join is already added by the main query args\n\t\t\t\t\t$joins['event_start_date'] = \" LEFT JOIN {$wpdb->postmeta} as {$postmeta_table} on {$wpdb->posts}.ID = {$postmeta_table}.post_id AND {$postmeta_table}.meta_key = '$event_start_key'\";\n\t\t\t\t} else {\n\t\t\t\t\t// for events-only post type queries, we should also get the end date for display\n\t\t\t\t\t$joins['event_end_date'] = \" LEFT JOIN {$wpdb->postmeta} as tribe_event_end_date ON ( {$wpdb->posts}.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = '$event_end_key' ) \";\n\t\t\t\t}\n\t\t\t\t$joins = apply_filters( 'tribe_events_query_posts_joins', $joins, $query );\n\n\t\t\t\treturn $join_sql . implode( '', $joins );\n\t\t\t}\n\n\t\t\treturn $join_sql;\n\t\t}", "function toSql($compiler, $model, $rhs) {\n // MySQL doesn't support LIMIT or OFFSET in subqueries. Instead, add\n // the query as a JOIN and add the join constraint into the WHERE\n // clause.\n if ($rhs instanceof Model\\QuerySet\n && ($rhs->isWindowed() || $rhs->countSelectFields() > 1 || $rhs->chain)\n ) {\n if (count($rhs->values) < 1)\n throw new Exception\\OrmError('Did you forget to specify a column with ->values()?');\n $f1 = array_values($rhs->values)[0];\n $view = $rhs->asView();\n $lhs = $this->buildLhs($compiler, $model);\n $alias = $compiler->pushJoin(spl_object_hash($view), $lhs, $view, array('constraint'=>array()));\n return sprintf('%s = %s.%s', $lhs, $alias, $compiler->quote($f1));\n }\n return parent::toSql($compiler, $model, $rhs);\n }", "public function getarchives_join( $join, $r ) {\n\t\tglobal $wpdb;\n\t\t$this->get_archives_where_r = $r;\n\t\tif(isset($r['taxonomy']) && is_array($r['taxonomy']) )\n\t\t$join = $join . \" INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)\";\n\n\t\treturn $join;\n\t}", "function outerJoin($conditions)\n\t{\n\t\treturn $this->join('OUTER', $conditions);\n\t}" ]
[ "0.7014482", "0.67189854", "0.664452", "0.64704597", "0.63887227", "0.63218415", "0.6204715", "0.61845237", "0.61598295", "0.6150158", "0.6105926", "0.6039087", "0.60271454", "0.60065204", "0.5915286", "0.5901905", "0.58522385", "0.5836333", "0.5835859", "0.5793641", "0.57779706", "0.5751575", "0.573871", "0.5716572", "0.5692819", "0.568138", "0.56760246", "0.56216276", "0.5607586", "0.55618244", "0.5522521", "0.55215645", "0.55204916", "0.5515158", "0.5506808", "0.55035305", "0.54988354", "0.54877496", "0.5487418", "0.5486292", "0.54758704", "0.54623586", "0.5454754", "0.5448473", "0.53993994", "0.53912586", "0.5390687", "0.53797096", "0.5368073", "0.53676057", "0.5362916", "0.53354853", "0.5324222", "0.53007394", "0.52836853", "0.52792084", "0.5258801", "0.5256859", "0.5251325", "0.52454317", "0.52219033", "0.52129227", "0.5202818", "0.52026623", "0.52013296", "0.5179475", "0.51763284", "0.5161783", "0.51496667", "0.51494986", "0.51465154", "0.51311237", "0.5123418", "0.5119874", "0.51086146", "0.5100681", "0.50525224", "0.50312704", "0.5029884", "0.5026537", "0.502378", "0.5022482", "0.5018017", "0.49909315", "0.4988694", "0.4982655", "0.4971971", "0.49702984", "0.4970263", "0.49702054", "0.49677894", "0.4960503", "0.49541", "0.4942551", "0.49244407", "0.49200785", "0.49127123", "0.49115032", "0.4911164", "0.49074975" ]
0.5757271
21
This will load the related model data.
abstract function load(Model $model);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadRelated()\n {\n return;\n }", "function load ()\n {\n $this->relationships = parent::_load ( $this->basepath ) ;\n }", "private function metaLoad()\n {\n $this->meta ??= $this?->relations['meta'] ?? $this->meta()->get();\n }", "public function loadModel()\n {\n $data = Contest::find($this->modelId);\n $this->title = $data->title;\n $this->description = $data->description;\n $this->image = $data->image;\n $this->featured_image = $data->featured_image;\n\n }", "protected function _loadRelatedData()\n {\n return array(\n 'UCmsAlbumI18n' => UCmsAlbumI18n::model()->findByPk(array(\n 'u_cms_album_id' => $_GET['album'], 'i18n_id' => Yii::app()->language\n ))\n );\n }", "private static function _loadModels(){\n if (self::$_models == null){\n $sql = 'SELECT id, uuid, name, description, version_id, created FROM v_model WHERE 1';\n $models = Mysql::query($sql);\n if ($models){\n $_models = array();\n foreach($models as $model){\n $sql = \"SELECT id, model_id, uuid, name, description, type, list, instance_model_id, version_id, created FROM v_property WHERE model_id = '{$model->id}'\";\n $properties = Mysql::query($sql);\n if ($properties){\n $model->properties = $properties;\n $_models[] = $model;\n }\n }\n self::$_models = $_models;\n }\n }\n }", "private function _load_models()\n {\n foreach ($this->models as $model)\n {\n $this->load->model($this->_model_name($model), $model);\n }\n }", "private function _load_models()\r\n {\r\n foreach ($this->models as $model)\r\n {\r\n $this->load->model($this->_model_name($model), $model);\r\n }\r\n }", "public function populateModels()\n {\n }", "public function loadModel()\n {\n $data = ModelsPegawai::find($this->dataId);\n $this->name = $data->name;\n $this->email = $data->email;\n $this->username = $data->username;\n $this->password = $data->password;\n $this->level = $data->level;\n\n }", "private function loadModels()\n {\n $this->use = ( ! isset($this->use)) ? [$this->class] : $this->use;\n\n if ($this->use) {\n foreach ($this->use as $model) {\n self::load('model', $model);\n }\n }\n }", "public function loadData(){\r\n $this->host = Team::find($this->host);\r\n $this->guest = Team::find($this->guest);\r\n $this->winner = Team::find($this->winner);\r\n $this->tournament = Tournament::find($this->tournamentID); \r\n }", "public function load($relations);", "public function load()\n {\n $input = $this->getCleanInput();\n $this->populate($input);\n }", "protected function loadRelated()\n {\n $spec_list = array();\n $part_list = array() ;\n //ftheeten 2016 09 22\n //$this->storageParts=array();\n foreach($this->specimensearch as $key=>$specimen){\n $spec_list[] = $specimen->getId() ;\n //ftheeten 2016 09 22\n // $this->storageParts[$specimen->getId() ]=$specimen->getStorageParts();\n }\n\n $codes_collection = Doctrine::getTable('Codes')->getCodesRelatedMultiple('specimens',$spec_list) ;\n $this->codes = array();\n foreach($codes_collection as $code) {\n if(! isset($this->codes[$code->getRecordId()]))\n $this->codes[$code->getRecordId()] = array();\n $this->codes[$code->getRecordId()][] = $code;\n }\n }", "public function load()\n {\n foreach ($this->aMappingConfiguration as $sLinkedEntity => $aMappingSetup) {\n $this->loadMapped(new $sLinkedEntity());\n }\n }", "public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }", "public function loadModel(){\n $this->load->model('Data_Model');\n return new Data_Model($this->used_table,$this->used_db);\n }", "public function doLoad()\n {\n $this->DataSourceInstance->doLoad();\n }", "private function load()\r\n {\r\n $this->dbFields = MySQL::fetchRecord(MySQL::executeQuery('SELECT * FROM training_slideshow WHERE ts_id='.(int)$this->id),MySQL::fmAssoc);\r\n }", "public function load($relation);", "public function load()\n\t{\n\t\t$this->list_table->load();\n\t}", "private function populateTranslations()\n {\n //translations\n $aRelated = $this->owner->getRelatedRecords();\n if (isset($aRelated[$this->relation]) && $aRelated[$this->relation] != null) {\n if (is_array($aRelated[$this->relation])) {\n foreach ($aRelated[$this->relation] as $model) {\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n } else {\n $model = $aRelated[$this->relation];\n $this->_models[$model->getAttribute($this->languageField)] = $model;\n }\n }\n }", "protected function load(){\r\n\t\r\n\t$qq1 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->tableName.\" WHERE \".$this->fieldName.\" = \".(int)$this->id);\r\n\t$this->profileData = count($qq1)>0 ? $qq1[0]: null; \r\n\t\r\n\tif($this->metaUse){\r\n\t\t$qq2 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->metaTypesTableName.\" WHERE active = 1 ORDER BY public_ord, id\");\r\n\t\t$this->metaData = count($qq2)>0 ? $qq2: array(); \r\n\t}\r\n}", "public function load()\r\n\t{\r\n\t\t$entities = $this->query($this->entity, $this->relation)->getResults($this->relation);\r\n\t\t\r\n\t\t$this->loaded = true;\r\n\r\n\t\treturn $entities;\r\n\t}", "public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n Apps::class,\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->setSource('users_associated_apps');\n }", "public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n $data = $this->storage->load();\n $this->collection->load($data);\n\n $this->refresh();\n }", "public function initialize()\n {\n $this->hasMany('idmov', 'App\\Models\\MovEstoque', 'movimentacao_manual_estoque_idmov', array('alias' => 'MovEstoque'));\n $this->hasMany('idmov', 'App\\Models\\MovimentacaoManualEstoqueItem', 'idmov', array('alias' => 'MovimentacaoManualEstoqueItem'));\n $this->belongsTo('cd_ordem_servico_reparo', 'App\\Models\\OrdemServicoReparo', 'cd_ordem_servico', array('alias' => 'OrdemServicoReparo'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('requerente', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->belongsTo('usuario_responsavel', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }", "function load() {\n\t\tglobal $mysql;\n //if(!$this->exists()) return;\n \t$id \t\t= $mysql->escape($this->id);\n \t$tablename \t= $this->class_name();\n \t$this->data = $mysql->executeSql(\"SELECT * FROM \".$tablename.\" WHERE id=$id;\");\n \t$this->id\t= $this->data['id'];\n \tunset($this->data['id']);\n }", "public function loadDataFromId(){\r\n\t\t\t$this -> loadFromId();\r\n\t }", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "public function load()\n {\n return $this->loadData();\n }", "private function loadModel()\n {\n require_once APP . '/model/User.php';\n // create new \"model\" (and pass the database connection)\n $this->model = new User($this->db);\n }", "public function loadModel() : void\n {\n $model = $this->newModel();\n\n $model->loadModel($this->modelPath);\n $model->printModel();\n\n $this->fm = FunctionMap::loadFunctionMap();\n }", "private function load() {\n\t\t\t$comments = array();\n\t\t\t\n\t\t\t$this->db->where('itemid', $this->itemid);\n\t\t\t$rows = $this->db->get('comments');\n\t\t\t\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$comments['author'] = $row['author'];\n\t\t\t\t$comments['via'] = $row['via'];\n\t\t\t\t$comments['date'] = $row['date'];\n\t\t\t\t$comments['comment'] = $row['comment'];\n\t\t\t\t$comments['avatar'] = $row['avatar'];\n\t\t\t\t$this->data[] = $comments;\n\t\t\t}\n\t\t}", "private function loadRelatedModels(Collection $models) {\n\t\t\t/** @var Model $model */\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->loadRelatedModels($this->request->getInclude());\n\t\t\t}\n\t\t}", "function init()\n {\n foreach ($GLOBALS['_PX_models'] as $model=>$val) {\n if (isset($val['relate_to'])) {\n foreach ($val['relate_to'] as $related) {\n if ($this->_model == $related) {\n // The current model is related to $model\n // through one or more foreign key. We load\n // the $model to check on which fields the\n // foreign keys are set, as it is possible in\n // one model to have several foreign keys to\n // the same other model.\n if ($model != $this->_model) {\n $_m = new $model();\n $_fkeys = $_m->getForeignKeysToModel($this->_model);\n } else {\n $_fkeys = $this->getForeignKeysToModel($this->_model);\n }\n foreach ($_fkeys as $_fkey=>$_fkeyval) {\n //For each foreign key, we add the\n //get_xx_list method that can have a\n //custom name through the relate_name\n //value.\n if (isset($_fkeyval['relate_name'])) {\n $mname = $_fkeyval['relate_name'];\n } else {\n $mname = strtolower($model);\n }\n $this->_methods_list['get_'.$mname.'_list'] = array($model, $_fkey);\n }\n break;\n }\n }\n }\n if (isset($val['relate_to_many']) && \n in_array($this->_model, $val['relate_to_many'])) {\n $this->_methods_list['get_'.strtolower($model).'_list'] = $model;\n $this->_manytomany[$model] = 'manytomany';\n }\n }\n foreach ($this->_cols as $col=>$val) {\n $field = new $val['type']($col);\n if ($field->type == 'foreignkey') {\n $this->_methods_get['get_'.strtolower($col)] = array($val['model'], $col);\n $this->_fk[$col] = 'foreignkey';\n }\n if ($field->type == 'manytomany') {\n $this->_methods_list['get_'.strtolower($col).'_list'] = $val['model'];\n $this->_manytomany[$val['model']] = 'manytomany';\n }\n foreach ($field->add_methods as $method) {\n $this->_methods_extra[$method[0]] = array(strtolower($col), $method[1]);\n }\n }\n }", "public function loadRelated($name, $model)\n {\n // Create a Zend_Db_Table_Row from the data in $model\n $row = $this->getDbTable()->createRow($this->toArray($model));\n\n $parents = $model->getParentList();\n $dependents = $model->getDependentList();\n\n $method = 'find';\n $type = 'dependent';\n\n $name = ucfirst($name);\n\n // Determine what $name is: key name or table name. Try keys first\n if (array_key_exists($name, $parents)) {\n $property = $parents[$name]['property'];\n $object_table_name = $parents[$name]['table_name'];\n $table_class = 'Application_Model_DbTable_' . $object_table_name;\n $rule = $name;\n $type = 'parent';\n } elseif (array_key_exists($name, $dependents)) {\n $property = $dependents[$name]['property'];\n $object_table_name = $dependents[$name]['table_name'];\n $ref_table_name = 'Application_Model_DbTable_' . $object_table_name;\n $rule = $name;\n } /* elseif ($rule = array_search($name, $parents)) {\n \t// TODO: Do some unnice rules for table_class\n $property = $name;\n $type = 'parent';\n } elseif ($rule = array_search($name, $dependents)) {\n \t// TODO: Do some unnice rules for ref_table_name\n $property = $name;\n } */ else {\n throw new Exception(\"Relationship $name not found\");\n }\n\n if ($type == 'parent') {\n $method .= 'ParentRow';\n $ref_table = $this->getDbTable();\n $column_type = 'columns';\n $table_name = $table_class;\n } else {\n $method .= 'DependentRowset';\n $ref_table = new $ref_table_name();\n $column_type = 'refColumns';\n $table_name = get_class($this->getDbTable());\n }\n\n\n $reference = $ref_table->getReference($table_name, $rule);\n if (empty($reference)) {\n throw new Exception(\"Relationship not found: $table_name; rule: $rule\");\n }\n\n // Check to make sure the foreign key value is set\n // Return early as relationships cannot be joined against null values\n $columns = $reference[$column_type];\n if (is_array($columns)) {\n foreach ($columns as $column) {\n if ($model->$column === null) {\n return $model;\n /*$varName = $model->columnNameToVar($column);\n throw new Exception(\"Cannot load relationship because $varName is not set\");*/\n }\n }\n } else {\n if ($model->$columns === null) {\n return $model;\n /*$varName = $model->columnNameToVar($column);\n throw new Exception(\"Cannot load relationship because $varName is not set\");*/\n }\n }\n\n $obj = $row->$method('Application_Model_DbTable_' . $object_table_name, $rule);\n\n if (! empty($obj)) {\n $model_class = 'Application_Model_' . $object_table_name;\n\n if ($obj instanceof Zend_Db_Table_Rowset) {\n if (method_exists($model, 'add' . $property)) {\n $class_method = 'add' . $property;\n } else {\n $class_method = 'set' . $property;\n }\n\n foreach ($obj as $row_object) {\n $related = new $model_class();\n $related->setOptions($row_object->toArray());\n $model->$class_method($related);\n\n }\n } else {\n $related = new $model_class();\n $related->setOptions($obj->toArray());\n $method_name = 'set' . $property;\n $model->$method_name($related);\n }\n }\n\n return $model;\n }", "public function loadModel(){\n\t\t$className = get_class($this);\n\t\tforeach(func_get_args() as $model){\n\t\t\t$entity = EntityManager::getEntityInstance($model);\n\t\t\tself::$_settingLock[$className] = true;\n\t\t\t$this->$model = $entity;\n\t\t\tself::$_settingLock[$className] = false;\n\t\t}\n\t}", "public function load()\n {\n $this\n ->objectManager\n ->createQuery('DELETE FROM ' . Member::class)\n ->execute()\n ;\n Fixtures::load(\n __DIR__ . '/../../fixtures/members.yml',\n $this->objectManager\n );\n }", "public function _load()\n {\n $query = new Query(\n \"SELECT *\n FROM `\" . Leder::TABLE . \"`\n WHERE `arrangement_fra` = '#fra'\n AND `arrangement_til` = '#til'\",\n [\n 'fra' => $this->getArrangementFraId(),\n 'til' => $this->getArrangementTilId()\n ]\n );\n\n $res = $query->getResults();\n while( $row = Query::fetch($res) ) {\n $this->add(\n Leder::loadFromDatabaseRow( $row )\n );\n }\n }", "public function load() { }", "public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }", "public function load() {\n\t\tparent::load ();\n\t\t\n\t\tforeach ( $this->records as &$record ) {\n\t\t\t$order = new order ( $record ['order_id'] );\n\t\t\t$order->set_order_status ( ORDER_STATUS_TYPES_CONFIRMING_AUTOMATIC_FUNDS );\n\t\t\t$order->order_status->save ();\n\t\t}\n\t}", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "protected abstract function loadModel($data, $entry);", "protected function loadAnnotatedModels()\n {\n if ($this->app->environment('local') && $this->scanWhenLocal) {\n $this->scanModels();\n }\n\n $scans = $this->modelScans();\n\n if (!empty($scans) && $this->finder->modelsAreScanned()) {\n $this->loadScannedModels();\n }\n }", "public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }", "public function loadModel()\n {\n if ($this->_modelName == null) {\n $this->_modelName = $this->_controllerName . '_Model';\n $this->load->model($this->_modelName);\n }\n }", "function _load()\n\t{\n\t\tif($this->primary_key)\n\t\t{\n\t\t\t$row = $this->db->get_where($this->table_name, array(\n\t\t\t\t$this->primary_key => $this->{$this->primary_key},\n\t\t\t))->result();\n\t\t\t\n\t\t\tif(count($row))\n\t\t\t\t$this->load_db_values($row[0]);\n\t\t}\n\t}", "public function beforeFilter(){\n\t $this->LoadModel(\"RestaurantInfo\");\n\t $this->LoadModel(\"Food\");\n\t $this->LoadModel(\"FoodReview\");\n\t $this->LoadModel(\"FeedBack\");\n\t $this->LoadModel(\"Restaurant\");\n\t $this->LoadModel(\"User\");\n\t }", "function setup(){\n if(!class_exists('Relationship')){\n\n }\n\n $rel = new Relationship();\n if(!empty($this->vardef['relationship'])){\n \t$rel->retrieve_by_name($this->vardef['relationship']);\n }\n if($rel->relationship_type == 'many-to-many'){\n if($rel->lhs_module == $this->module_dir){\n $this->related_module = $rel->rhs_module;\n $module_dir = $rel->lhs_module;\n }else {\n if($rel->rhs_module == $this->module_dir){\n $this->related_module = $rel->lhs_module;\n $module_dir = $rel->rhs_module;\n }else{\n die(\"this field has no relationships mapped with this module\");\n }\n }\n if($module_dir != $this->module_dir){\n die('These modules do not match : '. $this->module_dir . ' and ' . $module_dir);\n }\n if(isset($GLOBALS['beanList'][$this->module_dir])){\n $class = $GLOBALS['beanList'][$this->module_dir];\n if(file_exists($GLOBALS['beanFiles'][$class])){\n $this->bean = loadBean($this->module_dir);\n $this->bean->retrieve($_REQUEST['bean_id']);\n if($this->bean->load_relationship($this->vardef['name'])){\n $this->check_id();\n $this->retrieve_values();\n }else{\n die('failed to load the relationship');\n }\n }else{\n die('class file do not exist');\n }\n }else{\n die($this->module_dir . ' is not in the beanList.');\n }\n }\n else{\n die(\"the relationship is not a many-to-many\");\n }\n }", "public function initialize()\n {\n $this->belongsTo('id_categoria_gastos', 'CategoriaGastos', 'id_categoria_gastos', array('alias' => 'CategoriaGastos'));\n $this->belongsTo('id_presupuesto', 'Presupuesto', 'id_presupuesto', array('alias' => 'Presupuesto'));\n }", "public function load($model, $post) {\n // empty implementation. \n }", "private function loadMetadata() {\n\t\t$this->pMeta = $this->em->getClassMetadata('OcProduct');\n\t\t$this->pdMeta = $this->em->getClassMetadata('OcProductDescription');\n\t}", "private function loadData(): void\n {\n $modules = BackendExtensionsModel::getModules();\n\n // split the modules in 2 separate data grid sources\n foreach ($modules as $module) {\n if ($module['installed']) {\n $this->installedModules[] = $module;\n } else {\n $this->installableModules[] = $module;\n }\n }\n }", "public function initialize() {\n $this->setSource('article');\n\n $this->belongsTo('author_id', Article::class, 'author_id', [\n 'alias' => 'author',\n 'reusable' => true,\n ]);\n\n $this->hasMany('article_id', ArticleTag::class, 'article_id', [\n 'alias' => 'tagRelation',\n ]);\n\n $this->hasMany('article_id', Comment::class, 'article_id', [\n 'alias' => 'comments',\n ]);\n }", "protected function load()\n\t{\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "protected function loadObjects() {\n if (!isset($this->objects)) {\n $this->obj_builder->toggleAutoload('on');\n $this->objects = $this->obj_builder->buildObjects();\n $this->obj_builder->toggleAutoload('off');\n }\n }", "public function initialize()\n {\n $this->hasMany('id', 'GroupProfile', 'media_id', array('alias' => 'GroupProfile'));\n $this->belongsTo('profile_id', 'Profile', 'id', array('alias' => 'Profile'));\n $this->belongsTo('evenement_id', 'Event', 'id', array('alias' => 'Event'));\n }", "public function initialize()\n {\n $this->hasMany('cd_desconto', 'App\\Models\\PdvVendasHasItens', 'cd_desconto', array('alias' => 'PdvVendasHasItens'));\n $this->belongsTo('cd_caixa', 'App\\Models\\PdvCaixa', 'cd_caixa', array('alias' => 'PdvCaixa'));\n $this->belongsTo('cd_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('cd_unidade_negocio', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('cd_usuario_criacao', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }", "public function initialize()\n {\n $this->hasMany('cd', 'ShouhinMrs', 'shu_souko_mr_cd', array('alias' => 'ShouhinMrs'));\n $this->hasMany('cd', 'ShiireMeisaiDts', 'souko_mr_cd', array('alias' => 'ShiireMeisaiDts'));\n $this->hasMany('cd', 'UriageMeisaiDts', 'souko_mr_cd', array('alias' => 'UriageMeisaiDts'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n }", "function load() {\n $statement = $this->db->prepare('SELECT * FROM favs WHERE id = :id');\n $statement->execute(array(':id' => $this->get('id')));\n $data = $statement->fetch(PDO::FETCH_ASSOC);\n $this->setMultiple($data);\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function initialize()\n {\n $this->hasMany(\"id\", \"Hotelsfacility\", \"hotel_id\");\n $this->hasMany(\"id\", \"HotelRoom\", \"hotel_id\");\n $this->belongsTo(\"city_id\", \"City\", \"id\");\n $this->belongsTo(\"province_id\", \"Province\", \"id\");\n $this->belongsTo(\"country_id\", \"Country\", \"id\");\n\n }", "public function loadDetails($forUpdate = null)\n {\n if ($forUpdate === true)\n {\n $this->authorList = AuthorList::findForUpdate(array('bookId' => $this->bookId));\n $this->bookLanguageList = BookLanguageList::findForUpdate(array('bookId' => $this->bookId));\n }\n else\n {\n $this->authorList = AuthorList::find(array('bookId' => $this->bookId));\n $this->bookLanguageList = BookLanguageList::find(array('bookId' => $this->bookId));\n }\n }", "protected function postLoad(){\n\t\t\t\n\t\t}", "private function Load()\n\t{\n\t\t$sql = \"show tables\";\n\t\t$rs = $this->Server->Connection->Select($sql);\n\t\t\n\t\t// first pass load all the tables. this will initialize each object. we have to\n\t\t// do this first so that we can correctly determine and store \"Set\" information\n\t\twhile ($row = $this->Server->Connection->Next($rs))\n\t\t{\n\t\t\t$this->Tables[$row[\"Tables_in_\" . $this->Name]] = new DBTable($this,$row);\n\t\t}\n\t\t\n\t\t// now load all the keys and constraints for each table\n\t\tforeach ($this->Tables as $table)\n\t\t{\n\t\t\t$table->LoadKeys();\n\t\t}\n\n\t\t$this->Server->Connection->Release($rs);\n\t\t\n\t\t$sql = \"show table status from `\" . $this->Name . \"`\";\n\t\t$rs2 = $this->Server->Connection->Select($sql);\n\t\t\n\t\t// load the extra data\n\t\twhile ($row = $this->Server->Connection->Next($rs2))\n\t\t{\n\t\t\t$this->Tables[$row[\"Name\"]]->Engine = $row[\"Engine\"]; \n\t\t\t$this->Tables[$row[\"Name\"]]->Comment = $row[\"Comment\"];\n\t\t}\n\t\t$this->Server->Connection->Release($rs2);\n\t}", "public function initialize()\n {\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_periodo', 'CobPeriodo', 'id_periodo', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_contrato', 'CobActaconteo', 'id_contrato', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_ajuste_reportado', 'CobAjusteReportado', 'id_ajuste_reportado', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actaconteo_persona_facturacion', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona_facturacion', array(\n \t\t\t'reusable' => true\n \t));\n }", "public function load(){\n\t\treturn parent::load();\n\t}", "public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n 'Canvas\\Models\\Companies',\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n 'Canvas\\Models\\Apps',\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n 'Canvas\\Models\\Users',\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'system_modules_id',\n 'Canvas\\Models\\SystemModules',\n 'id',\n ['alias' => 'systemModule']\n );\n\n $this->setSource('email_templates_variables');\n }", "public function initialize()\n {\n $this->hasMany('id', 'Message', 'idFil', array('alias' => 'Message'));\n $this->belongsTo('idFil', 'Message', 'id', array('alias' => 'Message'));\n $this->belongsTo('idProjet', 'Projet', 'id', array('alias' => 'Projet'));\n $this->belongsTo('idUser', 'User', 'id', array('alias' => 'User'));\n }", "public function populate()\r\n {\r\n $sForeignTable = $this->_schemaField->getForeignTable();\r\n $sForeignField = $this->_schemaField->getForeignField();\r\n $sForeignLabel = $this->_schemaField->getForeignLabelField();\r\n \r\n if (!empty($sForeignTable) && !empty($sForeignField) && !empty($sForeignLabel))\r\n {\r\n $oClass = system\\ClassManager::getInstance($sForeignTable);\r\n \r\n if ($oClass instanceof system\\abstractClasses\\Controller)\r\n {\r\n $oClass->populateForeignField($this->_schemaField, $this);\r\n }\r\n }\r\n \r\n// Debug::e($this->_options);\r\n }", "public function initialize() {\n\n $this->belongsTo(\"users_id\", \"Aiden\\Models\\Users\", \"id\", [\"alias\" => \"User\"]);\n $this->belongsTo(\"councils_id\", \"Aiden\\Models\\Councils\", \"id\", [\"alias\" => \"Council\"]);\n\n }", "abstract public function loadData();", "private final function loadObjectFromDb()\n {\n # TODO: would be far preferable to use the objectsFromDestinations() code, possibly by refactoring into another shareable function. this is needed because otherwise we're in object A and OrmClass->load() is generating object B, instead of populating object A\n # TODO:NOTE01\n # TODO: must use $this->setLoadedFromDb() per class\n throw new Exception('TODO');\n }", "protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }", "protected function loadRequiredRelationships()\n {\n $model = $this->model;\n $relationships = $this->relationships;\n $relations = $this->filterRelationsToLoad($relationships);\n\n $model->load($relations);\n $relations = $model->getRelations();\n $model->setRelations([]);\n\n return $relations;\n }", "public function loadFromDB()\n {\n }", "public function initialize()\n {\n $this->hasMany('informacion_id', 'Informacionadicional', 'informacion_id', array('alias' => 'Informacionadicional'));\n $this->belongsTo('informacion_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\n }", "public function initialize()\n {\n parent::initialize();\n $this->loadModel('Projects');\n $this->loadModel('ProjectsInjections');\n $this->loadModel('Colonies');\n }", "public function initialize()\n {\n $this->hasMany('id', 'Movie', 'classification_id', array('alias' => 'Movie'));\n }", "public function initialize()\n {\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', array('alias' => 'Cargaestudiantes'));\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', array('alias' => 'Datosprofesiona'));\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', NULL);\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', NULL);\n }", "private function load()\n {\n $this->load->model('checkout/order');\n $this->load->model('setting/setting');\n $this->load->model('extension/payment/mundipagg_customer');\n $this->load->model('extension/payment/mundipagg');\n $this->load->model('extension/payment/mundipagg_credit_card');\n $this->load->model('extension/payment/mundipagg_orderdata_update');\n $this->load->language('extension/payment/mundipagg');\n\n $this->data['misc'] = $this->language->get('misc');\n $this->data['order_statuses'] = $this->language->get('order_statuses');\n $this->setting = $this->model_setting_setting;\n $this->mundipaggModel = $this->model_extension_payment_mundipagg;\n $this->creditCardModel = $this->model_extension_payment_mundipagg_credit_card;\n $this->mundipaggOrderUpdateModel = $this->model_extension_payment_mundipagg_orderdata_update;\n }", "public function initialize() {\n\n // Relation to DasUsers\n $this->belongsTo('id', 'Aiden\\Models\\DasUsers', 'users_id', ['alias' => 'DasUsers']);\n\n // Relation to Phrases\n $this->hasMany('id', 'Aiden\\Models\\UsersPhrases', 'users_id', [\"alias\" => \"Phrases\"]);\n\n // Relation to Das\n $this->hasManyToMany('id', 'Aiden\\Models\\DasUsers', 'users_id', 'das_id', 'Aiden\\Models\\Das', 'id', ['alias' => 'Das']);\n\n // Relation to Councils\n $this->hasManyToMany('id', 'Aiden\\Models\\UsersCouncils', 'users_id', 'councils_id', 'Aiden\\Models\\Councils', 'id', ['alias' => 'Councils']);\n\n }", "private function initRestorableRelations() {\n\n\t\t$configs = $this->cascadable();\n\n\t\t$this->runCascadeRestore = $configs['restore']['enable'] ?? true;\n\n\t\t$this->relationships = Arr::wrap($configs['restore']['relations'] ?? $configs);\n\t}", "public function DoctrineLoad()\n {\n // and call __load method\n }", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\n }", "abstract public function loadAll();", "abstract protected function loadData(ObjectManager $em);", "public function initialize()\n {\n $this->hasMany('cd_upload', 'App\\Models\\Empresa', 'logo', array('alias' => 'Empresa'));\n $this->hasMany('cd_upload', 'App\\Models\\EmpresaHasArquivos', 'cd_upload', array('alias' => 'EmpresaHasArquivos'));\n $this->hasMany('cd_upload', 'App\\Models\\EmpresaHasLinkCentralcompras', 'cd_upload', array('alias' => 'EmpresaHasLinkCentralcompras'));\n $this->hasMany('cd_upload', 'App\\Models\\LancamentoHasUpload', 'cd_upload', array('alias' => 'LancamentoHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\LiquidacaoHasUpload', 'cd_upload', array('alias' => 'LiquidacaoHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\NfentradaHasUpload', 'cd_upload', array('alias' => 'NfentradaHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\UploadHas', 'upload_cd_upload', array('alias' => 'UploadHas'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n }", "public function initialize()\n {\n $this->belongsTo('id_segmentation', 'Entities\\Segmentation', 'id', array('foreignKey' => true, 'alias' => 'Segmentation'));\n $this->belongsTo('id_factor_network', 'Entities\\FactorNetwork', 'id', array('foreignKey' => true, 'alias' => 'FactorNetwork'));\n }", "public function initialize()\n {\n $this->belongsTo('cons_order_id', '\\Orders', 'id', array('alias' => 'Orders'));\n $this->belongsTo('order_id', '\\Orders', 'id', array('alias' => 'Orders'));\n }" ]
[ "0.81130826", "0.7457343", "0.7010556", "0.6965736", "0.6887524", "0.684385", "0.68017256", "0.6767528", "0.66193515", "0.65783155", "0.6555463", "0.6531166", "0.6519117", "0.65181863", "0.6464512", "0.63984394", "0.63549066", "0.6267341", "0.6236558", "0.62264436", "0.62236553", "0.6221085", "0.6206403", "0.62033725", "0.6195221", "0.6187208", "0.6153883", "0.61471313", "0.6147007", "0.61459833", "0.61459833", "0.61459833", "0.6117714", "0.6050522", "0.6048812", "0.6043187", "0.6016244", "0.6015521", "0.60138166", "0.6013622", "0.60061544", "0.5998819", "0.59724015", "0.59554714", "0.5931005", "0.5918831", "0.59160334", "0.59141177", "0.59061617", "0.58915955", "0.5881753", "0.5878497", "0.58712184", "0.58704704", "0.58680695", "0.5860248", "0.58489287", "0.5835878", "0.58325773", "0.58279663", "0.58261985", "0.58126646", "0.5811417", "0.5794306", "0.5786749", "0.57790244", "0.576082", "0.57570434", "0.5756717", "0.5733969", "0.5733969", "0.57327086", "0.5730076", "0.57214344", "0.5718248", "0.5713817", "0.5708065", "0.5688404", "0.56844306", "0.5683796", "0.5681651", "0.56798315", "0.56748927", "0.56742406", "0.5674142", "0.56709486", "0.56684893", "0.56661814", "0.56660587", "0.565638", "0.56549144", "0.5649397", "0.5629939", "0.56162435", "0.56155777", "0.561445", "0.561193", "0.5609254", "0.5606931", "0.55921656" ]
0.6383496
16
Get an array containing the key and value of the foreign key for the association
private function getForeignKeyForNewAssociation(Model $model) { $this->setKeys($model); $primaryKey = Inflector::instance()->variablize($this->foreignKey[0]); return array( $primaryKey => $model->id, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getForeignKeys()\n {\n if ($this->foreign_keys_cache === null) {\n $query = $this->db_instance->query('SELECT table_name, column_name, referenced_table_name, referenced_column_name from information_schema.key_column_usage where referenced_table_name is not null');\n $foreign_keys_a = $query->result_array();\n $this->foreign_keys_cache = array();\n\n foreach ($foreign_keys_a as $key) {\n foreach ($key as $key_key => $key_value){\n $key[strtolower($key_key)] = $key_value;\n }\n $this->foreign_keys_cache[$key['table_name']][$key['column_name']] = array($key['referenced_table_name'], $key['referenced_column_name']);\n }\n }\n\n return $this->foreign_keys_cache;\n }", "public function getForeignKeyValuePair($related)\n {\n $foreignKey = $this->getForeignKey();\n\n if ($related) {\n $wrapper = $this->factory->make($related);\n\n $relatedKey = $this->relatedMap->getKeyName();\n\n return [\n $foreignKey => $wrapper->getEntityAttribute($relatedKey),\n $this->morphType => $wrapper->getMap()->getMorphClass(),\n ];\n } else {\n return [$foreignKey => null];\n }\n }", "public function getForeignKeys(){\n \n }", "public function associationData()\n {\n return [\n 'many-to-one' => [\n ClassMetadata::MANY_TO_ONE,\n 'orm_many_to_one',\n ],\n 'one-to-many' => [\n ClassMetadata::ONE_TO_MANY,\n 'orm_one_to_many',\n ],\n 'one-to-one' => [\n ClassMetadata::ONE_TO_ONE,\n 'orm_one_to_one',\n ],\n 'many-to-many' => [\n ClassMetadata::MANY_TO_MANY,\n 'orm_many_to_many',\n ],\n ];\n }", "public function key(): array\n {\n return $this->entityDefinition()->key() ?? [];\n }", "public function getRelatedIds()\n {\n $related = $this->getRelated ();\n $fullKey = $related->getQualifiedKeyName ();\n return $this->getQuery ()->select ( $fullKey )->lists ( $related->getKeyName () );\n }", "function getForeignKeysToModel($model)\n {\n $keys = array();\n foreach ($this->_cols as $col=>$val) {\n $field = new $val['type']();\n if ($field->type == 'foreignkey' and $val['model'] == $model) {\n $keys[$col] = $val;\n }\n }\n return $keys;\n }", "protected function fkData()\n\t{\n\t\tif (!isset($this->fkData))\n\t\t{\n\t\t\t$this->fkData = array();\n\n\t\t\t// Get the foreign key element\n\t\t\t$fkElement = $this->fkElement();\n\t\t\tif ($fkElement)\n\t\t\t{\n\t\t\t\t$fkElementKey = $fkElement->getFullName();\n\t\t\t\t$this->fkData = json_decode(JArrayHelper::getValue($this->formModel->_formData, $fkElementKey));\n\t\t\t\t$this->fkData = JArrayHelper::fromObject($this->fkData);\n\n\t\t\t\t$fkEval = $this->params->get('foreign_key_eval', '');\n\t\t\t\tif ($fkEval !== '')\n\t\t\t\t{\n\t\t\t\t\t$fkData = $this->fkData;\n\t\t\t\t\t$eval = eval($fkEval);\n\t\t\t\t\tif ($eval !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->fkData = $eval;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->fkData;\n\t}", "function getHasManyReference(string $table, string $key): ?array;", "public function getForeignKeys()\n {\n $return = [];\n $table = $this->getName();\n\n /** @var Base $call */\n foreach ($this->getGenericCalls() as $call) {\n if (isset($call->on) && $call->on !== $table) {\n $return[(string)$call->on] = $call;\n } // if\n } // foreach\n\n return $return;\n }", "protected function keyRelationParts()\n {\n $parts = explode(':', $this->key);\n $relation = $parts[0];\n $column = $parts[1];\n\n return [\"relation\" => $relation, \"column\" => $column];\n }", "public function getManyAssocValues()\n {\n $res = array();\n foreach ( $this->hasMany as $attr => $type )\n {\n $objectList = $this->attributeValues[ $attr ];\n if ( $objectList == self::NOT_LOADED_ASSOC ) $res[$attr] = array();\n else\n {\n $res[$attr] = array_filter( $objectList ); // Saco nulls del array\n }\n }\n return $res;\n }", "public function getKey()\n {\n $key = [\n $this->primaryKey => $this->getAttribute($this->primaryKey)\n ];\n\n if (! is_null($this->sortKey)) {\n $key[$this->sortKey] = $this->getAttribute($this->sortKey);\n }\n\n return $key;\n }", "function getJoinFK($col,$tab1,$tab2,$key1,$key2){\n $array=array();\n $conn=connectDB();\n $query=\"SELECT $tab2.$col FROM $tab1 JOIN $tab2 ON $tab1.$key1 = $tab2.$key2\";\n foreach ($conn->query($query)as $row){\n array_push($array,$row[$col]);\n }\n return $array;\n }", "public function PKArray() {\n $returnvalue = array();\n $returnvalue['DeterminationID'] = $this->getDeterminationID();\n return $returnvalue;\n }", "public function getPkValues() {\n $pkValues = array();\n foreach ($this->entity as $columnName => $column) {\n if (!empty($column['contraint']) && $column['contraint'] === 'pk')\n $pkValues[$columnName] = $column['value'];\n }\n\n return $pkValues;\n }", "public static function getResolveForeignIdFields();", "public function getForeignKeys()\n {\n return $this->parentTable->getColumnForeignKeys($this->name);\n }", "public function buildForeignKeys(Doctrine_Table $table)\n {\n $fk = array();\n\n foreach ((array) $table->getIdentifier() as $column) {\n $def = $table->getDefinitionOf($column);\n\n unset($def['autoincrement']);\n unset($def['sequence']);\n unset($def['primary']);\n\n $col = $column;\n\n //$def['primary'] = true;\n $fk[$col] = $def;\n }\n return $fk;\n }", "public function getPrimaryKeyValues() {\n\t\treturn array(\n\t\t\tself::FIELD_ID=>$this->getId());\n\t}", "public function getForeignKey();", "public function keys()\n {\n return array('id');\n }", "public function keys()\n {\n return array('id');\n }", "public function getForeignReferList()\n\t{\n\t\treturn Yii::app()->db->createCommand()->select('code as key, printable_name as title')->from(self::tableName())->queryAll();\n\t}", "public function metaKeys(): array\n {\n /** @var HasMetadataInterface $this */\n return Meta::metable(static::class, $this->id)\n ->pluck('key')\n ->toArray();\n }", "public function getPrimaryKeyValues() {\n\t\treturn array(\n\t\t\tself::FIELD_CODI_ESPECTACLE=>$this->getCodiEspectacle(),\n\t\t\tself::FIELD_DATA=>$this->getData(),\n\t\t\tself::FIELD_HORA=>$this->getHora());\n\t}", "public function getSimpleAssocValues()\n {\n $res = array();\n foreach ( $this->hasOne as $attr => $type )\n {\n $value = $this->aGet( $attr );\n // No se retorna NULL para que PM no guarde NULL\n // El tema es que si se pone un atributo en NULL se deberia actualizar en la base\n if ( $value !== NULL )\n {\n $res[$attr] = $value;\n }\n }\n return $res;\n }", "function get_tables_fk()\n\t{\n\t\t$tables_fk\t=\tarray();\n\t\t$fields\t\t=\t$this->_get_fields();\n\t\tforeach ( $fields as $field )\n\t\t{\n\t\t\t$column_name\t= $field->name;\n\t\t\tif ( strpos( $column_name, '_id_' ) != 0 )\n\t\t\t{\n\t\t\t\t$words\t\t\t\t\t\t=\texplode( \"_id_\", $column_name );\n\t\t\t\t$table_name\t\t\t\t\t=\t$words[0];\n\t\t\t\t$key\t\t\t\t\t\t=\t$words[0].'_'.$words[1];\n\t\t\t\t$tables_fk[ $key ]->column_name\t\t\t=\t$column_name;\n\t\t\t\t$tables_fk[ $key ]->table_name\t\t\t=\t$table_name;\n\t\t\t}\n\t\t\telseif ( strpos( $column_name, '_id' ) != 0 )\n\t\t\t{\n\t\t\t\t$table_name\t\t\t\t\t=\tstr_replace( \"_id\", \"\", $column_name );\n\t\t\t\t$key\t\t\t\t\t\t=\t$table_name;\n\t\t\t\t$tables_fk[ $key ]->column_name\t\t\t=\t$column_name;\n\t\t\t\t$tables_fk[ $key ]->table_name\t\t\t=\t$table_name;\n\t\t\t}\n\t\t}\n\t\treturn $tables_fk;\n\t}", "protected function other_key()\n {\n return Relationship::foreign($this->model, $this->other);\n }", "public function getReferencedKeysInfo($table)\n {\n $ret = [];\n\n $ric = $this->getRic($table);\n list($db, $_table) = $this->explodeTable($table);\n\n\n $safeDb = addcslashes($db, \"'\");\n $safeTable = addcslashes($_table, \"'\");\n\n foreach ($ric as $col) {\n\n $all = $this->query(\"\nSELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME \nFROM information_schema.`KEY_COLUMN_USAGE` WHERE \n`REFERENCED_TABLE_SCHEMA` LIKE '$safeDb' \nAND `REFERENCED_TABLE_NAME` LIKE '$safeTable' \nAND `REFERENCED_COLUMN_NAME` LIKE '$col' \n \")->fetchAll(\\PDO::FETCH_ASSOC);\n\n\n foreach ($all as $info) {\n $info = array_values($info);\n $id = $info[0] . '.' . $info[1];\n\n\n if (!array_key_exists($id, $ret)) {\n\n\n $ret[$id] = [\n \"referencing_schema\" => $info[0],\n \"referencing_table\" => $info[1],\n \"referencing_column\" => $info[2],\n \"referenced_schema\" => $db,\n \"referenced_table\" => $_table,\n \"referenced_columns\" => [$col => $info[2]],\n ];\n } else {\n $ret[$id][\"referenced_columns\"][$col] = $info[2];\n }\n }\n }\n return $ret;\n\n }", "function getPrimKeyArr($fk1, $fk2Arr, $pkCol, $fk1Col, $fk2Col, $table)\n\t{\n\t\t//intialize variable\n\t\t$pkIds\t= array();\n\t\t\n\t\tforeach($fk2Arr as $k)\n\t\t{\n\t\t\t$pkIds[] = $this->getPrimKey($fk1, $k, $pkCol, $fk1Col, $fk2Col, $table);\n\t\t}\n\t\t\n\t\t//return\n\t\treturn $pkIds;\n\t\t\n\t}", "public function getKey(){\n\t\treturn array_intersect_key($this->attributes, array_flip($this->getKeyName()));\n\t}", "public function getKeyAttributes()\n {\n return $this->getSchema()->getRelationKeyAttributes( $this->getName() );\n }", "protected function join_record($id)\n {\n return [\n $this->foreign_key() => $this->base->get_key(),\n $this->other_key() => $id,\n ];\n }", "public function getForeignKeysInfo($fullTable)\n {\n list($db, $_table) = $this->explodeTable($fullTable);\n\n $db = addcslashes($db, \"'\");\n $_table = addcslashes($_table, \"'\");\n\n\n $ret = [];\n\n $rows = $this->query(\"\nselect \nCOLUMN_NAME,\nREFERENCED_TABLE_SCHEMA, \nREFERENCED_TABLE_NAME,\nREFERENCED_COLUMN_NAME\n \nfrom information_schema.KEY_COLUMN_USAGE k \ninner join information_schema.TABLE_CONSTRAINTS t on t.CONSTRAINT_NAME=k.CONSTRAINT_NAME\nwhere k.TABLE_SCHEMA = '$db'\nand k.TABLE_NAME = '$_table'\nand CONSTRAINT_TYPE = 'FOREIGN KEY'\n\n\")->fetchAll(\\PDO::FETCH_ASSOC);\n\n\n foreach ($rows as $row) {\n $ret[$row['COLUMN_NAME']] = [\n \"referenced_schema\" => $row['REFERENCED_TABLE_SCHEMA'],\n \"referenced_table\" => $row['REFERENCED_TABLE_NAME'],\n \"referenced_column\" => $row['REFERENCED_COLUMN_NAME'],\n ];\n }\n\n return $ret;\n }", "function getBelongsToReference(string $table, string $key): ?array;", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "public function getEntityKeys()\n {\n return $this->_entityKey;\n }", "function getForeignKeyInfo($table, $constraint_name)\n {\n // In a sane world, it'd be easier to query the column names directly.\n // But it's pretty hard to work with arrays such as col_indexes in direct SQL here.\n $query = 'SELECT ' .\n '(SELECT relname FROM pg_class WHERE oid=confrelid) AS table_name, ' .\n 'confrelid AS table_id, ' .\n '(SELECT indkey FROM pg_index WHERE indexrelid=conindid) AS col_indexes ' .\n 'FROM pg_constraint ' .\n 'WHERE conrelid=(SELECT oid FROM pg_class WHERE relname=\\'%s\\') ' .\n 'AND conname=\\'%s\\' ' .\n 'AND contype=\\'f\\'';\n $sql = sprintf($query, $table, $constraint_name);\n $data = $this->fetchQueryData($sql);\n if (count($data) < 1) {\n throw new Exception(\"Could not find foreign key \" . $constraint_name . \" on table \" . $table);\n }\n\n $row = $data[0];\n return array(\n 'table_name' => $row['table_name'],\n 'col_names' => $this->getTableColumnNames($row['table_id'], $row['col_indexes'])\n );\n }", "private function findPrimaryKeyFields(): array\n {\n $sql = <<<SQL\nWITH schema_ns AS\n(\n SELECT\n oid relnamespace\n FROM \n pg_namespace\n WHERE\n nspname = :schema\n),\ntbl_class AS\n(\n SELECT\n oid tblclassid\n FROM\n pg_class\n WHERE\n relname = :table\n AND\n relnamespace = (\n SELECT\n relnamespace\n FROM\n schema_ns\n )\n),\nindexs AS\n(\n SELECT\n indexrelid\n FROM\n pg_index\n WHERE\n indrelid = (\n SELECT\n tblclassid\n FROM\n tbl_class\n )\n AND\n indisprimary = 't'\n),\npk AS\n(\n SELECT\n attname primary_key\n FROM\n pg_attribute\n WHERE\n attrelid = (\n SELECT\n indexrelid\n FROM \n indexs\n )\n)\n\nSELECT primary_key FROM pk\n\nSQL;\n\n $sth = $this->db->prepare($sql);\n $sth->execute(\n [\n ':table' => $this->table->getName(),\n ':schema' => $this->table->getSchema()\n ]);\n\n $fetched = $sth->fetchAll(PDO::FETCH_OBJ);\n\n $rtn = [];\n\n foreach ( $fetched as $fObj )\n {\n $rtn[] = $fObj->primary_key;\n }\n\n return $rtn;\n }", "public function associationValue($association) {\n\t\tif (strstr($association, \".\")) {\n\t\t\t// use the path to get to the data poing\n\t\t\t$fieldParts = explode(\".\", $association);\n\t\t\t$key = array_pop($fieldParts);\n\t\t\t\n\t\t\t// add the field parts to the entityPath to get the correct model\n\t\t\t$this->_setEntityPath($fieldParts);\n\t\t} else {\n\t\t\t$key = $association;\n\t\t\t$fieldParts = array();\n\t\t}\n\t\t\n\t\tlist($plugin, $model) = pluginSplit($this->currentPathClass());\n\t\t\n\t\t// TODO: Generalize this so to get the model if it's already loaded by previous calls\n\t\tif ($plugin) {\n\t\t\tApp::uses($model, $plugin . \".Model\");\n\t\t} else {\n\t\t\tApp::uses($model, \"Model\");\n\t\t}\n\t\t\n\t\tif (class_exists($model)) {\n\t\t\t$obj = Entity::getModel($model);\n\t\t\t$associations = $obj->getAssociated();\n\t\t} else {\n\t\t\t$this->_revertEntityPath(count($fieldParts));\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// if association is not defined in db, then just print whatever it is the key\n\t\tif (!isset($associations[$key]) ) {\n\t\t\t$this->_revertEntityPath(count($fieldParts));\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$value = null;\n\t\t\n\t\t$data = &$this->request->data;\n\n\t\tif (($result = Entity::getDataValue($data)) == false) {\n\t\t\t$result = &$this->request->data;\n\t\t}\n\t\t//pr($data);\n\t\t$this->_revertEntityPath(count($fieldParts));\n\t\t\n\t\tif (isset($result[$key]))\n\t\t\treturn $result[$key];\n\t\telse\n\t\t\treturn array();\n\t}", "public function listForeignKeys($table) {\r\n\t\tswitch ($this->getDbtype()) {\r\n\t\t\tcase 'mysql':\r\n\t\t\t\t$meta = array();\r\n\t\t\t\tforeach ($this->loadKeys() as $info) {\r\n\t\t\t\t\tif ($info['table_name'] === $table) {\r\n\t\t\t\t\t\t$meta[] = array(\r\n\t\t\t\t\t\t\t'table' => $info['table_name'],\r\n\t\t\t\t\t\t\t'column' => $info['column_name'],\r\n\t\t\t\t\t\t\t'referenced_table' => $info['referenced_table_name'],\r\n\t\t\t\t\t\t\t'referenced_column' => $info['referenced_column_name'],\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn $meta;\r\n\t\t\tcase 'pgsql':\r\n\t\t\t\tlist($schema, $table) = stristr($table, '.') ? explode(\".\", $table) : array('public', $table);\r\n\t\t\t\t$result = $this->query(\r\n\t\t\t\t\t\t\"SELECT kcu.column_name AS column_name, ccu.table_name AS referenced_table_name, ccu.column_name AS referenced_column_name \r\n FROM information_schema.table_constraints AS tc JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name\r\n JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name WHERE constraint_type = 'FOREIGN KEY' \r\n AND tc.table_name='\" . $table . \"' AND tc.table_schema = '\" . $schema . \"'\");\r\n\t\t\t\t$result->setFetchMode(PDO::FETCH_ASSOC);\r\n\t\t\t\t$meta = array();\r\n\t\t\t\tforeach ($result as $row) {\r\n\t\t\t\t\t$meta[] = array(\r\n\t\t\t\t\t\t'table' => $table,\r\n\t\t\t\t\t\t'column' => $row['column_name'],\r\n\t\t\t\t\t\t'referenced_table' => $row['referenced_table_name'],\r\n\t\t\t\t\t\t'referenced_column' => $row['referenced_column_name'],\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\treturn $meta;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'sqlite':\r\n\t\t\t\t$sql = \"PRAGMA foreign_key_list(\" . $this->quote($table) . \")\";\r\n\t\t\t\t$result = $this->query($sql);\r\n\t\t\t\t$result->setFetchMode(PDO::FETCH_ASSOC);\r\n\t\t\t\t$meta = array();\r\n\t\t\t\tforeach ($result as $row) {\r\n\t\t\t\t\t$meta[] = array(\r\n\t\t\t\t\t\t'table' => $table,\r\n\t\t\t\t\t\t'column' => $row['from'],\r\n\t\t\t\t\t\t'referenced_table' => $row['table'],\r\n\t\t\t\t\t\t'referenced_column' => $row['to'],\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\treturn $meta;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception('Unsupported database : ' . $this->getDbtype());\r\n\t\t}\r\n\t}", "public function referredIn($field)\r\n {\r\n $result = [];\r\n foreach ($this->relations as $relation) {\r\n if (false === $i = array_search($field, $relation->localKeys())) {\r\n continue;\r\n }\r\n\r\n $result[$relation->foreignKeys()[$i]] = $relation;\r\n }\r\n\r\n return $result;\r\n }", "public function modelKeys()\n\t{\n\t\treturn array_map( function ( $m )\n\t\t{\n\t\t\treturn $m->getKey();\n\t\t}, $this->items );\n\t}", "public function schemaPK() {\n return $this->primaryKeyArray;\n }", "public function schemaPK() {\n return $this->primaryKeyArray;\n }", "protected function associated_key()\n {\n return $this->model->table() . '.' . $this->model->key();\n }", "protected function getForeignKeys($src)\n\t{\n\t\t$matches = array();\n\t\t$brackets = '\\(([^\\)]+)\\)';\n\t\t$find = \"/FOREIGN\\s+KEY\\s+{$brackets}\\s+REFERENCES\\s+([^\\(]+){$brackets}/i\";\n\t\tif(preg_match($find, $src, $matches))\n\t\t{\n\t\t\t$keys = preg_split('/,\\s+/', $matches[1]);\n\t\t\t$fkeys = array();\n\t\t\tforeach(preg_split('/,\\s+/', $matches[3]) as $i => $fkey)\n\t\t\t\t$fkeys[$keys[$i]] = $fkey;\n\t\t\treturn array('table' => str_replace('\"','',$matches[2]), 'keys' => $fkeys);\n\t\t}\n\t}", "private function getAttachedKeysFromRelation($bind, string $name): ?array\n {\n if (!$bind instanceof Model) {\n return data_get($bind, $name);\n }\n\n $relation = $bind->{$name}();\n\n if ($relation instanceof BelongsToMany) {\n $relatedKeyName = $relation->getRelatedKeyName();\n\n return $relation->getBaseQuery()\n ->get($relation->getRelated()->qualifyColumn($relatedKeyName))\n ->pluck($relatedKeyName)\n ->all();\n }\n\n if ($relation instanceof MorphMany) {\n $parentKeyName = $relation->getLocalKeyName();\n\n return $relation->getBaseQuery()\n ->get($relation->getQuery()->qualifyColumn($parentKeyName))\n ->pluck($parentKeyName)\n ->all();\n }\n\n return data_get($bind, $name);\n }", "public function createKeyArray(){\n\t$keyArray = array();\n\tif (isset($this->id)) $keyArray[\"id\"] = $this->id;\n\tif (isset($this->codice_categoria)) $keyArray[\"codice_categoria\"] = $this->codice_categoria;\n\tif (isset($this->codice)) $keyArray[\"codice\"] = $this->codice;\n\tif (isset($this->descrizione)) $keyArray[\"descrizione\"] = $this->descrizione;\n\treturn $keyArray;\n}", "public function arrayKeysValues()\n {\n return array(\n\t\t\t\"FirstName\" => $this->firstName,\n\t\t\t\"LastName\" => $this->lastName,\n\t\t\t\"Gender\" => $this->gender,\n\t\t\t\"YearOfBirth\" => $this->yearOfBirth,\n \"IdGenre\" => $this->genre,\n \"IsInGroup\" => $this->group\n\t\t);\n }", "public function getMappingKeys()\n {\n return array_map(\n function ($mapping) {\n return $mapping->getKey();\n },\n $this->mapping\n );\n }", "public function getId($forceAsAssoc = false)\n {\n $info = $this->__getIdInfo();\n\n if (count($info) == 1) {\n $key = $info[0];\n if ($forceAsAssoc) {\n return [$key => $this->_data[$key]];\n }\n return $this->_data[$key];\n }\n\n $out = [];\n foreach ($info as $k) {\n $out[$k] = $this->$k;\n }\n ksort($out);\n\n return $out;\n }", "public function getEntityValues($pk = true) {\n $entityValues = array();\n foreach ($this->entity as $columnName => $column) {\n\n if (($column['contraint'] == 'pk' && $pk == true) || ($column['contraint'] != 'pk')) {\n $entityValues[$columnName] = $column['value'];\n }\n }\n\n return $entityValues;\n }", "public static function getReferencedKeysInfo($table, $schema = null)\n {\n $ret = [];\n if (null === $schema) {\n $schema = self::getDatabase();\n }\n $ric = QuickPdoInfoTool::getPrimaryKey($table, $schema, true);\n\n\n foreach ($ric as $col) {\n\n $all = QuickPdo::fetchAll(\"\nSELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME \nFROM information_schema.`KEY_COLUMN_USAGE` WHERE \n`REFERENCED_TABLE_SCHEMA` LIKE '$schema' \nAND `REFERENCED_TABLE_NAME` LIKE '$table' \nAND `REFERENCED_COLUMN_NAME` LIKE '$col' \n \");\n\n\n foreach ($all as $info) {\n $info = array_values($info);\n $id = $info[0] . '.' . $info[1];\n if (!array_key_exists($id, $ret)) {\n $ret[$id] = [\n $info[0],\n $info[1],\n [$col => $info[2]],\n ];\n } else {\n $ret[$id][2][$col] = $info[2];\n }\n }\n }\n return $ret;\n\n }", "public static function getPrimaryKeys()\n {\n return array('bindingId');\n }", "public function gen_dd_array()\n {\n $vec = array();\n if($result = $this->get($this->_table) )\n {\n foreach($result as $reg)\n { \n $vec[$reg->id] = $reg->name;\n }\n }\n return $vec;\n }", "public function getForeignEntityNames()\n {\n return $this->foreignEntityNames;\n }", "public function _foreignKeyData(string $table): array\n\t{\n\t\t//log_message('error', '_foreignKeyData');\n\n\t\t$sql = 'SELECT RDB$INDEX_NAME as INDEX_NAME, RDB$RELATION_NAME as RELATION_NAME,\n\t\t\t\t\t\tRDB$INDEX_ID as INDEX_ID, RDB$UNIQUE_FLAG as UNIQUE_FLAG,\n\t\t\t\t\t\tRDB$DESCRIPTION as DESCRIPTION, RDB$SEGMENT_COUNT as SEGMENT_COUNT,\n\t\t\t\t\t\tRDB$INDEX_INACTIVE as INDEX_INACTIVE, RDB$INDEX_TYPE as INDEX_TYPE,\n\t\t\t\t\t\tRDB$FOREIGN_KEY as FOREIGN_KEY, RDB$SYSTEM_FLAG as SYSTEM_FLAG,\n\t\t\t\t\t\tRDB$EXPRESSION_BLR as EXPRESSION_BLR, RDB$EXPRESSION_SOURCE as EXPRESSION_SOURCE,\n\t\t\t\t\t\tRDB$STATISTICS as STATISTICS\n\t\t \t\t\t\tFROM RDB$INDICES\n\t\t\t\t\t\tWHERE (RDB$SYSTEM_FLAG is null or RDB$SYSTEM_FLAG = 0) ';\n\n\t\tif (! empty($table)) $sql .= 'AND RDB$RELATION_NAME = \\''.$table.'\\' ';\n\n\t\t$sql .='ORDER BY RDB$FOREIGN_KEY NULLS FIRST';\n\n\t\t//log_message('error', '_indexData SQL:'.$sql);\n\n\t\tif (($query = $this->query($sql)) === false)\n\t\t{\n\t\t\tthrow new DatabaseException(lang('Database.failGetIndexData'));\n\t\t}\n\t\t$query = $query->getResultObject();\n\n\t\t//log_message('error', print_r($query, true) );\n\n\t\treturn $query;\n\t}", "public function associations(): array\n {\n return $this->_associations;\n }", "protected static function keyToAttributeMapping()\n {\n return array();\n }", "public function getAllSourcesAsKeyVal() {\n return $this->database->table(\"source\")->fetchPairs(\"id\",\"name\");\n }", "public function toArray($keysAsId = false, array $parentEntities = array());", "public function key()\r\n\t{\r\n\t\treturn $this->elements[$this->i]->get($this->obj->primaryKey);\r\n\t}", "public function getSimpleAssocAttrNames()\n {\n $res = array();\n foreach ( $this->hasOne as $attr => $type )\n {\n $res[] = DatabaseNormalization::simpleAssoc( $attr );\n }\n return $res;\n }", "public function PKArray() {\n $returnvalue = array();\n $returnvalue['DNASequencingRunID'] = $this->getDNASequencingRunID();\n return $returnvalue;\n }", "public function getForeignPartionKey()\n {\n return $this->parent->getAttribute($this->localKey[0]);\n }", "public function getPrimaryKeys();", "public function getPrimaryKeys();", "public function valueKeys(): array;", "public function getValuesArray()\n {\n return $this->keyValues;\n }", "public function as_assoc();", "public function getAssociations()\n {\n return array_keys($this->entityManager->getClassMetadata($this->repositoryName)->getAssociationMappings());\n }", "public function getKeys(): array;", "private function getForeignKeys(string $table): array\n {\n $mappedForeignKeys = [];\n /** @var CubridSchema|MssqlSchema|MysqlSchema|OciSchema|PgsqlSchema|SqliteSchema $schema */\n $schema = $this->db->getSchema();\n\n foreach ($schema->getTableForeignKeys($table, true) as $foreignKey) {\n $mappedForeignKey = new ForeignKey();\n $mappedForeignKey->setTableName($table);\n $mappedForeignKey->setName($foreignKey->name);\n $mappedForeignKey->setColumns($foreignKey->columnNames);\n $mappedForeignKey->setReferredTable($foreignKey->foreignTableName);\n $mappedForeignKey->setReferredColumns($foreignKey->foreignColumnNames);\n $mappedForeignKey->setOnDelete($foreignKey->onDelete);\n $mappedForeignKey->setOnUpdate($foreignKey->onUpdate);\n\n $mappedForeignKeys[$mappedForeignKey->getName()] = $mappedForeignKey;\n }\n\n return $mappedForeignKeys;\n }", "public function getCurrentlyReferencedEntityIds() {\n $ret = array();\n if (isset($this->entity) && isset($this->field)) {\n $entity_type = $this->entity_type;\n $field_name = $this->field['field_name'];\n $wrapper = entity_metadata_wrapper($entity_type, $this->entity);\n $ret = $wrapper->{$field_name}->raw();\n }\n\n return $ret;\n }", "public function guessForeignKeyMappings(Db_Descriptor $descriptor)\n\t{\n\t\t$ret = array();\n\t\t\n\t\tforeach($descriptor->getPrimaryKeys() as $pk)\n\t\t{\n\t\t\t$ret[$pk->getProperty()] = $descriptor->getSingular().'_'.$pk->getProperty();\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "public function extractDataForJoin($valueField = null, $keyField = null)\n {\n if ($keyField === null && static::$primaryKey !== null) {\n $keyField = static::$primaryKey;\n }\n if ($this->multiMode) {\n return $this->load()->extractDataForJoin($valueField, $keyField);\n }\n if ($this->data === null) {\n $this->load();\n }\n\n return [$this[$keyField] => $this[$valueField]];\n }", "public function getForeignKey()\n {\n return $this->foreignKey;\n }", "public function getForeignKey()\n {\n return $this->foreignKey;\n }", "public function getForeignKey()\n {\n return $this->foreignKey;\n }", "protected function default_mapping() {\n\t\t$from\t= $this->from();\n\t\t$to\t\t= $this->to();\n\n\t\t// Fk of source entity exists in target entity ? => one to many\n\t\t$fk\t\t= $from->fk();\n\t\t$errors\t= $to->fields_validate(array_values($fk));\n\t\tif (count($errors) === 0)\n\t\t\treturn $fk;\n\n\t\t// Fk of target entity exists in source entity ? => many to one\n\t\t$fk\t\t= $to->fk();\n\t\t$errors\t= $from->fields_validate(array_values($fk));\n\t\tif (count($errors) === 0)\n\t\t\treturn array_flip($fk);\n\n\t\t// Associative entity ? => many to many\n\t\ttry {\n\t\t\t$pivot\t\t= ($this->from < $this->to) ? $this->from.'2'.$this->to : $this->to.'2'.$this->from;\n\t\t\t$pivot\t\t= glue::entity($pivot); // Will raise exception if no such entity.\n\t\t\t$from_fk\t= $from->fk();\n\t\t\t$to_fk\t\t= $to->fk();\n\t\t\t$errors\t\t= $pivot->fields_validate(array_merge(array_values($from_fk), array_values($to_fk)));\n\t\t\tif (count($errors) === 0) {\n\t\t\t\tforeach($from_fk as $src => $trg) $mapping[$src] = $pivot->name().'.'.$trg;\n\t\t\t\tforeach($to_fk as $trg => $src) $mapping[$pivot->name().'.'.$src] = $trg;\n\t\t\t\treturn $mapping;\n\t\t\t}\n\t\t} catch(Exception $e) { /* means there is no such associative entity */ }\n\n\t\t// Matching pk ? => one to one\n\t\t$from_pk\t= $from->pk();\n\t\t$to_pk\t\t= $to->pk();\n\t\tif (count($from_pk) === count($to_pk) && count(array_diff($from_pk, $to_pk)) === 0)\n\t\t\treturn array_combine($from_pk, $from_pk);\n\n\t\t// Otherwise error.\n\t\tthrow new Kohana_Exception(\"Impossible to guess field mapping from entity '\".$this->from.\"' to entity'\".$this->to.\"'\");\n\t}", "function keyById(&$arr){\n\t\t$out = array();\n\t\tforeach ( array_keys($arr) as $key){\n\t\t\t$out[$arr[$key]->getId()] =& $arr[$key];\n\t\t}\n\t\treturn $out;\n\t}", "public function getForeignKey()\n {\n return $this->primaryKey;\n }", "function GetDBTableKeys()\n\t{\n\t\tglobal $dal_info;\n\t\tif( !array_key_exists($this->infoKey, $dal_info) || !is_array($dal_info[ $this->infoKey ]) )\n\t\t\treturn array();\n\t\t\n\t\t$ret = array();\n\t\tforeach($dal_info[ $this->infoKey ] as $fname=>$f)\n\t\t{\n\t\t\tif( @$f[\"key\"] )\n\t\t\t\t$ret[] = $fname;\n\t\t}\n\t\treturn $ret;\n\t}", "public function attributes()\n {\n if (isset(self::$_detailsData[self::className()][$this->_parentIdValue])) {\n return array_keys(self::$_detailsData[self::className()][$this->_parentIdValue]);\n }\n return [];\n }", "function getAssociationNames();", "public function get()\n {\n $joins = $this->build_relationship();\n\n return array('columns' => implode(',', $this->columns),\n 'joins' => $joins );\n }", "public function getFk()\n {\n return $this->_fk;\n }", "public function toArray() {\n return $this->keysMap->toArray();\n }", "public function getKeyValuePair() : array \n { \n return [\n $this->key => $this->value\n ];\n }" ]
[ "0.65673536", "0.65510887", "0.6480101", "0.63432956", "0.6341047", "0.6311684", "0.63016236", "0.6212021", "0.61953413", "0.61373574", "0.61232495", "0.61218035", "0.6117957", "0.6112464", "0.60784924", "0.60415894", "0.6035947", "0.5945154", "0.5937441", "0.5877868", "0.5876753", "0.5858957", "0.5858957", "0.585062", "0.5830465", "0.58284014", "0.5828228", "0.58236927", "0.5822534", "0.57938474", "0.5777443", "0.5766181", "0.57459426", "0.57330364", "0.573041", "0.57250243", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.5713148", "0.570778", "0.5692121", "0.5660888", "0.5660023", "0.5640352", "0.56309533", "0.5624064", "0.5624064", "0.56191", "0.5617534", "0.5609843", "0.56033975", "0.5585587", "0.5557534", "0.5550713", "0.55485314", "0.5543717", "0.5539065", "0.5525081", "0.55240613", "0.5520989", "0.55175954", "0.55106497", "0.5508469", "0.5508093", "0.5507748", "0.54967", "0.54933125", "0.54925394", "0.54878294", "0.54878294", "0.54825854", "0.5467842", "0.5457762", "0.54521483", "0.5451531", "0.5442314", "0.54367995", "0.5429968", "0.5423677", "0.54192895", "0.54192895", "0.54192895", "0.54127604", "0.5384721", "0.5377023", "0.53731847", "0.5369129", "0.53668076", "0.5366437", "0.53651243", "0.53646666", "0.5364543" ]
0.6145137
9
injects the API configuration This injection method also sets the username, password and baseUrl for the API.
public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $configuration = $configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManager::CONFIGURATION_TYPE_SETTINGS); $apiConfiguration = $configuration['api']; $this->username = $apiConfiguration['username']; $this->password = $apiConfiguration['password']; if ('' !== trim($apiConfiguration['baseUrl'])) { $this->baseUrl = $apiConfiguration['baseUrl']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n $dotenv = new Dotenv();\n $dotenv->load(dirname(__DIR__).'/.env');\n\n $this->api = new Api($_ENV['CLODUI_API']);\n\n $client_id = $_ENV['CLODUI_CLIENT_ID'];\n $user_pool_id = $_ENV['CLODUI_USER_POOL_ID'];\n $identity_pool_id = $_ENV['CLODUI_IDENTITY_POOL_ID'];\n\n Logger::debug('Config Client ID '. $client_id. ', User pool id '. $user_pool_id. ', Identity pool id '. $identity_pool_id);\n $this->auth = new Auth($client_id, $user_pool_id, $identity_pool_id);\n }", "protected function init_api() {\n\t\tinclude_once dirname( __FILE__ ) . '/includes/class-coinbase-api-handler.php';\n\n\t\tCoinbase_API_Handler::$log = get_class( $this ) . '::log';\n\t\tCoinbase_API_Handler::$api_key = $this->get_option( 'api_key' );\n\t}", "public function __construct() {\n global $apiConfig;\n if (! empty($apiConfig['developer_key'])) {\n $this->developerKey = $apiConfig['developer_key'];\n }\n if (! empty($apiConfig['oauth2_client_id'])) {\n $this->clientId = $apiConfig['oauth2_client_id'];\n }\n if (! empty($apiConfig['oauth2_client_secret'])) {\n $this->clientSecret = $apiConfig['oauth2_client_secret'];\n }\n if (! empty($apiConfig['oauth2_redirect_uri'])) {\n $this->redirectUri = $apiConfig['oauth2_redirect_uri'];\n }\n if (! empty($apiConfig['oauth2_access_type'])) {\n $this->accessType = $apiConfig['oauth2_access_type'];\n }\n if (! empty($apiConfig['oauth2_approval_prompt'])) {\n $this->approvalPrompt = $apiConfig['oauth2_approval_prompt'];\n }\n }", "public function __construct($api_url = null, $username = null, $password = null) {\n $options = array(\n 'api_url' => $api_url,\n 'username' => $username,\n 'password' => $password\n );\n\n //configure api options\n $this->configure( $options );\n\n //validate api credentials\n $this->validateApiCredentials();\n }", "protected function configure()\n {\n $this->addArgument(\n 'environment', InputArgument::REQUIRED | InputArgument::OPTIONAL, 'What environment to run the script in',\n 'production'\n );\n $this->_httpClient = new Client();\n }", "public function __construct()\r\n\t\t{\r\n\t\t\t$this->api_id = self::API_ID;\r\n\t\t\t$this->api_secret = self::API_SECRET;\r\n\t\t}", "protected function setUp()\n {\n $this->api_key = getenv('API_KEY');\n $this->api = new Api($this->api_key);\n }", "private function setup_api() {\n\t\trequire_once 'includes/class-themeisle-ob-rest-server.php';\n\t\tif ( ! class_exists( 'Themeisle_OB_Rest_Server' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$api = new Themeisle_OB_Rest_Server();\n\t\t$api->init();\n\t\trequire_once 'includes/importers/helpers/trait-themeisle-ob.php';\n\t}", "public function configureService ()\n {\n $config = $this->app->config('github');\n $this->url = sprintf('https://api.github.com/users/%s/events/public', $config['handle']);\n $this->configureHeaders();\n }", "public function __construct()\n {\n global $API_AUTHORIZATIONS;\n\n //Construct generic API handler\n parent::__construct();\n\n //Define authorizations for current API module\n $this->AUTH = $API_AUTHORIZATIONS[self::MODULE];\n }", "public function __construct()\r\n {\r\n $this->constructApiUrl();\r\n }", "public function __construct()\n {\n\n // For Authenticating with Login Credentials\n\n //$this->username = config('whmcs.username');\n //$this->password = config('whmcs.password');\n\n // For Authenticating with API Credentials\n\n $this->api_identifier = config('whmcs.api_identifier');\n $this->api_secret = config('whmcs.api_secret');\n\n $this->api_access_key = config('whmcs.api_access_key');\n\n $this->response_type = strtolower(config('whmcs.response_type'));\n\n $this->client = new Client([\n 'base_uri' => config('whmcs.url'),\n 'timeout' => config('whmcs.timeout'),\n 'headers' => ['Accept' => 'application/json']\n ]);\n }", "public function __construct()\n {\n $paypal_conf = config('paypal');\n \n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n \n }", "public function init( $config )\n {\n $this->_config = $config;\n\n // Application Slug - required\n if( !$config['slug'] || empty( $config['slug'] ))\n {\n throw new Exception(\"You must provid your Application's slug\");\n }\n\n $this->_slug = $config['slug'];\n\n //\n if( empty( $config['url'] ) )\n {\n throw new Exception( 'The URL must be set to connect to Tapioca Rest API' );\n }\n\n $url = $config['url'];\n\n if( substr( $url, -1 ) != '/')\n {\n $url .= '/';\n }\n\n\n if( substr( $url, -4 ) != 'api/')\n {\n $url .= 'api/';\n }\n\n $url .= $this->_slug.'/';\n\n if( empty( $config['clientId'] ) )\n {\n throw new Exception( 'You must provide your Client Id' );\n }\n\n if( empty( $config['clientSecret'] ) )\n {\n throw new Exception( 'You must provide your Secret' );\n }\n\n static::$rest = new GuzzleClient( $url, array(\n 'key' => $config['clientId']\n ));\n\n // set cache config\n if( is_array( $config['cache'] ) && $config['cache']['path'] )\n {\n try\n {\n //Make sure it exists and is writeable \n $this->_cache = new Cache( $config['cache']['path'] );\n }\n catch( TapiocaCacheException $e )\n {\n throw new Exception( $e->getMessage() );\n }\n }\n\n if( !is_array( $config['collections'] ) )\n {\n throw new Exception('Collections name must be an array');\n }\n\n // Set `apps` collection name\n if( isset( $config['collections']['apps'] ) && !empty( $config['collections']['apps'] ))\n {\n static::$appCollection = $config['collections']['apps'];\n }\n else\n {\n throw new Exception('Apps collections name must be provided');\n }\n\n // Set `library` collection name\n if( isset( $config['collections']['library'] ) && !empty( $config['collections']['library'] ))\n {\n static::$libraryCollection = $config['collections']['library'];\n }\n else\n {\n throw new Exception('Library collections name must be provided');\n }\n\n // Set `previews` collection name\n if( isset( $config['collections']['previews'] ) && !empty( $config['collections']['previews'] ))\n {\n static::$previewCollection = $config['collections']['previews'];\n }\n else\n {\n throw new Exception('Previews collections name must be provided');\n }\n\n if( $config['fileStorage'] )\n {\n $this->_fileStorage = $config['fileStorage'];\n\n if( substr( $this->_fileStorage, -1 ) != '/')\n {\n $this->_fileStorage .= '/';\n }\n\n $this->_fileStorage .= $this->_slug.'/';\n }\n\n // allow to pass app's data via config\n // usefull in shared environment/reduce remote query\n if( isset( $config['app'] ) && is_array( $config['app'] ))\n {\n $this->_app = $config['app'];\n }\n\n $this->reset();\n }", "public function __construct()\n {\n $param = func_get_args();\n switch (count($param)) {\n case 0:\n $this->setupApiConfigFromEnv();\n $this->setupApiConfigFromFile();\n break;\n case 1:\n $this->setupApiConfigFromFile($param[0]);\n break;\n case 2:\n $this->api_key = $param[0];\n $this->api_secret = $param[1];\n break;\n default:\n throw new ApiConstructorException('Invalid constructor parameters.');\n }\n $this->client = new Client(['base_uri' => self::BASE_URI, 'timeout' => self::TIMEOUT]);\n }", "public static function configure($api_key)\n {\n parent::configureEndpoint(self::API_ENDPOINT, $api_key);\n }", "public function __construct(){\n\t\t$paypal_conf = config('paypal');\n\t\t$this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n\t\t$this->_api_context->setConfig($paypal_conf['settings']);\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $this->endpoint = config('untappd.endpoint');\n\n $this->client_id = config('untappd.client_id');\n\n $this->secret = config('untappd.secret');\n\n $this->brewery_id = config('untappd.brewery_id');\n\n $this->params = [];\n }", "protected function setUp()\n {\n $config = array(\n \"accessToken\" => \"accessToken\",\n \"sk_url\" => \"sk_url\",\n \"redirect_url\" => \"redirect_url\",\n \"app_id\" => \"app_id\",\n \"app_secret\" => \"app_secret\"\n );\n\n $this->object = new API($config);\n }", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->httpClient = new Client([\n 'base_uri' => config('app.url'),\n 'headers' => [\n 'Authorization' => $this->apiKey,\n ],\n ]);\n }", "public static function init() {\n if (self::$apiClient === null)\n self::$apiClient = new ApiClient();\n }", "public function __construct()\n {\n // Don't instantiate bunq api context, we're using oauth2 here\n // parent::__construct();\n\n // Make sure oauth configuration is set\n foreach ([\n config('bunq.oauth.authorize_uri'),\n config('bunq.oauth.token_uri'),\n config('bunq.oauth.redirect_uri'),\n config('bunq.oauth.client_id'),\n config('bunq.oauth.client_secret'),\n ] as $config) {\n if (is_null($config)) {\n abort(500, 'Please add all the bunq configuration entries in config/bunq.php');\n }\n }\n }", "protected function _initApi() {\n\t$this->bootstrap('Zend');\n\t$this->bootstrap('ApiRoutes');\n }", "private function initConfig()\n {\n return $this->config = [\n 'api' => 'https://api.gfycat.com/v1',\n ];\n }", "public function __construct($config){\n $this->api = new LeadBIAPI($config);\n }", "public function __construct($config){\n $this->api = new LeadBIAPI($config);\n }", "public function initialization($config)\n {\n try {\n $api = new \\CyberpanelApi($config['hostname'], $config['username'], $config['password']);\n } catch (\\Exception $e) {\n $this->failTest();\n }\n\n return $api;\n }", "public function setUp()\r\n {\r\n $this->config += [\r\n 'http_errors' => false,\r\n 'timeout' => 10.0,\r\n 'base_uri' => $this->description->getBaseUri(),\r\n 'apiKey' => 'XXX',\r\n 'projectId' => 000,\r\n ];\r\n }", "public function __construct()\n {\n // returns the base portal URL as defined in conf file\n $this->baseUrl = \\Factory::getConfigService()->GetPortalURL();\n $this->baseApiUrl = \\Factory::getConfigService()->getServerBaseUrl();\n }", "public function __construct()\n {\n parent::__construct();\n $this->client = new APIClient();\n }", "public function configure(array $options) {\n $this->options = $options + $this->options;\n\n //Verify Api's domain\n $pieces = parse_url($this->options['api_url']);\n $domain = isset($pieces['host']) ? $pieces['host'] : '';\n $api_domain = '';\n if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\\-]{1,63}\\.[a-z\\.]{2,6})$/i', $domain, $regs)) {\n $api_domain = $regs['domain'];\n }\n\n //Set api path\n if($pieces['path'][0] == '/') {\n $pieces['path'] = substr($pieces['path'], 1);\n }\n if($pieces['path'][strlen($pieces['path'])-1] == '/') {\n $pieces['path'] = substr($pieces['path'], 0, -1);\n }\n\n //Set api type\n if($api_domain == 'github.com') {\n $this->setOption('api_type', 'github');\n $this->setOption('api_path', 'repos/'.trim($pieces['path']).'/issues');\n } else if($api_domain == 'bitbucket.org') {\n $this->setOption('api_type', 'bitbucket');\n $this->setOption('api_path', 'repositories/'.trim($pieces['path']).'/issues');\n } else {\n $this->error_handler( 'Method Not Allowed' );\n }\n\n //Set user agent based on Api's\n if( !empty($this->options['api_type']) ) {\n $user_agent = str_replace(':apitype', $this->options['api_type'], $this->options['user_agent']);\n $this->setOption('user_agent', $user_agent);\n }\n }", "private function loadConfig() {\n\n //get pachage and configuration\n $pkg = Package::getByHandle(\"c5authy\");\n Loader::library('authy', $pkg);\n\n $co = new Config();\n $co->setPackageObject($pkg);\n\n $production = ( $co->get('authy_server_production') == \"1\" ? true : false );\n\n //set the values\n $this->api_key = $co->get('authy_api_key');\n $this->server = $production ? self::LIVE_SERVER : self::SANDBOX_SERVER;\n $this->auth_type = $co->get('authy_type');\n $this->sms_token = $co->get('authy_sms_tokens');\n }", "public function __construct()\n {\n $this->api_id = Config::get('biddingos.ym.api_id');\n $this->api_token = md5(Config::get('biddingos.ym.api_token'));\n $this->refresh_time = Config::get('biddingos.ym.refresh_time');\n parent::__construct();\n }", "public function __construct()\n {\n $this->params['config'] = config('app');\n }", "public function __construct ($baseUrl, $username, $password, &$storageHelper) {\n $this->base = $baseUrl;\n $this->username = $username;\n $this->password = $password;\n $this->storageHelper = $storageHelper;\n }", "public function __construct($url,$user,$password,$key,$api_version='V1'){\n $this->urlPath = $url;\n $this->apiUser = $user;\n $this->apiPassword = $password;\n\n\n if($key == \"\"){ \n $this->authenticate();\n } else{\n $this->apiKey = $key;\n }\n \n \n }", "public function __construct()\n {\n $this->client = new Client();\n $this->apiKey = Api::platform('TikApi')->first()->api_key;\n }", "public function init()\n {\n $this\n ->instantiateNewCacher()\n ->instantiateNewClient()\n ->authenticateClient()\n ->getUsers(\n $this->getAppParam('s.github.api.organization')\n )\n ->getRepositories(\n $this->getAppParam('s.github.api.organization')\n )\n ;\n }", "public function __construct()\n {\n //setup connection\n $this->api = new Connector();\n $this->api->setAuth(config('swimtimes.username'), config('swimtimes.password'));\n\n //setup style json file for fast calculation styles\n $this->createStylesJsonCache();\n }", "public function init()\n {\n $this->curl = (new Curl())->setOption(\n CURLOPT_HTTPHEADER, [\n 'Authorization: Basic ' . $this->apiKey,\n 'Content-Type: application/json'\n ]\n );\n }", "public function boot()\n {\n if (env('API_STORE_URL')) {\n Client::configure([\n 'store_url' => env('API_STORE_URL'),\n 'username' => env('API_USERNAME'),\n 'api_key' => env('API_KEY'),\n ]);\n }\n }", "public function __construct()\n {\n// $paypal_conf = \\Config::get('paypal');\n// $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n// $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct($base_url, $api_key, $secret_key)\n\t{\n\t\t$this->setBaseURL($base_url);\n\t\t$this->setAPIKey($api_key);\n\t\t$this->setSecretKey($secret_key);\n\t}", "final private function constructApiUrl()\r\n {\r\n\t\trequire_once 'bset.php';\r\n $this->apiUrl = 'https://api.telegram.org/bot' . BOT_TOKEN;\r\n }", "public function __construct( $api_key, $api_secret ){\n $this->api_key = $api_key;\n $this->api_secret = $api_secret;\n\n $this->service = new FmRestApi();\n }", "public function __construct($apiLogin, $apiPassword, $apiEndpoint = self::PRODUCTION_API_ENDPOINT, $additionalClientConfig = [])\n {\n $additionalClientConfig['base_uri'] = $apiEndpoint;\n\n $this->apiLogin = $apiLogin;\n $this->apiPassword = $apiPassword;\n $this->apiClient = new \\GuzzleHttp\\Client($additionalClientConfig);\n $this->machineFactory = new MachineFactory();\n $this->serializer = new Serializer();\n }", "public function __construct()\n {\n parent::__construct();\n CoinGate::config([\n 'app_id' => '5507',\n 'api_key' => '8aPuGKxTwVAr9ycZ3n2zvN',\n 'api_secret' => 'lgTBcsASv7a8QjxO1kC5nyHdI0qVJmeE',\n ]);\n }", "public function __construct()\n {\n //$this->cliente = new Client(['base_uri'=>'http://localhost:8002/api/']);\n $apiDireccion = config('api.ubicacion');\n $this->cliente = new Client(['base_uri'=>$apiDireccion]);\n\n }", "private function __construct() {\n\n $this->\n database = \\FluitoPHP\\Database\\Database::GetInstance();\n\n require_once( dirname(__FILE__) . DS . 'User.class.php' );\n\n $appConfig = \\FluitoPHP\\FluitoPHP::GetInstance()->\n GetConfig('AUTHENTICATION');\n\n $appConfig = $appConfig ? $appConfig : [];\n\n $moduleConfig = \\FluitoPHP\\FluitoPHP::GetInstance()->\n GetModuleConfig('AUTHENTICATION');\n\n $moduleConfig = $moduleConfig ? $moduleConfig : [];\n\n $appConfig = array_replace_recursive($appConfig, $moduleConfig);\n\n $this->\n UpdateConfig($appConfig);\n }", "public function __construct()\n {\n $this->_config = request('_config');\n }", "public function __construct()\n {\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "private function settings_api_init() {\r\n\t\tif ( ! isset( $this->hook_suffix ) )\r\n\t\t\treturn;\r\n\r\n\t\t// Infusion API settings\r\n\t\t$section = 'infusion-api';\r\n\t\tadd_settings_section(\r\n\t\t\t$section,\r\n\t\t\t__( 'Infusion API Settings', 'inf-member' ),\r\n\t\t\tarray( &$this, 'section_header' ),\r\n\t\t\t$this->hook_suffix\r\n\t\t);\r\n\r\n\t\tadd_settings_field(\r\n\t\t\t'inf_url',\r\n\t\t\t_x( 'Infusion API Service URL', 'inf-member' ),\r\n\t\t\tarray( &$this, 'display_inf_url' ),\r\n\t\t\t$this->hook_suffix,\r\n\t\t\t$section,\r\n\t\t\tarray( 'label_for' => 'inf_url' )\r\n\t\t);\r\n\t\tadd_settings_field(\r\n\t\t\t'inf_key',\r\n\t\t\t_x( 'Infusion API key', 'inf-member' ),\r\n\t\t\tarray( &$this, 'display_api_key' ),\r\n\t\t\t$this->hook_suffix,\r\n\t\t\t$section,\r\n\t\t\tarray( 'label_for' => 'inf_key' )\r\n\t\t);\r\n\r\n /*if(Inf_Member::app_credentials_exist())\r\n $this->db_install();*/\r\n\t}", "public function __construct()\n {\n $this->apiKey = Config::i()->getSXApiKey();\n }", "protected function initConfiguration()\n {\n $this->initJsonConfiguration();\n $this->initApiGatewayConfiguration('kyc_service/' . $this->requestPath, false);\n }", "public function __construct()\n {\n $this->setApiKey();\n $this->setRequestOptions();\n }", "public function __construct($config = 'rest') {\n parent::__construct($config);\n $this->load->model('Common_model');\n \n// set_error_handler([$this,'exceptions_error_handler']);\n $config_username = $this->config->item('username');\n $config_password = $this->config->item('password');\n /*if (!empty($config_username) && !empty($config_password)) {\n if ($config_username != $this->input->server('PHP_AUTH_USER') && $config_password != $this->input->server('PHP_AUTH_PW')) {\n $responseArr = array(\n 'status_code' => UNAUTHORIZED,\n 'status_message' => $this->lang->line('UNAUTH_CREDENTIAL')\n );\n $this->response($responseArr);\n }\n }*/\n }", "public function __construct()\n {\n $this->endpoint = config('foodcloud.endpoint');\n if ($this->endpoint[strlen($this->endpoint) - 1] == '/') {\n $this->endpoint = substr($this->endpoint, 0, strlen($this->endpoint) - 1);\n }\n $this->clientId = config('foodcloud.client_id');\n $this->clientSecret = config('foodcloud.client_secret');\n $this->grantType = config('foodcloud.grant_type');\n\n $this->curl = new cURL;\n }", "public function __construct()\n {\n // parent::__construct();\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n\t\t//print_r($paypal_conf);exit;\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => config('app.url'),\n ]);\n }", "public function __construct() {\n if (!$this->api) {\n $this->api = new Wrapper();\n }\n }", "public function __construct()\n {\n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public static function api() {\n return Injector::inst()->get(self::APIServiceName);\n }", "public function __construct() {\n # returns the base portal URL as defined in conf file\n $configServ = new config();\n $this->baseUrl = $configServ->getServerBaseUrl() . \"/gocdbpi\";\n $this->docsURL = $configServ->getWriteApiDocsUrl();\n\n #Define some generic exception messages (remaining ones will be generated once entity type and value are known)\n $this->genericExceptionMessages[\"URLFormat\"] =\n \"API requests should take the form $this->baseUrl\" .\n \"/APIVERSION/ENTITYTYPE/ENTITYID/ENTITYPROPERTY/[ENTITYPROPERTYKEY]. \" .\n \"For more details see: $this->docsURL\";\n }", "public function __construct()\n {\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n \n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n $this->apiKey = '66122f8ad1adb1c075c75aba3bd503a4a559fc7f';\n }", "public function __construct()\n {\n\n /** PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential(\n $paypal_conf['client_id'],\n $paypal_conf['secret'])\n );\n $this->_api_context->setConfig($paypal_conf['settings']);\n\n }", "public function __construct()\n {\n parent::setup();\n\n $this->client = new Client([\n \"base_uri\" => self::URL\n ]);\n }", "private function setBaseUrl()\n {\n $this->baseUrl = config('gladepay.endpoint');\n }", "public function __construct()\n {\n parent::__construct();\n\n /* setup base parameters for authentication */\n $this->baseParams = [\n 'ts' => date('Y-m-d H:i:s'), //timestamp\n 'apikey' => config('marvel.public_key'), //public key\n 'hash' => md5(date('Y-m-d H:i:s').config('marvel.private_key').config('marvel.public_key')), //md5 combination of ts, private key and public key\n ];\n }", "public function __construct()\n {\n parent::__construct();\n $this->client_id = Tool::config('client_id');\n $this->client_secret = Tool::config('client_secret');\n $this->redirect_uri = Tool::config('redirect_uri');\n $this->authorize_url = Tool::config('app_type', 'com') === 'com'\n ? Constants::AUTHORITY_URL.Constants::AUTHORIZE_ENDPOINT\n : Constants::AUTHORITY_URL_21V.Constants::AUTHORIZE_ENDPOINT_21V;\n $this->access_token_url = Tool::config('app_type', 'com') === 'com'\n ? Constants::AUTHORITY_URL.Constants::TOKEN_ENDPOINT\n : Constants::AUTHORITY_URL_21V.Constants::TOKEN_ENDPOINT_21V;\n $this->scopes = Constants::SCOPES;\n }", "public function setApiKey($apiKey);", "public function setApiKey($apiKey);", "public function __construct()\r\n {\r\n $paypal_conf = Config::get('paypal');\r\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\r\n $this->_api_context->setConfig($paypal_conf['settings']);\r\n }", "private function _initApiCommons()\n {\n // Disable debug information - Required to generate valid XML output\n //Configure::write('debug', 0);\n\n // Avoids render() call\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n // Instanciate Upload Module\n $this->uploadApi = new KwUploadAPI($this->apiSetup);\n }", "public function setApi($api);", "public function set_up() {\n\n\t\t$this::base_set_up();\n\t\tdo_action( 'rest_api_init' );\n\t\t$this->server = rest_get_server();\n\n\t}", "public function __construct()\n {\n $this->api_key = env('RAJAONGKIR_API_KEY');\n }", "function permly_api($api_key=''){\n\t\t$this->api_key = $api_key;\n\t\t$this->url = $this->api_server_protocol.\"://\".$this->api_server.\"/?remote_service=rs_external_api&key=1&interface=eai_permly&version=\".$this->api_version;\n\t}", "public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => config('sportmonks.api_url'),\n 'verify' => app('env') !== 'production' ? false : true,\n ]);\n\n $this->apiToken = config('sportmonks.api_token');\n\n if (empty($this->apiToken)) {\n throw new \\InvalidArgumentException('No API token set');\n }\n\n $this->timezone = !empty(config('sportmonks.timezone'))\n ? config('sportmonks.timezone')\n : config('app.timezone');\n\n $this->withoutData = !empty(config('sportmonks.skip_data'))\n ? config('sportmonks.skip_data')\n : false;\n }", "function __construct() {\n global $ENV;\n $this->base_url = 'https://api.twitter.com/';\n $this->consumer_key = $ENV['TWITTER_CONSUMER_KEY'];\n $this->consumer_secret = $ENV['TWITTER_CONSUMER_SECRET'];\n }", "protected function setBaseUrl()\n {\n $this->baseUrl = 'https://api.paystack.co';\n }", "public function __construct(Api $api)\n {\n $this->api = $api;\n }", "public function __construct(Api $api)\n {\n $this->api = $api;\n }", "public function __construct(Api $api)\n {\n $this->api = $api;\n }", "public function __construct($config = null)\n {\n $clientId = is_null($config)? ApiInfos::$CLIENT_ID: $config->getCLIENTID();\n $secret = is_null($config)? ApiInfos::$SECRET_ID: $config->getSECRETID();\n $this->setClientId($clientId);\n $this->setClientSecret($secret);\n $this->getTokenFromConsumerKey();\n }", "public function setApikey()\n {\n $this->apiKey = Config::get('leanpub.API_KEY');\n }", "public function __construct($apiKey, $apiSecret) {\r\n\t\t$this->apiKey = $apiKey;\r\n\t\t$this->apiSecret = $apiSecret;\r\n\t\t//$this->setStore ( $store );\r\n\t\tparent::__construct ( $app_key, $app_secret );\r\n\t}", "protected function initialize()\n {\n if ($this->get('serverData') === null) {\n $this->set('serverData', (array) $_SERVER);\n }\n\n if ($this->get('getData') === null) {\n $this->set('getData', (array) $_GET);\n }\n\n if ($this->get('postData') === null) {\n $this->set('postData', (array) $_POST);\n }\n\n if ($this->get('sessionData') === null && isset($_SESSION)) {\n $this->set('sessionData', (array) $_SESSION);\n }\n\n $serverData = $this->get('serverData');\n\n if (!$this->get('projectRoot')) {\n $projectRoot = isset($serverData['_']) ? $serverData['_'] : $serverData['DOCUMENT_ROOT'];\n $this->set('projectRoot', $projectRoot);\n }\n\n if (!$this->get('url')) {\n if (isset($serverData['REDIRECT_URL'])) {\n $this->set('url', $serverData['REDIRECT_URL']);\n } elseif (isset($serverData['SCRIPT_NAME'])) {\n $this->set('url', $serverData['SCRIPT_NAME']);\n }\n }\n\n if (!$this->get('hostname')) {\n $this->set('hostname', isset($serverData['HTTP_HOST']) ? $serverData['HTTP_HOST'] : 'No Host');\n }\n\n $protocol = $this->get('secure') ? 'https' : 'http';\n $endPoint = $this->get('apiEndPoint') ?: $protocol . '://' . $this->get('host') . $this->get('resource');\n $this->set('apiEndPoint', $endPoint);\n }", "public function __construct()\n {\n \tauth()->setDefaultDriver('api');\n $this->middleware('auth:api', ['except' => ['me','login','registration','refresh','logouttest']]);\n // $this->middleware('cors');\n }", "private function setBaseUrl()\n {\n if (config(\"redx.sandbox\") == true) {\n $this->baseUrl = \"https://sandbox.redx.com.bd\";\n } else {\n $this->baseUrl = \"https://openapi.redx.com.bd\";\n }\n }", "public function __construct()\n {\n /*if(config('paypal.settings.mode') == 'live'){\n $this->client_id = config('paypal.live_client_id');\n $this->secret = config('paypal.live_secret');\n } else {\n $this->client_id = config('paypal.sandbox_client_id');\n $this->secret = config('paypal.sandbox_secret');\n }\n\n // Set the Paypal API Context/Credentials\n $this->apiContext = new ApiContext(new OAuthTokenCredential($this->client_id, $this->secret));\n $this->apiContext->setConfig(config('paypal.settings'));\n */\n //parent::__construct();\n\n /** setup PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->apiContext = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->apiContext->setConfig($paypal_conf['settings']);\n }", "public function configureApiPaths();", "protected function _apiInstance()\n {\n return Thrive_Api_iContact::getInstance()->setConfig($this->getCredentials());\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->client = new Client([\n\t\t\t'base_url' => Config::get('laundromatic.base_url')\n\t\t]);\n\t}", "public function __construct()\n {\n if(config('paypal.settings.mode') == 'live'){\n $this->client_id = config('paypal.live_client_id');\n $this->secret = config('paypal.live_secret');\n //$this->plan_id = env('PAYPAL_LIVE_PLAN_ID', '');\n } else {\n $this->client_id = config('paypal.sandbox_client_id');\n $this->secret = config('paypal.sandbox_secret');\n //$this->plan_id = env('PAYPAL_SANDBOX_PLAN_ID', '');\n }\n \n // Set the Paypal API Context/Credentials\n $this->apiContext = new ApiContext(new OAuthTokenCredential($this->client_id, $this->secret));\n $this->apiContext->setConfig(config('paypal.settings'));\n }", "public function __construct() {\n $paypal_conf = Config::get('paypal_payment');\n $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n $this->_api_context->setConfig($paypal_conf['settings']);\n }", "public function __construct()\n {\n $this->API_TOKEN = env('API_TOKEN');\n// $this->API_TOKEN = '9876543210'; //TODO REMOVE THIS LINE AND REMOVE ABOVE COMMENT\n }", "public function init()\n {\n parent::init();\n $this->configureClient();\n }" ]
[ "0.6504976", "0.6481723", "0.6399881", "0.6364724", "0.6335331", "0.6289158", "0.6206001", "0.61973065", "0.61705023", "0.61604416", "0.6153451", "0.61224014", "0.6060661", "0.60532725", "0.6050033", "0.604965", "0.60434884", "0.601867", "0.6004347", "0.6003547", "0.60026115", "0.59945285", "0.5964111", "0.5963224", "0.5956337", "0.59388", "0.59388", "0.59360117", "0.5929229", "0.5925139", "0.5902895", "0.58965266", "0.5895662", "0.58885723", "0.5884001", "0.58824", "0.58717847", "0.586938", "0.584993", "0.58493936", "0.5843117", "0.582334", "0.5822148", "0.58209956", "0.5812934", "0.57908213", "0.5789309", "0.5787859", "0.5783612", "0.5776894", "0.57741857", "0.5768936", "0.5767441", "0.57641387", "0.5760692", "0.5746969", "0.5742982", "0.57362014", "0.5735384", "0.57294214", "0.57106334", "0.57052827", "0.5703764", "0.5702952", "0.5693159", "0.5693159", "0.5683972", "0.5678281", "0.5676335", "0.5675827", "0.56688654", "0.5663939", "0.56587934", "0.56587934", "0.5648748", "0.56438977", "0.5642845", "0.56375927", "0.56368315", "0.5625644", "0.5624081", "0.5622773", "0.5621729", "0.5618382", "0.5618382", "0.5618382", "0.56064117", "0.5602217", "0.55914694", "0.5587934", "0.55875224", "0.55873376", "0.5581859", "0.5571216", "0.556385", "0.5559188", "0.5558338", "0.55480856", "0.5547706", "0.55464226" ]
0.6126822
11
sets the debug flag
public function setDebug($state = TRUE) { $this->debug = $state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setdebug($d = true){\n\t\t$this->debug = $d;\n\t}", "function setDebug($debug = true)\n {\n $this->_debug = $debug;\n }", "function set_debug($debug)\n\t{\n\t\t$this->debug = $debug;\n\t}", "public function setDebug(bool $debug);", "function setDebug($debug_mode=true)\n {\n $this->debug = $debug_mode;\n }", "function debugOn()\n\t{\n\t\t$this->bDebug = true;\n\t}", "public function enableDebug() : void\n {\n $this->debug = TRUE;\n }", "public function setDebug($debug)\n\t{\n\t\t$this->_debug = $debug;\n\t}", "function turnOnDebugMode()\n {\n $this->debugmode = true;\n }", "public function enableDebug() {}", "public function setDebug($debug)\n {\n $this->debug = $debug;\n }", "public function enableDebug();", "function setDebugMode($debug) {\r\n $this->_templateObject->setDebugMode($debug);\r\n }", "public function enableDebugMode() {}", "static public function setDebug($on=false){\n \tif (self::$_is_debug != (bool) $on){\n \t\tself::$_is_debug = (bool) $on;\n \t\tself::regenerate();\n \t}\n }", "public function EnableDebug()\n {\n $this->_debug = true;\n return;\n }", "abstract public function setDebugOptions($debug_opt);", "public function setDebugMode( $enable=false );", "function setDebugMode($debug_mode)\n\t{\n\t\t$this->debug_mode = $debug_mode;\n\t}", "public function setDebug($debug)\n {\n $this->apiDebug = $debug ? true : false;\n }", "public function setDebug($bool)\n {\n $this->client->setDebug((int)$bool);\n }", "public function setDebug($debug){\n\t\tCoreType::assertBool($debug);\n\t\t$this->_debug = $debug;\n\t\tif($debug==true){\n\t\t\t$this->_connect();\n\t\t\t$this->_db->setDebug($this->_debug);\n\t\t}\n\t}", "public function setDebugMode( $enable=false )\n\t{\n \t$this->obj['debug'] = intval($enable);\n \n \t//-----------------------------------------\n \t// If debug, no shutdown....\n \t//-----------------------------------------\n \t\n \tif ( $this->obj['debug'] )\n \t{\n \t\t$this->obj['use_shutdown'] = 0;\n \t}\n\t}", "public function enableDebug($value)\n {\n $this->debug = $value ? true: false;\n }", "public function setDebug($status) {\n \n $this->_debug = $status;\n }", "public function setDebug($value)\n {\n $this->provider->isDebug = $value;\n }", "protected function setDebug()\n {\n $this->_debug = (null != $this->_config->system->debug)\n && (true == $this->_config->system->debug);\n if ($this->_debug) {\n error_reporting(E_ALL | E_STRICT);\n ini_set('display_errors', true);\n ini_set('display_startup_errors', true);\n ini_set('html_errors', true);\n }\n Zend_Registry::set('debug', $this->_debug);\n }", "public function enableDebug($bool = true)\n {\n $this->_debug = $bool;\n }", "public function setDebugMode($debug_mode = 0) {\n $this->debug_mode = $debug_mode;\n }", "private function setDebugger()\n {\n $this->client\n ->getEmitter()\n ->attach(new LogSubscriber($this->debugLogger, Formatter::DEBUG));\n }", "public function debug($enable){\n $this->_debug = $enable;\n }", "function setDebug(){\n if(isset($_GET['debug']) && $_GET['debug']==\"true\"){\n return true;\n }\n return false;\n }", "public function SetDebug() {\n\t\t$this->SetType(Debugger::DEBUG);\n\t\treturn $this;\n\t}", "public function SetDebug($bln) {\n $this->blnDebug = (bool)$bln;\n $this->objDb->blnDebug = (bool)$bln;\n }", "function debug($status = array())\n {\n $this->debug = $status;\n }", "protected function setDebugOptions($flag)\n {\n $this->debug = true;\n switch ($flag) {\n case 'output':\n $this->debugToOutput = true;\n break;\n case 'devlog':\n $this->debugToDevLog = true;\n break;\n case 'both':\n $this->debugToOutput = true;\n $this->debugToDevLog = true;\n break;\n\n // Turn off all debugging if no valid value was entered\n default:\n $this->debug = false;\n $this->debugToOutput = false;\n $this->debugToDevLog = false;\n }\n }", "public function setDebugMode($debugMode) {\n $this->debugMode = $debugMode;\n }", "function setDebug( $level )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"setDebug( $level )\\n\";\r\n\t\t$this->debug = $level;\r\n\t}", "public function debug(bool $enable): void {\n $this->_debug = $enable;\n }", "public static function setDebug($debug) {\n\n\t\t// Need to recreate the instace.\n\t\tstatic::$instance = null;\n\t\tstatic::$debug = $debug;\n\t}", "function enableDebug($debug = true, $html = false) {\n $this->debug = $debug;\n $this->htmldebug = $html;\n }", "public function get_debug_flag()\n {\n }", "public static function setDebugMode($debugMode)\n {\n self::$debugMode = $debugMode;\n }", "function debugOff()\n\t{\n\t\t$this->bDebug = false;\n\t}", "function setDebug($debug)\r\n\t{\r\n\t\t$this->debugging = $debug;\r\n\t\treturn $this;\r\n\t}", "public function debug()\n {\n add_settings_field(\n 'debug',\n apply_filters($this->plugin_name . 'label-debug', esc_html__('Debug', $this->plugin_name)),\n [$this->builder, 'checkbox'],\n $this->plugin_name,\n $this->plugin_name . '-library',\n [\n 'description' => 'Enable debug at the bottom of your security.txt file & this page.',\n 'id' => 'debug',\n 'class' => 'hide-when-disabled',\n 'value' => isset($this->options['debug']) ? $this->options['debug'] : false,\n ]\n );\n }", "public function debug( $debug = null ) {\n\t\treturn wfSetBit( $this->mFlags, DBO_DEBUG, $debug );\n\t}", "function disableDebug($value = true) {\n\t\t$GLOBALS['amfphp']['disableDebug'] = $value;\n\t}", "public function setDebug($val) \n {\n $this->debug = $val;\n $this->client->setDebug($val);\n return $this;\n }", "public function disableDebug() {}", "public function debugMode($debug) {\n if ((bool)$debug === TRUE) {\n // Debug output via drush_print can only be turned on if we are in\n // a drush call\n if (function_exists('drush_print') && function_exists('drush_get_option')) {\n $this->debug = $debug;\n }\n }\n return $this->debug;\n }", "public function isDebug()\n {\n }", "protected function checkDebugOption() {\n global $argv;\n \n if (!empty($argv[1]) && $argv[1] === 'debug') {\n $this->setDebug(true);\n }\n else {\n $this->setDebug(false);\n }\n }", "public function setDebug($debug = false)\n {\n $this->_debug = (bool)$debug;\n return $this;\n }", "public function debugMode($debug) {\n if (is_bool(($debug))) {\n if ($debug) {\n // Debug output via drush_print can only be turned on if we are in\n // a drush call\n if (function_exists('drush_print') && function_exists('drush_get_option')) {\n $this->debug = $debug;\n }\n }\n }\n return $this->debug;\n }", "public function setDevMode($set=TRUE)\r\n\t{\r\n\t\t$this->_devMode = (bool) $set;\r\n\t}", "public static function debug() : bool\n {\n }", "public function isDebug();", "public function isDebug();", "public function setDebugLevel($level = 0)\n {\n $this->do_debug = $level;\n }", "function turnOffDebugMode()\n {\n $this->debugmode = false;\n }", "public function SetDebugFn($fn)\n {\n $this->debugFn = $fn;\n }", "public function disableDebug();", "public function debug();", "public function debug();", "public function __debug($environment = '')\n {\n $this->__HANDLER(true, $environment);\n }", "public function setDebug($enable_debugging) {\r\n\t\tif ( !is_bool($enable_debugging) ) {\r\n\t\t\tthrow new InvalidArgumentException(\r\n\t\t\t\t'Oara_Network::setDebug only accepts boolean values. '.\r\n\t\t\t\t'Input was:'. var_export($enable_debugging, true)\r\n\t\t\t);\r\n\t\t}\r\n\t\t$this->_debug = $enable_debugging;\r\n\t}", "public function setDebug($debug)\n {\n $this->debug = (bool)$debug;\n\n return $this;\n }", "public static function error_debug(bool $debug = true)\n\t{\n\t\tif ($debug == true) {\n\t\t\terror_reporting(E_ALL);\n\t\t\tini_set('display_errors', 1);\n\t\t} else {\n\t\t\terror_reporting(0);\n\t\t\tini_set('display_errors', 0);\n\t\t}\n\t}", "function _debug($message) {\n if ($debug = TRUE) {\n _log($message);\n } \n}", "public function enableLogging() {\n $this->debug = true;\n }", "public function setDebug($debug) {\n\t\t$this->debug = $debug;\n\t\treturn $this;\n\t}", "public function enableDebug($bool = false) {\r\n if (!is_bool($bool)) {\r\n $this->setError(self::$NQT_BOOLEAN_EXPECTED);\r\n return false;\r\n }\r\n $this->debug = $bool;\r\n }", "public function debug($var){\n\t\tif ($this->env['debug'] !== false){\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($var);\n\t\t\techo \"</pre>\";\n\t\t}\n\t}", "public function debug($level)\n {\n $this->debug = (int) ($level);\n }", "public function __construct($debug = false)\n {\n $this->_debug = $debug;\n }", "function emDebug() {\n if ($this->getSystemSetting('enable-system-debug-logging') || ( !empty($_GET['pid']) && $this->getProjectSetting('enable-project-debug-logging'))) {\n $emLogger = \\ExternalModules\\ExternalModules::getModuleInstance('em_logger');\n $emLogger->emLog($this->PREFIX, func_get_args(), \"DEBUG\");\n }\n }", "function setDebugSwitch($switch, $onoff = true)\n {\n if ($onoff == true) {\n $this->_debugSwitches[\"$switch\"] = true;\n }else {\n unset($this->_debugSwitches[\"$switch\"]);\n }\n }", "protected function debug($string){\n \t$this->_msg($string, Messages::DEBUG);\n }", "public function debug(bool $debug = null)\n {\n if (null === $debug) {\n return !!$this->debug;\n }\n\n $this->debug = $debug;\n return $this;\n }", "public function display_option_debug() {\n $debug = (bool) $this->options['debug'];\n $this->display_checkbox_field('debug', $debug);\n }", "public function __construct($debug)\n {\n $this->debug = $debug;\n }", "protected function _debug()\n {\n $file = self::DEFAULT_LOG_FILE;\n Mage::getModel('core/log_adapter', $file)->log($this->_debugData);\n }", "public function debug($state = TRUE)\n {\n if($state) error_reporting(E_ALL);\n else error_reporting(0);\n }", "public function debug_enable() {\n\t\t$this->debug_enabled = true;\n\n\t\treturn $this;\n\t}", "public function testIsDebugMode()\n {\n $oControl = $this->getProxyClass(\"oxShopControl\");\n $oConfigFile = oxRegistry::get('oxConfigFile');\n\n $oConfigFile->iDebug = -1;\n $this->assertTrue($oControl->UNITisDebugMode());\n\n $oConfigFile->iDebug = 0;\n $this->assertFalse($oControl->UNITisDebugMode());\n }", "public function debug($state = TRUE)\n {\n if($state)\n error_reporting(E_ALL);\n else\n error_reporting(0);\n }", "public function setDebugOptions($debug_opt)\n\t{\n\t\t$debug_map = array(\n\t\t\tDEBUG_RUN_CASHLINE\t=> OLPBlackbox_DebugConf::PREV_CUSTOMER,\n\t\t\tDEBUG_RUN_USEDINFO\t=> OLPBlackbox_DebugConf::USED_INFO,\n\t\t\tDEBUG_RUN_DATAX_IDV\t=> OLPBlackbox_DebugConf::DATAX_IDV,\n\t\t\tDEBUG_RUN_DATAX_PERF=> OLPBlackbox_DebugConf::DATAX_PERF,\n\t\t\tDEBUG_RUN_RULES\t\t=> OLPBlackbox_DebugConf::RULES,\n\t\t\tDEBUG_RUN_STATS => OLPBlackbox_DebugConf::LIMITS,\n\t\t\tDEBUG_RUN_ABA\t\t=> OLPBlackbox_DebugConf::ABA,\n\t\t\tDEBUG_RUN_FILTERS\t=> OLPBlackbox_DebugConf::FILTERS,\n\t\t\t'fraud_scan'\t\t=> OLPBlackbox_DebugConf::FRAUD_SCAN,\n\t\t\t'no_checks'\t\t\t=> OLPBlackbox_DebugConf::NO_CHECKS,\n\n\t\t\t// @todo This should not be set in the _debug_ configuration...\n\t\t\tDEBUG_RUN_PREACT_CHECK => OLPBlackbox_DebugConf::PREACT_CHECK,\n\t\t);\n\n\t\tforeach ($debug_opt as $option => $value)\n\t\t{\n\t\t\tif (isset($debug_map[$option]))\n\t\t\t{\n\t\t\t\t$this->debug->setFlag($debug_map[$option], $value);\n\t\t\t}\n\t\t}\n\t}", "public function setDebugMode(bool $debugMode) : self\n {\n $this->initialized['debugMode'] = true;\n $this->debugMode = $debugMode;\n return $this;\n }", "function debugger(){\n $debug = 1;\n if($debug === 1) {\n header(\"Content-Type: text/html; charset=utf-8\");\n error_reporting(E_ALL);\n ini_set('display_errors', 1);\n }else{\n error_reporting( 0 );\n }\n}", "public function setDebug($debug = false): self {\n\t\t$this->request->setDebug($debug);\n\n\t\treturn $this;\n\t}", "public function enableDebug()\n {\n $this->_debug_mode = true;\n return $this;\n }", "public function isDebugMode() {\n return $this->options['debug'];\n }", "public function enableExtJsDebug() {}", "function Debug($debug, $msg = \"Debugging\"){\n\tif(ENV == PRODUCTION && (!isset($_GET['debug'])) ){\n\t\treturn;\n\t}\n\n\techo '<pre class=\"debug\">';\n\techo '<h2>'.$msg.'</h2>';\n\tprint_r($debug);\n\techo '</pre>';\n}", "public function isDebug()\n {\n return $this->debug;\n }", "public function isDebug()\n {\n return $this->debug;\n }", "public static function debug()\n {\n return self::getBool('DEBUG');\n }", "public function isDebug()\n {\n return $this->_debug_mode;\n }", "public function dev($dev=true)\n {\n\n if($dev) {\n\n $this->dev = true;\n\n }\n\n }" ]
[ "0.855661", "0.8401014", "0.8389107", "0.83871984", "0.8373796", "0.8272425", "0.8155399", "0.80374587", "0.7990239", "0.79883343", "0.79821414", "0.79192", "0.791335", "0.79080373", "0.7900672", "0.7801722", "0.7786787", "0.7776636", "0.77192795", "0.7658485", "0.76349807", "0.7631088", "0.7600447", "0.75978416", "0.7590566", "0.75679344", "0.7544884", "0.7544132", "0.75275314", "0.7436869", "0.74351895", "0.7369118", "0.7364456", "0.7360105", "0.7311828", "0.72988033", "0.72757584", "0.72345525", "0.72331667", "0.7226321", "0.7200432", "0.71939105", "0.7139101", "0.7125695", "0.71145314", "0.70879716", "0.7073813", "0.7042634", "0.7041653", "0.69823927", "0.69610363", "0.69576657", "0.6930994", "0.69160163", "0.690881", "0.68746346", "0.68652725", "0.68622124", "0.68622124", "0.68475026", "0.68300027", "0.67552406", "0.6730387", "0.6728293", "0.6728293", "0.67066276", "0.6695757", "0.6692539", "0.6686868", "0.66817117", "0.66468024", "0.66089576", "0.6599916", "0.6592736", "0.6575216", "0.6570417", "0.6566824", "0.656135", "0.6557835", "0.65547544", "0.6536035", "0.6528978", "0.6524887", "0.64805865", "0.64798784", "0.64751023", "0.64711696", "0.64659834", "0.6416197", "0.64123976", "0.6409799", "0.6386572", "0.6373595", "0.63657457", "0.63505477", "0.6328074", "0.6328074", "0.632021", "0.6309358", "0.6300349" ]
0.80430114
7
fetches the data from the API endpoint
public function loadData($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $this->baseUrl . $url); curl_setopt($ch, CURLOPT_USERPWD, $this->username . ':' . $this->password); @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); if ($this->debug) { echo "Fetch: " . $url; } $result = curl_exec($ch); curl_close($ch); if ($this->debug) { echo "Fetch-Result: " . $result; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchData()\n {\n // TODO Build URI and add PARAMS, METHODS, API TOKEN etc...\n // TODO Handle POST, GET requests using curl\n // TODO Authentication\n $path = $this->endpoint;\n return json_decode(file_get_contents($path, true));\n }", "public function getApiData();", "public function fetch() {}", "public function apiFetch( $limit, $offset );", "public function fetch()\n {\n// $client = new \\GuzzleHttp\\Client();\n\n $url = $this->provider->getUrl();\n\n// if (empty($url)) {\n// throw new \\InvalidArgumentException('Provider \"url\" must be specified.');\n// }\n\n// $response = $client->get($url);\n\n $result = $response->getBody();\n\n// try {\n// $response = $client->get($url);\n//\n// $result = $response->getBody();\n// } catch (ClientException | RequestException $e) {\n// // TODO: handle exception, log, mail etc...\n// return [];\n// }\n\n $result = json_decode($result, true);\n\n return $this->provider->transform($result);\n }", "abstract public function fetchData();", "abstract public function fetchData();", "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }", "public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}", "private function getData(){\n if($this->type == \"auto\"){\n \n \n $result = $this->get_from_link( self::AUTO_STRING.http_build_query($this->data));\n $array_names = json_decode($result, true); \n //var_dump($array_names); \n if(!isset($array_names)){\n $this->serverSideError(); \n }\n $ans = array(); \n \n foreach($array_names[\"predictions\"] as $key => $value){\n array_push($ans, $value[\"description\"]); \n }\n \n $response['status_code_header'] = 'HTTP/1.1 200 OK'; \n $response['body'] = json_encode($ans); \n \n return $response; \n }\n\n else if($this->type == \"geocode\"){\n \n\n //echo() $this->data); \n $result = $this->get_from_link( self::GEOCODE_STRING.http_build_query($this->data));\n // echo $result; \n $array = json_decode($result, true); \n if(!isset($array)){\n $this->serverSideError(); \n }\n \n $response['status_code_header'] = 'HTTP/1.1 200 OK'; \n $response['body'] = json_encode( $array[\"results\"][0][\"geometry\"][\"location\"]); \n \n return $response; \n }\n }", "public function callApi()\n {\n // Call URL\n $fetchUsers = $this->requestUsingCurl($this->url);\n \n if (!$fetchUsers) {\n return false;\n }\n // Get Data in array format\n $this->users = json_decode($fetchUsers, true);\n }", "private function getData()\n {\n if (!$this->dataLoaded) {\n $this->refreshData();\n $this->dataLoaded = true;\n }\n }", "protected function fetchData() {\n \t$token = 'ocjQhgorjZophCNgLLljABZUscFULJFh';\n \t$url = 'http://www.ncdc.noaa.gov/cdo-web/api/v2/data';\n\n \tApp::uses('HttpSocket', 'Network/Http');\n \t$HttpSocket = new HttpSocket();\n\n \t// set token in the headers\n $options = array(\n\t\t\t'header' => array(\n\t\t\t 'token' => $token\n\t\t\t)\n\t\t);\n \t// send the request\n \t$response = $HttpSocket->get($url, array('datasetid' => 'GHCND',\n \t\t 'stationid' => 'GHCND:USW00023234',\n \t\t 'startdate' => '2014-01-01',\n \t\t 'enddate' => '2014-01-17',\n \t\t 'offset' => 0,\n \t\t 'limit' => 1000), $options);\n\n \tif( $response->isOk() ) {\n \t\t\n \t\t$dataIN = json_decode( $response->body(), true );\n\t\t\t$my_arr = array();\n\t\t\tforeach ($dataIN['results'] as $data) {\n\t\t\t foreach ($data as $key => $value) {\n\t\t\t if($key === \"datatype\" && $value === \"TMIN\" || $value === \"TMAX\") {\n\t\t\t $my_arr[$data['date']][$value] = $data['value']; \n\t\t\t }\n\t\t\t \n\t\t\t }\n\t\t\t}\n \t\t\n \t\t// save data to DB\n\t\t\tif ($this->Reading->save($my_arr)) {\n\t\t\t\t$this->Session->setFlash(__('The reading has been saved.'));\n\t\t\t\treturn $this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The reading could not be saved. Please, try again.'));\n\t\t\t}\n\n // clean up\n \t\tunset($dataIN);\n \t\tunset($my_arr);\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "private function get_data_from_API()\n {\n\n //call the API\n $apikey = \"9rCPJKFYcpWLM0XxhhBkGQ\";\n $url = \"https://www.golfgenius.com/api_v2/\" . $apikey . \"/events\";\n\n //Save the contents of the GET request\n $content = file_get_contents($url);\n\n //dump the results of the api call into an array\n $array = json_decode($content, true);\n return $array;\n }", "public function retrieveData() {\n return $this->fetch();\n }", "public function fetch(){\n\n if(request()->id){\n $datas = Property::where('id',request()->id)->get();\n }else{\n $datas = Property::all();\n }\n \n /** Creates a collection instance */\n $result = collect();\n\n /** Looping thru the [datas] */\n foreach($datas as $data){\n\n /** Pushing [data] into collection instance [result] */\n $result->push([\n 'id' => $data->id,\n 'name' => $data->name,\n 'estate' => $data->estate,\n 'price' => $data->price,\n 'keypoints' => $data->keypoints,\n 'facts' => $data->facts,\n 'amenities' => $data->amenities,\n ]);\n }\n\n /** Returns a response object */\n return response()->json(['message' => $result]);\n }", "public function all()\n {\n // set the url\n $url = self::$apiUrl . self::$servicePoint;\n\n // get a raw response\n self::$rawData = self::apiCall($url, '', array('headers' => array('Accept: ' . self::$httpAccept), 'options' => $this->getOptions()));\n\n // decode it and set php native rough data....\n if (self::$httpAccept == 'application/xml') {\n self::$data = simplexml_load_string(self::$rawData);\n } elseif (self::$httpAccept == 'application/json') {\n self::$data = json_decode(self::$rawData);\n }\n\n $data = self::getData();\n\n if (is_object($data) && property_exists($data, 'context')) {\n $context = (array)$data->context;\n } else {\n $context = null;\n }\n\n $model = self::$model;\n $class = 'MIMAS\\\\Service\\Jorum\\\\' . strtoupper(substr($model, 0, 1)) . substr($model, 1);\n\n $data = array();\n\n foreach (self::getData()->$model as $i => $object) {\n $data[] = new $class((array)$object);\n }\n\n $ret = new \\MIMAS\\Service\\DataCollection($data, $context);\n\n return ($ret);\n }", "public function get_data();", "public function fetch() {\n\t\t\treturn $this->run(\"fetch\");\n\t\t}", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "private function GET() {\n global $_GET;\n $getData = array();\n foreach($_GET as $key => $value) {\n $getData[$key] = $value;\n }\n $this -> response[\"response\"] = $getData;\n return;\n }", "public function obat_get()\n\t{\n\t\t$data = $this->Obat->getAllObat();\n\t\tif ($data) {\n\t\t\t$this->response($data,200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'error'=>false,\n\t\t\t\t'message'=>'Obat kosong'\n\t\t\t],200);\n\t\t}\n\t}", "public function get_data() {\n $rv = [\n 'standard' => [],\n 'counties' => []\n ];\n // echo 'url: '. $this->url;\n if ($this->is_remote($this->url)) {\n // Remote fetch\n // echo 'is remote';\n if ($this->user && $this->passwd) {\n // echo 'user:'.$this->user;\n $auth = base64_encode($this->user . \":\" . $this->passwd);\n $context = stream_context_create(['http' => ['header' => \"Authorization: Basic $auth\"]]);\n // $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n $data_standards = file($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n // echo '$data_standards: '. $data_standards;\n // $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n $data_counties = file($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n // echo '$data_counties: '. $data_counties;\n }\n else {\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n }\n else {\n // Local files\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n // $rv['standard'] = $this->read_standards_file($data_standards);\n // $rv['counties'] = $this->read_counties_file($data_counties, $data_standards);\n\n // return $rv;\n\n $standards_and_committees = $this->read_standards_file($data_standards);\n // var_dump($standards_and_committees[0]);\n $listings = $this->read_counties_file($data_counties, $standards_and_committees[0], $standards_and_committees);\n $listings['committees'] = $standards_and_committees[1];\n return $listings;\n }", "protected function obtainData()\n\t{\n\t\t$this->obtainDataReferences();\n\t\t$this->obtainDataOrders();\n\t}", "public function fromAPI($data);", "public function index()\n {\n $cacheKey = class_basename($this);\n\n if (\\Cache::has($cacheKey)) {\n $data = \\Cache::get($cacheKey);\n } else {\n $data = $this->provider->fetchData();\n \\Cache::put($cacheKey, $data, $this->cacheExpirationMinutes);\n }\n\n return \\Response::api($data);\n }", "protected function fetchData() {\n try {\n $uri = $this->config('uri');\n $response = $this->getContentFromUri($uri);\n }\n catch (\\Exception $e) {\n $this->messenger()->addError('Unable to read JSON');\n $this->logger->error($this->t('Error reading JSON file :error',\n [':error' => $e->getMessage()]));\n $response = NULL;\n }\n\n $data = '{}';\n\n if ($response) {\n if (!$this->dvfHelpers->validateJson($response)) {\n $this->messenger()->addError('Invalid JSON file provided');\n $this->logger->error($this->t('Unable to parse this json file :url',\n [':url' => $uri]));\n }\n $data = $response;\n }\n\n return $data;\n }", "public function get()\n\t{\n\t\t$response = $this->client->sendRequest(sprintf(self::ENDPOINT_PATH, null, null), Client::METHOD_GET);\n\t\t$dataCollector = new DataCollector($this->client, $response);\n\t\treturn $dataCollector->getData();\n\t}", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken()\n\t\t\t\t\t\t. \"&filterType=\" . $this->filterType . \"&filterValues=\" . $this::csvString($this->filterValues);\n\t\t\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->nextPageToken;\n\t\t}\n\t\tif(isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\t\n\t\t//debug\n\t\t//echo '<p>url after = ' . $url . '</p>';\n\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "function queryElections() {\n $data = file_get_contents(sprintf(ELECTIONS_API, API_KEY));\n return $data;\n}", "private function collectData()\n {\n // Decode the API data\n $data = $this->callApi();\n\n // Convert the data to JSON\n // - We could return the response()->json($data) here\n // But instead I am converting to JSON to create an Array compatible with the Resource / Transformer / collections\n $json = json_encode($data);\n\n // And convert the JSON to an array for the Resource / Fractal Transformer\n $array = json_decode($json, true);\n\n // This could also be done in one line using:\n // $array = json_decode(json_encode($xml), true);\n // But it was easier as individual lines for improved commenting\n\n $this->data = collect(FloatRatesResource::collection($array[\"item\"])->resolve());\n }", "public function fetch_all_users_get(){\n\n header(\"Access-Controll-Allow-Origin: *\");\n\n $data = $this->Users_Model->fetch_all_users();\n\n $this->response($data);\n\n }", "public function fetch(Request $request)\n {\n /* Fetch user */\n $this->user = \\Auth::user();\n\n /* Set default filter/search param */\n $this->setParameters($request);\n\n\n /* Query */\n $idps = $this->fetchQuery($this->where, $this->sort);\n\n\n /* Do the pagination */\n $pagination = $idps ? $idps->paginate(10) : array_merge($idps, ['data' => []]);\n\n return response()->json([\n 'lists' => $pagination,\n ]);\n }", "public function fetchData()\n {\n if (null === $this->data) {\n $adaptable = $this->getAdaptable();\n if ($adaptable instanceof \\ArrayObject) {\n $this->data = $adaptable->getArrayCopy();\n } else {\n $this->data = (array) $adaptable;\n }\n\n $page = $this->getPageNumber() - 1;\n $limit = $this->getItemsPerPage();\n $this->data = array_splice($this->data, $page * $limit, $limit);\n }\n }", "function callTwitterApi()\n{\n\t// code for retrieve data from Twitter\n\treturn twitterData;\n}", "private function _fetch($params)\n {\n $params['apikey'] = $this->api_key;\n $data = $this->fetchget($params);\n\n if (!$data) {\n print_r($this->error);\n die();\n }\n // Convert result to our standard result array\n\n switch($this->method) {\n\n case \"search\":\n // echo \"Formatting search results\";\n // Currently search only returns one result\n $result=[\"result\" => []];\n\n foreach ($data->Search as $movie) {\n $result[\"results\"][] = [\n \"title\" => $movie->Title,\n \"year\" => $movie->Year,\n \"image\" => $movie->Poster,\n \"imdbID\" => $movie->imdbID,\n \"provider\" => \"omdb\"\n ];\n }\n\n break;\n\n case \"get\":\n $result = [\n \"title\" => $data->Title,\n \"year\" => $data->Year,\n \"image\" => $data->Poster,\n \"imdbID\" => $data->imdbID,\n \"plot\" => $data->Plot,\n \"provider\" => \"omdb\"\n ];\n break;\n\n }\n return json_encode($result);\n }", "public function fetchData() {\n \n $this->readMainDomain($this->base . \"/userdata/main\");\n $main[$this->mainDomain] = $this->mainDomain;\n\n $this->readAddOnDomains($this->base . \"/addons\");\n $this->readParkedDomains($this->base . \"/pds\");\n $this->readSubDomains($this->base . \"/sds2\");\n\n $this->allDomains = array_merge($this->addOnDomains, $this->subDomains);\n $this->allDomains = array_merge($this->allDomains, $this->parkedDomains);\n $this->allDomains = array_merge($this->allDomains, $main);\n\n $this->readMail($this->base . \"/homedir/.cpanel/email_accounts.yaml\");\n\n $this->readMySQL();\n $this->readUserConfig();\n $this->readHomeDir();\n }", "public function fetch()\n {\n $response = $this->responseToArray(\n $this->request($this->baseUrl.\"/latest.json?\".http_build_query($this->queryParameters())\n ));\n\n if (isset($response['error'])) {\n $this->handleErrors($response);\n }\n\n if (isset($response['rates'])) {\n $updatedAt = (new DateTime)->setTimestamp($response['timestamp']);\n\n return collect($response['rates'])->mapWithKeys(function ($rate, $currencyCode) use ($updatedAt) {\n return $this->formatRate($currencyCode, $rate, $updatedAt);\n })->except($this->defaultCurrency)->all();\n }\n\n throw ConnectionFailedException::source($this->name());\n }", "public function getResponseData();", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "private function fetch() {\n\t\treturn $this->storage = $this->connection->fetch($this->request);\n\t}", "abstract public function fetch();", "abstract public function fetch();", "public function api()\n {\n $postData = $this->request->post;\n $getData = $this->request->get;\n\n $action = explode('/', $getData['route']);\n $action = array_pop($action);\n\n $data = [\n 'post' => $postData,\n 'get' => $getData\n ];\n\n $verb = strtolower($_SERVER['REQUEST_METHOD']);\n\n $api = new Api($data, $verb, $this);\n $result = $api->{$action}();\n\n $this->sendResponse($result);\n }", "function apiGetCokeData()\n\t{\n\t\t$data = $this->model->dbGetData();\n\t\techo json_encode($data);\n\t}", "protected function getApiResult()\n {\n return Singleton::class('ZN\\Services\\Restful')->get($this->address);\n }", "public function get_all_items_by_api()\n {\n\n $data = array('token' =>'ayaolwan');//'type' => 'fees_category');\n $data_string = json_encode($data);\n $curl = curl_init(base_url() . 'webServices/Itemapi');\n\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string))\n );\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);\n\n $result = json_decode(curl_exec($curl), true);\n curl_close($curl);\n\n if ($result['status'])\n {\n echo json_encode($result['itemsList']);\n }\n\n\n }", "public function gatherData() {\r\n\t\t$this->resource->gatherData();\r\n\t}", "public function get()\n {\n return $this->apiCall('get', '', [], ['auto-fill' => true]);\n }", "public function get()\n {\n return $this->apiCall('get', '', [], ['auto-fill' => true]);\n }", "public function get()\n {\n return $this->apiCall('get', '', [], ['auto-fill' => true]);\n }", "public function offers_get()\n\t{\n $token = $_SERVER['HTTP_TOKEN'];\n $data = array(\n 'status' => 0,\n 'code' => -1,\n 'msg' => 'Bad Request',\n 'data' => null\n );\n if($this->checkToken($token))\n {\n $offers = $this->Api_model->getOffers();\n if (isset($offers)) {\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => $offers\n );\n }else{\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => null\n );\n }\n }else\n {\n $data['msg'] = 'Request Unknown or Bad Request';\n }\n $this->response($data, REST_Controller::HTTP_OK);\n\t}", "public function index()\n {\n $client = new Client(['base_uri' => 'http://127.0.0.1:8000/api/skorpoint']);\n $request = $client->request('GET');\n // $response = json_decode($request->getBody());\n // echo $response[0]->id;\n $response = $request->getBody();\n return $response;\n }", "public function allrecord_get() { \n $result = $this->Api_model->selectData('info', 'id, name, email');\n if($result == null)\n $this->set_response(array('response_code'=>400,'response_message'=>'No Data Found','response_data'=>array()), REST_Controller::HTTP_OK);\n else\n $this->set_response(array('response_code'=>200,'response_message'=>'Success','response_data'=>$result), REST_Controller::HTTP_OK);\n }", "public function get_data()\n {\n\n\n }", "function fetch() {\n //require_once ('library/simplepie_1.3.1.compiled.php');\n //include SimplePie 1.3\n try {\n $feed_data = new \\SimplePie();\n\n // Set which feed to process.\n $feed_data->set_feed_url($this->feeds);\n $feed_data->set_cache_location('library/cache');\n // Run SimplePie.\n $feed_data->init();\n\n // This makes sure that the content is sent to the browser as text/html and the UTF-8 character set (since we didn't change it).\n $feed_data->handle_content_type();\n $this->feed_data = $feed_data;\n return $feed_data;\n } catch (\\Exception $e) {\n throw new \\Exception('Error with the feed', 0, $e);\n }\n }", "abstract function getdata();", "public static function getData()\r\n {\r\n $nrShow=$_GET['show'] ?? self::$nrShow;\r\n $json = file_get_contents(self::$endpoint.\"?show=$nrShow\");\r\n if (!$json)\r\n throw new Exception(\"Cannot access \".self::$endpoint);\r\n return json_decode($json, true);\r\n }", "public function fetchData()\n {\n $invoice = InvoiceAppointment::leftjoin('appointments as appt','appt.id','invoice_appointment.detail_id')\n ->leftjoin('appointment_status as appt_stat','appt_stat.appt_id','invoice_appointment.detail_id')\n ->where(fn($query) => $query\n ->where( 'appt.name', 'like', '%' . $this->search . '%')\n ->orWhere('invoice_appointment.total', 'like', '%' . $this->search . '%')\n )\n ->orderBy($this->sortBy, $this->sortDirection)\n ->paginate($this->perPage);\n $this->invappt = $invoice;\n\n /*For notifications*/\n $appoint = Appointment::leftjoin('appointment_status as apts','apts.appt_id','appointments.id')\n ->where('apts.status','Pending')\n ->latest()->get();\n $this->appt = $appoint;\n }", "public function index()\n {\n //\n return response([ 'data' => HouseholdDetailResource::collection(HouseholdDetail::all()), 'message' => 'Retrieved successfully'], 200);\n\n }", "public function get_data_by_id()\n {\n $token = $this->getAuthHeader();\n $data = $this->request->getJSON();\n $ret_data = [];\n\n //init data\n $id = isset( $data->id ) ? $data->id : -1;\n\n $result = $this->_checkToken( $token );\n\n if ( !isset( $result ) ) {\n $dataDB['status'] = \"error\";\n $dataDB['message'] = $this->db->error()['message'];\n $dataDB['data'] = \"\";\n\n return $this->respond( $dataDB, TOKEN_NOT_FOUND );\n }\n\n $db_data = $this->_getCurrentData($id);\n\n if ( $this->db->error()['message'] !== '' ) {\n $dataDB['status'] = \"error\";\n $dataDB['message'] = $this->db->error()['message'];\n $dataDB['data'] = \"\";\n\n return $this->respond( $dataDB, 200 );\n }\n\n if ( !empty($db_data) ) {\n $ret_data[] = $this->_mappingData($db_data);\n $ret_data[] = $this->_mappingData($db_data);\n }\n \n\n $dataDB['status'] = \"success\";\n $dataDB['message'] = \"\";\n $dataDB['data'] = $ret_data;\n\n return $this->respond( $dataDB, 200 );\n }", "private function callApi(){\n $endpoint = sprintf( self::$ENDPOINT, $this->category );\n\n // call URL and get contents\n $content = file_get_contents($endpoint);\n\n // Check if Backend API has failed to return a successul response\n if($content===FALSE){\n throw new Exception(\"Backend service failed to return a response. Possibly throttling our request.\");\n }\n\n // Parse JSON response\n $response = json_decode($content, true);\n\n // Return just the quote\n $quote = $response['contents']['quotes'][0];\n $quote['requested_category'] = $this->category;\n if(!$quote['id']){\n $quote['id'] = substr( md5($str), 0, 32); // just a unique id if missing\n }\n\n return $quote;\n }", "public function apiList();", "public function find_all()\n {\n\n try {\n $this->response = $this->http_client->request('GET',\n \"http://{$_SERVER['REMOTE_ADDR']}:9091/api/file/all.php\",\n [\n 'verify' => false\n ]);\n $this->status_code = $this->response->getStatusCode();\n return json_decode($this->response->getBody());\n\n } catch (Exception $e) {\n // echo \"Exception: \" . $e;\n }\n\n }", "function rest_get_data($url)\n{\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "public function getFetch()\n {\n return $this->get(self::_FETCH);\n }", "public function getApi();", "public function getApi();", "public function getApi();", "public function fetchFeed() {\n $r = '';\n if($this->ID != '' && $this->count > 0) {\n $c = curl_init(); \n curl_setopt_array($c, array( \n CURLOPT_URL => 'http://api.twitter.com/1/statuses/user_timeline/' . $this->ID . '.json?count=' . $this->Count, \n CURLOPT_HEADER => false, \n CURLOPT_TIMEOUT => 10, \n CURLOPT_RETURNTRANSFER => true \n )); \n $r = curl_exec($c); \n curl_close($c); \n }\n /* return JSON as array */\n return (!!$r ? json_decode($r, true) : false); \n }", "public function all(){\n \t\t$response = $this->curl->get( $this->api_url, [ \n\t\t\t'access_token' => $this->token\n\t\t]);\n\n \t\tif( $response->success ){\n \t\t\t$products = [];\n\t\t\tforeach ($response->products as $product) {\n\t \t\t\t$tmp = new Product( $this );\n\t \t\t\t$tmp->fetch($product);\n\t \t\t\t$products[] = $tmp;\n\n\t \t\t\treturn $products;\n\t \t\t}//foreach\n \t\t}//if\n \t\telse{\n \t\t\t// Throw error according to status\n \t\t}//else\n\n \t}", "public function getData() {}", "public function get($apiQuery, $options = array());", "public function fetch(): array\n {\n }", "function getProducts() {\n\techo \"Getting Products </br>\";\n\t$response = getRequest('/api/product');\n\tprintInfo($response);\n}", "public function index_get() {\n $action = $this->get('action');\n switch ($action) {\n case \"retrieve_get\":\n $this->retrieve_get();\n break;\n default:\n $this->not_found();\n break;\n }\n }", "public function exchangeRate() {\n try{\n $client = new GuzzleHttp\\Client(['base_uri' => 'https://api.exchangeratesapi.io/']);\n // Latest endpoint \n $response = $client->request('GET', 'latest');\n $statusCode = $response->getStatusCode();\n if($statusCode == 200) {\n // Get body of the response and stringify\n $body = (string)$response->getBody();\n // Parse json to ApiResponse Object\n $apiResponse = new ApiResponse($body);\n // Print associative response to console\n print_r($apiResponse);\n }\n }catch(Exception $e){\n echo $e;\n }\n\n }", "public function Individualgetdata();", "private function fetchResource() {\n\t\t$ch = curl_init();\n\t\tif ((php_sapi_name() != 'cli')) {\n\t\t\tcurl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (compatible; ' . TITLE . '/' . HOST . ')');\n\t\t}\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s\n\t\t$this->content = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\t$this->httpCode = $info['http_code'];\n\t\t$this->contentType = $info['content_type'];\n\t\t\n\t\tif (((int) $this->httpCode) >= 400) {\n\t\t\tthrow new Exception('STATUS CODE: ' . $this->httpCode);\n\t\t}\n\t}", "abstract function do_api_request();", "public function get_data()\n {\n return $this->retrieve('SELECT * FROM isys_import LIMIT 1000;');\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "abstract function getPairsFromAPI();", "public function index()\n {\n $client = new Client();\n $kirim = $client->get(env('API_URL').'/rangkumannilai');\n return $kirim->getBody(); \n }", "public function fetch()\n {\n $response = $this->responseToArray(\n $this->request($this->baseUrl.\"/latest?\".http_build_query($this->queryParameters())\n ));\n\n if (isset($response['error']['code'])) {\n $this->handleErrors($response);\n }\n\n if (isset($response['success']) && $response['success']) {\n return collect($response['rates'])->mapWithKeys(function ($rate, $currencyCode) {\n return $this->formatRate($currencyCode, $rate);\n })->except($this->defaultCurrency)->all();\n }\n\n throw ConnectionFailedException::source($this->name());\n }", "function getData()\r\n {\r\n //if POST or PUT get the data wiht file_get_contents\r\n if ($this->request === \"POST\" || $this->request === \"PUT\") {\r\n $this->preCleanData = JSON_decode(file_get_contents(\"php://input\"));\r\n //else get the ID from $_get\r\n } else if ($this->request === \"GET\" || $this->request === \"DELETE\") {\r\n if (isset($_GET['ID'])) {\r\n $this->data = $_GET['ID'];\r\n return;\r\n } else {\r\n return;\r\n }\r\n }\r\n $this->cleanData();\r\n }", "public function DataGet_get()\n {\n $username = $this->get('username');\n $password = $this->get('password');\n \n\t\tif(empty($username) || empty($password))\n\t\t{\t\t\t\n\t\t\t$this->response( [\n 'status' => RestController::HTTP_NOT_FOUND,\n 'message' => 'Please Enter All Fields.'\n ], RestController::HTTP_NOT_FOUND );\n }\n else\n {\n $username = $this->input->get('username');\n $password = $this->input->get('password');\n //call Model Function .... \n $this->response( [\n 'status' => RestController::HTTP_OK,\n 'message' => 'Data Get Successfully.'\n ], RestController::HTTP_OK ); \n }\n }", "function data() {\n $result = $this->fetcher->get($this->url);\n\n if ($result->getStatusCode() == 200) {\n $xml = new SimpleXMLElement($result->getBody());\n\n // WorkflowMax API's standard for error reporting\n if((string)$xml->Status !== 'OK') {\n throw new \\LogicException((string)$xml->ErrorDescription);\n }\n\n $array = json_decode(json_encode($xml), true);\n\n if($this->dataProcessor) {\n $dp = $this->dataProcessor;\n $array = $dp($array);\n }\n\n return $array;\n }\n\n throw new \\LogicException('URL returned status code ' . $result->getStatusCode());\n }" ]
[ "0.7797532", "0.728505", "0.67601794", "0.6755052", "0.67540455", "0.67309076", "0.67309076", "0.66648084", "0.6647892", "0.6549433", "0.64197814", "0.6382438", "0.6378382", "0.6319769", "0.63093436", "0.6299207", "0.62731326", "0.62642336", "0.62640995", "0.6175659", "0.61568046", "0.61568046", "0.61568046", "0.61568046", "0.61568046", "0.61568046", "0.61568046", "0.61568046", "0.61568046", "0.6135188", "0.6135188", "0.6135188", "0.6133518", "0.6129243", "0.6116773", "0.61160856", "0.61158866", "0.6101548", "0.6086368", "0.60829574", "0.6033962", "0.6032294", "0.60184026", "0.59917337", "0.59896576", "0.5982724", "0.5979497", "0.59500474", "0.5938142", "0.59373754", "0.5932223", "0.5931444", "0.5928649", "0.58905464", "0.58872604", "0.58872604", "0.58748984", "0.58744067", "0.5872534", "0.5870408", "0.58608794", "0.5859045", "0.5859045", "0.5859045", "0.58525056", "0.58517605", "0.5851633", "0.58446515", "0.584345", "0.5837437", "0.58217025", "0.5812807", "0.5809142", "0.5803426", "0.58014446", "0.58006227", "0.5787427", "0.5787065", "0.5783652", "0.57820517", "0.57820517", "0.57820517", "0.5772264", "0.576654", "0.5764789", "0.5763132", "0.5756129", "0.5753743", "0.575078", "0.57442194", "0.57397527", "0.57390636", "0.5737339", "0.57355684", "0.57353723", "0.5731933", "0.57305163", "0.5714451", "0.5708271", "0.5704003", "0.56979674" ]
0.0
-1
returns the API response as a SimpleXMLElement
public function getData($url) { return simplexml_load_string($this->loadData($url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXMLResponse() {\n return \\Lib\\Format::forge($this->_response)->to_xml();\n }", "private function getAPIResponse() {\n $query = self::$BASE_URL . $this->city . \",\" . $this->country . self::$KEY . self::$MODE . self::$UNITS;\n $file_content = file_get_contents($query);\n\n return ($file_content[0] != '<') ? null : new SimpleXMLElement($file_content);\n }", "public function getXmlResponse();", "public function xml()\n {\n try\n {\n if (! $this->decoded) {\n $this->response = json_encode(simplexml_load_string($this->response));\n\n $this->json();\n }\n }\n catch (\\Exception $exception){\n $this->decoded = [];\n }\n\n return $this->decoded;\n }", "public function toXml()\n {\n return $this->response->asXML();\n }", "public function getResponseXML()\n\t{\n\t\treturn $this->response_xml;\n\t}", "private function xml() {\n if( $this->format === 'text/hal+xml' ) {\n header('Content-Type: text/hal+xml; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\XmlWriter(true);\n \n return $writer->execute($hal_response);\n } else {\n header('Content-Type: text/xml; charset=utf-8', TRUE, $this->status);\n $xml_data = new \\SimpleXMLElement('<?xml version=\"1.0\"?><data></data>');\n static::array_to_xml($this->content,$xml_data);\n \n return $xml_data->asXML();\n }\n \n }", "protected function fetchData(): SimpleXMLElement\n {\n $response = @simplexml_load_file($this->getApiUrl());\n\n throw_if(\n false === $response,\n XmlParseErrorException::class,\n sprintf('Error parsing file (\"%s\") on line (%s) : %s',\n @libxml_get_last_error()->file,\n @libxml_get_last_error()->line,\n @libxml_get_last_error()->message\n )\n );\n\n return $response;\n }", "public function getResponseXML()\n\t{\n\t\treturn $this->responseXML;\n\t}", "protected function parseResponseToXML($response)\n {\n return simplexml_load_string($response->getBody()->getContents());\n }", "function _getXMLResponse($sResponse) {\n if (extension_loaded('simplexml')) { // If simplexml is available, we can do more stuff!\n $oDOM = new DOMDocument;\n $oDOM->loadXML($sResponse);\n $sXML = simplexml_import_dom($oDOM);\n $sXMLLayout = 'http://www.shrinktheweb.com/doc/stwresponse.xsd';\n\n // Pull response codes from XML feed\n $aThumbnail = (array)$sXML->children($sXMLLayout)->Response->ThumbnailResult->Thumbnail;\n $aResponse['thumbnail'] = $aThumbnail[0];\n $aResponse['stw_action'] = $aThumbnail[1];\n $aResponse['stw_response_status'] = $sXML->children($sXMLLayout)->Response->ResponseStatus->StatusCode; // HTTP Response Code\n $aResponse['stw_response_code'] = $sXML->children($sXMLLayout)->Response->ResponseCode->StatusCode; // STW Error Response\n $aResponse['stw_last_captured'] = $sXML->children($sXMLLayout)->Response->ResponseTimestamp->StatusCode; // Last Captured\n $aResponse['stw_quota_remaining'] = $sXML->children($sXMLLayout)->Response->Quota_Remaining->StatusCode; // New Reqs left for today\n $aResponse['stw_bandwidth_remaining'] = $sXML->children($sXMLLayout)->Response->Bandwidth_Remaining->StatusCode; // New Reqs left for today\n $aResponse['stw_category_code'] = $sXML->children($sXMLLayout)->Response->CategoryCode->StatusCode; // Not yet implemented\n } else {\n\t // LEGACY SUPPPORT\n $aResponse['stw_response_status'] = _getLegacyResponse('ResponseStatus', $sRemoteData);\n $aResponse['stw_response_code'] = _getLegacyResponse('ResponseCode', $sRemoteData);\n\n // check remaining quota\n $aResponse['stw_quota_remaining'] = _getLegacyResponse('Quota_Remaining', $sRemoteData);\n // check remaining bandwidth\n $aResponse['stw_bandwidth_remaining'] = _getLegacyResponse('Bandwidth_Remaining', $sRemoteData);\n\n // get thumbnail and status\n $aThumbnail = $this->_getThumbnailStatus($sRemoteData);\n $aResponse = array_merge($aResponse, $aThumbnail);\n }\n \n if ($aResponse['stw_action'] == 'delivered') {\n $aResponse['exists'] = true;\n } else {\n $aResponse['exists'] = false;\n }\n\n if ($aResponse['stw_action'] == 'fix_and_retry') {\n $aResponse['problem'] = true;\n } else {\n $aResponse['problem'] = false;\n }\n\n if ($aResponse['stw_action'] == 'noretry') {\n $aResponse['error'] = true;\n } else {\n $aResponse['error'] = false;\n }\n\n // if we use the advanced api for free account we get an invalid request\n if ($aResponse['stw_response_code'] == 'INVALID_REQUEST') {\n $aResponse['invalid'] = true;\n } else {\n $aResponse['invalid'] = false;\n }\n\t\t\n\t\t// if our domain or IP is not listed in the account's \"Allowed Referrers\" AND \"Lock to Account\" is enabled, then we get this error\n if ($aResponse['stw_response_code'] == 'LOCK_TO_ACCOUNT') {\n $aResponse['locked'] = true;\n } else {\n $aResponse['locked'] = false;\n }\n\n return $aResponse;\n }", "function parse_response($response)\n {\n $data = $response->getBody();\n\n // Note we could not use Guzzle XML method becuase Endicia does not return valid XML it seems\n $sxe = new SimpleXMLElement($data);\n\n if ($sxe->status == 0) {\n $return_data = array();\n $return_data['Status'] = (string)$sxe->Status;\n $return_data['Base64LabelImage'] = (string)$sxe->Base64LabelImage;\n $return_data['TrackingNumber'] = (string)$sxe->TrackingNumber;\n $return_data['FinalPostage'] = (string)$sxe->FinalPostage;\n $return_data['TransactionID'] = (string)$sxe->TransactionID;\n $return_data['PostmarkDate'] = (string)$sxe->PostmarkDate;\n $return_data['DeliveryTimeDays'] = (string)$sxe->PostagePrice->DeliveryTimeDays;\n\t $return_data['error'] = (string)$data;\n \n\t\treturn $return_data;\n } else {\n return array('status' => 'error', 'message' => $sxe);\n }\n }", "abstract function parse_api_response();", "private function callApi()\n {\n // Get the XML from the FloatRates URL\n return simplexml_load_file($this->url);\n }", "public function data(): SimpleXMLElement\n {\n return $this->data;\n }", "public function get_xml()\n\t{\n\t\treturn @file_get_contents(\"http://whatpulse.org/api/user.php?UserID=\" . $this->user_id);\n\t}", "private function formatXml($response)\n {\n libxml_use_internal_errors(true);\n if (false === simplexml_load_string($response)) {\n return $response;\n }\n\n $domxml = new DOMDocument('1.0');\n $domxml->preserveWhiteSpace = false;\n $domxml->formatOutput = true;\n /* @var $xml SimpleXMLElement */\n $domxml->loadXML($response);\n return $domxml->saveXML();\n }", "public function getResponse() {}", "public function getResponse() {}", "protected function handleResponse($response)\n {\n if($this->response_type === 'json')\n return json_decode($response->getBody(), true);\n\n return simplexml_load_string($response->getBody());\n }", "public function convertResponse2XML($response)\n {\n /* Split the articles if the message is news. */\n $msgType = ucfirst($response->msgType);\n if($msgType == 'News') \n {\n $articles = $response->articles;\n unset($response->articles);\n }\n\n /* Join other fields. */\n $xml = \"<xml>\\n\";\n foreach($response as $key => $value)\n {\n $key = ucfirst($key);\n if($key == 'MediaId') $xml .= \"<$msgType><$key><![CDATA[$value]]></$key></$msgType>\";\n if($key != 'MediaId') $xml .= \"<$key><![CDATA[$value]]></$key>\\n\";\n }\n if(!isset($articles)) return $xml . '</xml>';\n\n /* Join articles. */\n $xml .= '<ArticleCount>' . count($articles) . \"</ArticleCount>\\n<Articles>\\n\";\n foreach($articles as $article)\n {\n $xml .= \"<item>\\n\";\n foreach($article as $key => $value)\n {\n $key = ucfirst($key);\n $xml .= \"<$key><![CDATA[$value]]></$key>\\n\";\n }\n $xml .= \"</item>\\n\";\n }\n $xml .= \"</Articles>\\n</xml>\";\n return $xml;\n }", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function merchant()\n {\n $this->setHeader(self::HEADER_TYPE_BEARER);\n $link = Rakuten::BASE_API_URL.'/'.self::API_NAME_ADVERTISER_SEARCH.'/'.self::API_VERSION;\n\n\n $curl = new Curl;\n $response = $curl->get($link, '', $this->getHeader());\n\n $xmlData = new SimpleXMLElement(XMLHelper::tidy($response));\n\n return $xmlData;\n }", "public function getResponse(){\n switch($this->format){\n case 'json':\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n case 'xml':\n $this->response_type = 'text/xml';\n return $this -> getXML();\n break;\n default:\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n }\n }", "public function toResponse()\n {\n $base = ['return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, 'return_msg' => $this->fail];\n $attributes = array_merge($base, $this->attributes);\n if ($this->sign) {\n $attributes['sign'] = Support\\generate_sign($attributes, $this->app->getKey());\n }\n return new Response(XML::build($attributes));\n }", "public function response() {\n return json_decode($this->response);\n }", "public function getInnerResponse();", "public function testXML() {\n $result = ApiResponse::xml()\n ->code(200)\n ->status('OK!')\n ->addProperty('extrastatus', 'ok')\n ->addProperty('extra', '')\n ->removeProperty('extra')\n ->output();\n $this->assertXmlStringEqualsXmlString($this->expected_xml, $result);\n }", "public function getResponse()\n {\n // TODO: Implement getResponse() method.\n }", "public function &fetchXML($url) {\r\n\t\tif(!$this->isOAuthAuthenticated()) {\r\n\t\t\t$res = $this->performAuth();\r\n\t\t\treturn $res;\r\n\t\t}\r\n\t\t$data = $this->signedRequest($url);\r\n\t\tif(substr($data, 0, 5) !== ('<'.'?xml')) {\r\n\t\t\tthrow new Exception(\"Response was not XML\");\r\n\t\t}\r\n\t\t$xml = simplexml_load_string($data);\r\n\t\treturn $xml;\r\n\t}", "function icedrive_response_to_array($response)\r\n {\r\n libxml_use_internal_errors(true);\r\n $xml = simplexml_load_string(str_replace(':', '', $response));\r\n $xml = json_encode($xml);\r\n $xml = json_decode($xml, true);\r\n return $xml;\r\n }", "private function response_xml($array) {\n require_once 'array2xml.php';\n try {\n// header(\"Content-type: text/xml\");\n $xml = new array2xml('my_node');\n $xml->createNode($array);\n return $xml;\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "public function getXml() {}", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }", "public function getResponse() {\n }", "public function XMLResult2Object()\n {\n\n\n if(!empty($this->_xml_retorno) > 0){\n libxml_use_internal_errors(true);\n $xml = simplexml_load_string(strtr($this->_xml_retorno, array(' xmlns:'=>' ')),NULL,NULL,\"http://schemas.xmlsoap.org/soap/envelope/\");\n if(!isset($xml->xpath)){\n $xml =simplexml_load_string(strtr($this->_xml_retorno, array(' xmlns:'=>' ')));\n }\n\n if(is_object($xml)){\n $xml->registerXPathNamespace('S', 'http://schemas.xmlsoap.org/soap/envelope/');\n $xml->registerXPathNamespace('ns0', 'http://br.com.getnet.ecommerce.ws.service');\n $xpath = $xml->xpath('//result');\n if(empty($xpath)){ # caso seja um erro não tratavel\n $xpath = $xml->xpath('//*');\n }\n return $xpath;\n }else{\n $this->_errors = $this->setError(101,'Falha ao receber os dados do servidor da GETNET','Resposta inválida do servidor da GETNET.');\n return false;\n }\n }else{\n $this->_errors = $this->setError(101,'Falha ao receber os dados do servidor da GETNET','Tente novamente em alguns segundos.');\n return false;\n }\n }", "public function getSerializeResponse() {\n return \\Lib\\Format::forge($this->_response)->to_serialized();\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }" ]
[ "0.77478886", "0.7627048", "0.74298906", "0.73872524", "0.70658976", "0.68162", "0.6789199", "0.66722625", "0.6571372", "0.65704113", "0.6308135", "0.6195296", "0.6194465", "0.6164092", "0.6055205", "0.605195", "0.60026884", "0.5999238", "0.5999238", "0.5998738", "0.5991593", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.5959928", "0.59504664", "0.59477264", "0.5937404", "0.5922831", "0.591795", "0.5912334", "0.58667934", "0.5855484", "0.58510196", "0.58508414", "0.5829287", "0.5819465", "0.5818344", "0.5808232", "0.5785904", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106", "0.57803106" ]
0.0
-1
fetches a list of realty objects
public function getList($params = array(), $filter = array(), $orderby = NULL, $ordertype = 'asc', $offset = 0, $limit = 0) { if (is_array($filter)) { foreach ($filter as $key => $value) { if (is_array($value)) { foreach ($value as $key1 => $value1) { $params[] = 'filter[' . $key . '][]=' . $value1; } } else { $params[] = 'filter[' . $key . ']=' . $value; } } } if ($orderby) { $params[] = 'orderby=' . $orderby; } $params[] = 'ordertype=' . $ordertype; if ($offset) { $params[] = 'offset=' . $offset; } if ($limit) { $params[] = 'limit=' . $limit; } try { return new SimpleXMLElement($this->loadData('/objekt/list?' . implode('&', $params))); } catch (Exception $e) { $msg = sprintf('%s. Please check the filter query parameters. Additionally, you should check the filter defaults in your TypoScript setup! Current filter string: %s', $e->getMessage(), implode('&', $params) ); throw new Tx_Extbase_Exception($msg, $e->getCode()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchList();", "public abstract function fetchAllObjects();", "public abstract function getObjects();", "function listObjects();", "protected abstract function fetchLists();", "abstract public function getList();", "function sthFetchObjects($sth) {\r\n\t$out = array();\r\n\twhile($o = $sth->fetchObject()) {\r\n\t\t$out[] = $o;\r\n\t}\r\n\treturn $out;\r\n}", "public abstract function fetchAll();", "function getAllObjects($instance, $sortBy='', $ascending=true, $limit='')\n{\n\t//eval('$instance = new '.$objectName.'();');\n\t//$instanceId = strtolower(get_class($instance)).\"Id\";\n\t//return $instance->GetList(array(array($instanceId, \">\", \"0\")));\n\treturn \t$instance->GetList(array(array(true)), $sortBy, $ascending, $limit);\n\t\n\t\n}", "public function fetchAll()\n {\n $objectArray = [];\n while($fetchedObject = $this->fetch())\n {\n $objectArray[] = $fetchedObject;\n }\n\n return $objectArray;\n }", "public function getList();", "public function getList();", "public function fetchObject();", "public function fetchObject();", "public function retrieveAllList()\n {\n if ($list = $this->memcache->get('API::' . $this->numInstance . '::referentiel')) {\n return json_decode($list, true);\n } else {\n $list = $this->refIdRepository->findAllAsArray();\n $this->memcache->set(\n 'API::' . $this->numInstance . '::referentiel',\n json_encode($list),\n 0,\n 86400\n );\n return $list;\n }\n }", "public function getList()\n\t{\n\t\treturn $this->crud->orderby('id DESC')\n\t\t\t\t\t->read(10)\n\t\t;\t\n\t}", "public abstract function getObjects():?object ;", "abstract protected function doFetchAll();", "public abstract function fetchObject();", "public function all(){\n \t\t$response = $this->curl->get( $this->api_url, [ \n\t\t\t'access_token' => $this->token\n\t\t]);\n\n \t\tif( $response->success ){\n \t\t\t$products = [];\n\t\t\tforeach ($response->products as $product) {\n\t \t\t\t$tmp = new Product( $this );\n\t \t\t\t$tmp->fetch($product);\n\t \t\t\t$products[] = $tmp;\n\n\t \t\t\treturn $products;\n\t \t\t}//foreach\n \t\t}//if\n \t\telse{\n \t\t\t// Throw error according to status\n \t\t}//else\n\n \t}", "function loadObjectlist($query){\n\t\t$rows\t= array();\n\t\t$result = mysql_query($query);\n\t\tif($result){\n\t\t\twhile( $row = mysql_fetch_object($result) ){\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $rows;\n\t}", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public abstract function FetchObject();", "protected function getRemoteObjects()\n {\n $query = $this->getRemoteObjectsQuery();\n $items = iterator_to_array($this->task->query($query));\n return new ArrayList($items);\n }", "public function fetchAllForBase3();", "function fetchList($limit, $offset);", "public function fetch_objects($query);", "public function getList(): linkedList\n {\n\n $this->initialize();\n return $this->objManager->getList($this->objType);\n\n }", "function asListObject($result)\n {\n $lista = array();\n while ($linha = $result->fetch(PDO::FETCH_OBJ)) {\n $lista[] = $this->asObject($linha);\n }\n return $lista;\n }", "public function callRealtyList(array $params = array())\n {\n return $this->call('objekt/list', $params);\n }", "public function getList(){\r\n $listArticles =[]; ///on creer une liste vide ou ont mettra tous les articles\r\n\r\n\r\n //prepare une requete de type select\r\n $sql='SELECT * FROM articles';\r\n $req = $this->bdd->prepare($sql);\r\n\r\n//////execution de la requete avec attribution des valeurs\r\n$req->execute();\r\n\r\n/////on stocke les données obtenues dans un tableau\r\nwhile ($donnees = $req->fetch(PDO::FETCH_ASSOC)){///tant que il y a des article alors on boucle\r\n ////on cree des objets avec les données issue de la bdd\r\n $articles = new articles();\r\n $articles->hydrate($donnees);\r\n $listArticles[] = $articles;\r\n}\r\n///print_r2($listArticles)\r\nreturn $listArticles;\r\n\r\n}", "function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}", "public function fetch(){\n $qry = $this->db->query(\"SELECT * FROM \".$this->tbl_specialOffers);\n $array = array();\n while($r = $qry->fetch_assoc()){\n $array[] = new ArrToObj($r) ;\n }\n if(count($array) > 0){\n return $array;\n }else{\n return null ;\n }\n }", "function list_all() {\n $ssql = \"select nombre from TBL_FRONTS where estado=\" . I_ACTIVE;\n $this->DBobj->loadRS($ssql);\n if (!$this->DBobj->noEmpty)\n return null;\n $i = 0;\n $list = array();\n while ($idV = $this->DBobj->get_vector()) {\n $list[$i] = $this->objsCache->get_object(get_class(), $idV[0]);\n $i++;\n }\n return $list;\n }", "public function get_all ();", "public function fetchAll()\n {\n }", "public function list();", "public function list();", "public function list();", "public function all() {\r\n\t\t$objects = []\r\n\t\twhile($this->hasNext()) {\r\n\t\t\t$next = $this->next();\r\n\t\t\tif($next == FALSE) break;\r\n\t\t\t$objects->push($next);\r\n\t\t}", "function FetchObj() {}", "abstract public function getList($first = -1, $limit = -1);", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function getList()\n {\n }", "public function fetch_object()\n\t{\n\t\t$object = null;\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $key => $value) {\n\t\t\t\t$object->$key = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$object = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $object;\n\t}", "public function fetchAll() {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "abstract public function getAll();", "abstract public function getAll();", "abstract public function getAll();", "public static function fetch_all($params) {}", "public function listAll();", "public function listAll();", "public abstract function getAll();", "function getObjects() {\n return $this->objects;\n }", "public function getObjects()\n {\n return $this->objects;\n }", "function fetch_object_array($resource) {\n $result = array();\n if ($this->num_rows($resource) > 0) {\n while($row_obj = mysql_fetch_object($resource)) {\n array_push($result, $row_obj);\n }\n }\n\n return $result;\n }", "function fetchAll($var){\n //Create an array variable to hold list of search records\n $result_array = array();\n\n //create an instance of the product class\n $object = new API();\n\n //run the search product method\n $records = $object->fetchOne($var);\n\n //check if the method worked\n if ($records) {\n\n while ($one_record = $object->db_fetch()) {\n\n //Assign each result to the array\n $result_array[] = $one_record;\n }\n }\n //return the array\n return $result_array;\n}", "public function fetchAll()\r\n {\r\n \t// get from mem if available\r\n \t$memcache = new \\Memcached();\r\n \t$memcache->addServer('localhost', 11211);\r\n \t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n \t$cache_data = $memcache->get($key);\r\n \tif ($cache_data) {\r\n \t\t$this->log->addInfo('cache hit', array(\"key\" => $key));\r\n \t\t$this->data = $cache_data;\r\n \t} else {\r\n\t\t\t$this->data = $this->client->catalogProductList($this->sessionid);\r\n\t\t\t$memcache->set($key, $this->data, 60*1);\r\n \t}\r\n }", "abstract public function fetch();", "abstract public function fetch();", "function retrieveAll ()\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'MtnPriceListComponent mplc' )\n ->innerJoin ( 'mplc.MtnComponent mc' )\n ->innerJoin ( 'mplc.MtnPriceList mpl' );\n\n\n return $q->execute ();\n }", "function listAll() \r\n {\r\n \r\n //new PDOAgent\r\n $p = new PDOAgent(\"mysql\", DB_USER, DB_PASS, DB_HOST, DB_NAME);\r\n\r\n //Connect to the Database\r\n $p->connect();\r\n\r\n //Setup the Bind Parameters\r\n $bindParams = [];\r\n\r\n //Get the results of the insert query (rows inserted)\r\n $results = $p->query(\"SELECT * FROM Coaches;\", $bindParams);\r\n\r\n //Disconnect from the database\r\n $p->disconnect();\r\n \r\n //Return the objects\r\n return $results;\r\n\r\n }", "public function all()\n {\n // set the url\n $url = self::$apiUrl . self::$servicePoint;\n\n // get a raw response\n self::$rawData = self::apiCall($url, '', array('headers' => array('Accept: ' . self::$httpAccept), 'options' => $this->getOptions()));\n\n // decode it and set php native rough data....\n if (self::$httpAccept == 'application/xml') {\n self::$data = simplexml_load_string(self::$rawData);\n } elseif (self::$httpAccept == 'application/json') {\n self::$data = json_decode(self::$rawData);\n }\n\n $data = self::getData();\n\n if (is_object($data) && property_exists($data, 'context')) {\n $context = (array)$data->context;\n } else {\n $context = null;\n }\n\n $model = self::$model;\n $class = 'MIMAS\\\\Service\\Jorum\\\\' . strtoupper(substr($model, 0, 1)) . substr($model, 1);\n\n $data = array();\n\n foreach (self::getData()->$model as $i => $object) {\n $data[] = new $class((array)$object);\n }\n\n $ret = new \\MIMAS\\Service\\DataCollection($data, $context);\n\n return ($ret);\n }", "function all() {\n\t\t$results = array();\n\t\twhile ($result = $this->fetch())\n\t\t\t$results[] = $result;\n\t\treturn $results;\n\t}", "public function fetch_all(){\n $data = array();\n while( ($obj = oci_fetch_object($this->result)) != false ){\n $data[] = $obj;\n }\n return $data;\n }", "public final function get_all()\n {\n }", "public function getList() {\n\t\treturn $this->find('list', array(\n\t\t\t'contain' => false,\n\t\t\t'cache' => $this->alias . '::' . __FUNCTION__\n\t\t));\n\t}", "public function getAll()\n {\n $resultSet = $this->oMapper->getAll();\n\n $className = get_class($this);\n\n// $return = array();\n $dto = new EntityDTO($this->oDb, $this->oLogger);\n foreach ($resultSet as $key => $row) {\n $obj = new $className($dto);\n $obj->fillByObject($row);\n\n $this->aCollection[] = $obj;\n }\n unset($resultSet);\n\n return $this->aCollection;\n }", "public static function listOfObjectsByRank() {\n\t\t/*\n\t\t * Holds values to be assigned during query execution. Values do not need\n\t\t * to be escaped because they are injected into named place-holders in the\n\t\t * prepared query. Add items using $values[':PlaceHolder'] = $value;\n \t\t */\n\t\t$values = array();\n\n\t\t$query = '\n\t\t\tSELECT ID, coverImageID, trackID, status, rank, createDate\n\t\t\t FROM '.system::getConfig()->getDatabase('momusic_content').'.handpickedMusic\n\t\t\t ORDER BY rank desc';\n\n\t\tif ( $inOffset !== null ) {\n\t\t\t$query .= ' LIMIT '.$inOffset.','.$inLimit;\n\t\t}\n\n\t\t$list = array();\n\n\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\tif ( $oStmt->execute($values) ) {\n\t\t\tforeach ( $oStmt as $row ) {\n\t\t\t\t$oObject = new momusicHandpickedmusic();\n\t\t\t\t$oObject->loadFromArray($row);\n\t\t\t\t$list[] = $oObject;\n\t\t\t}\n\t\t}\n\t\t$oStmt->closeCursor();\n\n\t\treturn $list;\n\t}", "function FetchNextObj() {}", "public function testQueryFetchObject() {\n $records = [];\n $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25], ['fetch' => \\PDO::FETCH_OBJ]);\n foreach ($result as $record) {\n $records[] = $record;\n $this->assertIsObject($record);\n $this->assertSame('John', $record->name);\n }\n\n $this->assertCount(1, $records, 'There is only one record.');\n }", "public static function getAll() {}", "function query_objects($sql, $parameters = null) {\n $query = $this->query($sql, $parameters);\n\n // This may not be the most optimal way to get an array of objects\n // from PDO, but it functions properly for now and can be discretely\n // optimized later.\n return $query->fetchAll(PDO::FETCH_CLASS);\n }", "public function find(){\n\n $params = $this->_where;\n $selects = $this->preparedSelects();\n $order = $this->preparedOrderBy();\n $range = $this->_range;\n $depth = $this->_depth;\n $objects = array();\n\n $found = $this->_find($params,$selects,$order,$range,$depth);\n\n if($this->_rest->statusCode() == 200){\n $this->_count = $this->_rest->count();\n $indexKey = $this->indexKey;\n\n // if the result is a single object (for example, in the case of listapi\n // query), it's converted to an array before being processed\n if(!is_array($found)) {\n $found = array($found);\n }\n foreach($found as $attributes){\n if($indexKey){\n $index = isset($attributes->$indexKey) ? $attributes->$indexKey : count($objects);\n }else{\n $index = count($objects);\n }\n\n if($this->objectClass == Object::USER_OBJECT_CLASS){\n $objects[$index] = new User($attributes);\n }else{\n $objects[$index] = new Object($this->objectClass,$attributes);\n }\n }\n }\n\n return $objects;\n }", "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "abstract protected function loadExposedObjects();", "public abstract function readObjects();", "public function getList($perezoso = true){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\t$this->setPerezoso($perezoso);\n\t\tforeach ($stmt->fetchAll() as $row){\n\t\t\t$objects[]= $this->_populate($row);\n\t\t}\n\t\treturn $objects;\n\t}", "public function findAll($hydrateMode = AbstractQuery::HYDRATE_OBJECT);", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function findAllLoaded() {}", "public function fetchAllObjects($statement, array $params = array(), $class = 'stdClass', $args = array());", "function getItems();", "function getItems();", "protected abstract function getIListar();", "public function getAll() {}", "public function getAll() {}", "public abstract function getPaginatedListApiObjectClass();", "public function getAll() {}", "public function getAll() {}" ]
[ "0.75632066", "0.73207515", "0.72998846", "0.7109362", "0.66514575", "0.66176665", "0.6550379", "0.6437033", "0.6379983", "0.6361483", "0.6357069", "0.6357069", "0.6355353", "0.6355353", "0.6347576", "0.63387114", "0.6323703", "0.6303698", "0.6275342", "0.62586457", "0.62494355", "0.62434304", "0.62434304", "0.62434304", "0.62434304", "0.6239534", "0.62054056", "0.6203506", "0.6198837", "0.6188109", "0.6181778", "0.61618286", "0.61599386", "0.6157403", "0.6127838", "0.60676324", "0.60535127", "0.6044473", "0.60425854", "0.60404205", "0.60404205", "0.60404205", "0.60280174", "0.59987897", "0.59848857", "0.5971318", "0.59566504", "0.59558606", "0.59556097", "0.5949538", "0.5949538", "0.5949538", "0.5942308", "0.59399915", "0.59399915", "0.593843", "0.5937699", "0.59327376", "0.5927111", "0.59246355", "0.5914047", "0.5909292", "0.5909292", "0.5906514", "0.590138", "0.5900488", "0.5900222", "0.58995515", "0.5898008", "0.5890529", "0.58792937", "0.58744633", "0.5868084", "0.58434284", "0.58398926", "0.58370984", "0.5828962", "0.5825836", "0.58202434", "0.58185285", "0.5814555", "0.5813144", "0.581083", "0.581083", "0.581083", "0.581083", "0.581083", "0.581083", "0.581083", "0.581083", "0.581083", "0.5805863", "0.5805631", "0.5800316", "0.5800316", "0.57971615", "0.57922256", "0.57922256", "0.579208", "0.57917607", "0.57917607" ]
0.0
-1
fetchs realty object detail info
public function getDetail($id) { return $this->getData('/objekt/detail/objekt_id/' . $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDetail();", "abstract public function getDetails();", "public abstract function FetchObject();", "public abstract function fetchObject();", "public function fetchObject();", "public function fetchObject();", "public function fetch()\n {\n return $this->info;\n }", "function get_detail() {\n return $this->detail;\n }", "function FetchObj() {}", "public function fetchDetail(): void\n {\n $request = Certification::$request;\n\n $url = sprintf('%s/projects/%s', Certification::$endpoint, $this->id);\n $payload = $request->get($url)->throw()->json();\n\n $attributes = Arr::get($payload, 'data.attributes');\n\n conmsg(sprintf('Project ID: %s', Arr::get($attributes, 'id')));\n conmsg(sprintf('Project Name: %s', Arr::get($attributes, 'name')));\n conmsg(sprintf('Project Description: %s', Arr::get($attributes, 'description')));\n }", "public function getDetails() {\n return $this->_get( 'details', array() );\n }", "public function getInformation();", "public function getDetail()\n {\n return $this->detail;\n }", "public function getDetail()\n {\n return $this->detail;\n }", "public function getDetail()\n {\n return $this->detail;\n }", "abstract public function retrieve();", "public function getInfo();", "public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}", "public function details_get()\n \t{\n \t\tlog_message('debug', 'Score/details_get');\n\n\t\t$result = $this->_score->get_details(\n\t\t\t$this->get('type'),\n\t\t\t$this->get('codes'),\n\t\t\textract_id($this->get('userId')),\n\t\t\t(!empty($this->get('storeId'))? extract_id($this->get('storeId')): '')\n\t\t);\n\n\t\tlog_message('debug', 'Score/details_get:: [1] result='.json_encode($result));\n\t\t$this->response($result);\n\t}", "public function getInfo() {}", "public function getInfo() {}", "public function callRealtyDetail($pk)\n {\n return $this->call('objekt/detail', array('objekt_id' => $pk));\n }", "public function getInstanceDetail()\n {\n return $this->get(self::_INSTANCE_DETAIL);\n }", "public function fetchObject(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_object\";\n return $this;\n }", "public function getDetail() {\r\n\t\treturn($this->detail);\r\n\t}", "protected function fetchDetails() {\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'tstamp, crdate, cruser_id, name',\n\t\t\t'tx_passwordmgr_group',\n\t\t\t'uid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this['uid'],'tx_passwordmgr_group')\n\t\t);\n\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t$this['name'] = $row['name'];\n\t\t$this['timeStamp'] = $row['timeStamp'];\n\t\t$this['createDate'] = $row['crdate'];\n\t\t$this['cruserUid'] = $row['cruser_id'];\n\t}", "private function _get_info() {\n\n\t\t/* Grab the basic information from the catalog and return it */\n\t\t$sql = \"SELECT * FROM `access_list` WHERE `id`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results;\n\n\t}", "public function fetchObject()\n {\n return sasql_fetch_object($this->result);\n }", "abstract protected function extractProductDetail();", "public function fetch(): object\n {\n if ($this->title() instanceof UserTrophyTitle) {\n return $this->get(\n 'trophy/v1/users/' . $this->title()->getFactory()->getUser()->accountId() . '/npCommunicationIds/' . $this->title()->npCommunicationId() . '/trophyGroups',\n [\n 'npServiceName' => $this->title()->serviceName()\n ]\n );\n } else {\n return $this->get(\n 'trophy/v1/npCommunicationIds/' . $this->title()->npCommunicationId() . '/trophyGroups',\n [\n 'npServiceName' => $this->title()->serviceName()\n ]\n );\n }\n }", "function _fetch_object()\n\t{\n\t\treturn mysqli_fetch_object($this->result_id);\n\t}", "public function getObject();", "public function getObject();", "public function getDetail(int $id)\n {\n }", "abstract protected function getObject($id);", "public function getDetails()\r\n {\r\n return $this->details;\r\n }", "public function getDetailByCode($object, $code) {\n\n $url = $this->buildUrl('detail', array(\n 'object' => $object,\n 'code' => $code\n ));\n return $this->getContent($url);\n }", "public function getObj();", "public function fetch_object()\n\t{\n\t\t$object = null;\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $key => $value) {\n\t\t\t\t$object->$key = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$object = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $object;\n\t}", "function _fetch_object()\n\t{\n\t\treturn sqlsrv_fetch_object($this->result_id);\n\t}", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function fetchObj(){\n try{\n $this->obj = $this->resultado->fetch(PDO::FETCH_OBJ);\n } catch (PDOException $e){\n $this->errors[] = 'error: function fetchObj<br/>'.$e->getMessage();\n $this->obj = NULL;\n }\n return $this->obj;\n }", "public function getObject() {}", "public function getObject() {}", "function get_prize_list_detail($obj){\n\t\t\t$sql = \" select \n\t\t\t\t\t\t*\n\t\t\t\t\tfrom prize_list \n\t\t\t\t\twhere id=?\";\n\t\t\t$data = $this->sys->query($sql,array($obj->prize_list_id))->row();\n\t\t\treturn array( \n \"id\"\t\t\t\t=> empty($data->id)?'':$data->id,\n \"description\"\t\t=> empty($data->description)?'':$data->description,\n \"prize\"\t\t => empty($data->prize)?'0':$data->prize,\n \"status\"\t\t\t=> empty($data->status)?'0':$data->status,\n \"created_date\"\t\t=> empty($data->created_date)?'':$data->created_date,\n \"modified_date\"\t\t=> empty($data->modified_date)?'':$data->modified_date,\n \"created_by\"\t\t=> empty($data->created_by)?'':$data->created_by,\n \"modified_by\"\t\t=> empty($data->modified_by)?'':$data->modified_by,\n\t\t\t\t); \n\t\t}", "function FetchObject() {\n\t\t\treturn pg_fetch_object($this->result);\n\t\t}", "function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}", "public function getDetails()\n\t{\n\t\treturn $this->details;\n\t}", "public function fetchInto(){\n\t\t\t}", "public function getObjectIdent() {}", "public function getObjectIdent() {}", "private function getObject() {\n return $this->object;\n }", "public function getDetails()\n {\n\t $detail_field = $this->getValue('details');\n\t return wed_decodeJSON($detail_field,true);\n }", "function getDetails() {\n\t\treturn $this->data_array['details'];\n\t}", "public function testFetching()\n {\n $this->assertType('Horde_Kolab_Server_Object', $this->koward->getObject('cn=Gunnar Wrobel,dc=example,dc=org'));\n }", "abstract public function fetch();", "abstract public function fetch();", "function _fetch_object()\r\n\t{\r\n\t\tif ( is_array($this->pdo_results) ) {\r\n\t\t\t$i = $this->pdo_index;\r\n\t\t\t$this->pdo_index++;\r\n\t\t\tif ( isset($this->pdo_results[$i])) {\r\n\t\t\t\t$back = '';\r\n\t\t\t\tforeach ( $this->pdo_results[$i] as $key => $val ) {\r\n\t\t\t\t\t$back->$key = $val;\r\n\t\t\t\t}\r\n\t\t\t\treturn $back;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $this->result_id->fetch(PDO::FETCH_OBJ);\r\n\t}", "public function getDetails() {\r\n\t\t\treturn $this->_details;\r\n\t\t}", "public function getObject(): object;", "public function readInfoById() {\t\t\n\t\t$fnName = \"getId\";\n\t\t$_id = -1;\n\t\t\n\t\t$_nombre = get_class( $this ) ;\n\t\t$result = null;\n\t\t$params = array();\n\t\t\n\t\tforeach(get_class_methods( $this ) as $id => $vl){\n\t\t\tif( strtolower( $vl ) == strtolower( $fnName ) ){\n\t\t\t\t$_id = $this->$fnName();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( $_id > 0 ){\n\t\t\t$stmt = null;\n\t\t\t\n\t\t\t$query = \"SELECT * FROM \" . strtolower( $_nombre ) . \" WHERE id = ?\";\n\t\t\tif ($stmt = self::$lnk->prepare($query)) {\n\t\t\t\t$stmt->bind_param(\"i\", $_id);\n\t\t\t $stmt->execute();\n\t\t\t \n\t\t\t\t$meta = $stmt->result_metadata(); \n\t\t\t while ($field = $meta->fetch_field()) {\n\t\t\t \t$params[] = &$row[ $field->name ]; \n\t\t\t } \n\t\t\t\n\t\t\t call_user_func_array(array($stmt, 'bind_result'), $params); \n\t\t\t \n\t\t\t while ($stmt->fetch()) {\n\t\t\t \t$o = new $_nombre();\n\t\t\t foreach($row as $key => $val) {\n\t\t\t $o->{ \"set\" . Singleton::toCap($key)}( $val );\n\t\t\t } \n\t\t\t $result = $o;\t\t\t \n\t\t\t }\n\t\t\t $stmt->close();\n\t\t\t}else{\n\t\t\t\t$this->mensaje_error = self::$lnk->error;\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "function opensky_get_obj_subcollection_infos(AbstractObject $object) {\n module_load_include('inc', 'islandora_basic_collection', 'includes/utilities');\n\n $params = array(\n 'object' => $object,\n 'page_size' => -1,\n 'model' => \"<info:fedora/islandora:collectionCModel>\",\n );\n\n $map_results = function($o) {\n return array (\n 'pid' => $o['object']['value'],\n 'uri' => $o['object']['uri'],\n 'title' => $o['title']['value'],\n );\n };\n $query_info = islandora_basic_collection_get_query_info($params);\n $results = $object->repository->ri->query($query_info['query'], $query_info['type']);\n return array_map($map_results, $results);\n}", "public function retrieveData(){\n\t\t$mParser = new RecipeParser;\n\t\t$mParser->retrieveInfoForObject($this);\n\t}", "public function getObject()\n {\n return mysqli_fetch_object($this->resulset);\n }", "public function getDetails() {\n\t\treturn $this->details;\n\t}", "public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }", "public function detail(){\r\n\t\t//only ajax is allowed\r\n\t\tif(!$this->input->is_ajax_request()) show_404();\r\n\r\n\t\t//$this->auth->set_access('view');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//search data with pk for default\r\n\t\t$search_data = $this->input->post('ang_id');\r\n\t\t//if no search data exist, response error\r\n\t\tif($search_data === NULL)\r\n\t\t\tajax_response('error');\r\n\r\n\t\t//activate if search data is integer\r\n\t\t//$search_data = uintval($search_data);\r\n\r\n\t\t//get detail\r\n\t\t$detail = $this->m_anggota->get_by_column($search_data);\r\n\r\n\t\t//output return value\r\n\t\tif($detail !== NULL) ajax_response('ok', '', $detail);\r\n\t\telse ajax_response('error');\r\n\t}", "public function fetch_object($query);", "public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }", "public function getCurrentObjectData() {}", "public function fetchData()\r\n {\r\n $this->objectcount = $this->search_obj->getObjectQueryCount($this->extra);\r\n }", "public function getInfo($model);", "public function getObjectIdent();", "function getObject();", "function getObject();", "public function\tgetReferidoInfo(){\r\t\t\r\t\t$model_ref = $this->getModel( 'referido' );\r\t\t$idref = JRequest::getInt( 'idref' );\r\t\t\r\t\t$model_ref->instance( $idref );\r\t\t$inf_ref = $model_ref->getReferidoInf();\r\t\t\r\t\tif( !empty($inf_ref) ){\r\t\t\t\r\t\t\t$model_ref\r\t\t}\r\t\t\r\t}", "public function viewdetailsAction()\n {\n $productId = $this->_getParam('product_id');\n $product = $this->_model->setId($productId);\n $this->view->product = $product->fetch(); \n \n }", "public function getDetails()\n {\n if (array_key_exists(\"details\", $this->_propDict)) {\n return $this->_propDict[\"details\"];\n } else {\n return null;\n }\n }", "abstract protected function fetchObject(string $className = 'stdClass');", "public function details($id)\n {\n return SupuestoObra::where('id', $id)->get();\n }", "function getInfo($id){\r\n\t\t$this->getQuestion($id);\r\n\t}", "public function getdetails(){\n $data = $this->get();\n if(!empty($data)){\n $pizzalist = new pizzalist();\n $nonpizza = new ordernonpizzalist();\n $payment = new payment();\n $customer = new customer();\n\n $customer->__set('CustomerID', $this->__get('CustomerID'));\n $payment->__set( 'CustomerID', $this->__get('CustomerID'));\n $payment->__set( 'OrderID', $this->__get('OrderID'));\n \n\n $data['pizza'] = $pizzalist->getorderspizza($this->__get('OrderID'));\n $data['nonpizza'] = $nonpizza->getordernonpizza($this->__get('OrderID'));\n $data['payment'] = $payment->getbyorderid();\n $data['Customer'] = $customer->get(); \n\n // $this->__set('Customer', $data[0]['CustomerID']);\n // $this->__set('TotalPrice', $data[0]['TotalPrice']);\n // $this->__set( 'Status', $data[0]['Status']);\n // $this->__set( 'OrderAddress', $data[0]['OrderAddress']);\n // $this->__set( 'OrderTime', $data[0]['OrderTime']);\n // $this->__set( 'OrderDeliverTime', $data[0]['OrderDeliverTime']);\n $this->__set( 'pizzalist', $data['pizza']);\n $this->__set( 'nonpizzalist', $data['nonpizza']);\n $this->__set( 'payment', $data['payment']);\n $this->__set( 'Customer', $data['Customer']);\n \n return $data;\n } else {\n\n return false;\n\n }\n }", "public function getRecordInformation() {}", "function detail()\n {\n }", "public function info(): \\iota\\schemas\\response\\info {\n return $this->fetch([\n 'route' => \"info\",\n 'return' => \\iota\\schemas\\response\\Info::class,\n ]);\n }", "public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }", "public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }", "abstract public function retrieve($id);", "public function getDetails()\n {\n if (array_key_exists(\"details\", $this->_propDict)) {\n if (is_a($this->_propDict[\"details\"], \"\\Beta\\Microsoft\\Graph\\Model\\DetailsInfo\") || is_null($this->_propDict[\"details\"])) {\n return $this->_propDict[\"details\"];\n } else {\n $this->_propDict[\"details\"] = new DetailsInfo($this->_propDict[\"details\"]);\n return $this->_propDict[\"details\"];\n }\n }\n return null;\n }", "public function getObject() {\n return $this->object;\n }", "public function getInfo(Laptop $object){\r\n return \"{$object->namaLaptop}, {$object->getData()}\";\r\n }", "public function detail(){\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$record = $this->modelGetRecord($id);\n\t\t\t//load view\n\t\t\tinclude \"Views/BlogsDetailView.php\";\n\t\t}", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "public function testFetchObject()\n {\n $this->todo('stub');\n }", "function get_info($item_kit_id)\n\t{\n\t\t$query = $this->db->where('item_kit_id',$item_kit_id)\n\t\t\t\t->where(\"category\", \"tickets\")\n\t\t\t\t->get(\"item_kits\");\n\t\tif($query->num_rows()==1)\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Get empty base parent object, as $item_kit_id is NOT an item kit\n\t\t\t$item_obj=new stdClass();\n\n\t\t\t//Get all the fields from items table\n\t\t\t$fields = $this->db->list_fields('item_kits');\n\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\t$item_obj->$field='';\n\t\t\t}\n\n\t\t\treturn $item_obj;\n\t\t}\n\t}", "function getUserInformation(){\n\t\tinclude ($_SERVER['DOCUMENT_ROOT'] . '_inc/controller/fb/getUserInformation.fb.inc.php');\n return $this->resObject;\n\t}", "public function detail() {\n $url = explode('/', $_GET['url']);\n $id = $url[2];\n $this->loadView('detail', 'content');\n $client = $this->em->selectById('client', $id);\n $village = $this->em->selectById('village', $client->getIdVillage());\n $this->loadHtml($client->getId(), 'id');\n $this->loadHtml($client->getNomFamille(), 'nomFamille');\n $this->loadHtml($village->getNom(), 'village');\n $this->loadHtml($client->getTelephone(), 'telephone');\n $this->dom->getElementById('lien_client')->href .= $id;\n }" ]
[ "0.74613553", "0.7282049", "0.71012104", "0.7033522", "0.6963956", "0.6963956", "0.683296", "0.67904836", "0.6529969", "0.6412335", "0.64095986", "0.6399234", "0.6398683", "0.6398683", "0.6398683", "0.63811225", "0.6344925", "0.6335585", "0.6334248", "0.6322935", "0.6322935", "0.63172895", "0.63049245", "0.63005584", "0.62994736", "0.62568885", "0.62198734", "0.62050045", "0.61811954", "0.6166531", "0.61485267", "0.6134904", "0.6134904", "0.6098673", "0.6082382", "0.60707223", "0.60504866", "0.6047821", "0.6021535", "0.60146904", "0.6014647", "0.6014647", "0.6014647", "0.5995674", "0.596288", "0.596288", "0.595712", "0.59568995", "0.5956362", "0.5953917", "0.59477735", "0.59476227", "0.59476227", "0.59411037", "0.5938503", "0.59323734", "0.5932184", "0.59309983", "0.59309983", "0.59239507", "0.5921658", "0.5920883", "0.5919855", "0.5919792", "0.59189016", "0.59162235", "0.5915484", "0.5900808", "0.58981866", "0.58801913", "0.5877463", "0.5871791", "0.58712417", "0.5869669", "0.586542", "0.58600116", "0.58600116", "0.58490515", "0.5843013", "0.5841274", "0.58345604", "0.58262765", "0.5823201", "0.5808378", "0.58063596", "0.58029324", "0.5785442", "0.577968", "0.577968", "0.5773561", "0.57727224", "0.5769171", "0.57674587", "0.5767065", "0.576421", "0.576421", "0.5759767", "0.57579327", "0.575223", "0.57386655" ]
0.63196975
21
fetches the team list info
public function getTeamList() { return $this->getData('/team/list'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function team_list()\n {\n }", "public function team_info() {\n\n $method=\"team.info\";\n $payload = array();\n $team_details = $this->apicall($method, $payload);\n $this->debug(\"team-details.log\", json_encode($team_details));\n return $team_details;\n\n }", "public function getTeams();", "public function teamlist_get()\n\t{\n\n\t\tif($_SERVER['REQUEST_METHOD'] != \"GET\")\n\t\t{\n\t\t $this->response('Not Acceptable',406);\n\t\t}\n\t\t$sport_id = $this->input->get('sport_id');\n\t\t$search_text = $this->input->get('search_text');\n\t\t$offset = $this->input->get('offset');\n\t\t$limit = $this->input->get('limit');\n\t\t\n\t\t$this->load->model('User_model');\n\t\t\n\t\t$team_list_count = $this->User_model->GetTeamCount($sport_id, $search_text);\n\t\tif($limit >0 ) {\n\t\t\t$remianest = $team_list_count - $limit;\n\t\t}\n\t\telse {\n\t\t\t$remianest = $team_list_count;\n\t\t}\n\t\t\n\t\t$team_list_arr=$this->User_model->GetTeam($sport_id, $search_text, $offset, $limit);\n\t\tif(count($team_list_arr)>0)\n\t\t{\n\t\t\t$this->response(array('status'=>'success','remaincount' => $remianest, 'team'=>$team_list_arr), 200);\n\t\t}\n\t\telse\n\t\t\t$this->response(array('status'=>'failed','message'=>'No records in database'),200);\n\t\n\t\n\t}", "public function getTeams() { \r\n $uri = $this->payload->_links->teams->href;\r\n $response = file_get_contents($uri, false, stream_context_create($this->reqPrefs)); \r\n $response = json_decode($response);\r\n \r\n return $response->teams;\r\n }", "function listTeams() {\n global $oDbHelper;\n\n $sQuery = \"SELECT * FROM team WHERE competition_id = \" . COMPETITION_ID;\n $oResult = $oDbHelper->executeQuery($sQuery);\n $oDbHelper->printDbResult($oResult);\n}", "public function getTeam();", "function get_team_info($idTeam)\n{\n $team_info = get_team_info_db($idTeam);\n return $team_info;\n}", "function get_driver_team($idTeam)\n{\n $list_driver = get_driver_team_db($idTeam);\n return $list_driver;\n}", "public function all_team_member_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_team WHERE publication_status = 1 ORDER BY team_member_id DESC LIMIT 4\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function getAll(){\n\t\t$url = WEBSERVICE. \"teams/getAll\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $this->arrayToTeam($arrayResponse, false);\n\t}", "public function teams()\n {\n return $this->request('get', '/api/teams');\n }", "function get_team_info($team_id) {\n global $db;\n $query = 'SELECT t.team_id\n , t.name\n , t.nickname\n , t.logo_file_name\n , l.name as league\n , l.abbr as league_abbr\n , s.name as sub_league_name\n , s.abbr as sub_league_abbr\n , d.name as div_name\n FROM teams t INNER JOIN leagues l ON t.league_id = l.league_id\n INNER JOIN sub_leagues s ON t.league_id = s.league_id AND t.sub_league_id = s.sub_league_id\n INNER JOIN divisions d ON t.league_id = d.league_id AND t.sub_league_id = d.sub_league_id\n AND t.division_id = d.division_id\n WHERE t.team_id = :team_id';\n $statement = $db->prepare($query);\n $statement->bindValue('team_id', $team_id);\n $statement->execute();\n $team_info = $statement->fetch();\n $statement->closeCursor();\n return $team_info;\n}", "public function getListData(){\n\t\tif(auth()->user()->hasRole('merchandiser')){\n\t\t\t$lead_associateId[] = auth()->user()->associate_id;\n\t\t \t$team_members = DB::table('hr_as_basic_info as b')\n\t\t\t\t->where('associate_id',auth()->user()->associate_id)\n\t\t\t\t->leftJoin('mr_excecutive_team','b.as_id','mr_excecutive_team.team_lead_id')\n\t\t\t\t->leftJoin('mr_excecutive_team_members','mr_excecutive_team.id','mr_excecutive_team_members.mr_excecutive_team_id')\n\t\t\t\t->pluck('member_id');\n\t\t\t$team_members_associateId = DB::table('hr_as_basic_info as b')\n\t \t\t\t\t ->whereIn('as_id',$team_members)\n\t\t\t\t\t\t\t\t\t\t->pluck('associate_id');\n\t\t \t$team = array_merge($team_members_associateId->toArray(),$lead_associateId);\n\n\t \t}elseif (auth()->user()->hasRole('merchandising_executive')) {\n\t\t \t$executive_associateId[] = auth()->user()->associate_id;\n\n\t\t \t$teamid = DB::table('hr_as_basic_info as b')\n\t\t\t\t->where('associate_id',auth()->user()->associate_id)\n\t\t\t\t->leftJoin('mr_excecutive_team_members','b.as_id','mr_excecutive_team_members.member_id')\n\t\t\t\t->pluck('mr_excecutive_team_id');\n\t\t\t$team_lead = DB::table('mr_excecutive_team')\n\t\t\t\t\t ->whereIn('id',$teamid)\n\t\t\t\t\t ->leftJoin('hr_as_basic_info as b','mr_excecutive_team.team_lead_id','b.as_id')\n\t\t\t\t\t ->pluck('associate_id');\n\t\t\t$team_members_associateId = DB::table('mr_excecutive_team_members')\n\t\t\t\t\t\t\t\t\t->whereIn('mr_excecutive_team_id',$teamid)\n\t\t\t\t\t\t\t\t\t->leftJoin('hr_as_basic_info as b','mr_excecutive_team_members.member_id','b.as_id')\n\t\t\t\t\t\t\t\t\t->pluck('associate_id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t$team = array_merge($team_members_associateId->toArray(),$team_lead->toArray());\n\t\t}else{\n\t\t \t$team =[];\n\t\t}\n\t\t$getBuyer = buyer_by_id();\n\t\t$getSeason = season_by_id();\n\t\t$getBrand = brand_by_id();\n\t\t$query= DB::table('mr_order_entry AS OE')\n\t\t->select([\n\t\t\t\"OE.order_id\",\n\t\t\t\"OE.order_code\",\n\t\t\t\"stl.stl_no\",\n\t\t\t\"stl.stl_year\",\n\t\t\t\"stl.mr_season_se_id\",\n\t\t\t\"stl.mr_brand_br_id\",\n\t\t\t\"OE.order_ref_no\",\n\t\t\t\"OE.mr_buyer_b_id\",\n\t\t\t\"OE.order_qty\",\n\t\t\t\"OE.order_delivery_date\",\n\t\t\t\"OE.unit_id\"\n\t\t])\n\t\t->whereIn('OE.mr_buyer_b_id', auth()->user()->buyer_permissions())\n\t\t->leftJoin('mr_style AS stl', 'stl.stl_id', \"OE.mr_style_stl_id\");\n\t\tif(!empty($team)){\n\t\t\t$query->whereIn('OE.created_by', $team);\n\t\t}\n\t\t$data = $query->orderBy('OE.order_id', 'DESC')\n\t\t->get();\n\t\t$getUnit = unit_by_id();\n\n\t\treturn DataTables::of($data)\n\t\t->addIndexColumn()\n\t\t->editColumn('hr_unit_name', function($data) use ($getUnit){\n\t\t\treturn $getUnit[$data->unit_id]['hr_unit_name']??'';\n\t\t})\n\t\t->editColumn('b_name', function($data) use ($getBuyer){\n\t\t\treturn $getBuyer[$data->mr_buyer_b_id]->b_name??'';\n\t\t})\n\t\t->editColumn('br_name', function($data) use ($getBrand){\n\t\t\treturn $getBrand[$data->mr_brand_br_id]->br_name??'';\n\t\t})\n\t\t->editColumn('se_name', function($data) use ($getSeason){\n\t\t\treturn $getSeason[$data->mr_season_se_id]->se_name??''. '-'.$data->stl_year;\n\t\t})\n\t\t->editColumn('order_delivery_date', function($data){\n\t\t\treturn custom_date_format($data->order_delivery_date);\n\t\t})\n\t\t->addColumn('action', function ($data) {\n\t\t\t$action_buttons= \"<div class=\\\"btn-group\\\">\n\t\t\t<a href=\".url('merch/order/bom/'.$data->order_id).\" class=\\\"btn btn-xs btn-success\\\" data-toggle=\\\"tooltip\\\" title=\\\"Order BOM\\\">\n\t\t\t<i class=\\\"ace-icon fa fa-pencil bigger-120\\\"></i>\n\t\t\t</a></div>\";\n\t\t\treturn $action_buttons;\n\t\t})\n\t\t->rawColumns([\n 'order_code', 'hr_unit_name', 'b_name', 'br_name', 'se_name', 'stl_no', 'order_qty', 'order_delivery_date', 'action'\n ])\n ->make(true);\n\t}", "public function competition_team_get()\n\t{\n\n\t\tif($_SERVER['REQUEST_METHOD'] != \"GET\")\n\t\t{\n\t\t $this->response('Not Acceptable',406);\n\t\t}\n\t\t$comp_team_list_arr=array();\n\n\t\t$this->load->model('Table_model');\n\t\t$comp_team_list_arr=$this->Table_model->GetCompetitionTeam();\n\t\tif(count($comp_team_list_arr)>0)\n\t\t{\n\t\t\t$this->response(array('status'=>'success','competition_team'=>$comp_team_list_arr), 200);\n\t\t}\n\t\telse\n\t\t\t$this->response(array('status'=>'failed','message'=>'No records in database'),200);\n\t\n\t\n\t}", "public function teamMembers()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/members');\n }", "public function getTeamList() {\n if ($this->cached['Team']) return array_values($this->cache['Team']);\n return XPClass::forName('de.uska.db.Team')\n ->getMethod('getPeer')\n ->invoke()\n ->doSelect(new Criteria(\n array('team_id', $this->getTeam_id(), EQUAL)\n ));\n }", "public function actionListmyteam() {\n return array('status' => 0, 'status_msg' => 'ok');\n }", "public function load_teamManagerTeams() {\n\t\treturn $this->noScriptWarning().$this->displayManager();\n\t}", "public function team(){\n\tif ($this->session->userdata('logged_in')){\n\t\t$data['title'] = 'Team';\n\t\t$data['teamsList'] = $this->common_model->get_all('fr_team', '');\n\t\t$this->set_layout('team/team_list',$data);\n\t}else{\n\t\t$this->load->view('site/login');\n\t}\n}", "public function testTeamsGet()\n {\n $this->get('/api/v1/teams', ['Content-Type' => 'application/json', 'Accept' => 'application/json'])\n ->seeJsonStructure([\n '*' => [\n 'id',\n 'name',\n 'nickname',\n 'acronym',\n 'coach',\n 'location',\n ]\n ]);\n }", "public function ownedTeams()\n {\n return $this->request('get', '/api/owned-teams');\n }", "public function get_teams()\r\n\t\t{\r\n\t\t\t$retArr = $this->obj->result;\r\n\r\n\t\t\treturn $retArr;\r\n\t\t}", "function get_team_info_db($idTeam)\n{\n require('./model/connect_db.php');\n $sql = \"select t.nameTeam from team t where t.idteam = '%d'\";\n $request = sprintf($sql,$idTeam);\n $result = mysqli_query($link,$request) or die(utf8_encode(\"request error\") . $request);\n $team_info = mysqli_fetch_assoc($result);\n return $team_info;\n}", "function get_team_details($team_name, $what_to_get){\n\n\t\t//get details from config file to help us connect to the database\n\t\tinclude(\"../config.php\");\n\n\t\t//varaible to return at the end\n\t\t$result_to_return;\n\n\t\t//get what ever details from what ever team has been chosen\n\t\t$sql = \"SELECT $what_to_get FROM basketball_teams_website WHERE team_name = ? ;\";\n\t\t$stmt = mysqli_stmt_init($conn);\n\n\t\t//if connection has failed output error\n\t\tif(!mysqli_stmt_prepare($stmt, $sql)){\n\t\t\t\n\t\t\techo \"sql Statment failed!\";\n\t\t}\n\t\telse{\n\n\t\t// bind parameter to placeholders\n\t\t\tmysqli_stmt_bind_param($stmt, \"s\", $team_name);\n\n\n\t\t// run parameters inside of database\n\t\t\tmysqli_stmt_execute($stmt);\n\t\t\t$result = mysqli_stmt_get_result($stmt);\n\t\t\t$row = mysqli_fetch_assoc($result);\n\n\t\t\t//assign result to return variable to retrived data\n\t\t\t$result_to_return = $row[$what_to_get];\n\t\t}\n\n\t\t//echo data where ever the function has been called\n\t\techo $result_to_return;\n\t}", "protected abstract function fetchLists();", "public function index(Request $request){\n\n return $this->repo->getUserTeams($request->user());\n\n }", "public function index()\n {\n $teams = DB::table('team_user')\n ->where('user_id', Auth::user()->id)\n ->get();\n \n return TeamUserResource::collection($teams, 200); \n }", "public function getAll()\n {\n return Team::all();\n }", "public function index()\n {\n //\n $teams =Team::paginate(2);\n return view('team/lists')->withTeams($teams);\n }", "function index()\n\t{\n\t\t$teams = $this->teams->retrieve_with_field();\n\n\t\t$data = array(\n\t\t\t'title' => 'Teams',\n\t\t\t'teams' => $teams,\n\t\t\t'js' => array(''),\n\t\t\t'css' => array('/styles/admin.css'),\n\t\t\t'sidenav' => self::$user_links\n\t\t);\n\n\t\t$this->load->view('admin/show_all_teams.php', $data);\n\t}", "public function fetchList();", "public function index() {\n\t\ttry {\n\t\t\t$teams = Team::active()->with(['teamParent', 'leader'])->latest()->get();\n\t\t\t$team_tree = getTeamTree(Team::all());\n\t\t\treturn response()->json(['teams' => $teams, 'team_tree' => $team_tree]);\n\t\t} catch (\\Exception $e) {\n\t\t\t\\Log::info($e);\n\t\t\treturn response()->json(['status' => 'error', 'message' => 'Get teams failed!']);\n\t\t}\n\t}", "public function index()\n {\n $teams = Team::all();\n return TeamResource::collection($teams);\n }", "public function index()\n {\n return response()->json(TeamManagement::all());\n }", "public function index()\n {\n $team = Team::all();\n return $team;\n }", "function teams(){\n\t\t$this->autoRender = false;\n\t\t$this->response->type('json');\n\t\ttry {\n\t\t\t$teams = $this->Team->find('all');\n\t\t}catch (Exception $e){\n\t\t\techo $this->dbError;\n\t\t}\n\t\tif (!empty($teams)){\n\t\t\techo json_encode($teams);\n\t\t}else{\n\t\t\techo $this->noResult;\n\t\t}\n\t}", "public function sycTeams(){\n //Get all team\n $url = \"http://db.basketball.nl/db/json/team.pl?clb_ID=81\";\n\n //Get json file for api\n\n //TODO set to api\n $teams = file_get_contents($url);\n $teams = json_decode($teams);\n\n\n //TODO filter if there is dubbel comp_id\n\n //TODO create team categorys for menu\n foreach ($teams->teams as $team){\n\n //Create new team entity\n $teamEntities = $this->Teams->newEntity();\n $teamEntities->name = $team->naam;\n\n //Create slug\n $teamEntities->slug = strtolower(Text::slug(trim($team->naam)));\n $teamEntities->nbb_id = $team->id;\n $teamEntities->comp_id = $team->comp_id;\n\n //Save team\n $this->Teams->save($teamEntities);\n }\n\n }", "function checkteam($team) {\n\t$result = $team->list_members();\n\tif (count($result) < 3) {\n\t\tprint <<<EOT\n<h1>Edit Match</h1>\n<p>\nSorry but there are not enough members in {$team->display_name()} yet to\nmake up a match with.</p>\n<p>Please <a href=\"javascript:history.back()\">click here</a> to go back\nor <a href=\"teamsupd.php\">here</a> to update teams.</p>\n\nEOT;\n\t\tlg_html_footer();\n\t\texit(0);\n\t}\n\tforeach ($result as $p) {\n\t\t$p->fetchdets();\n\t}\n\treturn $result;\n}", "public function getAll(){\n return view('/backoffice/teams_read', ['teams' => Team::with('users')->paginate(Config::get('constants.backoffice.NUMBER_OF_DISPLAYED_TEAMS_PER_PAGE'))]);\n }", "function fantacalcio_admin_real_teams_list() {\n \n $out = \"\";\n \n $out .= l(\"Aggiungi Squadra\", \"admin/fantacalcio/realteams/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n\n $out .= l(\"Importa squadre\", \"admin/fantacalcio/realteams/import\", array(\n \"attributes\" => array(\"class\" => \"btn btn-warning\"))) . \"<br/><br/>\";\n \n $real_teams = RealTeam::all();\n if ($real_teams) {\n $header = array(\n t(\"Nome\"));\n\n foreach ($real_teams as $rt_id => $real_team) {\n $rows[] = array(\n l($real_team->name, \"admin/fantacalcio/realteams/\" . $rt_id));\n }\n\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"sticky\" => \"\", \n \"empty\" => t(\"Nessuna squadra\"))));\n }\n return $out;\n}", "public function teamList()\n {\n $teams = Team::all();\n $countTC = 0;\n $countBranch = 0;\n foreach ($teams as $t) {\n if($t->respo->branch == \"TC\" && $t->respo->level < 4){\n $countTC ++;\n }\n else\n $countBranch++;\n }\n //info(\"Nombre de team de TC : \" . $countTC . \" Nombre de team de Branche : \" . $countBranch);\n\n return View::make('dashboard.ce.teamlist', [\n 'teams' => Team::all(),\n 'teamLeftTC' => Config::get('services.ce.maxTeamTc') - $countTC,\n 'teamLeftBranch' => Config::get('services.ce.maxTeamBranch') - $countBranch,\n ]);\n }", "function showteam( $ffanumber, $lastname )\n{\n\t\t$db_hostname = 'gungahlinunitedfc.org.au';\n\t\t$db_username = 'gufcweb_dev';\n\t\t$db_password = 'deve!oper';\n\t\t$db_database = 'gufcweb_player';\n\n \t$mysqli = new mysqli($db_hostname,$db_username,$db_password, $db_database);\n\n\t\t$playerteam = \"\";\n\t\t\n\t\t$sqlinner = \" SELECT * FROM gufcdraws.player where FFANumber = '\".$ffanumber.\"' and LastName = '\".$lastname.\"' and display = 'Y'\";\n\n\t\t$sqlexample1 = \" SELECT * FROM gufcdraws.player where FFANumber = 28069631 and LastName = 'Chilmaid' and display = 'Y' \";\n\t\t$sqlexample2 = \" SELECT * FROM gufcdraws.player where fkteamid = 'U16 Div 2 Boys' and display = 'Y' \";\n\t\t\n\t\t$r_queryinner = $mysqli->query($sqlinner);\n\n\t\t$todays_date = date(\"Y-m-d\");\t\t\t\t\t\t\n\n\t\t$msg = 'No player found.';\t\n\n\t\techo '<table class=\"table\" align=\"center\" border=\"1\" >';\n\t\techo '<th>First Name</th>';\n\t\techo '<th>Last Name</th>';\n\t\techo '<th>Team Name</th>';\n\n\t\tif ( ! $r_queryinner )\n\t\t{\n\t\t\techo 'Player not found'; \n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sqlteam = \" SELECT FirstName,LastName,fkteamid FROM gufcdraws.player where fkteamid = '\".$playerteam.\"' and display = 'Y'\";\n\t\t\t\n\t\t\t$r_queryteam = $mysqli->query($sqlteam);\n\t\t\t\n\t\t\tif ( $r_queryteam ) {\n\t\t\t\n\t\t\t\t$rowteam = mysqli_fetch_assoc($r_queryteam)\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>'.$rowteam['FirstName'].'</td>';\n\t\t\t\techo '<td>'.$rowteam['LastName'].'</td>';\n\t\t\t\techo '<td>'.$rowteam['fkteamid'].'</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\techo '</table>';\n\t\t\techo '<p/>';\n\t\t}\n}", "public function all_about_us_member_info_for_admin(){\r\n $query = \"SELECT * FROM tbl_aboutus_team ORDER BY team_member_id DESC\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "function fantacalcio_admin_teams_list() {\n $out = l(\"Aggiungi squadra\", \"admin/fantacalcio/teams/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $teams = Team::all();\n \n if ($teams) {\n \n $header = array(\"Nome\", \"Utente\", \"Gironi\", \"Attiva\");\n \n foreach ($teams as $t_id => $team) {\n \n $account = User::get($team->user);\n \n $groups_team = \"\";\n foreach ($team->getCompetitions() as $competition) {\n $groups_team .= $competition . \"<br>\";\n }\n $rows[] = array(\n l($team->name, \"admin/fantacalcio/teams/\" . $t_id), \n $account != null ? $account->name : \"\", \n $groups_team, \n fantacalcio_check_value($team->active));\n }\n $out .= theme(\"table\", array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table table-responsive\")), \n \"sticky\" => TRUE, \n \"empty\" => t(\"Nessuna squadra\")));\n }\n \n return $out;\n}", "private function loadAllTeams()\n\t{\n\t\t$this->aTeams = Team::loadAllTeams();\n\t}", "public function indexAction(){\n $user = $this->getUser();\n\n if($user->getRole()->getRole() === 'ROLE_EMPLOYEE'){\n $teams = $user->getTeams();\n }else if($user->getRole()->getRole() === 'ROLE_MANAGER'){\n $teams = $user->getManagedTeams();\n }else if($user->getRole()->getRole() === 'ROLE_ADMIN'){\n $em = $this->getDoctrine()->getManager();\n $teams = $em->getRepository('UserBundle:Team')->findAll();\n }else{\n $teams = null;\n }\n\n return $this->render('UserBundle:Team:table.html.twig', [\n 'teams' => $teams,\n ]);\n }", "public function loadData(){\r\n $this->host = Team::find($this->host);\r\n $this->guest = Team::find($this->guest);\r\n $this->winner = Team::find($this->winner);\r\n $this->tournament = Tournament::find($this->tournamentID); \r\n }", "public function index()\n {\n return response(League::withCount('teams')->get());\n }", "function getTeam()\n\t{\n\t\treturn $this->Info['Team'];\n\t}", "public function getTeams() {\n return $this->teams;\n }", "public function show(Teamrequest $teamrequest)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }", "public function addGetInfos(){\n return view('/backoffice/teams_add');\n }", "function get_driver_team_db($idTeam)\n{\n require('./model/connect_db.php');\n $sql = \"select p.idPilot, p.namePilot, p.pilotNumber, p.country from pilot p where p.idTeam = '%d'\";\n $request = sprintf($sql,$idTeam);\n $result = mysqli_query($link,$request) or die(utf8_encode(\"request error\") . $request);\n $list_driver = array();\n while($line = mysqli_fetch_assoc($result) and isset($line))\n {\n $list_driver[] = $line;\n }\n return $list_driver;\n}", "public static function loadAllTeams()\n {\n\n $sql_connection = new mySqlConnection();\n $sql = \"SELECT * FROM team ORDER BY team_name ASC\";\n\n $statement = $sql_connection->connect()->prepare($sql);\n $statement->execute();\n $allTeams = $statement->fetchAll(PDO::FETCH_UNIQUE);\n\n return $allTeams;\n }", "public function team();", "public function actionDisplay() {\r\n global $mainframe, $user; \r\n $tourID = Request::getVar('tourID',0);\r\n $model = Tournament::getInstance();\r\n $tour_detail = $model->getItem($tourID);\r\n $lists = $model->getLists($tourID, $tour_detail); \r\n \r\n $this->addBarTitle(\"Tournament: <small>$tour_detail->name</small>\", \"tournaments\"); \r\n $this->addIconToolbar(\"Apply\", Router::buildLink(\"gamesport\", array(\"view\"=>\"tournament\", \"layout\" => \"save\",\"tourID\"=>$tourID)), \"apply\");\r\n addSubMenuGameSportTour('tournament');\r\n \r\n $this->render('teamjoined', array('tour_detail'=> $tour_detail,'lists' => $lists));\r\n }", "public function show(team_members $team_members)\n {\n //\n }", "public function getOurTeam()\n {\n $data = HomeController::getPage('our-team');\n return view('our_team')->with(['data' => $data]);\n }", "public function fetchAllTeams(){\n $sqlQuery = \"SELECT teamID, teamID, teamName, dateCreated, lastUpdate, isBusy, (select count(userID)\n FROM Users where Users.teamID = Teams.teamID) as'memberCount' \n FROM Teams\";\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $dataSet = [];\n while ($dbRow = $statement->fetch(PDO::FETCH_ASSOC)) {\n $dataSet[] = new Team($dbRow);\n\n }\n\n $this->_dbInstance->destruct();\n return $dataSet;\n }", "public function index()\n {\n //\n\n return view('admin.team.index')->withEntries(Team::orderByDesc('id')->get());\n }", "function woothemes_get_our_team ( $args = '' ) {\n\tglobal $woothemes_our_team;\n\treturn $woothemes_our_team->get_our_team( $args );\n}", "function listTeams($con, $def_teamID)\n\t{ \n\t # Default value for the team dropdown\n\t $sql_teams = \"SELECT teamID, teamName FROM journeyteams\";\n\t\t$result_teams = $con->query($sql_teams) or die(mysqli_error($con));\n\t\n\t\t$list_teams = \"\";\n\t\twhile($rowt = mysqli_fetch_array($result_teams))\n\t\t{\n\t\t\t$teamID = htmlspecialchars($rowt['teamID']);\n\t\t\t$teamName = htmlspecialchars($rowt['teamName']);\n\t\n\t\t\tif($teamID == $def_teamID) { $selected = \"selected='true'\"; } else { $selected = \"\"; }\n\t\n\t\t\t$list_teams .= \"<option value='$teamID' $selected>$teamName</option>\";\n\t\t}\n\n\t\treturn $list_teams;\n\t}", "private function fetchGames() {\n $this->games = array();\n $this->playtimes = array();\n\n $url = $this->getBaseUrl() . '/games?xml=1';\n $gamesData = new SimpleXMLElement(file_get_contents($url));\n\n foreach($gamesData->games->game as $gameData) {\n $game = SteamGame::create($gameData);\n $this->games[$game->getAppId()] = $game;\n $recent = (float) $gameData->hoursLast2Weeks;\n $total = (float) $gameData->hoursOnRecord;\n $playtimes = array((int) ($recent * 60), (int) ($total * 60));\n $this->playtimes[$game->getAppId()] = $playtimes;\n }\n }", "public function preDisplay()\n {\n if (!$GLOBALS['current_user']->isAdminForModule('Users') && !$GLOBALS['current_user']->isDeveloperForModule('Users'))\n dotb_die(\"Unauthorized access to administration.\");\n\n\n //Customize Team Management - By Lap Nguyen\n include_once(\"custom/modules/Teams/_helper.php\");\n $ss = new Dotb_Smarty();\n $region = $GLOBALS['app_list_strings']['region_list'];\n $nodes = getTeamNodes();\n $ss->assign(\"MOD\", $GLOBALS['mod_strings']);\n $ss->assign(\"NODES\", json_encode($nodes));\n $ss->assign(\"APPS\", $GLOBALS['app_strings']);\n $ss->assign(\"CURRENT_USER_ID\", $GLOBALS['current_user']->id);\n\n $detail = getTeamDetail('1');\n $ss->assign(\"team_name\", $detail['team']['team_name']);\n $ss->assign(\"legal_name\", $detail['team']['legal_name']);\n $ss->assign(\"short_name\", $detail['team']['short_name']);\n $ss->assign(\"prefix\", $detail['team']['prefix']);\n $ss->assign(\"phone_number\", $detail['team']['phone_number']);\n $ss->assign(\"team_id\", $detail['team']['team_id']);\n $ss->assign(\"parent_name\", $detail['team']['parent_name']);\n $ss->assign(\"parent_id\", $detail['team']['parent_id']);\n $ss->assign(\"manager_user_id\", $detail['team']['manager_user_id']);\n $ss->assign(\"manager_user_name\", $detail['team']['manager_user_name']);\n $ss->assign(\"description\", $detail['team']['description']);\n $ss->assign(\"count_user\", $detail['team']['count_user']);\n $ss->assign(\"region\", $detail['team']['region']);\n $ss->assign(\"select_region\", $region);\n\n echo $ss->fetch('custom/modules/Teams/tpls/TeamManagement.tpl');\n dotb_die();\n }", "public function getMaxTeamsList(){\n return $this->_get(11);\n }", "public function testDestiny2GetLeaderboards()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function lists()\n\t{\n\t\t$this->OnlyAdmin();\n\t\t$info = $this->TicketModel->getList('desc');\n\t\t$this->loadView('views/ticket', array('info'=> $info), true);\n\t}", "function get_team_members() {\n\tif ( is_singular( 'companies' ) ) {\n\t\t$field_name_repeater = 'company_team_member_repeater';\n\t\t$name_meta = 'company_team_member_name';\n\t\t$job_title_meta = 'company_team_member_job_title';\n\t\t$phone_number_meta = 'company_team_member_phone_number';\n\t\t$email_meta = 'company_team_member_email';\n\t\t$picture_meta = 'company_team_member_picture';\n\t}\n\tif ( is_singular( 'group_of_companies' ) ) {\n\t\t$field_name_repeater = 'group_of_companies_team_member_repeater';\n\t\t$name_meta = 'group_of_companies_team_member_name';\n\t\t$job_title_meta = 'group_of_companies_team_member_job_title';\n\t\t$phone_number_meta = 'group_of_companies_team_member_phone_number';\n\t\t$email_meta = 'group_of_companies_team_member_email';\n\t\t$picture_meta = 'group_of_companies_team_member_picture';\n\t}\n\t$team_member_count = 0;\n\t/**\n\t * Check if there are data in the team_member_repeater field:\n\t */\n\t$team_member_name_array = array();\n\t$team_member_job_title_array = array();\n\t$team_member_phone_number_array = array();\n\t$team_member_email_array = array();\n\t$team_member_picture_url_array = array();\n\tif (have_rows($field_name_repeater)) {\n\t\t/**\n\t\t * Go through all the data in the team_member_repeated field\n\t\t */\n\t\twhile ( have_rows($field_name_repeater) ) {\n\t\t\t/**\n\t\t\t * the_row() function gets the row data\n\t\t\t */\n\t\t\tthe_row();\n\t\t\tarray_push( $team_member_name_array , get_sub_field($name_meta) );\n\t\t\tarray_push( $team_member_job_title_array , get_sub_field($job_title_meta) );\n\t\t\tarray_push( $team_member_phone_number_array , get_sub_field($phone_number_meta) );\n\t\t\tarray_push( $team_member_email_array , get_sub_field($email_meta) );\n\t\t\tarray_push( $team_member_picture_url_array , get_sub_field($picture_meta) );\n\t\t\t$team_member_count++;\n\t\t}\n\t}\n\t/**\n\t * Different styles for different amount of team members\n\t */\n\tswitch ($team_member_count) {\n\t\tcase 0:\n\t\t\t/**\n\t\t\t * There are no team members -> HIDE our team section\n\t\t\t */\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t?>\n\t\t\t<div class=\"col-lg-6 center-block\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[0],\n\t\t\t\t\t$team_member_job_title_array[0],\n\t\t\t\t\t$team_member_phone_number_array[0],\n\t\t\t\t\t$team_member_email_array[0],\n\t\t\t\t\t$team_member_picture_url_array[0],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t?>\n\t\t\t<div class=\"col-sm-6 col-md-6 col-lg-6\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[0],\n\t\t\t\t\t$team_member_job_title_array[0],\n\t\t\t\t\t$team_member_phone_number_array[0],\n\t\t\t\t\t$team_member_email_array[0],\n\t\t\t\t\t$team_member_picture_url_array[0],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-6 col-md-6 col-lg-6\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[1],\n\t\t\t\t\t$team_member_job_title_array[1],\n\t\t\t\t\t$team_member_phone_number_array[1],\n\t\t\t\t\t$team_member_email_array[1],\n\t\t\t\t\t$team_member_picture_url_array[1],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t?>\n\t\t\t<div class=\"col-sm-6 col-md-4 col-lg-3 col-lg-offset-1\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[0],\n\t\t\t\t\t$team_member_job_title_array[0],\n\t\t\t\t\t$team_member_phone_number_array[0],\n\t\t\t\t\t$team_member_email_array[0],\n\t\t\t\t\t$team_member_picture_url_array[0],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-6 col-md-4 col-lg-3\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[1],\n\t\t\t\t\t$team_member_job_title_array[1],\n\t\t\t\t\t$team_member_phone_number_array[1],\n\t\t\t\t\t$team_member_email_array[1],\n\t\t\t\t\t$team_member_picture_url_array[1],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-6 col-md-4 col-lg-3\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[2],\n\t\t\t\t\t$team_member_job_title_array[2],\n\t\t\t\t\t$team_member_phone_number_array[2],\n\t\t\t\t\t$team_member_email_array[2],\n\t\t\t\t\t$team_member_picture_url_array[2],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\t?>\n\t\t\t<div class=\"col-sm-6 col-md-4 col-lg-3\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[0],\n\t\t\t\t\t$team_member_job_title_array[0],\n\t\t\t\t\t$team_member_phone_number_array[0],\n\t\t\t\t\t$team_member_email_array[0],\n\t\t\t\t\t$team_member_picture_url_array[0],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-6 col-md-4 col-lg-3\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[1],\n\t\t\t\t\t$team_member_job_title_array[1],\n\t\t\t\t\t$team_member_phone_number_array[1],\n\t\t\t\t\t$team_member_email_array[1],\n\t\t\t\t\t$team_member_picture_url_array[1],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-6 col-md-4 col-lg-3\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[2],\n\t\t\t\t\t$team_member_job_title_array[2],\n\t\t\t\t\t$team_member_phone_number_array[2],\n\t\t\t\t\t$team_member_email_array[2],\n\t\t\t\t\t$team_member_picture_url_array[2],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-6 col-md-4 col-lg-3\">\n\t\t\t\t<?php\n\t\t\t\tmake_team_member_html_card(\n\t\t\t\t\t$team_member_name_array[3],\n\t\t\t\t\t$team_member_job_title_array[3],\n\t\t\t\t\t$team_member_phone_number_array[3],\n\t\t\t\t\t$team_member_email_array[3],\n\t\t\t\t\t$team_member_picture_url_array[3],\n\t\t\t\t\t'grey-underline')\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}", "public function actionTeam_name() {\n if (isset($_POST['search']) != 0) {\n $output = '';\n $teamname = $_POST['search'];\n $department = $_POST['department'];\n $managers = $_POST['managers'];\n $response = array();\n $modules = Yii::$app->db->createCommand(\"SELECT distinct assist_users.id, assist_users.email FROM assist_users JOIN assist_user_meta ON assist_user_meta.uid = assist_users.id WHERE email LIKE '%$teamname%' AND department = '$department' AND assist_user_meta.meta_value = '' AND assist_user_meta.meta_key = 'team' AND assist_users.status = 1 \")->queryAll();\n foreach ($modules as $key => $val) {\n $get_userrole = $this->getUserRole($val['id']); /* get the current user's role */\n\n $userrole = $this->checkUserRole($val['id']); // check the current user is not manager\n if ($userrole != 1) {\n\n $userteam = $this->checkUserTeam($val['id'], $managers); // exclude existing users\n if ($userteam != 1) {\n if (!empty($get_userrole)) {\n if ($get_userrole[0]['meta_value'] != 7) {\n $response[] = array(\"value\" => $val['email']);\n }\n } else {\n $response[] = array(\"value\" => $val['email']);\n }\n }\n }\n }\n $output = json_encode($response);\n return $output;\n } else {\n return $this->redirect(['dv-users/index']);\n }\n }", "public function getAllTeamsAdmin() {\n\t\t$url = WEBSERVICE. \"teams/getAllTeamsAdmin\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $arrayResponse;\n\t}", "function viewTeam() {\n global $user;\n $UID = $user->uid;\n\n $params = drupal_get_query_parameters();\n $array = array();\n \n // checks to see if the user has a team\n if (isset($params['TID'])) {\n $TID = $params['TID'];\n } else {\n drupal_set_message(\"No team selected.\", 'error');\n drupal_goto($_SERVER['HTTP_REFERER']);\n }\n\n // checks to see if the user is on the team (keeping in mind that team owners can\n // see their team application\n if (dbGetTeamOwner($TID) != $UID && (!isMyTeam($TID) || teamIsIneligible($TID))) {\n drupal_set_message('You do not have permission to access this page.', 'error');\n return;\n }\n \n $team = dbGetTeam($TID);\n\n $markup = '';\n $markup .= '<div style=\"float:left; width:38%\">';\n // create team header and table\n $markup .= '<table style=\"margin:0px 0px 10px 0px;\"><tr>';\n \n $markup .= '<td style=\"padding:0px 14px 10px 14px;\"><div align=\"left\"><h2 style=\"margin:0px 0px 7px 0px;\"><b>';\n\n // if the team has a type\n if ($team['type'] != \"Other\"){\n $markup .= \"{$team['type']} {$team['number']} - {$team['name']}\";\n } else{\n $markup .= \"Team {$team['number']} - {$team['name']}\";\n }\n \n $markup .= '</b></h2></div></td></tr></table>';\n \n // create table\n $markup .= '<table id=\"photoAndEdit\"><tr><td style=\"padding:0px;\">'; \n\n // if the user can edit team picture\n if (hasPermissionForTeam('editTeam', $TID)){\n $markup .= '<div align=\"right\">';\n $markup .= '<a href= \"?q=editThumbnail';\n $markup .= '&TID='. $TID . '&FID=' . $team['FID'] . '\">';\n $markup .= '<span title=\"Edit Photo\"><button><img class=\"editIcon\" src=\"/images/icons/editThumbnailWhite.png\"></button></span></a>';\n $markup .='</div>';\n } else {\n // otherwise show just a disabled button\n $markup .= '<div align=\"right\">';\n $markup .= '<span title=\"Edit Photo\"><button type=\"button\" disabled><img class=\"editIcon\" src=\"/images/icons/editThumbnailWhite.png\"></button></span>';\n $markup .='</div>';\n }\n\n $markup .= '</td></tr><tr><td style=\"padding:0px;\">';\n\n // if the team has a picture then display\n if (!empty($team['FID'])) {\n $url = generateURL($team['FID']);\n $markup .= '<div align=\"center\"><img src=\"' .$url .'\" style=\"max-width:150px; width:auto; height:auto; padding: 5px 0px 5px 0px\">';\n // default team picture\n } else {\n $markup .= '<div align=\"center\"><img src= \"/images/defaultPics/team.png\" style=\"max-width:200px; width:auto; height:auto; padding: 15px 0px 15px 0px\">';\n }\n\n $markup .= '</div></td></tr></table></div>';\n\n $teams = dbGetTeamsForUser($UID);\n\n $markup .= '<div align=\"right\">';\n\n // if the user can permission to manage outreach\n if (!teamIsIneligible($TID) &&\n hasPermissionForTeam('manageOutreachTags', $TID)) {\n $markup .= '<a href=\"?q=teamModeratorPage\">';\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button>Moderators</button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to view ideas, write-ups, and hours awaiting approval.';\n $markup .= '</span></div></a>';\n } else {\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button type=\"button\" disabled>Moderators</button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to view ideas, write-ups, and hours awaiting approval.';\n $markup .= '</span></div>';\n\n }\n\n // if the user can manage the outreach settings (currently only tags)\n if (!teamIsIneligible($TID) && hasPermissionForTeam('manageOutreachTags', $TID)){\n $markup .= '<a href=\"?q=teamOutreachSettings\">';\n $markup .= '<button>Settings</button></a>';\n } else {\n $markup .= '<button type=\"button\" disabled>Settings</button>';\n }\n\n // if the user has permission to manage hours\n if (!teamIsIneligible($TID) && hasPermissionForTeam('editAnyHours', $TID)){\n $markup .= '<a href= \"?q=offsetHours';\n $markup .= '&TID=' . $team['TID'] . '\">';\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button type=\"button\"><img class=\"hoursIcon\" src=\"/images/icons/clockWhite.png\"></button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to enter old team hours from previous years.';\n $markup .= '</span></div></a>';\n } else {\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button type=\"button\" disabled><img class=\"hoursIcon\" src=\"/images/icons/clockWhite.png\"></button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to enter old team hours from previous years.';\n $markup .= '</span></div>';\n }\n \n // if the user can edit the team\n if (hasPermissionForTeam('editTeam',$TID)){\n $markup .= '<a href= \"?q=teamForm&url=viewTeam';\n $markup .= '&TID=' . $team['TID'] . '\">';\n $markup .= '<button type=\"button\"><img class=\"editIcon\" src=\"/images/icons/editWhite.png\"></button></a>';\n } else{\n $markup .= '<button type=\"button\" disabled><img class=\"editIcon\" src=\"/images/icons/editWhite.png\"></button></a>';\n }\n\n // if the user can delete the team\n if (hasPermissionForTeam('deleteTeam', $TID)){ \n $markup .= '<a href= \"?q=deleteTeamPage';\n $markup .= '&TID=' . $team['TID'] . '\">';\n $markup .= '<button type=\"button\"><img class=\"trashIcon\" src=\"/images/icons/trashWhite.png\"></button></a>';\n } else {\n $markup .= '<button type=\"button\" disabled><img class=\"trashIcon\" src=\"/images/icons/trashWhite.png\"></button></a>';\n }\n \n $markup .= '</div>';\n\n // begin displaying info\n\n $markup .= '<div style=\"width:60%; float:right; padding-left:10px\">';\n\n $teams = dbGetTeamsForUser($UID);\n $numOutreaches = dbGetNumOutreachForTeam($TID);\n \n // create table\n $markup .= '<table id=\"miniViewTeam\" style=\"margin:16px 0px 0px 0px\"><tr><td><b>';\n\n if ($numOutreaches != 0){\n $markup .= '<a href=\"?q=outreach&allTeamOutreach\">Outreaches: </a></b>';\n } else {\n $markup .= 'Outreaches: </b>';\n }\n\n $markup .= $numOutreaches . '</td>';\n\n $markup .= '<td><b>Total Number of Hours: </b>' . dbGetHoursForTeam($TID) . '</td></tr>';\n\n $markup .= '<tr><td><b><a href=\"?q=showUsersForTeam';\n $numStudents = dbGetNumStudentsForTeam($team['TID']);\n $numMentors = dbGetNumMentorsForTeam($team['TID']);\n $markup .= '&TID='.$team['TID'].'&type=student\">Students: </a></b>'.dbGetNumStudentsForTeam($team['TID']).'</td>';\n $markup .= '<td><b><a href=\"?q=showUsersForTeam';\n $markup .= '&TID='.$team['TID'].'&type=mentor\">Mentors: </a></b>'.dbGetNumMentorsForTeam($team['TID']).'</td></tr>';\n\n $markup .= '<tr><td><b>City: </b>' . $team['city'] . '</td>';\n $markup .= '<td><b>State: </b>' . $team['state'] . '</td></tr>';\n\n $markup .= '<tr><td><b>Country: </b>' . $team['country'] . '</td>';\n $markup .= '<td><b>Rookie Year: </b>' . $team['rookieYear'] . '</td></tr>';\n\n if ($team['rookieYear'] == NULL){\n $team['rookieYear'] = '[none]';\n }\n\n $markup .= '</table></div>';\n\n return array('#markup' => $markup);\n}", "public static function loadAllTeams()\n\t{\n\t\t$tmpDataMgr = createNewDataManager();\n\t\t$sql = self::getQueryTextAndCurYearWeek();\n\t\t$qTeam = $tmpDataMgr->runQuery($sql);\n\t\t$aTeams = array();\n\t\t\n\t\twhile($row = mysql_fetch_assoc($qTeam))\n\t\t{\t\t\n\t\t\t$aTeams[$row[\"id\"]] = new Team($row);\n\t\t}\n\t\t\n\t\treturn $aTeams;\n\t\t\n\t}", "public function index()\n {\n \n try {\n\n // fetching team members\n $team_members = TeamMembers::select('id', 'first_name', 'last_name', 'image','designation', 'designation', 'status','created_at')->get();\n \n return view('admin.team.list-team-member')->with('team_members',$team_members->toArray());\n\n } catch (\\Exception $e) {\n print_r($e->getMessage());\n }\n\n }", "public function testActiveTeamResponse()\n {\n $client = new DebugClient($_SERVER['FANTASY_DATA_API_KEY'], Subscription::KEY_DEVELOPER);\n\n /** @var \\GuzzleHttp\\Command\\Model $result */\n $result = $client->Teams([]);\n\n $response = $client->mHistory->getLastResponse();\n\n $this->assertEquals('200', $response->getStatusCode());\n\n /** we expect 32 teams for 2014 */\n $this->assertCount( 32, $result );\n\n $check_team_keys = function ( $pTeam )\n {\n /** we expect 19 stats (woah!) */\n $this->assertCount( 19, $pTeam );\n\n $cloned_array = $pTeam;\n\n /** this function helps us assure that we're not missing any keys in the Enum list */\n $process_key = function ( $pKey ) use ( $pTeam, &$cloned_array )\n {\n $this->assertArrayHasKey( $pKey, $pTeam );\n unset( $cloned_array[$pKey] );\n\n if ( Teams\\Property::KEY_STADIUM_DETAILS == $pKey )\n {\n $pStadium = $pTeam[$pKey];\n\n /** we expect 7 keys */\n $this->assertCount( 7, $pStadium );\n\n $cloned_stadium = $pStadium;\n\n $process_stadium = function ( $pStadiumKey ) use ( $pStadium, &$cloned_stadium )\n {\n $this->assertArrayHasKey( $pStadiumKey, $pStadium );\n unset( $cloned_stadium[$pStadiumKey] );\n };\n\n /** test all the stadium keys */\n $process_stadium( Stadium\\Property::KEY_CAPACITY );\n $process_stadium( Stadium\\Property::KEY_CITY );\n $process_stadium( Stadium\\Property::KEY_COUNTRY );\n $process_stadium( Stadium\\Property::KEY_NAME );\n $process_stadium( Stadium\\Property::KEY_PLAYING_SURFACE );\n $process_stadium( Stadium\\Property::KEY_STADIUM_ID );\n $process_stadium( Stadium\\Property::KEY_STATE );\n }\n };\n\n /** test all the keys */\n $process_key( Teams\\Property::KEY_CITY );\n $process_key( Teams\\Property::KEY_CONFERENCE );\n $process_key( Teams\\Property::KEY_DIVISION );\n $process_key( Teams\\Property::KEY_FULL_NAME );\n $process_key( Teams\\Property::KEY_KEY );\n $process_key( Teams\\Property::KEY_NAME );\n $process_key( Teams\\Property::KEY_STADIUM_DETAILS );\n $process_key( Teams\\Property::KEY_STADIUM_ID );\n\n /** 06/07/2014 Update */\n $process_key( Teams\\Property::KEY_AVERAGE_DRAFT_POSITION );\n $process_key( Teams\\Property::KEY_AVERAGE_DRAFT_POSITION_PPR );\n $process_key( Teams\\Property::KEY_BYE_WEEK );\n $process_key( Teams\\Property::KEY_DEFENSIVE_COORDINATOR );\n $process_key( Teams\\Property::KEY_DEFENSIVE_SCHEME );\n $process_key( Teams\\Property::KEY_HEAD_COACH );\n $process_key( Teams\\Property::KEY_OFFENSIVE_COORDINATOR );\n $process_key( Teams\\Property::KEY_OFFENSIVE_SCHEME );\n $process_key( Teams\\Property::KEY_SPECIAL_TEAMS_COACH );\n $process_key( Teams\\Property::KEY_TEAM_ID );\n\n /** ?? */\n $process_key( Teams\\Property::KEY_PLAYER_ID );\n\n $this->assertEmpty( $cloned_array );\n };\n\n $stats = $result->toArray();\n\n array_walk( $stats, $check_team_keys );\n }", "public function getTeams()\n {\n $em = $this->getEntityManager();\n $query = $em->createQuery(\n 'SELECT p\n FROM Vlreleases\\UserBundle\\Entity\\Team p\n ORDER BY p.tname ASC'\n );\n $result = $query->getResult();\n \n return $result;\n }", "public function otherList()\n\t{\n\t\techo json_encode($this->other_schedule->fetchData());\n\t}", "function getTeamById($teamId){\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select id`, `name`, `score` from teams where `id`='. $teamId .';');\r\n\r\n return fetch_result($res);\r\n}", "public function list_team($id)\n {\n $con['selection'] = 'hr_users.*, hr_users.id as user_id, hr_designations.name as designation, hr_roles.name as role, hr_departments.name as department';\n $con['conditions'] = array(\n 'hr_users.department_id' => $id,\n 'hr_users.status' => 1\n );\n $con['innerJoin'] = array(array(\n 'table' => 'hr_designations',\n 'condition' =>'hr_users.designation_id = hr_designations.id',\n 'joinType' => 'left'\n ),array(\n 'table' => 'hr_roles',\n 'condition' =>'hr_users.role_id = hr_roles.id',\n 'joinType' => 'left'\n ),array(\n 'table' => 'hr_departments',\n 'condition' =>'hr_users.department_id = hr_departments.id',\n 'joinType' => 'left'\n ));\n $data['users'] = $this->get_users($con);\n $data['heading'] = 'Employees';\n $this->load->view('users/users', $data);\n }", "function getAllTeams(){\r\n /*for testing purposes only, replace with request to db\r\n return array(\r\n array(\"name\" => \"Usine\", \"score\" => 2000),\r\n array(\"name\" => \"Abattoirs\", \"score\" => 1000),\r\n array(\"name\" => \"Caserne\", \"score\" => 1200),\r\n array(\"name\" => \"Asile\", \"score\" => 5000),\r\n array(\"name\" => \"Zombie\", \"score\" => -10000)\r\n );*/\r\n\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select `id`, `name`, `score` from teams;');\r\n\r\n return fetch_result($res);\r\n}", "public function scrape()\n {\n $this->scrapeTeams();\n }", "function view_projects_info(){\n \t$details = array();\n\n \t$link = mysql_connect(DN_HOST, DB_USER, DB_PASS);\n \tmysql_select_db(DB_NAME, $link);\n \t$query = \"select `id`, name from healingcrystals_projects where completed_on is null order by starts_on desc\";\n \t$result = mysql_query($query);\n \twhile($project = mysql_fetch_assoc($result)){\n \t\t$details[] = array('project_name' => $project['name'],\n \t\t\t\t\t\t\t'project_url' => assemble_url('project_overview', array('project_id' => $project['id'])),\n\t\t\t \t\t\t\t\t'project_id' => $project['id']);\n\n\t\t\t$query_1 = \"select id, name from healingcrystals_project_objects\n\t\t\t\t\t\twhere type='Milestone' and\n\t\t\t\t\t\tproject_id='\" . $project['id'] . \"' and\n\t\t\t\t\t\tcompleted_on is null order by created_on desc\";\n\t\t\t$result_1 = mysql_query($query_1);\n\t\t\twhile($milestone = mysql_fetch_assoc($result_1)){\n\t\t\t\t$details[count($details)-1]['milestones'][] = array('milestone_id' => $milestone['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'milestone_url' => assemble_url('project_milestone', array('project_id' => $project['id'], 'milestone_id' => $milestone['id'])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'milestone_name' => $milestone['name']);\n\n\t\t\t\t$query_2 = \"select id, name, integer_field_1 from healingcrystals_project_objects\n\t\t\t\t\t\t\twhere type='Ticket' and\n\t\t\t\t\t\t\tproject_id='\" . $project['id'] . \"' and\n\t\t\t\t\t\t\tmilestone_id='\" . $milestone['id'] . \"' and\n\t\t\t\t\t\t\tcompleted_on is null order by created_on desc\";\n\t\t\t\t$result_2 = mysql_query($query_2);\n\t\t\t\twhile($ticket = mysql_fetch_assoc($result_2)){\n\t\t\t\t\t$index = count($details[count($details)-1]['milestones']) - 1;\n\t\t\t\t\t$details[count($details)-1]['milestones'][$index]['tickets'][] = array('ticket_id' => $ticket['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ticket_url' => assemble_url('project_ticket', array('project_id' => $project['id'], 'ticket_id' => $ticket['integer_field_1'])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ticket_name' => $ticket['name']);\n\n\t \t\t$query_3 = \"select id, body\n\t\t \t\t \t\t\t\tfrom healingcrystals_project_objects\n\t\t\t\t \t\t\t\twhere parent_id='\" . $ticket['id'] . \"' and\n\t\t\t\t\t\t\t\tparent_type = 'Ticket'\n\t\t\t\t\t\t\t\torder by created_on desc\";\n\t\t\t\t\t$result_3 = mysql_query($query_3);\n\t\t\t\t\twhile($task = mysql_fetch_assoc($result_3)){\n\t\t\t\t\t\t$index_1 = count($details[count($details)-1]['milestones'][$index]['tickets']) - 1;\n\t\t\t\t\t\t$details[count($details)-1]['milestones'][$index]['tickets'][$index_1]['tasks'][] = array('task_body' => $task['body'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'task_id' => $task['id']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t}\n\n \tmysql_close($link);\n\n \t$this->smarty->assign('details', $details);\n }", "public static function fetch_data($opt)\r\n {\r\n $result = ($opt == 'all') ? db::sql(\"SELECT * FROM `superrugby_2016_scores_18`\", DB_NAME):\r\n db::sql(\"SELECT * FROM `superrugby_2016_scores_18` WHERE Team = '$opt'\", DB_NAME);\r\n $return_result = null;\r\n if (mysqli_num_rows($result)){\r\n while(list($round, $match_id, $player_id, $first_name, $last_name, $country, $position, $bonus_points, $full_appearance, $part_appearance, $win, $draw,\t$away_win, $away_draw, $try, $assist, $conversion, $penalty, $drop_goal, $yellow_card, $red_card, $man_of_the_match) = mysqli_fetch_array($result)){\r\n $return_result[] = array(\r\n 'round'=>$round,\r\n 'match_id'=>$match_id,\r\n 'player_id'=>$player_id,\r\n 'first_name'=>$first_name,\r\n 'last_name'=>$last_name,\r\n 'team'=>$country,\r\n 'position'=>$position,\r\n 'bonus_points'=>$bonus_points,\r\n 'full_appearance'=>$full_appearance,\r\n 'part_appearance'=>$part_appearance,\r\n 'win'=>$win,\r\n 'draw'=>$draw,\r\n 'away_win'=>$away_win,\r\n 'away_draw'=>$away_draw,\r\n 'try'=>$try,\r\n 'assist'=>$assist,\r\n 'conversion'=>$conversion,\r\n 'penalty'=>$penalty,\r\n 'drop_goal'=>$drop_goal,\r\n 'yellow_card'=>$yellow_card,\r\n 'red_card'=>$red_card,\r\n 'man_of_the_match'=>$man_of_the_match\r\n );\r\n }\r\n }\r\n return $return_result;\r\n }", "private function fetchFriends() {\n $url = $this->getBaseUrl() . '/friends?xml=1';\n\n $this->friends = array();\n $friendsData = new SimpleXMLElement(file_get_contents($url));\n foreach($friendsData->friends->friend as $friend) {\n $this->friends[] = SteamId::create((string) $friend, false);\n }\n }", "public function index()\n {\n try {\n $teams = Team::all('name', 'logo_uri');\n if ($teams) {\n return json_encode(array(\"status\" => 200, \"message\" => \"Team List\", \"response\" => $teams));\n }\n return json_encode(array(\"status\" => 500, \"message\" => \"No teams to display\"));\n } catch (Throwable $e) {\n report($e);\n return json_encode(array(\"status\" => 500, \"message\" => \"Something went wrong\"));\n }\n }", "public function getPeopleList()\n {\n //db object\n $db = JFactory::getDBO();\n //gen query\n $query = $db->getQuery(true);\n $query->select(\"DISTINCT(p.id),p.first_name,p.last_name\");\n $query->from(\"#__people AS p\");\n $query->leftJoin(\"#__users AS u ON u.id = p.owner_id\");\n $query->leftJoin(\"#__people_cf AS dcf ON dcf.person_id = p.id AND dcf.association_type='deal'\");\n\n //filter based on member access roles\n $user_id = UsersHelper::getUserId();\n $member_role = UsersHelper::getRole();\n $team_id = UsersHelper::getTeamId();\n\n if ($member_role != 'exec') {\n\n if ($member_role == 'manager') {\n $query->where(\"u.team_id=$team_id\");\n } else {\n $query->where(\"(p.owner_id=$user_id OR p.assignee_id=$user_id )\");\n }\n\n }\n\n $query->where(\"p.published=\".$this->published);\n\n $associationType = $this->app->input->get('association');\n $associationId = $this->app->input->get('association_id');\n\n if ($associationType == \"company\") {\n $query->where(\"p.company_id=\".$associationId);\n }\n if ($associationType == \"deal\") {\n $query->where(\"dcf.association_id=\".$associationId.\" AND dcf.association_type='deal'\");\n }\n\n //set query\n $db->setQuery($query);\n\n //load list\n $row = $db->loadAssocList();\n $blank = array(array('first_name'=>TextHelper::_('COBALT_NONE'),'last_name'=>'','id'=>0));\n $return = array_merge($blank,$row);\n\n //return results\n return $return;\n\n }", "function get_team_by_team_id_request($teamID){\n // Require SQL Connection\n require_once(__DIR__ . '/mysql-connect.php');\n $conn = mysqli_connection();\n\n $sql = \"SELECT * FROM teams WHERE TeamID='$teamID' LIMIT 1\";\n $result = mysqli_query($conn, $sql);\n\n mysqli_close($conn);\n return $result;\n }", "public function getScores()\n {\n \t$url = 'http://www.nfl.com/liveupdate/scorestrip/ss.json';\n \t$content = file_get_contents($url);\n \t$ss_json = json_decode($content, true);\n \t\n $url = 'http://www.nfl.com/liveupdate/scores/scores.json';\n $content = file_get_contents($url);\n $scores_json = json_decode($content, true);\n\n foreach ($ss_json['gms'] as $game) {\n // Map game data to game\n $eid = $game[\"eid\"];\n $game['data'] = $scores_json[$eid];\n \n // Get team IDs\n $home_team = DB::table('team')->where('abbr', $game['data']['home']['abbr'])->value('id');\n $away_team = DB::table('team')->where('abbr', $game['data']['away']['abbr'])->value('id');\n \n // Save teams\n if (! $home_team > 0) {\n \tprint \"Inserting home team into DB<br/>\";\n $home_team = DB::table('team')->insertGetId([\n 'name' => $game['hnn'],\n 'abbr' => $game['data']['home']['abbr']\n ]);\n } else {\n print \"Updating home team in DB<br/>\";\n DB::table('team')->where('id',$home_team)->update(['name' => $game['hnn']]);\n }\n if (! $away_team > 0) {\n print \"Inserting away team into DB<br/>\";\n $away_team = DB::table('team')->insertGetId([\n 'name' => $game['vnn'],\n 'abbr' => $game['data']['away']['abbr']\n ]);\n } else {\n print \"Updating away team in DB<br/>\";\n DB::table('team')->where('id',$away_team)->update(['name' => $game['vnn']]);\n }\n \n // Determine start time\n $year = substr($eid,0,4);\n $month = substr($eid,4,2);\n $day = substr($eid,6,2);\n $time = explode(':',$game['t']);\n $hours = $time[0] + 12;\n $minutes = $time[1];\n $seconds = 0;\n $start = date(\"Y-m-d H:i:s\", mktime($hours, $minutes, $seconds, $month, $day, $year));\n \n // Pull game ID\n $gid = DB::table('game')\n ->where('home_team_id', $home_team)\n ->where('away_team_id', $away_team)\n ->value('id');\n \n // Save game\n if (! $gid > 0) {\n print \"Inserting game for \". $home_team .\" \". $away_team .\" \". $start .\"<br/>\";\n $gid = DB::table('game')->insertGetId([\n \t'eid' => $eid,\n 'home_team_id' => $home_team,\n \t 'away_team_id' => $away_team,\n 'start' => $start\n ]);\n }\n \n // Save scores\n print \"Inserting scores \". $game['data']['home']['score']['T'] .\" \". $game['data']['away']['score']['T'] .\"<br/>\";\n if ($game['data']['home']['score']['T'] != Null && $game['data']['home']['score']['T'] != Null) {\n DB::table('score')->insert([\n 'game_id' => $gid,\n 'home_q1' => $game['data']['home']['score']['1'],\n 'home_q2' => $game['data']['home']['score']['2'],\n 'home_q3' => $game['data']['home']['score']['3'],\n 'home_q4' => $game['data']['home']['score']['4'],\n 'home_q5' => $game['data']['home']['score']['5'],\n 'away_q1' => $game['data']['away']['score']['1'],\n 'away_q2' => $game['data']['away']['score']['2'],\n 'away_q3' => $game['data']['away']['score']['3'],\n 'away_q4' => $game['data']['away']['score']['4'],\n 'away_q5' => $game['data']['away']['score']['5']\n ]);\n }\n print \"<p>----------------------------------------</p>\";\n }\n\n $response = array('exit_code' => 'success');\n //return $response;\n }", "public function getTeamMembers(){\n // body\n $team = new Team();\n $data = $team->getAllTeamByGroup();\n\n // return response.\n return response()->json($data);\n }", "public static function get_all_team()\r\n {\r\n $result = db::sql(\"SELECT DISTINCT Team FROM `superrugby_2016_scores_18`;\", DB_NAME);\r\n $all_team = null;\r\n if (mysqli_num_rows($result)){\r\n while(list($team) = mysqli_fetch_array($result)){\r\n $all_team[] = $team;\r\n }\r\n }\r\n return $all_team;\r\n }", "public function getTeam_post() {\n $this->form_validation->set_rules('TeamGUID', 'TeamGUID', 'trim|required|callback_validateEntityGUID[Teams,TeamID]');\n $this->form_validation->validation($this); /* Run validation */\n\n /* Get Match Data */\n $TeamDetails = $this->Sports_model->getTeams(@$this->Post['Params'], array_merge($this->Post, array('TeamID' => $this->TeamID)));\n if (!empty($TeamDetails)) {\n $this->Return['Data'] = $TeamDetails;\n }\n }", "public function getDropboxTeams() {\n return @$this->attributes['dropbox_teams'];\n }", "public function run()\n {\n $teams = [\n ['team'=>'Manchester City',\n 'team_id'=>1001,\n 'league_id'=>1,\n 'points'=>77,\n 'wins'=>24,\n 'draws'=>5,\n 'losses'=>4,\n 'gd'=>45,\n 'sport_id'=>1,\n 'img_name'=>'manCity.png'],\n ['team'=>'Manchester United',\n 'team_id'=>1002,\n 'league_id'=>1,\n 'points'=>67,\n 'wins'=>19,\n 'draws'=>10,\n 'losses'=>4,\n 'gd'=>29,\n 'sport_id'=>1,\n 'img_name'=>'manUtd.png'],\n ['team'=>'Leicester City',\n 'team_id'=>1003,\n 'league_id'=>1,\n 'points'=>62,\n 'wins'=>19,\n 'draws'=>5,\n 'losses'=>9,\n 'gd'=>22,\n 'sport_id'=>1,\n 'img_name'=>'leicesterCity.png'],\n ['team'=>'Chelsea',\n 'team_id'=>1004,\n 'league_id'=>1,\n 'points'=>58,\n 'wins'=>16,\n 'draws'=>10,\n 'losses'=>7,\n 'gd'=>20,\n 'sport_id'=>1,\n 'img_name'=>'chelsea.png'],\n ['team'=>'West Ham',\n 'team_id'=>1005,\n 'league_id'=>1,\n 'points'=>55,\n 'wins'=>16,\n 'draws'=>7,\n 'losses'=>10,\n 'gd'=>10,\n 'sport_id'=>1,\n 'img_name'=>'westHam.png'],\n ['team'=>'Liverpool',\n 'team_id'=>1006,\n 'league_id'=>1,\n 'points'=>54,\n 'wins'=>15,\n 'draws'=>9,\n 'losses'=>9,\n 'gd'=>16,\n 'sport_id'=>1,\n 'img_name'=>'liverpool.png'],\n ['team'=>'Tottenham',\n 'team_id'=>1007,\n 'league_id'=>1,\n 'points'=>53,\n 'wins'=>15,\n 'draws'=>8,\n 'losses'=>10,\n 'gd'=>18,\n 'sport_id'=>1,\n 'img_name'=>'tottenham.png'],\n ['team'=>'Everton',\n 'team_id'=>1008,\n 'league_id'=>1,\n 'points'=>52,\n 'wins'=>15,\n 'draws'=>7,\n 'losses'=>10,\n 'gd'=>4,\n 'sport_id'=>1,\n 'img_name'=>'everton.png'],\n ['team'=>'Leeds United',\n 'team_id'=>1009,\n 'league_id'=>1,\n 'points'=>47,\n 'wins'=>14,\n 'draws'=>5,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'leedsUtd.png'],\n ['team'=>'Arsenal',\n 'team_id'=>1010,\n 'league_id'=>1,\n 'points'=>46,\n 'wins'=>13,\n 'draws'=>7,\n 'losses'=>13,\n 'gd'=>7,\n 'sport_id'=>1,\n 'img_name'=>'arsenal.png'],\n ['team'=>'Aston Villa',\n 'team_id'=>1011,\n 'league_id'=>1,\n 'points'=>45,\n 'wins'=>13,\n 'draws'=>6,\n 'losses'=>13,\n 'gd'=>9,\n 'sport_id'=>1,\n 'img_name'=>'astonVilla.png'],\n ['team'=>'Wolves',\n 'team_id'=>1012,\n 'league_id'=>1,\n 'points'=>41,\n 'wins'=>11,\n 'draws'=>8,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'wolves.png'],\n ['team'=>'Crystal Palace',\n 'team_id'=>1013,\n 'league_id'=>1,\n 'points'=>38,\n 'wins'=>10,\n 'draws'=>8,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'crystalPalace.png'],\n ['team'=>'Burnley',\n 'team_id'=>1014,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>9,\n 'draws'=>9,\n 'losses'=>15,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'burnley.png'],\n ['team'=>'Southampton',\n 'team_id'=>1015,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>10,\n 'draws'=>6,\n 'losses'=>16,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'southampton.png'],\n ['team'=>'Newcastle',\n 'team_id'=>1016,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>9,\n 'draws'=>9,\n 'losses'=>15,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'newcastle.png'],\n ['team'=>'Brighton',\n 'team_id'=>1017,\n 'league_id'=>1,\n 'points'=>34,\n 'wins'=>7,\n 'draws'=>13,\n 'losses'=>13,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'brighton.png'],\n ['team'=>'Fullham',\n 'team_id'=>1018,\n 'league_id'=>1,\n 'points'=>27,\n 'wins'=>5,\n 'draws'=>10,\n 'losses'=>18,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'fullham.png'],\n ['team'=>'West Brom',\n 'team_id'=>1019,\n 'league_id'=>1,\n 'points'=>25,\n 'wins'=>5,\n 'draws'=>10,\n 'losses'=>18,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'westBrom.png'],\n ['team'=>'Sheffield United',\n 'team_id'=>1020,\n 'league_id'=>1,\n 'points'=>17,\n 'wins'=>5,\n 'draws'=>2,\n 'losses'=>26,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'sheffieldUtd.png'],\n ];\n\n foreach($teams as $team){\n football::create([\n 'team'=> $team['team'],\n 'team_id'=> $team['team_id'],\n 'league_id'=> $team['league_id'],\n 'points'=> $team['points'],\n 'wins'=> $team['wins'],\n 'draws'=> $team['draws'],\n 'losses'=> $team['losses'],\n 'gd'=> $team['gd'],\n 'sport_id'=> $team['sport_id'],\n 'img_name'=>$team['img_name']\n ]);\n }\n }", "public function test_teams_index_authenticated_admin_returns_correct_data(){\n $this->signInAdmin();\n $response = $this->get(route('teams.index'));\n $this->assertEquals(Team::with('leader')->get(), $response['teams']);\n }" ]
[ "0.7134685", "0.6676885", "0.6662068", "0.65972847", "0.65259886", "0.6419824", "0.6387947", "0.6385662", "0.63537157", "0.6350115", "0.6341144", "0.62110436", "0.62058854", "0.6135939", "0.61335206", "0.6123362", "0.61066926", "0.6099865", "0.6001227", "0.59856087", "0.59597564", "0.59114563", "0.58544016", "0.5854168", "0.58068997", "0.5806749", "0.57983226", "0.5779142", "0.5765675", "0.57476425", "0.57469165", "0.5746386", "0.5741787", "0.5734912", "0.5731195", "0.57202655", "0.5719775", "0.5715969", "0.5703831", "0.56972986", "0.56852514", "0.5684573", "0.5675729", "0.5668135", "0.5663758", "0.5652033", "0.56237817", "0.5623639", "0.562309", "0.5608426", "0.5594089", "0.5575617", "0.5574861", "0.5574861", "0.5574861", "0.5574861", "0.5574861", "0.5574861", "0.5573266", "0.55646694", "0.5554488", "0.55519253", "0.55460656", "0.5543545", "0.5540062", "0.552112", "0.55105597", "0.55078226", "0.5489122", "0.5487443", "0.5485197", "0.54816836", "0.54659116", "0.5460424", "0.5445866", "0.541585", "0.5405269", "0.54022586", "0.5399487", "0.5393862", "0.53812957", "0.53710574", "0.5363589", "0.53553206", "0.5354468", "0.53515506", "0.5350445", "0.53461677", "0.5343015", "0.53353393", "0.5333739", "0.5326787", "0.5325446", "0.5322117", "0.5320777", "0.53136015", "0.531156", "0.5310557", "0.53101385", "0.5291482" ]
0.67592037
1
loads the expose PDF stream for a given realty object id
public function getExpose($id) { return $this->loadData('/objekt/expose?objekt_id=' . $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show($id)\n {\n $url = Storage::get('po/'.$id);\n dd($url);\n $headers = array(\n 'Content-Type: application/pdf',\n );\n $download = Storage::download($url, $id, $headers);\n \n }", "public function show($id){\n try{\n $estrategia = Estrategia::with('metasAnios')->contenidoReporte()->find($id);\n //return Response::json($estrategia,500);\n $nombreArchivo = 'Carátula Estrategia Institucional';\n $nombreArchivo.=' - '.$estrategia->claveUnidadResponsable;\n\n $data = array('data' => $estrategia);\n\n //return Response::json($data,500);\n\n $pdf = PDF::loadView('expediente.pdf.estrategia-institucional',$data);\n\n $pdf->setPaper('LEGAL')->setOrientation('landscape')->setWarnings(false);\n\n return $pdf->stream($nombreArchivo.'.pdf');\n }catch(\\Exception $e){\n return Response::json($e,500);\n }\n }", "public function show($id)\n {\n $especies = Especie::find($id);\n $date=new Carbon();\n $fecha = $date->format('d-m-Y');\n\n $pdf = PDF::loadView('especie.reportePDF',compact('especies','fecha'));\n $pdf->getDomPDF()->set_option(\"enable_php\", TRUE);\n return $pdf->stream('reportePDF.pdf');\n }", "public function createPDF($id) {\n $data = \\App\\Rampas::find($id);\n \n $pdf = PDF::loadView('pdf_view', $data);\n \n // download PDF file with download method\n return $pdf->stream('pdf_file.pdf');\n }", "function getObjectFromStreamID($id) {\n\t\t$url = 'https://hestia.speckle.works/api/';\n\t\t$data = json_decode(file_get_contents($url.'streams/'.$id));\n\t\techo '<h2>GH Object: '.$data->resource->name.'</h2>';\n\t\t\n\t\t// get number of objects...\n\t\t$o_len = count($data->resource->layers);\n\t\t\n\t\t// get a list of the objects...\n\t\t\n\t\tfor ($x = 0; $x < $o_len; $x++) \n\t\t{\n\t\t\tgetSubObject($url,$data,$x);\n\t\t}\n\t\techo '<br>';\n\t}", "function _wp_kses_allow_pdf_objects($url)\n {\n }", "public function pdf($id)\n {\n $repair2 = DB::table('repair')\n ->select('repair.id', 'repair.client_id', 'repair.marca_modelo', 'repair.datos', 'repair.descripcion', 'repair.estado', 'clients.name', 'clients.last_name', 'clients.email', 'clients.telefono', 'clients.cuit_cuil')\n ->join('clients', 'clients.id', '=', 'repair.client_id')\n ->where('repair.id', $id)\n ->get();\n\n $pdf = \\PDF::loadView('panel.ejemplo', compact('repair2'));\n return $pdf->stream($id.'.pdf');\n }", "function pdf() {\n if($this->active_invoice->isLoaded()) {\n\n require_once INVOICING_MODULE_PATH . '/models/InvoicePDFGenerator.class.php';\n InvoicePDFGenerator::download($this->active_invoice, lang(':invoice_id.pdf', array('invoice_id' => $this->active_invoice->getName())));\n die();\n } else {\n $this->response->notFound();\n } // if\n }", "function stream($filename) {\n if ( !is_null($this->_current_page_id) ) {\n $this->_pdf->close_object();\n $this->_pdf->add_object($this->_current_page_id, \"add\");\n Page_Cache::store_page($this->_cache_id,\n $this->_pdf->get_page_number(),\n $this->_pdf->serialize_object($this->_current_page_id));\n Page_Cache::store_fonts($this->_cache_id, $this->_fonts);\n $this->_current_page_id = null;\n }\n \n $this->_pdf->stream($filename);\n \n }", "public function getStreamObject() {}", "public function printdata($id)\n{\n $hardware = hard::with(['customer', 'detail', 'detail.product'])->find($id);\n //LOAD PDF YANG MERUJUK KE VIEW PRINT.BLADE.PHP DENGAN MENGIRIMKAN DATA DARI INVOICE\n //KEMUDIAN MENGGUNAKAN PENGATURAN LANDSCAPE A4\n $pdf = PDF::loadView('invoice.print', compact('invoice'))->setPaper('a4', 'landscape');\n return $pdf->stream();\n}", "public function show($id)\n {\n $data = $this->prepareData($id);\n\n $pdf = PDF::loadView('documents.spagreement', $data)->setPaper('a4')->setOrientation('portrait')->setOptions([\n 'margin-bottom' => 0,\n 'margin-top' => 10,\n 'margin-left' => 10,\n 'margin-right' => 10\n ]);\n\n return $pdf->stream();\n }", "public function show($id)\n {\n $book = Book::find($id);\n $file= public_path(). \"/download/\".$book->fileName;\n $headers = array(\n 'Content-Type: application/pdf',\n );\n return Response::download($file, $book->bookName.\".pdf\", $headers);\n //\n }", "public function show($id)\n {\n $document = research_papers::findOrFail($id);\n\n $filePath = 'storage/abstract/'.$document->abstract;\n // if( ! Storage::exists($filePath) ) {\n // abort(404);\n // }\n\n return view('landingpage.viewer', compact('document','filePath'));\n\n // return view('landingpage.viewer')->with(['fileName'=>$fileName,'filepath'=>$filePath,'pdfContent'=>$pdfContent]);\n\n }", "function getObjectFromObjectID($url,$o_id){\n\t\t$object = json_decode(file_get_contents($url.'objects/'.$o_id));\n\t\treturn $object;\n\t}", "public function show($id)\n {\n $products = Products::all();\n $pdf = PDF::loadview('products.mostrar', compact('products'));\n return $pdf->stream();\n }", "function pdf() {\n if($this->active_invoice->isLoaded()) {\n if($this->active_invoice->canView($this->logged_user)) {\n InvoicePDFGenerator::download($this->active_invoice, Invoices::getInvoicePdfName($this->active_invoice));\n \tdie();\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "public function pdf($id)\n {\n $controllerInfo = $this->controllerInfo;\n $passport_collection = Customer::with(['submitted_passports'])->withCount('submitted_passports')->findOrFail($id);\n// return view('Admin.passport-collection.pdf', compact('controllerInfo', 'passport_collection'));\n $pdf = PDF::loadView('Admin.passport-collection.pdf', compact('controllerInfo', 'passport_collection'))\n ->setOptions([\n 'defaultPaperSize' => 'A4',\n 'isRemoteEnabled' => true,\n 'isJavascriptEnabled' => true,\n 'isPhpEnabled' => true,\n 'isHtml5ParserEnabled' => true,\n 'fullBase' => true,\n ]);\n return $pdf->stream();\n }", "public function pdf($id)\n {\n $response = $this->parasut->request('GET', $this->path. '/' . $id . '/pdf');\n\n return new Response($response->getBody());\n }", "public function pdf($id)\r\n {\r\n if (!has_permission('invoices', '', 'view') && !has_permission('invoices', '', 'view_own')) {\r\n access_denied('invoices');\r\n }\r\n if (!$id) {\r\n redirect(admin_url('invoices/list_invoices'));\r\n }\r\n $invoice = $this->invoices_model->get($id);\r\n $invoice_number = format_invoice_number($invoice->id);\r\n $pdf = invoice_pdf($invoice);\r\n $type = 'D';\r\n if ($this->input->get('print')) {\r\n $type = 'I';\r\n }\r\n $pdf->Output(mb_strtoupper(slug_it($invoice_number)) . '.pdf', $type);\r\n }", "public function descargar_pdf(){\n $zonas=Zona::join('colonia','zona.id','=','colonia.id_zona')\n ->join('permiso','permiso.id_colonia','=','colonia.id')\n ->select('zona.*',DB::raw('count(permiso.id)as total'))\n ->groupBy('zona.id')\n ->get();\n\n $pdf=\\PDF::loadView('Pdfs.zonas',compact('zonas'));\n\n return $pdf->stream();\n }", "static function load(){\n $pdf = new LK_PDF('L');\n return $pdf;\n }", "public function show($id)\n {\n // $transaction = \\App\\Transaction::with('users')->findOrFail($id);\n // $pdf = PDF::loadview('pdf.transaction', ['transaction' => $transaction]);\n // //$pdf->save(storage_path().'_filename.pdf');\n // return $pdf->stream('transaction.pdf');\n }", "public function printAction() {\n\t\t$request = Zend_Controller_Front::getInstance ()->getRequest ();\n\t\ttry {\n\t\t\tif (is_numeric ( $request->id )) {\n\t\t\t\t$file = Invoices::PrintPDF($request->id, true, false);\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\tdie ( $e->getMessage () );\n\t\t}\n\t\tdie ();\n\t}", "public function show($id,$user_id)\n {\n $data = Skk::findOrFail($id);\n $user = User::with('roles')->findOrFail($user_id);\n $r = $user->roles->first()->name;\n if ($r == 'Kepala Desa') {\n $pdf = PDF::loadView('pdf.kades.skkl',compact('data','user'))->setPaper('legal','portrait');\n }elseif (\n $r == 'Sekretaris Desa' || $r == 'Kepala Seksi Pelayanan' || \n $r == 'Kepala Seksi Pemerintahan' || $r == 'Kepala Seksi Kesejahteraan'\n ){\n $pdf = PDF::loadView('pdf.perwakilan.skkl',compact('data','user'))->setPaper('legal','portrait');\n }else{\n return abort(404);\n }\n\n return $pdf->stream($data->nama.\".pdf\");\n }", "public function pdf($id)\n {\n $valeurs = $this->detail($id);\n if (!$valeurs) {\n throw new MY_Exceptions_NoSuchRecord('Impossible de trouver la facture ' . $id);\n }\n /*if ($valeurs->fac_fichier && file_exists($valeurs->fac_fichier)) {\n return array(\n 'path' => $valeurs->fac_fichier,\n 'created' => false,\n );\n }*/\n $chemin = $this->generer_pdf($id, true);\n if ($chemin) {\n return array(\n 'path' => $chemin,\n 'created' => true,\n );\n }\n return $chemin;\n }", "static function getPDF($uid){\n $pdf = self::load();\n \n $account = \\LK\\get_user($uid);\n $pdf->setUserSettings(\\LK\\VKU\\VKUManager::getVKU_RenderSettings($account));\n return $pdf;\n }", "public function reporteFactura($id){\n\n $datos =FacturacionCurso::find($id);\n $cursos = DatosFacturaCurso::where('facturaCurso', $id)->get();\n $pdf = \\PDF::loadView('facturacionCursos.factura', compact('datos', 'cursos'));\n return $pdf->stream('reporte.pdf');\n }", "public function show($id)\n\t{\n \t\tif ( ! \\Util::getAccess('Documentos')) return $this->accessFail();\n\t\t\n $documento = $this->documentoRepo->find($id);\n\n $this->notFoundUnless($documento);\n\n\t\t$content_types = [\n\t\t 'txt'\t=> 'application/octet-stream',\n\t\t 'doc'\t=> 'application/msword',\n\t\t 'docx'\t=> 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n\t\t 'xls'\t=> 'application/vnd.ms-excel',\n\t\t 'xlsx'\t=> 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n\t\t 'pdf'\t=> 'application/pdf',\n\t\t 'jpeg'\t=> 'image/jpeg',\n\t\t 'jpg'\t=> 'image/jpg',\n\t\t 'gif'\t=> 'image/gif',\n\t\t 'png'\t=> 'image/png',\n\t\t 'avi'\t=> 'video/avi',\n\t\t 'mpeg'\t=> 'video/mpeg',\n\t\t 'mp4'\t=> 'video/mp4',\n\t\t 'dwg'\t=> 'application/acad',\n\t\t 'dxf'\t=> 'application/dxf',\n//\t\t 'dxf'\t=> 'image/vnd.dxf,\n\t\t 'dwf'\t=> 'application/x-dwf',\n\t\t];\n\t\t\n\t\t$file= $documento->Emp_Doc_Dir . $documento->Doc_File_Nbr;\n\n\t\t$extension = strtolower(pathinfo($documento->Doc_File_Nbr, PATHINFO_EXTENSION));\n\n\t\tif (File::isFile($file))\n\t\t{\n\t\t\tif (in_array($extension, array('txt', 'doc', 'docx', 'xls', 'xlsx', 'dwg', 'dxf', 'dwf'))) \n\t\t\t{\n\t\t\t\treturn Response::download($file, $documento->Doc_File_Nbr, ['Content-Type' => $content_types[ $extension ]]);\n\t\t\t} \n\t\t\telse \n\t\t\t{\t\t\t\t\t\n\t\t\t $file = File::get($file);\n\t\t\t $response = Response::make($file, 200);\n\t\t\t $response->header('Content-Type', $content_types[ $extension ]);\n\t\t\t\n\t\t\t return $response;\n\t\t }\n\t\t}\n\n\t}", "function getTerminalObjectFromStreamID($id) {\n\t\t$url = 'https://hestia.speckle.works/api/';\n\t\t$data = json_decode(file_get_contents($url.'streams/'.$id));\n\t\t//echo '<h1>'.$data->resource->name.'</h1>';\n\t\t\n\t\t// get number of variables\n\t\t$o_len = count($data->resource->layers);\n\t\t\n\t\t// get a list of the variables\n\t\t\n\t\t for ($x = 0; $x < $o_len; $x++) \n\t\t{\n\t\t\t// talk about them - get their names etc.\n\t\t\t$name = $data->resource->layers[$x]->name;\n\t\t\t$o_id = $data->resource->objects[$x]->_id;\n\t\t\t$value = $data->resource->layers[$x]->objectCount;\n\t\t\techo '<h3>'.$name.' = '.$value.' data objects</h3>';\n\t\t\t// this is the object id\n\t\t\t//echo $o_id.'<br>';\n\t\t\t\n\t\t}\n\t\techo '<br>'; \n\t}", "public function get_document(){retrun($id_local_document); }", "public function tampil($id)\n{\n // $tamu=\\App\\models\\tamu_model::find($id);\n // return ('export.tampilpdf',['tamu'=>$tamu]);\n\n // // menampilkan pdf \n // $pdf = PDF::loadView('export.tampilkpdf');\n // return $pdf->stream();\n}", "function _artesis_netarchive_objects($ids) {\n $pdfs = [];\n\n try {\n $netarchive_url = variable_get('addi_wsdl_url', '');\n $netarchive_username = variable_get('addi_username', '');\n $netarchive_group = variable_get('addi_group', '');\n $netarchive_password = variable_get('addi_password', '');\n\n $service = new NetArchiveService($netarchive_url, $netarchive_username, $netarchive_group, $netarchive_password);\n $pdfs = $service->getByFaustNumber($ids);\n }\n catch (Exception $e) {\n watchdog_exception('artesis_netarchive', $e, 'Unable to retrieve pdf from MoreInfo: %message', ['%message' => $e->getMessage()]);\n }\n\n return $pdfs;\n}", "public function downloadPdf($id) {\n $payslip = Payroll::find($id);\n\n $data = \\View::make('admin.pdf-payslip', compact('payslip'));\n $html = $data->render();\n $pdf = \\App::make('snappy.pdf.wrapper');\n $pdf->loadHTML($html);\n return $pdf->inline();\n\n }", "public function show($id)\n {\n $dl = file::find($id);\n return Storage::download($dl->filename, $dl->tittle);\n }", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}", "public function show($id)\n {\n $cita=Cita::findOrFail($id);\n $pdf = PDF::loadView(\"clinica.cita.vista\",[\"cita\"=>$cita]);\n return $pdf->stream($cita->idCita);\n //return view(\"clinica.paciente.show\",[\"paciente\"=>Paciente::findOrFail($id)]);\n }", "public function show($id)\n {\n $ProjectCase = ProjectCase::find($id);\n $ProjectCase->case_status_id = 4;\n $ProjectCase->save();\n $pdf = PDF::loadView('billing.pdf', ['ProjectCase' => $ProjectCase]);\n return $pdf->stream('billing.pdf');\n }", "public function getDownload($id){\n //PDF file is stored under project/public/download/info.pdf\n\n $file= public_path(). \"/download/\";\n $headers = array(\n 'Content-Type: application/pdf',\n );\n return Response::download($file, 'info.pdf', $headers);\n }", "public function show($id)\n {\n $url = Parecer::where('cod_parecer', $id)->select('Parecer.url_documento')->first();\n\n if ($url == null) {\n return redirect()->back()->withErrors('Ops! Este parecer ainda não foi enviado.');\n }\n\n $pathToFile=storage_path().\"/app/\".$url->url_documento;\n return response()->file($pathToFile);\n }", "public function getContentStream($objectId, $options = array ()) { // Yes\n\t\t$myURL = $this->getLink($objectId, \"edit-media\");\n\t\t$ret = $this->doGet($myURL);\n\t\t// doRequest stores the last request information in this object\n\t\treturn $ret->body;\n\t}", "public function download($id);", "public function get_by_id(int $id)\r\n {\r\n $data = array(\r\n 'pageTitle' => 'Document',\r\n 'document' => $this->StaticPage_model->get_document($id),\r\n 'docs' => $this->StaticPage_model->get_document(),\r\n 'session' => $this->session->userdata('username', 'role')\r\n\t\t);\r\n\r\n $this->load->view('templates/header', $data);\r\n $this->load->view('staticPage/get_by_id_staticPage', $data);\r\n $this->load->view('templates/footer');\r\n\r\n }", "abstract public function getDocument($id);", "abstract protected function getObject($id);", "public function getIndirectObject(?\\SetaPDF_Core_Document $document = null);", "public function show(Request $request, int $id): Response\n {\n $invoice = $request->user()->invoice($id);\n\n $viewVars = [\n 'user' => $request->user(),\n 'invoice' => $invoice,\n 'client' => $invoice->client,\n 'pageTitle' => $invoice->name,\n ];\n\n $pdf = app()->make('dompdf.wrapper');\n $pdf->loadView('invoice.show', $viewVars);\n\n $filename = sprintf('invoice_%s.pdf', $invoice->number);\n\n return $pdf->stream($filename);\n }", "public function getObjectByID($objectID);", "public function render($pid, $dsid) {\n global $base_url;\n $url = $base_url . '/viewer/' . $pid . '/' . $dsid . '/download';\n return \"<img src='$url'/>\";\n }", "public function show($pid)\n {\n $data = GeneralTransaction::find($pid);\n $Trans_Detail = DB::table('zenrolle__general_transaction')->join('zenrolle__general_transaction_detail','zenrolle__general_transaction_detail.pid','=','zenrolle__general_transaction.id')\n ->where('zenrolle__general_transaction.id',$pid)->get();\n $pdf = PDF::loadView('Accounts.GeneralTransaction.print_view', compact('data','Trans_Detail'));\n return $pdf->stream('ZenrolleVoucher.pdf');\n\n }", "public function getDocument($id);", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function actionPdf($id) {\n $model = $this->findModel($id);\n\n $content = $this->renderAjax('_pdf', [\n 'model' => $model,\n ]);\n\n $pdf = Yii::$app->pdf;\n $pdf->content = $content;\n return $pdf->render();\n\n }", "public function print_pdf($id, Request $request)\n {\n $order = PurchaseOrder::find($id);\n $pdf = new PurchaseOrderPdf($order);\n $pdf->AliasNbPages();\n return Response::make($pdf->Output('I', 'orden_'.$id.'.pdf'), 200, array('content-type' => 'application/pdf'));\n }", "public function show($id)\n {\n $item = Service::with([\n 'transactions','user_families'\n ])->findOrFail($id);\n\n set_time_limit (300);\n \n $pdf = PDF::loadView('admin.pengaduan-musibah.service-pdf', ['item'=>$item]);\n $pdf->save(storage_path().'_pengaduan-musibah.pdf');\n return $pdf->stream();\n \n return view('admin.pengaduan-musibah.detail', compact('item'));\n }", "function autonav_read_pdf($img_resource, $pic_full_path, $attr, $ext) {\n if (!isset($img_resource)) {\n switch ($ext) {\n case 'pdf':\n // Experimental support\n if (class_exists('Imagick')) {\n\t$im = new Imagick();\n\t$im->setResolution( 100, 100 );\n\t$im->readImage( $pic_full_path.'[0]' ); // read only the first page\n\t$im->scaleImage(900, 900, 1); // final param = bestfit\n\t// need to pick resource from object???\n\t$img_resource = NULL; // ~~~~ Hmm...\n } else {\n\t$attr['error'] = \"Imagick support missing for: {$to_file_path}\";\n\treturn ($attr);\n }\n }\n }\n return $img_resource;\n}", "public function downloadPdfAction() {\r\n $this->checkSession();\r\n $offerId = $this->Request()->getParam(\"offerId\");\r\n $hash = $this->Request()->getParam(\"hash\");\r\n $mediaId = $this->Request()->getParam(\"mediaId\");\r\n\r\n $document = Shopware()->Models()->getRepository('Shopware\\CustomModels\\Offer\\Document\\Document')->findOneBy(array('offerId' => $offerId, 'hash' => $hash));\r\n\r\n if(!$document instanceof \\Shopware\\CustomModels\\Offer\\Document\\Document) {\r\n $document = Shopware()->Models()->getRepository('Shopware\\CustomModels\\Offer\\Document\\Document')->findOneBy(array('offerId' => $offerId));\r\n }\r\n\r\n $isMedia = true;\r\n $docMediaId = $document->getMediaId();\r\n if(!isset($docMediaId) || empty($docMediaId) || $docMediaId==-1) {\r\n $isMedia = false;\r\n }\r\n\r\n try {\r\n $name = basename($document->getHash()) . '.pdf';\r\n $file = Shopware()->DocPath('files/documents') . $name;\r\n if(!file_exists($file)) {\r\n $this->View()->assign(array(\r\n 'success' => false,\r\n 'data' => $this->Request()->getParams(),\r\n 'message' => 'File not exist'\r\n ));\r\n return;\r\n }\r\n\r\n $docId = $document->getDocumentId();\r\n $response = $this->Response();\r\n $response->setHeader('Cache-Control', 'public');\r\n $response->setHeader('Content-Description', 'File Transfer');\r\n $response->setHeader('Content-disposition', 'attachment; filename='.($isMedia?'Angebot':$docId).\".pdf\" );\r\n $response->setHeader('Content-Type', 'application/pdf');\r\n $response->setHeader('Content-Transfer-Encoding', 'binary');\r\n $response->setHeader('Content-Length', filesize($file));\r\n echo file_get_contents($file);\r\n } catch (Exception $e) {\r\n $this->View()->assign(array(\r\n 'success' => false,\r\n 'data' => $this->Request()->getParams(),\r\n 'message' => $e->getMessage()\r\n ));\r\n return;\r\n }\r\n $this->forward('offers');\r\n }", "#[Route(path: '/project/show-simple-pdf/{id}', name: 'translationalresearch_project_show_simple_pdf', methods: ['GET'], options: ['expose' => true])]\n #[Template('AppTranslationalResearchBundle/Project/show-simple-pdf.html.twig')]\n public function showProjectPdfAction(Request $request, Project $project)\n {\n return $this->showAction($request, $project, \"pdf\");\n }", "public function __invoke(Request $request, $id)\n {\n try {\n $asset = Asset::where('file_uri', $id)->first();\n $fileToStreamPath = getenv('VIDEO_STORAGE_ADDR') . $asset->path;\n $stream = new Streamer($fileToStreamPath);\n $stream->start();\n } catch(Exception $exception) {\n new Logger(\"Exception throw: \" . $exception->getMessage());\n }\n }", "public function print($id)\n {\n $order = $this->orderRepository->findWithoutFail($id);\n\n if (empty($order)) {\n Flash::error('Order not found');\n\n return redirect(route('orders.index'));\n }\n\n $pdf = PDF::loadView('admin.orders.print',['order'=>$order]);\n\n return $pdf->stream('order'.$id.'.pdf');\n\t //return view('admin.orders.print')->with('order', $order);\n\n }", "function ml_extract_pdf_contents($s_id){\n\t$filename = 'resume_candidates/'.$s_id.'.pdf';\n\t// Call to Python function to parse pdf file and build necessary objects.\n\t$text = json_decode(exec('python pdf_python/extract_pdf.py '.$filename), true);\n\t$text = preg_replace('/(?:(?:\\r\\n|\\r|\\n)\\s*){2}/s', \"\\n\", $text);\n\t// Compress large resume\n\tif (strlen($text)>7500)\n\t{\n\t\t$text = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"),'', $text); \n\t}\n\t\n\t$text = utf8_decode($text);\n\t$text = strtolower($text);\n\treturn $text;\n}", "public function getOwnerPdfDocument() {}", "public function getOwnerPdfDocument() {}", "public function getOwnerPdfDocument() {}", "public function getOwnerPdfDocument() {}", "private function getEdittedOCRStream($pageId)\n {\n // Getstream\n return $this->decode($results);\n }", "public function edit($id)\n {\n $book = Book::find($id);\n $file= public_path(). \"/download/\".$book->fileName;\n\n return Response::make(file_get_contents($file), 200, [\n 'Content-Type' => 'application/pdf',\n 'Content-Disposition' => 'inline; ' . $book->bookName,\n ]);\n }", "public function show($id)\n {\n $document = Document::with('file')->find($id);\n return response()->json($document);\n }", "private function get_object_resources($p_obj_id)\n {\n $l_quick_info = new isys_ajax_handler_quick_info();\n $l_dao_memory = new isys_cmdb_dao_category_g_memory($this->get_database_component());\n $l_dao_cpu = new isys_cmdb_dao_category_g_cpu($this->get_database_component());\n $l_dao_port = new isys_cmdb_dao_category_g_network_port($this->get_database_component());\n $l_dao_drive = new isys_cmdb_dao_category_g_drive($this->get_database_component());\n\n $l_memory_res = $l_dao_memory->get_data(null, $p_obj_id, \"\", null, C__RECORD_STATUS__NORMAL);\n $l_cpu_res = $l_dao_cpu->get_data(null, $p_obj_id, \"\", null, C__RECORD_STATUS__NORMAL);\n\n $l_memory = 0;\n $l_disc_space = 0;\n $l_cpu = 0;\n\n $l_obj_title = $this->get_obj_name_by_id_as_string($p_obj_id);\n\n if (strlen($l_obj_title) >= 20)\n {\n $l_obj_title = substr($l_obj_title, 0, 20);\n $l_obj_title .= \"...\";\n } // if\n\n $l_member[\"link\"] = $l_quick_info->get_quick_info($p_obj_id, $l_obj_title, C__LINK__OBJECT);\n\n if ($p_obj_id == $_GET[C__CMDB__GET__OBJECT])\n {\n $l_member[\"type\"] = _L($this->get_objtype_name_by_id_as_string($this->get_objTypeID($p_obj_id)));\n }\n else\n {\n $l_member[\"type\"] = _L(\"LC__CMDB__CATG__VIRTUAL_MACHINE\");\n } // if\n\n /**\n * MEMORY\n */\n while ($l_memory_row = $l_memory_res->get_row())\n {\n // @todo Check if \"round()\" does work correctly... Because some of the convert methods use \"number_format()\".\n $l_memory += round(isys_convert::memory($l_memory_row[\"isys_catg_memory_list__capacity\"], \"C__MEMORY_UNIT__MB\", C__CONVERT_DIRECTION__BACKWARD), 2);\n } // while\n\n $l_member[\"memory\"] = $l_memory + 0;\n $l_member[\"memory_rest\"] = $l_memory + 0;\n $l_member[\"memory_unit\"] = \"MB\";\n\n /**\n * CPU\n */\n while ($l_cpu_row = $l_cpu_res->get_row())\n {\n // @todo Check if \"round()\" does work correctly... Because some of the convert methods use \"number_format()\".\n $l_cpu += round(isys_convert::frequency($l_cpu_row[\"isys_catg_cpu_list__frequency\"], C__FREQUENCY_UNIT__GHZ, C__CONVERT_DIRECTION__BACKWARD), 2);\n } // while\n\n $l_member[\"cpu\"] = $l_cpu + 0;\n $l_member[\"cpu_rest\"] = $l_cpu + 0;\n $l_member[\"cpu_unit\"] = \"GHz\";\n\n /**\n * BANDWIDTH\n */\n $l_max_speed = round($l_dao_port->get_max_speed($p_obj_id, \"C__PORT_SPEED__MBIT_S\"), 2);\n\n $l_member[\"bandwidth\"] = $l_max_speed + 0;\n $l_member[\"bandwidth_rest\"] = $l_max_speed + 0;\n $l_member[\"bandwidth_unit\"] = $this->retrieve('SELECT isys_port_speed__title FROM isys_port_speed WHERE isys_port_speed__const = \"C__PORT_SPEED__MBIT_S\";')\n ->get_row_value('isys_port_speed__title');\n\n /**\n * DRIVES\n */\n $l_system_drive_res = $l_dao_drive->get_system_drives($p_obj_id);\n\n while ($l_system_drive_row = $l_system_drive_res->get_row())\n {\n // @todo Check if \"round()\" does work correctly... Because some of the convert methods use \"number_format()\".\n $l_disc_space += round(isys_convert::memory($l_system_drive_row[\"isys_catg_drive_list__capacity\"], \"C__MEMORY_UNIT__GB\", C__CONVERT_DIRECTION__BACKWARD), 2);\n } // while\n\n $l_member[\"disc_space\"] = $l_disc_space + 0;\n $l_member[\"disc_space_rest\"] = $l_disc_space + 0;\n $l_member[\"disc_space_unit\"] = \"GB\";\n\n return $l_member;\n }", "public function show($id)\n\t{\n\t\treturn Response::json(DocumentReception::find($id));\n\t}", "public function show($file_id)\n {\n $file = new Files($file_id);\n\n if(!$file->id)\n {\n $this->addMessageError('File not found.');\n $this->redirect('error');\n }\n\n $ph_file = new File($file->path);\n\n \n if(!$ph_file->path)\n {\n // Not exists\n $this->addMessageError('File content not found.');\n $this->redirect('error');\n }\n \n $data = file_get_contents($ph_file->path);\n\n // set headers\n\t\theader('Content-Type: ' . $file->mime);\n\t\theader('Content-Length: ' . filesize($file->path));\n\t\theader('Expires: 0');\n\t\theader(\"Content-Disposition: inline; filename=\" . urlencode($ph_file->name));\n\t\theader('Connection: close');\n\t\tflush();\n\n\t\t// send file data\n\t\techo $data;\n }", "public function display()\n {\n $dompdf = $this->getDomPdfObject();\n // Affichage, proposition de télécharger sous le nom donné.\n Zend_Layout::getMvcInstance()->disableLayout();\n Zend_Controller_Front::getInstance()->setParam('noViewRenderer', true);\n $dompdf->stream($this->fileName.'.pdf');\n }", "public function createPDF()\n {\n $soxId = $this->getEditObjectId();\n if ($soxId != \"-1\" && isset($soxId)) {\n // load object\n $oOrder = oxNew(\"oxorder\");\n if ($oOrder->load($soxId)) {\n $oUtils = oxRegistry::getUtils();\n $sTrimmedBillName = trim($oOrder->oxorder__oxbilllname->getRawValue());\n $sFilename = $oOrder->oxorder__oxordernr->value . \"_\" . $sTrimmedBillName . \".pdf\";\n $sFilename = $this->makeValidFileName($sFilename);\n ob_start();\n $oOrder->genPDF($sFilename, oxRegistry::getConfig()->getRequestParameter(\"pdflanguage\"));\n $sPDF = ob_get_contents();\n ob_end_clean();\n $oUtils->setHeader(\"Pragma: public\");\n $oUtils->setHeader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n $oUtils->setHeader(\"Expires: 0\");\n $oUtils->setHeader(\"Content-type: application/pdf\");\n $oUtils->setHeader(\"Content-Disposition: attachment; filename=\" . $sFilename);\n oxRegistry::getUtils()->showMessageAndExit($sPDF);\n }\n }\n }", "function _wp_oembed_get_object()\n {\n }", "public function downloadPdf($id)\n {\n $userId = Auth::id();\n $record = DB::table('records')->select('id')->where([\n ['name', '=', 'projects'],\n ['record_id', '=', $id]\n ])->first();\n $count = DB::table('record_user')->where([\n ['user_id', '=', $userId],\n ['record_id', '=', $record->id],\n ['read', '=', true]\n ])->count();\n $response = [];\n if (!Gate::allows('project-read') && !Auth::user()->administrator && $count == 0){\n $response['status'] = 'error';\n $response['msg'] = 'No estas autorizado';\n return response()->json($response, 403);\n }\n $record = Project::find($id);\n $response['data'] = $record;\n #lee el json setting con los datos de configuracion de form\n $path = storage_path() . \"/settings.json\"; // storage/json/setting_form.json\n $json = json_decode(file_get_contents($path), true); \n $styles=[];\n $styles['width_logo']=$json['width_logo'];\n $styles['color']=$json['color'];\n $forms=array_get($json, 'forms');\n foreach($forms as $form){\n if($form['name']==$this->form_name){\n $form_code=$form['code'];\n $form_title=$form['title'];\n $data = $form['fields'];\n }\n }\n $pdf = \\PDF::loadView('pdf', compact('data','form_name','form_title','form_code','record','styles'));\n $pdf->save(storage_path().'/pdf_files_tmp/'.Auth::user()->id.'.pdf');\n $b64Doc = base64_encode(file_get_contents(storage_path('/pdf_files_tmp/'.Auth::user()->id.'.pdf')));\n $response['form']=$id;\n $response['route']=$b64Doc;\n $response['success'] = true;\n $response['req'] = true;\n return response()->json($response, 200);\n }", "public function exporttoPDF(Request $request, $id)\n {\n $purchaseInvoices = PurchaseInvoice::with('items')->find($id);\n $pdf = PDF::loadView('pdf-invoice',['purchaseInvoices'=>$purchaseInvoices])->setPaper('a4','portrait');\n $fileName = $purchaseInvoices->kode;\n //kalo mau liat pdfnya matiiin ini\n //return view('pdf-invoice', compact('purchaseInvoices'));\n //nyalain bawahnya\n return $pdf->stream($fileName.'.pdf');\n }", "public function attachment_is_pdf( $id ) {\n\t\treturn wp_attachment_is( 'pdf', $id );\t\t\n\t}", "public function read($id) {\n\n var_dump($id);\n echo 'read()NEXT'; \n \n $this->pdo->beginTransaction();\n \n $stmt = $this->pdo->prepare(\"SELECT id, file_data, mime_type \"\n . \"FROM company_files \"\n . \"WHERE id= :id\");\n\n //var_dump($stmt); exit;\n \n // query blob from the database\n $stmt->execute([$id]);\n \n $stmt->bindColumn('file_data', $fileData, \\PDO::PARAM_STR);\n $stmt->bindColumn('mime_type', $mimeType, \\PDO::PARAM_STR);\n $stmt->fetch(\\PDO::FETCH_BOUND);\n $stream = $this->pdo->pgsqlLOBOpen($fileData, 'r');\n \n // output the file\n header(\"Content-type: \" . $mimeType);\n fpassthru($stream);\n }", "public function getPage($id) {\r\n\t\t$file = stream_resolve_include_path($this->name . '/pages/' . $id .'.' .\\app::$config['dev']['serialization']) ;\r\n\t\tif ($file) \r\n\t\t\t\treturn \\tools::unserialize(substr($file,0,-4));\r\n\t\telse\r\n\t\t\tthrow new \\Exception(t('Page doesn\\'t exist', FALSE) . ' ,' . $this->name . ' : ' . $id);\r\n }", "public function pdf($id)\n {\n $items = Complain::findOrFail($id);\n $default = Gallerie::with('galleries')\n ->where('complaints_id', $id )\n ->where('is_default',1)\n ->take(1)\n ->get();\n $default2 = Gallerie::with('galleries')\n ->where('complaints_id', $id )\n ->where('is_default',1)\n ->take(1)\n ->get();\n $user = User::where('level', 'public')->get();\n $data = Gallerie::with('galleries')->where('complaints_id', $id)->get();\n\n return view('pages.pdf.index')->with([\n 'items' => $items,\n 'default' => $default,\n 'default2' => $default2,\n 'user' => $user,\n 'data' => $data,\n ]);\n }", "function\tcreatePDF( $_key=\"\", $_id=-1, $_pdfName=\"\") {\n\t\t$this->_createPDF( $_key, $_id, $_pdfName) ;\n\t\treturn $this->myInv->getXMLComplete() ;\n\t}", "public function pdf() \n {\n $proveedores = Proveedor::all();\n $coment = 'Reporte de proveedores con los datos sin filtrar';\n $pdf = PDF::loadView('pdf.proveedor', compact('proveedores','coment'))->setPaper('letter');//,'landscape' para cambiar la horientacion de la hoja\n return $pdf->stream('proveedor.pdf');//descargar directa \"dawnload\" en lugar de stream\n }", "private function getOCRStream($pageId)\n {\n // Getstream\n return $this->decode($results);\n }", "public function viewDocumentsAction($idAction)\n {\n /** @var Action $action */\n $action = $this->loadClassById($idAction,\"Action\");\n /** @var Person $person */\n $person = $action->getPersonPerson();\n /** @var User $user */\n $user = $action->getUserUser();\n\n /** @var Employer $employer */\n $employer = $user->getPersonPerson()->getEmployer();\n /** @var Document $cedula */\n $cedula = $action->getPersonPerson()->getDocumentDocument();\n if ($cedula) {\n if($_SERVER['HTTP_HOST'] =='127.0.0.1:8000'){\n $pathCedula = 'http://'.'127.0.0.1:8000' . $this->container->get('sonata.media.twig.extension')->path($cedula->getMediaMedia(), 'reference');\n $nameCedula = $cedula->getMediaMedia()->getName();\n }else{\n $pathCedula = '//' . $actual_link = $_SERVER['HTTP_HOST'] . $this->container->get('sonata.media.twig.extension')->path($cedula->getMediaMedia(), 'reference');\n $nameCedula = $cedula->getMediaMedia()->getName();\n }\n }else{\n $pathCedula='';\n $nameCedula='';\n }\n $rut = $action->getPersonPerson()->getRutDocument();\n if ($rut) {\n if($_SERVER['HTTP_HOST'] =='127.0.0.1:8000'){\n $pathRut = 'http://'.'127.0.0.1:8000' . $this->container->get('sonata.media.twig.extension')->path($rut->getMediaMedia(), 'reference');\n $nameRut = $rut->getMediaMedia()->getName();\n }else{\n $pathRut = '//' . $actual_link = $_SERVER['HTTP_HOST'] . $this->container->get('sonata.media.twig.extension')->path($rut->getMediaMedia(), 'reference');\n $nameRut = $rut->getMediaMedia()->getName();\n }\n }else{\n $pathRut='';\n $nameRut='';\n }\n return $this->render('RocketSellerTwoPickBundle:BackOffice:ViewDocuments.html.twig',array('user'=>$user , 'person'=>$person,'action'=>$action, 'cedula'=>$cedula,'path_document'=>$pathCedula,'nameDoc'=>$nameCedula ,'rut'=>$rut,'pathRut'=>$pathRut,'nameRut'=>$nameRut));\n }", "public function getPdfContent();", "public function descargar($id)\n {\n $documento=Documentos::find($id);\n $file=\"documentos/\".$documento->idcliente.\"/\".$documento->ruta;\n return Response::download($file);\n }", "public function show(User $user)\n {\n $pdf = PDF::loadview('pdf', compact('user'));\n return $pdf->stream();\n }", "public function printsalaryslip($id){\n\t\t\n\t\t$salary=Salary::where('salaryid',$id)->get()->first();\n\t\t$employee=Employee::where('employeeid',$salary->employeeid)->get()->first();\n\t\t$employeefullname=ucfirst($employee->first_name).' '.ucfirst($employee->last_name);\n $pdf = PDF::loadView('hr.salary.salaryslip', compact('salary','employeefullname'));\n \n return $pdf->stream('Salary Slip.pdf');\n\t}", "public function printPDF()\n {\n $data = [\n 'title' => 'First PDF for Medium',\n 'heading' => 'Hello from 99Points.info',\n 'content' => \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.\"\n ];\n\n $pdf = PDF::loadView('pdf_view', $data);\n return $pdf->download('medium.pdf');\n }", "public function get_download($id){\n\n\t\t$data = Media::find($id);\n\n\t\treturn Response::download('public/'.$data->original, $data->name);\n\t}" ]
[ "0.6643904", "0.6290223", "0.62154746", "0.6104439", "0.6035732", "0.59884286", "0.5983619", "0.59631574", "0.5956142", "0.5936295", "0.59291714", "0.591532", "0.5897738", "0.5871889", "0.5829794", "0.5814274", "0.5813957", "0.5790253", "0.5779586", "0.5766296", "0.5726997", "0.57245505", "0.5633559", "0.56153667", "0.5595134", "0.5585921", "0.5575659", "0.5570807", "0.5568064", "0.5547425", "0.5536455", "0.55328286", "0.55184555", "0.5514136", "0.5509646", "0.5495963", "0.5495963", "0.5495171", "0.5495171", "0.5495171", "0.5495171", "0.5495171", "0.5495004", "0.5494396", "0.5494396", "0.5494312", "0.5493279", "0.54847336", "0.54704106", "0.5456284", "0.5452623", "0.5430867", "0.54222316", "0.54134643", "0.54054886", "0.5397804", "0.5375243", "0.53732425", "0.5370804", "0.53621733", "0.53583676", "0.53569776", "0.5351079", "0.5340651", "0.5340412", "0.5318326", "0.5310347", "0.5308788", "0.5292481", "0.5287995", "0.5286747", "0.5284172", "0.5284172", "0.52841413", "0.52841413", "0.52822214", "0.5280823", "0.52796656", "0.5260337", "0.52573615", "0.52553517", "0.52450573", "0.52357405", "0.5233978", "0.52335656", "0.5232425", "0.52316725", "0.522563", "0.52236956", "0.5211315", "0.5210781", "0.5207064", "0.5204324", "0.5197014", "0.519363", "0.51899064", "0.5187219", "0.51807237", "0.51801115", "0.51794785" ]
0.5186611
97
returns a list of countries from the API only countries where active objects exists are returned
public function getCountries() { return $this->getData('/objekt/laender'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountryList()\n {\n return $this->call('country.list');\n }", "public function get_all_countries_list()\n\t {\n\t \t$query=$this->ApiModel->get_all_countries();\n\t \techo json_encode($query);\n\t }", "function getAllCountries() {\n $myModel = new My_Model();\n $result = $myModel->select('countries', \"*\", null);\n if (count($result) > 1) {\n return $result = [\n \"message\" => \"countries list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no country available\",\n \"data\" => \"null\"\n ];\n }\n }", "public function listCountries() {\r\n\t\t\t$sql = Connection::getHandle()->prepare(\"SELECT DISTINCT c.countries_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_name,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_iso_code_2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCASE WHEN z.zone_id > 0 THEN 'true' ELSE 'false' END AS zone\r\n\t\t\t\t\t\t\t\t\t\tFROM bs_countries c\r\n\t\t\t\t\t\t\t\t\t\tLEFT JOIN bs_zones z ON (c.countries_iso_code_2 = z.countries_id)\r\n\t\t\t\t\t\t\t\t\t\tGROUP BY c.countries_id\r\n\t\t\t\t\t\t\t\t\t\tORDER BY c.countries_id\");\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\twhile ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\t\t$results[] = $row;\r\n\t\t\t}\r\n\r\n\t\t\treturn $results;\r\n\t\t}", "public function getCountries();", "public function getCountrylist()\n {\n $cachePool = new FilesystemAdapter('', 0, \"cache\");\n \n if ($cachePool->hasItem('countries')) {\n $countries = $cachePool->getItem('countries')->get();\n } else {\n $countries = $this->client->request(\n 'GET',\n 'https://kayaposoft.com/enrico/json/v2.0?action=getSupportedCountries'\n )->toArray();\n $countriesCache = $cachePool->getItem('countries');\n \n if (!$countriesCache->isHit()) {\n $countriesCache->set($countries);\n $countriesCache->expiresAfter(60*60*24);\n $cachePool->save($countriesCache);\n }\n }\n\n return $countries;\n }", "public function countryList(){\n $response['status'] = \"false\"; \n $response['message'] = \"Invalid request.\"; \n \n $country = Country::getCountries();\n if(!empty($country)){\n $response['status'] = \"true\"; \n $response['message'] = \"Country data.\"; \n $response['data'] = $country; \n }\n $this->response($response);\n \n }", "public function getCountries() {\n\n $result = $this->doRequest('v1.0/all-countries', 'GET');\n\n return $result;\n\n }", "public static function getCountryList(){\n return Country::find()\n ->orderBy(['name'=>SORT_ASC])\n ->all();\n }", "public function countries(): array\n {\n return $this->client->get(\"country\");\n }", "protected function operatingCountries()\n {\n return OperatingCountry::all();\n }", "public function sGetCountryList()\n {\n $context = Shopware()->Container()->get('shopware_storefront.context_service')->getShopContext();\n $service = Shopware()->Container()->get('shopware_storefront.location_service');\n\n $countryList = $service->getCountries($context);\n $countryList = Shopware()->Container()->get('legacy_struct_converter')->convertCountryStructList($countryList);\n\n $countryList = array_map(function ($country) {\n $request = $this->front->Request();\n $countryId = (int) $country['id'];\n $country['flag'] = ((int) $request->getPost('country') === $countryId || (int) $request->getPost('countryID') === $countryId);\n\n return $country;\n }, $countryList);\n\n $countryList = $this->eventManager->filter(\n 'Shopware_Modules_Admin_GetCountries_FilterResult',\n $countryList,\n ['subject' => $this]\n );\n\n return $countryList;\n }", "public function getAllCountries() {\n return $this->_countries->pluck ( 'name', 'code','id','flag');\n }", "public function getCountryList() {\n \n if($this->request->has('page')) {\n $data = $this->_countries->where('is_active', 1)->with(['categories' =>function($query){\n $query->distinct('id');\n }])->paginate(10);\n } else {\n $data = $this->_countries->where('is_active', 1)->with(['categories' =>function($query){\n $query->distinct('id');\n }])->get();\n }\n\n // db::raw('SELECT country_categories.country_id FROM country_categories INNER JOIN videos ON videos.id = country_categories.video_id WHERE videos.is_live =1 group BY country_categories.country_id order BY country_id ASC');\n $result = DB::select( DB::raw('SELECT country_categories.country_id FROM country_categories INNER JOIN videos ON videos.id = country_categories.video_id LEFT JOIN countries c ON country_categories.country_id= c.id WHERE c.is_active = 1 and videos.is_live =1 and videos.is_active = 1 and videos.job_status=\"Complete\" and videos.is_archived = 0 and videos.liveStatus != \"complete\" and country_categories.video_id != 0 group BY country_categories.country_id order BY country_id ASC'));\n $countries = array();\n foreach($result as $country) {\n array_push($countries,$country->country_id);\n }\n\n foreach($data as $item) {\n if(in_array($item['id'],$countries)){\n $list[] = $item;\n }\n }\n return $list;\n }", "function getSiteCountries() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_COUNTRIES . \" WHERE status='1' ORDER BY country_name\");\n\n return $data;\n }", "function GetCountries()\n\t{\n\t\t$result = $this->sendRequest(\"GetCountries\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "static function get_countries() {\n static $ret = array();\n if(empty($ret)) {\n global $wpdb;\n $ret = $wpdb->get_results('SELECT * FROM ai_country ORDER BY name', OBJECT_K);\n }\n return $ret;\n }", "public function getCountriesList() {\n return $this->_get(7);\n }", "public function GetCountries(){\n try {\n \n // $country=new Countries();\n $countries=Countries::model()->GetCountries();\n return $countries;\n \n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:GetCountries::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n }", "public function getAllCountriesProperty()\n {\n return Country::get();\n }", "public function getCountries() {\n\n $countries = CountryModel::all();\n\n return response()->json($countries);\n }", "public static function getCountries()\n {\n return self::$countryList;\n }", "public function countries(): array\n {\n $payload = Payload::list('countries');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return (array) $result->json('data');\n }", "public function get_countries()\n\t{\n\t\t$t_countries = xtc_get_countriesList();\n\t\treturn $t_countries;\n\t}", "public function getListCountry()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_country' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}", "public function getCountriesInfo();", "function countryList()\n {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getAllCountries() {\n $sql = \"SELECT * FROM countries\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n return false;\n } else {\n return $result->result_array();\n }\n }", "function get_all_countries($obj, $continent='')\n{\n\t$country_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_countries_list', array('continent'=>$continent)));\n\t\n\treturn $country_result->result_array();\n}", "function getcountries_get(){\n\n $from = 'countries';\n $where = array();\n $select = '*';\n $records = 2;\n\n $countries = $this->base_model->getCommon($from, $where, $select, $records);\n\n if ($countries) {\n \n $response = array(\n 'status' => TRUE,\n 'message' => 'Countries found successfully.',\n 'result' => $countries);\n\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code \n }else{\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country not found.');\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }", "public function actionCountries()\n {\n $continentId = Yii::$app->request->get(\"continentId\");\n $countries = Country::getAvailable( $continentId );\n echo json_encode( $countries );\n Yii::$app->end(200);\n }", "public function getCountryList()\r\n {\r\n return $this->admin->sGetCountryList();\r\n }", "public function getAvailableCountries()\n {\n $availableCountries=array();\n $models=ShippingCosts::model()->findAll(array(\n 'select'=>'t.country_code',\n 'group'=>'t.country_code',\n 'distinct'=>true,\n 'condition'=>'t.shipping_method_id=:shipping_method_id',\n 'params'=>array(':shipping_method_id'=>$this->id),\n ));\n $availableCountries=CHtml::listData($models, 'country_code', 'country_code');\n return $availableCountries;\n }", "public function getCountries() {\n $db = database::getDB();\n $query = \"SELECT country FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }", "public function countryList ( Request $request ) {\n $countries = Country::all();\n return response()->json([\n \"response\" => $countries\n ]);\n }", "public function getAllCountryCodes() {\n\t\t$filter = new Filters\\Misc\\CountryCode();\n\t\treturn $filter->query->find();\n\t}", "public function getCustomerCountryList()\n {\n $customerCountryList = DB::table('country')\n ->join('city', 'country.country_id', '=', 'city.country_id')\n ->join('address', 'city.city_id', '=', 'address.city_id')\n ->join('customer', 'customer.address_id', '=', 'address.address_id')\n ->select(DB::raw('country.country, COUNT(customer.*)'))\n ->groupBy('country.country')\n ->orderBy('country')\n ->get();\n\n return response()->json([\n 'success' => true,\n 'message' => 'Customers country list',\n 'data' => $customerCountryList\n ]);\n }", "public function getCountries()\n {\n $uri = '/countries';\n $cacheKey = substr($uri, 1);\n\n $result = $this->cache->get($cacheKey);\n if ($result == null) {\n $result = $this->requestData($uri);\n if (!$result) {\n return false;\n }\n $this->cache->save($cacheKey, $result);\n }\n return $result;\n\n }", "public function countries(){\n $countries=Country::all();\n if ($countries){\n $countriesArray = [];\n foreach ($countries as $country) {\n array_push($countriesArray, $country->country);\n }\n return response()->json([\"Status\"=>\"Ok\",\"data\"=>$countriesArray],200);\n }else{\n return response()->json([\"Status\"=>\"No Content\"],204);\n }\n }", "function getCountryList($options = array()) {\n\t\t$local_country_data = array();\n\t\t$where = array();\n\n\t\t# possible options of filtering\n\t\tif (!empty($options['country_id']))\n\t\t$where[] = \"id = \".$options['country_id'];\n\n\t\t# build SQL request\n\t\t$_sql = \"SELECT `id`, `iso2`, `iso3`, `name`\n\t\t\t\tFROM `%s` %s ORDER BY `name` ASC\";\n\t\t$sql = sprintf($_sql,\n\t\t$this->country_table,\n\t\t!empty($where) ? \"WHERE \".implode(\" AND \", $where) : \"\"\n\t\t);\n\t\t$result = mysql_query($sql);\n\n\t\twhile ($_city = mysql_fetch_assoc($result)) {\n\t\t\t$this->country_data[$_city['id']] = array (\n\t\t\t'id'\t=> $_city['id'],\n\t\t\t'iso2'\t=> $_city['iso2'],\n\t\t\t'iso3'\t=> $_city['iso3'],\n\t\t\t'name'\t=> $_city['name'],\n\t\t\t);\n\t\t\t$local_country_data[] = $this->country_data[$_city['id']];\n\t\t}\n\n\t\treturn $local_country_data;\n\t}", "public function getCountries()\n {\n return $this->_countries;\n }", "public function getCountriesProperty()\n {\n return Country::where('name', 'LIKE', \"%{$this->searchTerm}%\")\n ->whereNotIn('id', $this->selectedCountries)->get();\n }", "public static function __getCountries($active = \"1\", DbConnection $DbConnection = null) \r\n\t{\r\n\t \t$DbConnection = ($DbConnection == null) ? DbConnection::getInstance(\"_world\") : $DbConnection ;\r\n\t \t$sql = \"SELECT country_id, country FROM country WHERE active = '{$active}' \";\r\n\t \t\r\n\t \treturn $DbConnection->getPair($sql);\r\n\t}", "public function getCountryList() {\n $result = array();\n $collection = Mage::getModel('directory/country')->getCollection();\n foreach ($collection as $country) {\n $cid = $country->getId();\n $cname = $country->getName();\n $result[$cid] = $cname;\n }\n return $result;\n }", "public function countryList(){\n $sorted = $this->country->select('id','country_name')->get()->sortBy('country_name');\n return $sorted->values()->all();\n }", "public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }", "public function getCountries() {\n $dql = \"SELECT c from Country c\n ORDER BY c.name\";\n $countries = $this->em\n ->createQuery($dql)\n ->getResult();\n return $countries;\n }", "function getcountries() {\n\t\t// import the country DB\n\t\t$cntArray = array();\t \n\t\tApp::import(\"Model\",\"Country\");\n\t\t$this->Country=& new Country();\n\t\t$country = $this->Country->find('all', array('conditions'=>array('Country.status'=>'1'), 'fields'=>array('Country.id','Country.country_name')));\n\t\tforeach($country as $cat){\n\t\t\t$cntArray[$cat['Country']['id']] = $cat['Country']['country_name'];\n\t\t}\n\t\treturn $cntArray;\n\t}", "public function get_country_list() \n\t{\n\t\treturn $this->db->select('num_code')\n\t\t->select('country_name')\n\t\t->select('num_code')\n\t\t->from('system_iso3166_l10n')\n\t\t->order_by('country_name', 'ASC')\t\n\t\t->get()->result();\n\t}", "public function getCountryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('country');\r\n\t\t$this->db->where('country_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function getCountryList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('country');\n\t\t$this->db->where('country_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "protected function _getCountries()\n {\n return $options = $this->_getCountryCollection()\n ->setForegroundCountries($this->_getTopDestinations())\n ->toOptionArray();\n }", "public function getAll()\n {\n \ttry {\n\t\t\t// Cargo los entrenamientos.\n\t\t\t$country = Country::get();\n\t\t\t\n \t} catch (\\Exception $e) {\n \t\treturn ResponseHelper::armyResponse(false, 400, \"Internal Error\", \"Error: \" . $e->getMessage()) ;\n \t}\n\n\t\treturn ResponseHelper::armyResponse(true, 200, $country, \"countries\");\n }", "public function countries()\n {\n $countries = Countries::where('status', 'active')->orderBy('idx')->get();\n return view('setup.countries.index', compact('countries'));\n }", "public function getZoneCountriesProperty()\n {\n return Country::whereIn('id', $this->selectedCountries)->get();\n }", "public function hasCountries() {\n return $this->_has(7);\n }", "public function getCountries()\n {\n return \"/V1/directory/countries\";\n }", "public static function All()\n\t{\n\t\t$query = 'EXEC [getCountries]';\n\t\t$query .= '@languageCode = \\'' . Localisation::getCurrentLanguage() . '\\'';\n\n\t\t$rows = Database::ODBCExecute($query);\n\n\t\t$countries = array();\n\t\tforeach ($rows as $row) {\n\t\t\t$countries[] = new Country(\n\t\t\t\t$row['code'],\n\t\t\t\t$row['name']\n\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "function CountriesList()\n\t{\t$countries = array();\n\t\t$adminuser = new AdminUser((int)$_SESSION[SITE_NAME][\"auserid\"]);\n\t\t\n\t\t$sql = \"SELECT countries.ccode, countries.shortname, IF(toplist > 0, 0, 1) AS istoplist FROM countries ORDER BY istoplist, toplist, shortname\";\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$countries[$row[\"ccode\"]] = $row[\"shortname\"];\n\t\t\t}\n\t\t}\n\t\treturn $countries;\n\t}", "public function hasCountry() {\n return $this->_has(5);\n }", "public function country_details() {\n $options = [\n 'projection' => [\n '_id' => 1,\n 'country_name' => 1,\n 'iso_country_code' => 1,\n 'telephone_code' => 1,\n 'currency_code' => 1,\n 'currency_symbol' => 1\n ],\n 'sort' => [\n 'country_name' => 1\n ]\n ];\n $res = $this->mongo_db->find(MDB_CSC, ['country_status' => 'A'], $options);\n\n return (!empty($res)) ? $res : array();\n }", "public function countriesCache()\n {\n if (!config('priongeography.use_cache')) {\n return $this->allCountries();\n }\n\n $ttl = config('priongeography.cache_ttl', 60*24);\n $cacheKey = 'country_all';\n\n $this->cache->remember($cacheKey, $ttl, function () {\n return $this->allCountries();\n });\n }", "public function getCountries() {\n\n $countries = civicrm_api3('Address', 'Getoptions', [\n 'field' => 'country_id',\n ]);\n return $countries['values'];\n }", "public function getCountries() {\n $this->db->select('id, country_name, internet'); \n $result = $this->db->get(TBL_COUNTRIES);\n if ($result->num_rows() > 0 )\n return $result->result_array();\n else\n return FALSE;\n }", "function get_country_list()\n\t{\n\t\t$query = \"SELECT `id`, `country` FROM `countries` ORDER BY CASE WHEN `id` = '\".OTHER_COUNTRY.\"' THEN 1 ELSE 0 END, `country`\";\n\t\t$result = $this->db->query($query);\n\t\tif ($result->num_rows() > 0 ) \n\t\t\treturn $result->result();\n\t\treturn false;\n\t}", "public function getCountries(): Country\\Collection\n {\n $result = $this->client->request(\n 'GET',\n '/countries',\n [\n 'query' => [\n 'access_key' => $this->accessKey,\n ]\n ]\n );\n $this->validateResponse($result);\n\n $body = json_decode($result->getBody(), true);\n\n $countries = array_map(\n function (array $country, string $countryCode) {\n return new Country\\Country($countryCode, $country['country_name'], $country['dialling_code']);\n },\n $body,\n array_keys($body)\n );\n return new Country\\Collection(...$countries);\n }", "private function returnCountriesForUser()\n {\n\n $tableCountryExt = CountryExt::tablename();\n $tableCountry = Country::tablename();\n\n /* $role=Yii::$app->user->getIdentity()->role;\n //If I'm admin just get all countries\n if($role==User::ROLE_ADMIN || $role==User::ROLE_SUPERADMIN || $role==User::ROLE_MARKETER)\n {\n $countries = Country::listAllCountries();\n }\n //otherwise find all countries where specific lanuage(language of current user is) is spoken\n else\n {\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n } */\n\n //return countries per language\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n return $countries;\n }", "public static function getList()\n {\n\n $queryString = 'SELECT * from `countries` ORDER BY id ASC';\n\n $paramsArray = array();\n\n // query\n $dbh = new \\Components\\Db();\n $result = $dbh->getResult($queryString, $paramsArray);\n \n return $result;\n\n }", "public static function countries(): array\n\t{\n\t\treturn ArrayLists::countries();\n\t}", "public function getCountries()\n {\n foreach (CountryStorage::getAll() as $id=>$content) {\n $key = $content->id;\n $value = $content->name;\n $countryoptions[$key] = $value;\n }\n return $countryoptions;\n }", "public function generateActiveCountries(){\n $published= CaseStudy::published()->get();\n\n $a= collect([]);\n foreach($published as $cs){\n $a= $a->merge($cs->collectCountries());\n }\n $a= $a->unique()->sort();\n $this->active_countries= implode(', ', $a->toArray()); //store the countries as a comma-seperated string\n $this->save();\n\n return true;\n }", "public function actionGetnearbycountry(){\t\t\n\t\t$ip = $this->get_client_ip();\n\t\tif($ip){\n\t\t\t$countries = Countries::model()->get_current_nearbycountries($ip);\n\t\t}\n\t\techo $countries;\n\t\tYii::app()->end();\t\t\n\t}", "public function getCountries()\n {\n return $this->hasOne(Countries::className(), ['id' => 'countries_id']);\n }", "public static function getSupportedCountriesOffline()\n {\n return static::getSupportedCountries();\n }", "public function getAllCountrie()\n\t{\n\t\t$countrie = Countrie::all() ;\t\n\t\t$data = array() ;\n\t\tforeach($countrie as $value){\n\t\t\t$countryData = array(\n\t\t\t'id' => $value->id ,\n\t\t\t'name_ar' => $value->name_ar ,\n\t\t\t'name_en' => $value->name_en \n\t\t\t) ;\n\t\t\tarray_push($data , $countryData) ;\n\t\t}\n\t\t return response()->json([\n 'status' => 1,\n 'data' => $data, \t\t\t\t\n ]); \n\t}", "function GetCountries () {\n\t\t$this->db->order_by('name','ASC');\n\t\t$result = $this->db->get('countries');\n\n\t\t$countries = array();\n\t\tforeach ($result->result_array() as $country) {\n\t\t\t$countries[] = array(\n\t\t\t\t\t\t\t'iso2' => $country['iso2'],\n\t\t\t\t\t\t\t'name' => $country['name']\n\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "public function countries()\n\t{\n\t\treturn $this->hasMany('App\\Country');\n\t}", "public function getAllCountriesLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.countries');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people')\n\t\t\t\t->from(Phpfox::getT('gmap_countries'), 'fc')\t\t\n\t\t\t\t->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso')\t\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.country_iso = fc.country_iso')\n\t\t\t\t->join(Phpfox::getT('gmap'), 'f', 'u.user_id = f.user_id')\n\t\t\t\t->group('u.country_iso')\n\t\t\t\t->where('f.not_found = \\'0\\'')\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\t\t$this->cache()->save($sCacheId, $aRows);\n\t\t}\n\t\t\n\t\tif($aRows != null && is_array($aRows))\n\t\t{\n\t\t\tforeach($aRows as $key => $aRow)\n\t\t\t{\n\t\t\t\tif(isset($aRow['phrase_var_name']) && $aRow['phrase_var_name'] != '')\n\t\t\t\t{\n\t\t\t\t\t$aRows[$key]['name'] = Phpfox::getPhrase($aRow['phrase_var_name']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$aRows = $this->sortByProperty($aRows, 'name');\n\t\t}\n\t\t\n\t\treturn $aRows;\n\t}", "public function getCountries(){\n $stmt = $this->databaseConnection->prepare(\"SELECT id_country, country_name FROM countries\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "private function getCountriesList()\n {\n $list = [];\n $countries = Twilio::init()->getAvailableCountries();\n\n foreach($countries as $item) {\n $list[$item->country_code] = $item->country;\n }\n ksort($list);\n return $list;\n }", "public function country_get()\n\t{\n\n\t\tif($_SERVER['REQUEST_METHOD'] != \"GET\")\n\t\t{\n\t\t $this->response('Not Acceptable',406);\n\t\t}\n\t\t$country_list_arr=array();\n\n\t\t$this->load->model('Table_model');\n\t\t$country_list_arr=$this->Table_model->GetCountry();\n\t\t$deleted_country = array();\n\t\tif(count($country_list_arr)>0)\n\t\t{\n\t\t\t$this->response(array('status'=>'success','deleted' => $deleted_country,'country'=>$country_list_arr), 200);\n\t\t}\n\t\telse\n\t\t\t$this->response(array('status'=>'failed','message'=>'No records in database'),200);\n\t\n\t\n\t}", "public function countryOptionList();", "public function loadActiveCountries($iLang = null)\n {\n $sViewName = getViewName('oxcountry', $iLang);\n $sSelect = \"SELECT oxid, oxtitle, oxisoalpha2 FROM {$sViewName} WHERE oxactive = '1' ORDER BY oxorder, oxtitle \";\n $this->selectString($sSelect);\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countriesRepository = $em->getRepository('ShopBundle:Countries');\n\n $countryList = $countriesRepository->findBy(\n array(),\n array('country' => 'ASC')\n );\n\n return array(\n 'countryList' => $countryList,\n );\n }", "public function getAllActive() {}", "public function listcountryAction(Request $request)\n {\n if (! $request->isXmlHttpRequest()) {\n throw new NotFoundHttpException();\n }\n $name = $request->query->get('city_name');\n $list = $request->query->get('countrylist');\n $countrylist = json_decode($list);\n\n $em = $this->getDoctrine()->getManager();\n $states = $em->getRepository('NvCargaBundle:State')->findByCountry($countrylist);\n \n $entities = $em->getRepository('NvCargaBundle:City')->createQueryBuilder('o')\n \t\t\t->where('o.name LIKE :name')\n //->setParameter('name', '%'.$name.'%')\n ->andWhere('o.state IN (:states)')\n ->andwhere('o.active =:active')\n ->setParameters(['name'=>$name.'%','states'=>$states, 'active'=>true])\n ->setFirstResult(0)\n ->setMaxResults(25)\n ->getQuery()\n ->getResult();\n $result=array();\n $counter = 0;\n foreach ($entities as $entity) {\n $result[$counter]['cityid'] = $entity->getId();\n $result[$counter]['cityname'] = $entity->getName();\n $result[$counter]['state'] = $entity->getState()->getName();\n $result[$counter]['country'] = $entity->getState()->getCountry()->getName();\n $counter++;\n }\n\t\n return new JsonResponse($result); \n }", "public function getCountries(){\n $countries = array();\n $db = DB::prepare('SELECT * FROM countries ORDER BY de ASC');\n $db->execute();\n while($result = $db->fetchObject()) { \n $this->id = $result->id; \n $this->code = $result->code; \n $this->en = $result->en; \n $this->de = $result->de; \n $countries[] = clone $this; \n }\n return $countries;\n }", "public function getSwitchableCountries()\n {\n $result = array();\n $allCountries = Mage::getResourceModel('directory/country_collection')->loadByStore()->toOptionArray(true);\n\n foreach ($allCountries as $country) {\n $result[] = $country;\n }\n\n return $result;\n }", "function tep_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n\n $Qcountries = Registry::get('Db')->get('countries', ['countries_id', 'countries_name'], null, 'countries_name');\n\n while ($Qcountries->fetch()) {\n $countries_array[] = [\n 'id' => $Qcountries->valueInt('countries_id'),\n 'text' => $Qcountries->value('countries_name')\n ];\n }\n\n return $countries_array;\n }", "public function getCountry(){\n\t\n\t\tif(!isset($_SESSION['country_list'])){\n\t\t\t$country = $this->getData(\"select id,country,currency,flag,is_active,contact_email,address from country order by id\");\n\t\t\tforeach ($country as $k => $countrys) {\n\t\t\t\t$_SESSION['country_list'][$countrys['id']]=['id' => $countrys['id'],'country' => $countrys['country'], 'currency' => $countrys['currency'], 'flag'=>$countrys['flag'], 'is_active' => $countrys['is_active'], 'contact_email' => $countrys['contact_email'], 'address' => $countrys['address'] ];\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function countries($shipping_zone_id)\n {\n\n try {\n $countries = ShippingCountry::where('shipping_zone_id', $shipping_zone_id)\n ->orderBy('label', 'asc')\n ->get(['code', 'label'])->toArray();\n } catch (\\Exception $e) {\n return response()->json(['status' => 'error', 'message' => 'Failed to get zone countries.']);\n }\n\n\n return response()->json(['status' => 'success', 'data' => $countries]);\n }", "public function fetchCountries(){\n\t\t\t// fetch countries\n\t\t\t$getCountries = \"SELECT * FROM countries\";\n\t\t\t$getCountries = mysqli_query($this->plug, $getCountries);\n\n\t\t\t$dataArr = [];\n\n\t\t\twhile ($row = mysqli_fetch_assoc($getCountries)) {\n\t\t\t\t# code...\n\t\t\t\tarray_push($dataArr, $row);\n\t\t\t}\n\t\t\treturn $dataArr;\n\t\t}", "public function getCountry();", "public function getCountry();", "public function getCountryList()\n {\n $countryList=array(\n 'BG'=>__('Bulgaria')\n 'DE'=>__('Germany'),\n 'GB'=>__('Great Britain'),\n );\n\n return $countryList;\n }", "public static function getCountries()\n\t{\n\t\t$country[\"AFG\"] = Array(\"iso2\" => \"AF\", \"name\" => \"Afghanistan, Islamic Republic \");\n\t\t$country[\"ALA\"] = Array(\"iso2\" => \"AX\", \"name\" => \"Åland Islands\");\n\t\t$country[\"ALB\"] = Array(\"iso2\" => \"AL\", \"name\" => \"Albania, Republic of\");\n\t\t$country[\"DZA\"] = Array(\"iso2\" => \"DZ\", \"name\" => \"Algeria, People's Democratic Republic\");\n\t\t$country[\"ASM\"] = Array(\"iso2\" => \"AS\", \"name\" => \"American Samoa\");\n\t\t$country[\"AND\"] = Array(\"iso2\" => \"AD\", \"name\" => \"Andorra, Principality of\");\n\t\t$country[\"AGO\"] = Array(\"iso2\" => \"AO\", \"name\" => \"Angola, Republic of\");\n\t\t$country[\"AIA\"] = Array(\"iso2\" => \"AI\", \"name\" => \"Anguilla\");\n\t\t$country[\"ATA\"] = Array(\"iso2\" => \"AQ\", \"name\" => \"Antarctica (the territory Sout\");\n\t\t$country[\"ATG\"] = Array(\"iso2\" => \"AG\", \"name\" => \"Antigua and Barbuda\");\n\t\t$country[\"ARG\"] = Array(\"iso2\" => \"AR\", \"name\" => \"Argentina, Argentine Republic\");\n\t\t$country[\"ARM\"] = Array(\"iso2\" => \"AM\", \"name\" => \"Armenia, Republic of\");\n\t\t$country[\"ABW\"] = Array(\"iso2\" => \"AW\", \"name\" => \"Aruba\");\n\t\t$country[\"AUS\"] = Array(\"iso2\" => \"AU\", \"name\" => \"Australia, Commonwealth of\");\n\t\t$country[\"AUT\"] = Array(\"iso2\" => \"AT\", \"name\" => \"Austria, Republic of\");\n\t\t$country[\"AZE\"] = Array(\"iso2\" => \"AZ\", \"name\" => \"Azerbaijan, Republic of\");\n\t\t$country[\"BHS\"] = Array(\"iso2\" => \"BS\", \"name\" => \"Bahamas, Commonwealth of the\");\n\t\t$country[\"BHR\"] = Array(\"iso2\" => \"BH\", \"name\" => \"Bahrain, Kingdom of\");\n\t\t$country[\"BGD\"] = Array(\"iso2\" => \"BD\", \"name\" => \"Bangladesh, People's Republic \");\n\t\t$country[\"BRB\"] = Array(\"iso2\" => \"BB\", \"name\" => \"Barbados\");\n\t\t$country[\"BLR\"] = Array(\"iso2\" => \"BY\", \"name\" => \"Belarus, Republic of\");\n\t\t$country[\"BEL\"] = Array(\"iso2\" => \"BE\", \"name\" => \"Belgium, Kingdom of\");\n\t\t$country[\"BLZ\"] = Array(\"iso2\" => \"BZ\", \"name\" => \"Belize\");\n\t\t$country[\"BEN\"] = Array(\"iso2\" => \"BJ\", \"name\" => \"Benin, Republic of\");\n\t\t$country[\"BMU\"] = Array(\"iso2\" => \"BM\", \"name\" => \"Bermuda\");\n\t\t$country[\"BTN\"] = Array(\"iso2\" => \"BT\", \"name\" => \"Bhutan, Kingdom of\");\n\t\t$country[\"BOL\"] = Array(\"iso2\" => \"BO\", \"name\" => \"Bolivia, Republic of\");\n\t\t$country[\"BIH\"] = Array(\"iso2\" => \"BA\", \"name\" => \"Bosnia and Herzegovina\");\n\t\t$country[\"BWA\"] = Array(\"iso2\" => \"BW\", \"name\" => \"Botswana, Republic of\");\n\t\t$country[\"BVT\"] = Array(\"iso2\" => \"BV\", \"name\" => \"Bouvet Island (Bouvetoya)\");\n\t\t$country[\"BRA\"] = Array(\"iso2\" => \"BR\", \"name\" => \"Brazil, Federative Republic of\");\n\t\t$country[\"IOT\"] = Array(\"iso2\" => \"IO\", \"name\" => \"British Indian Ocean Territory\");\n\t\t$country[\"VGB\"] = Array(\"iso2\" => \"VG\", \"name\" => \"British Virgin Islands\");\n\t\t$country[\"BRN\"] = Array(\"iso2\" => \"BN\", \"name\" => \"Brunei Darussalam\");\n\t\t$country[\"BGR\"] = Array(\"iso2\" => \"BG\", \"name\" => \"Bulgaria, Republic of\");\n\t\t$country[\"BFA\"] = Array(\"iso2\" => \"BF\", \"name\" => \"Burkina Faso\");\n\t\t$country[\"BDI\"] = Array(\"iso2\" => \"BI\", \"name\" => \"Burundi, Republic of\");\n\t\t$country[\"KHM\"] = Array(\"iso2\" => \"KH\", \"name\" => \"Cambodia, Kingdom of\");\n\t\t$country[\"CMR\"] = Array(\"iso2\" => \"CM\", \"name\" => \"Cameroon, Republic of\");\n\t\t$country[\"CAN\"] = Array(\"iso2\" => \"CA\", \"name\" => \"Canada\");\n\t\t$country[\"CPV\"] = Array(\"iso2\" => \"CV\", \"name\" => \"Cape Verde, Republic of\");\n\t\t$country[\"CYM\"] = Array(\"iso2\" => \"KY\", \"name\" => \"Cayman Islands\");\n\t\t$country[\"CAF\"] = Array(\"iso2\" => \"CF\", \"name\" => \"Central African Republic\");\n\t\t$country[\"TCD\"] = Array(\"iso2\" => \"TD\", \"name\" => \"Chad, Republic of\");\n\t\t$country[\"CHL\"] = Array(\"iso2\" => \"CL\", \"name\" => \"Chile, Republic of\");\n\t\t$country[\"CHN\"] = Array(\"iso2\" => \"CN\", \"name\" => \"China, People's Republic of\");\n\t\t$country[\"CXR\"] = Array(\"iso2\" => \"CX\", \"name\" => \"Christmas Island\");\n\t\t$country[\"CCK\"] = Array(\"iso2\" => \"CC\", \"name\" => \"Cocos (Keeling) Islands\");\n\t\t$country[\"COL\"] = Array(\"iso2\" => \"CO\", \"name\" => \"Colombia, Republic of\");\n\t\t$country[\"COM\"] = Array(\"iso2\" => \"KM\", \"name\" => \"Comoros, Union of the\");\n\t\t$country[\"COD\"] = Array(\"iso2\" => \"CD\", \"name\" => \"Congo, Democratic Republic of \");\n\t\t$country[\"COG\"] = Array(\"iso2\" => \"CG\", \"name\" => \"Congo, Republic of the\");\n\t\t$country[\"COK\"] = Array(\"iso2\" => \"CK\", \"name\" => \"Cook Islands\");\n\t\t$country[\"CRI\"] = Array(\"iso2\" => \"CR\", \"name\" => \"Costa Rica, Republic of\");\n\t\t$country[\"CIV\"] = Array(\"iso2\" => \"CI\", \"name\" => \"Cote d'Ivoire, Republic of\");\n\t\t$country[\"HRV\"] = Array(\"iso2\" => \"HR\", \"name\" => \"Croatia, Republic of\");\n\t\t$country[\"CUB\"] = Array(\"iso2\" => \"CU\", \"name\" => \"Cuba, Republic of\");\n\t\t$country[\"CYP\"] = Array(\"iso2\" => \"CY\", \"name\" => \"Cyprus, Republic of\");\n\t\t$country[\"CZE\"] = Array(\"iso2\" => \"CZ\", \"name\" => \"Czech Republic\");\n\t\t$country[\"DNK\"] = Array(\"iso2\" => \"DK\", \"name\" => \"Denmark, Kingdom of\");\n\t\t$country[\"DJI\"] = Array(\"iso2\" => \"DJ\", \"name\" => \"Djibouti, Republic of\");\n\t\t$country[\"DMA\"] = Array(\"iso2\" => \"DM\", \"name\" => \"Dominica, Commonwealth of\");\n\t\t$country[\"DOM\"] = Array(\"iso2\" => \"DO\", \"name\" => \"Dominican Republic\");\n\t\t$country[\"ECU\"] = Array(\"iso2\" => \"EC\", \"name\" => \"Ecuador, Republic of\");\n\t\t$country[\"EGY\"] = Array(\"iso2\" => \"EG\", \"name\" => \"Egypt, Arab Republic of\");\n\t\t$country[\"SLV\"] = Array(\"iso2\" => \"SV\", \"name\" => \"El Salvador, Republic of\");\n\t\t$country[\"GNQ\"] = Array(\"iso2\" => \"GQ\", \"name\" => \"Equatorial Guinea, Republic of\");\n\t\t$country[\"ERI\"] = Array(\"iso2\" => \"ER\", \"name\" => \"Eritrea, State of\");\n\t\t$country[\"EST\"] = Array(\"iso2\" => \"EE\", \"name\" => \"Estonia, Republic of\");\n\t\t$country[\"ETH\"] = Array(\"iso2\" => \"ET\", \"name\" => \"Ethiopia, Federal Democratic R\");\n\t\t$country[\"FRO\"] = Array(\"iso2\" => \"FO\", \"name\" => \"Faroe Islands\");\n\t\t$country[\"FLK\"] = Array(\"iso2\" => \"FK\", \"name\" => \"Falkland Islands (Malvinas)\");\n\t\t$country[\"FJI\"] = Array(\"iso2\" => \"FJ\", \"name\" => \"Fiji, Republic of the Fiji Isl\");\n\t\t$country[\"FIN\"] = Array(\"iso2\" => \"FI\", \"name\" => \"Finland, Republic of\");\n\t\t$country[\"FRA\"] = Array(\"iso2\" => \"FR\", \"name\" => \"France, French Republic\");\n\t\t$country[\"GUF\"] = Array(\"iso2\" => \"GF\", \"name\" => \"French Guiana\");\n\t\t$country[\"PYF\"] = Array(\"iso2\" => \"PF\", \"name\" => \"French Polynesia\");\n\t\t$country[\"ATF\"] = Array(\"iso2\" => \"TF\", \"name\" => \"French Southern Territories\");\n\t\t$country[\"GAB\"] = Array(\"iso2\" => \"GA\", \"name\" => \"Gabon, Gabonese Republic\");\n\t\t$country[\"GMB\"] = Array(\"iso2\" => \"GM\", \"name\" => \"Gambia, Republic of the\");\n\t\t$country[\"GEO\"] = Array(\"iso2\" => \"GE\", \"name\" => \"Georgia\");\n\t\t$country[\"DEU\"] = Array(\"iso2\" => \"DE\", \"name\" => \"Germany, Federal Republic of\");\n\t\t$country[\"GHA\"] = Array(\"iso2\" => \"GH\", \"name\" => \"Ghana, Republic of\");\n\t\t$country[\"GIB\"] = Array(\"iso2\" => \"GI\", \"name\" => \"Gibraltar\");\n\t\t$country[\"GRC\"] = Array(\"iso2\" => \"GR\", \"name\" => \"Greece, Hellenic Republic\");\n\t\t$country[\"GRL\"] = Array(\"iso2\" => \"GL\", \"name\" => \"Greenland\");\n\t\t$country[\"GRD\"] = Array(\"iso2\" => \"GD\", \"name\" => \"Grenada\");\n\t\t$country[\"GLP\"] = Array(\"iso2\" => \"GP\", \"name\" => \"Guadeloupe\");\n\t\t$country[\"GUM\"] = Array(\"iso2\" => \"GU\", \"name\" => \"Guam\");\n\t\t$country[\"GTM\"] = Array(\"iso2\" => \"GT\", \"name\" => \"Guatemala, Republic of\");\n\t\t$country[\"GGY\"] = Array(\"iso2\" => \"GG\", \"name\" => \"Guernsey, Bailiwick of\");\n\t\t$country[\"GIN\"] = Array(\"iso2\" => \"GN\", \"name\" => \"Guinea, Republic of\");\n\t\t$country[\"GNB\"] = Array(\"iso2\" => \"GW\", \"name\" => \"Guinea-Bissau, Republic of\");\n\t\t$country[\"GUY\"] = Array(\"iso2\" => \"GY\", \"name\" => \"Guyana, Co-operative Republic \");\n\t\t$country[\"HTI\"] = Array(\"iso2\" => \"HT\", \"name\" => \"Haiti, Republic of\");\n\t\t$country[\"HMD\"] = Array(\"iso2\" => \"HM\", \"name\" => \"Heard Island and McDonald Isla\");\n\t\t$country[\"VAT\"] = Array(\"iso2\" => \"VA\", \"name\" => \"Holy See (Vatican City State)\");\n\t\t$country[\"HND\"] = Array(\"iso2\" => \"HN\", \"name\" => \"Honduras, Republic of\");\n\t\t$country[\"HKG\"] = Array(\"iso2\" => \"HK\", \"name\" => \"Hong Kong, Special Administrat\");\n\t\t$country[\"HUN\"] = Array(\"iso2\" => \"HU\", \"name\" => \"Hungary, Republic of\");\n\t\t$country[\"ISL\"] = Array(\"iso2\" => \"IS\", \"name\" => \"Iceland, Republic of\");\n\t\t$country[\"IND\"] = Array(\"iso2\" => \"IN\", \"name\" => \"India, Republic of\");\n\t\t$country[\"IDN\"] = Array(\"iso2\" => \"ID\", \"name\" => \"Indonesia, Republic of\");\n\t\t$country[\"IRN\"] = Array(\"iso2\" => \"IR\", \"name\" => \"Iran, Islamic Republic of\");\n\t\t$country[\"IRQ\"] = Array(\"iso2\" => \"IQ\", \"name\" => \"Iraq, Republic of\");\n\t\t$country[\"IRL\"] = Array(\"iso2\" => \"IE\", \"name\" => \"Ireland\");\n\t\t$country[\"IMN\"] = Array(\"iso2\" => \"IM\", \"name\" => \"Isle of Man\");\n\t\t$country[\"ISR\"] = Array(\"iso2\" => \"IL\", \"name\" => \"Israel, State of\");\n\t\t$country[\"ITA\"] = Array(\"iso2\" => \"IT\", \"name\" => \"Italy, Italian Republic\");\n\t\t$country[\"JAM\"] = Array(\"iso2\" => \"JM\", \"name\" => \"Jamaica\");\n\t\t$country[\"JPN\"] = Array(\"iso2\" => \"JP\", \"name\" => \"Japan\");\n\t\t$country[\"JEY\"] = Array(\"iso2\" => \"JE\", \"name\" => \"Jersey, Bailiwick of\");\n\t\t$country[\"JOR\"] = Array(\"iso2\" => \"JO\", \"name\" => \"Jordan, Hashemite Kingdom of\");\n\t\t$country[\"KAZ\"] = Array(\"iso2\" => \"KZ\", \"name\" => \"Kazakhstan, Republic of\");\n\t\t$country[\"KEN\"] = Array(\"iso2\" => \"KE\", \"name\" => \"Kenya, Republic of\");\n\t\t$country[\"KIR\"] = Array(\"iso2\" => \"KI\", \"name\" => \"Kiribati, Republic of\");\n\t\t$country[\"PRK\"] = Array(\"iso2\" => \"KP\", \"name\" => \"Korea, Democratic People's Rep\");\n\t\t$country[\"KOR\"] = Array(\"iso2\" => \"KR\", \"name\" => \"Korea, Republic of\");\n\t\t$country[\"KWT\"] = Array(\"iso2\" => \"KW\", \"name\" => \"Kuwait, State of\");\n\t\t$country[\"KGZ\"] = Array(\"iso2\" => \"KG\", \"name\" => \"Kyrgyz Republic\");\n\t\t$country[\"LAO\"] = Array(\"iso2\" => \"LA\", \"name\" => \"Lao People's Democratic Republ\");\n\t\t$country[\"LVA\"] = Array(\"iso2\" => \"LV\", \"name\" => \"Latvia, Republic of\");\n\t\t$country[\"LBN\"] = Array(\"iso2\" => \"LB\", \"name\" => \"Lebanon, Lebanese Republic\");\n\t\t$country[\"LSO\"] = Array(\"iso2\" => \"LS\", \"name\" => \"Lesotho, Kingdom of\");\n\t\t$country[\"LBR\"] = Array(\"iso2\" => \"LR\", \"name\" => \"Liberia, Republic of\");\n\t\t$country[\"LBY\"] = Array(\"iso2\" => \"LY\", \"name\" => \"Libyan Arab Jamahiriya\");\n\t\t$country[\"LIE\"] = Array(\"iso2\" => \"LI\", \"name\" => \"Liechtenstein, Principality of\");\n\t\t$country[\"LTU\"] = Array(\"iso2\" => \"LT\", \"name\" => \"Lithuania, Republic of\");\n\t\t$country[\"LUX\"] = Array(\"iso2\" => \"LU\", \"name\" => \"Luxembourg, Grand Duchy of\");\n\t\t$country[\"MAC\"] = Array(\"iso2\" => \"MO\", \"name\" => \"Macao, Special Administrative \");\n\t\t$country[\"MKD\"] = Array(\"iso2\" => \"MK\", \"name\" => \"Macedonia, the former Yugoslav\");\n\t\t$country[\"MDG\"] = Array(\"iso2\" => \"MG\", \"name\" => \"Madagascar, Republic of\");\n\t\t$country[\"MWI\"] = Array(\"iso2\" => \"MW\", \"name\" => \"Malawi, Republic of\");\n\t\t$country[\"MYS\"] = Array(\"iso2\" => \"MY\", \"name\" => \"Malaysia\");\n\t\t$country[\"MDV\"] = Array(\"iso2\" => \"MV\", \"name\" => \"Maldives, Republic of\");\n\t\t$country[\"MLI\"] = Array(\"iso2\" => \"ML\", \"name\" => \"Mali, Republic of\");\n\t\t$country[\"MLT\"] = Array(\"iso2\" => \"MT\", \"name\" => \"Malta, Republic of\");\n\t\t$country[\"MHL\"] = Array(\"iso2\" => \"MH\", \"name\" => \"Marshall Islands, Republic of \");\n\t\t$country[\"MTQ\"] = Array(\"iso2\" => \"MQ\", \"name\" => \"Martinique\");\n\t\t$country[\"MRT\"] = Array(\"iso2\" => \"MR\", \"name\" => \"Mauritania, Islamic Republic o\");\n\t\t$country[\"MUS\"] = Array(\"iso2\" => \"MU\", \"name\" => \"Mauritius, Republic of\");\n\t\t$country[\"MYT\"] = Array(\"iso2\" => \"YT\", \"name\" => \"Mayotte\");\n\t\t$country[\"MEX\"] = Array(\"iso2\" => \"MX\", \"name\" => \"Mexico, United Mexican States\");\n\t\t$country[\"FSM\"] = Array(\"iso2\" => \"FM\", \"name\" => \"Micronesia, Federated States o\");\n\t\t$country[\"MDA\"] = Array(\"iso2\" => \"MD\", \"name\" => \"Moldova, Republic of\");\n\t\t$country[\"MCO\"] = Array(\"iso2\" => \"MC\", \"name\" => \"Monaco, Principality of\");\n\t\t$country[\"MNG\"] = Array(\"iso2\" => \"MN\", \"name\" => \"Mongolia\");\n\t\t$country[\"MNE\"] = Array(\"iso2\" => \"ME\", \"name\" => \"Montenegro, Republic of\");\n\t\t$country[\"MSR\"] = Array(\"iso2\" => \"MS\", \"name\" => \"Montserrat\");\n\t\t$country[\"MAR\"] = Array(\"iso2\" => \"MA\", \"name\" => \"Morocco, Kingdom of\");\n\t\t$country[\"MOZ\"] = Array(\"iso2\" => \"MZ\", \"name\" => \"Mozambique, Republic of\");\n\t\t$country[\"MMR\"] = Array(\"iso2\" => \"MM\", \"name\" => \"Myanmar, Union of\");\n\t\t$country[\"NAM\"] = Array(\"iso2\" => \"NA\", \"name\" => \"Namibia, Republic of\");\n\t\t$country[\"NRU\"] = Array(\"iso2\" => \"NR\", \"name\" => \"Nauru, Republic of\");\n\t\t$country[\"NPL\"] = Array(\"iso2\" => \"NP\", \"name\" => \"Nepal, State of\");\n\t\t$country[\"ANT\"] = Array(\"iso2\" => \"AN\", \"name\" => \"Netherlands Antilles\");\n\t\t$country[\"NLD\"] = Array(\"iso2\" => \"NL\", \"name\" => \"Netherlands, Kingdom of the\");\n\t\t$country[\"NCL\"] = Array(\"iso2\" => \"NC\", \"name\" => \"New Caledonia\");\n\t\t$country[\"NZL\"] = Array(\"iso2\" => \"NZ\", \"name\" => \"New Zealand\");\n\t\t$country[\"NIC\"] = Array(\"iso2\" => \"NI\", \"name\" => \"Nicaragua, Republic of\");\n\t\t$country[\"NER\"] = Array(\"iso2\" => \"NE\", \"name\" => \"Niger, Republic of\");\n\t\t$country[\"NGA\"] = Array(\"iso2\" => \"NG\", \"name\" => \"Nigeria, Federal Republic of\");\n\t\t$country[\"NIU\"] = Array(\"iso2\" => \"NU\", \"name\" => \"Niue\");\n\t\t$country[\"NFK\"] = Array(\"iso2\" => \"NF\", \"name\" => \"Norfolk Island\");\n\t\t$country[\"MNP\"] = Array(\"iso2\" => \"MP\", \"name\" => \"Northern Mariana Islands, Comm\");\n\t\t$country[\"NOR\"] = Array(\"iso2\" => \"NO\", \"name\" => \"Norway, Kingdom of\");\n\t\t$country[\"OMN\"] = Array(\"iso2\" => \"OM\", \"name\" => \"Oman, Sultanate of\");\n\t\t$country[\"PAK\"] = Array(\"iso2\" => \"PK\", \"name\" => \"Pakistan, Islamic Republic of\");\n\t\t$country[\"PLW\"] = Array(\"iso2\" => \"PW\", \"name\" => \"Palau, Republic of\");\n\t\t$country[\"PSE\"] = Array(\"iso2\" => \"PS\", \"name\" => \"Palestinian Territory, Occupie\");\n\t\t$country[\"PAN\"] = Array(\"iso2\" => \"PA\", \"name\" => \"Panama, Republic of\");\n\t\t$country[\"PNG\"] = Array(\"iso2\" => \"PG\", \"name\" => \"Papua New Guinea, Independent \");\n\t\t$country[\"PRY\"] = Array(\"iso2\" => \"PY\", \"name\" => \"Paraguay, Republic of\");\n\t\t$country[\"PER\"] = Array(\"iso2\" => \"PE\", \"name\" => \"Peru, Republic of\");\n\t\t$country[\"PHL\"] = Array(\"iso2\" => \"PH\", \"name\" => \"Philippines, Republic of the\");\n\t\t$country[\"PCN\"] = Array(\"iso2\" => \"PN\", \"name\" => \"Pitcairn Islands\");\n\t\t$country[\"POL\"] = Array(\"iso2\" => \"PL\", \"name\" => \"Poland, Republic of\");\n\t\t$country[\"PRT\"] = Array(\"iso2\" => \"PT\", \"name\" => \"Portugal, Portuguese Republic\");\n\t\t$country[\"PRI\"] = Array(\"iso2\" => \"PR\", \"name\" => \"Puerto Rico, Commonwealth of\");\n\t\t$country[\"QAT\"] = Array(\"iso2\" => \"QA\", \"name\" => \"Qatar, State of\");\n\t\t$country[\"REU\"] = Array(\"iso2\" => \"RE\", \"name\" => \"Reunion\");\n\t\t$country[\"ROU\"] = Array(\"iso2\" => \"RO\", \"name\" => \"Romania\");\n\t\t$country[\"RUS\"] = Array(\"iso2\" => \"RU\", \"name\" => \"Russian Federation\");\n\t\t$country[\"RWA\"] = Array(\"iso2\" => \"RW\", \"name\" => \"Rwanda, Republic of\");\n\t\t$country[\"BLM\"] = Array(\"iso2\" => \"BL\", \"name\" => \"Saint Barthelemy\");\n\t\t$country[\"SHN\"] = Array(\"iso2\" => \"SH\", \"name\" => \"Saint Helena\");\n\t\t$country[\"KNA\"] = Array(\"iso2\" => \"KN\", \"name\" => \"Saint Kitts and Nevis, Federat\");\n\t\t$country[\"LCA\"] = Array(\"iso2\" => \"LC\", \"name\" => \"Saint Lucia\");\n\t\t$country[\"MAF\"] = Array(\"iso2\" => \"MF\", \"name\" => \"Saint Martin\");\n\t\t$country[\"SPM\"] = Array(\"iso2\" => \"PM\", \"name\" => \"Saint Pierre and Miquelon\");\n\t\t$country[\"VCT\"] = Array(\"iso2\" => \"VC\", \"name\" => \"Saint Vincent and the Grenadin\");\n\t\t$country[\"WSM\"] = Array(\"iso2\" => \"WS\", \"name\" => \"Samoa, Independent State of\");\n\t\t$country[\"SMR\"] = Array(\"iso2\" => \"SM\", \"name\" => \"San Marino, Republic of\");\n\t\t$country[\"STP\"] = Array(\"iso2\" => \"ST\", \"name\" => \"Sao Tome and Principe, Democra\");\n\t\t$country[\"SAU\"] = Array(\"iso2\" => \"SA\", \"name\" => \"Saudi Arabia, Kingdom of\");\n\t\t$country[\"SEN\"] = Array(\"iso2\" => \"SN\", \"name\" => \"Senegal, Republic of\");\n\t\t$country[\"SRB\"] = Array(\"iso2\" => \"RS\", \"name\" => \"Serbia, Republic of\");\n\t\t$country[\"SYC\"] = Array(\"iso2\" => \"SC\", \"name\" => \"Seychelles, Republic of\");\n\t\t$country[\"SLE\"] = Array(\"iso2\" => \"SL\", \"name\" => \"Sierra Leone, Republic of\");\n\t\t$country[\"SGP\"] = Array(\"iso2\" => \"SG\", \"name\" => \"Singapore, Republic of\");\n\t\t$country[\"SVK\"] = Array(\"iso2\" => \"SK\", \"name\" => \"Slovakia (Slovak Republic)\");\n\t\t$country[\"SVN\"] = Array(\"iso2\" => \"SI\", \"name\" => \"Slovenia, Republic of\");\n\t\t$country[\"SLB\"] = Array(\"iso2\" => \"SB\", \"name\" => \"Solomon Islands\");\n\t\t$country[\"SOM\"] = Array(\"iso2\" => \"SO\", \"name\" => \"Somalia, Somali Republic\");\n\t\t$country[\"ZAF\"] = Array(\"iso2\" => \"ZA\", \"name\" => \"South Africa, Republic of\");\n\t\t$country[\"SGS\"] = Array(\"iso2\" => \"GS\", \"name\" => \"South Georgia and the South Sa\");\n\t\t$country[\"ESP\"] = Array(\"iso2\" => \"ES\", \"name\" => \"Spain, Kingdom of\");\n\t\t$country[\"LKA\"] = Array(\"iso2\" => \"LK\", \"name\" => \"Sri Lanka, Democratic Socialis\");\n\t\t$country[\"SDN\"] = Array(\"iso2\" => \"SD\", \"name\" => \"Sudan, Republic of\");\n\t\t$country[\"SUR\"] = Array(\"iso2\" => \"SR\", \"name\" => \"Suriname, Republic of\");\n\t\t$country[\"SJM\"] = Array(\"iso2\" => \"SJ\", \"name\" => \"Svalbard & Jan Mayen Islands\");\n\t\t$country[\"SWZ\"] = Array(\"iso2\" => \"SZ\", \"name\" => \"Swaziland, Kingdom of\");\n\t\t$country[\"SWE\"] = Array(\"iso2\" => \"SE\", \"name\" => \"Sweden, Kingdom of\");\n\t\t$country[\"CHE\"] = Array(\"iso2\" => \"CH\", \"name\" => \"Switzerland, Swiss Confederati\");\n\t\t$country[\"SYR\"] = Array(\"iso2\" => \"SY\", \"name\" => \"Syrian Arab Republic\");\n\t\t$country[\"TWN\"] = Array(\"iso2\" => \"TW\", \"name\" => \"Taiwan\");\n\t\t$country[\"TJK\"] = Array(\"iso2\" => \"TJ\", \"name\" => \"Tajikistan, Republic of\");\n\t\t$country[\"TZA\"] = Array(\"iso2\" => \"TZ\", \"name\" => \"Tanzania, United Republic of\");\n\t\t$country[\"THA\"] = Array(\"iso2\" => \"TH\", \"name\" => \"Thailand, Kingdom of\");\n\t\t$country[\"TLS\"] = Array(\"iso2\" => \"TL\", \"name\" => \"Timor-Leste, Democratic Republ\");\n\t\t$country[\"TGO\"] = Array(\"iso2\" => \"TG\", \"name\" => \"Togo, Togolese Republic\");\n\t\t$country[\"TKL\"] = Array(\"iso2\" => \"TK\", \"name\" => \"Tokelau\");\n\t\t$country[\"TON\"] = Array(\"iso2\" => \"TO\", \"name\" => \"Tonga, Kingdom of\");\n\t\t$country[\"TTO\"] = Array(\"iso2\" => \"TT\", \"name\" => \"Trinidad and Tobago, Republic \");\n\t\t$country[\"TUN\"] = Array(\"iso2\" => \"TN\", \"name\" => \"Tunisia, Tunisian Republic\");\n\t\t$country[\"TUR\"] = Array(\"iso2\" => \"TR\", \"name\" => \"Turkey, Republic of\");\n\t\t$country[\"TKM\"] = Array(\"iso2\" => \"TM\", \"name\" => \"Turkmenistan\");\n\t\t$country[\"TCA\"] = Array(\"iso2\" => \"TC\", \"name\" => \"Turks and Caicos Islands\");\n\t\t$country[\"TUV\"] = Array(\"iso2\" => \"TV\", \"name\" => \"Tuvalu\");\n\t\t$country[\"UGA\"] = Array(\"iso2\" => \"UG\", \"name\" => \"Uganda, Republic of\");\n\t\t$country[\"UKR\"] = Array(\"iso2\" => \"UA\", \"name\" => \"Ukraine\");\n\t\t$country[\"ARE\"] = Array(\"iso2\" => \"AE\", \"name\" => \"United Arab Emirates\");\n\t\t$country[\"GBR\"] = Array(\"iso2\" => \"GB\", \"name\" => \"United Kingdom of Great Britain\");\n\t\t$country[\"USA\"] = Array(\"iso2\" => \"US\", \"name\" => \"United States of America\");\n\t\t$country[\"UMI\"] = Array(\"iso2\" => \"UM\", \"name\" => \"United States Minor Outlying I\");\n\t\t$country[\"VIR\"] = Array(\"iso2\" => \"VI\", \"name\" => \"United States Virgin Islands\");\n\t\t$country[\"URY\"] = Array(\"iso2\" => \"UY\", \"name\" => \"Uruguay, Eastern Republic of\");\n\t\t$country[\"UZB\"] = Array(\"iso2\" => \"UZ\", \"name\" => \"Uzbekistan, Republic of\");\n\t\t$country[\"VUT\"] = Array(\"iso2\" => \"VU\", \"name\" => \"Vanuatu, Republic of\");\n\t\t$country[\"VEN\"] = Array(\"iso2\" => \"VE\", \"name\" => \"Venezuela, Bolivarian Republic\");\n\t\t$country[\"VNM\"] = Array(\"iso2\" => \"VN\", \"name\" => \"Vietnam, Socialist Republic of\");\n\t\t$country[\"WLF\"] = Array(\"iso2\" => \"WF\", \"name\" => \"Wallis and Futuna\");\n\t\t$country[\"ESH\"] = Array(\"iso2\" => \"EH\", \"name\" => \"Western Sahara\");\n\t\t$country[\"YEM\"] = Array(\"iso2\" => \"YE\", \"name\" => \"Yemen\");\n\t\t$country[\"ZMB\"] = Array(\"iso2\" => \"ZM\", \"name\" => \"Zambia, Republic of\");\n\t\t$country[\"ZWE\"] = Array(\"iso2\" => \"ZW\", \"name\" => \"Zimbabwe, Republic of\");\n\t\t$country[\"0\"] = Array(\"iso2\" => \"0\", \"name\" => \"NO VALID COUNTRY\");\n\n\t\treturn $country;\n\t}", "private function allCountries()\n {\n $countries = [];\n $isos = $this->countryIso();\n foreach ($isos as $iso) {\n $path = __DIR__ . '/config/geography/' . $iso . '.php';\n $countries[$iso] = require $path;\n }\n\n return $countries;\n }" ]
[ "0.74347043", "0.74129736", "0.7363566", "0.72715765", "0.726688", "0.7260263", "0.721749", "0.71706855", "0.71462035", "0.7131006", "0.70065475", "0.70037305", "0.6988385", "0.69774765", "0.69510233", "0.6941439", "0.69327605", "0.6913418", "0.6895535", "0.68724614", "0.6871564", "0.686498", "0.68583", "0.68581027", "0.6842675", "0.68210965", "0.6809205", "0.6800326", "0.6800326", "0.6800326", "0.6798864", "0.67933", "0.6785436", "0.67712617", "0.6739863", "0.67353076", "0.6726018", "0.67182493", "0.67181444", "0.6706014", "0.6701701", "0.66833633", "0.66766", "0.6653401", "0.6644035", "0.6637266", "0.66362965", "0.6634343", "0.6632487", "0.6631054", "0.66042346", "0.6591525", "0.6579836", "0.656181", "0.65514743", "0.6545726", "0.6525264", "0.650464", "0.647137", "0.64678276", "0.64531064", "0.6444768", "0.64301145", "0.6410042", "0.64100033", "0.6400241", "0.63997793", "0.6379899", "0.63664097", "0.63624233", "0.63621455", "0.6358238", "0.6300672", "0.62894684", "0.6277895", "0.6262275", "0.6248648", "0.62365186", "0.62332374", "0.6210132", "0.62052673", "0.6205", "0.619143", "0.61899745", "0.61700845", "0.6168356", "0.61682266", "0.6140234", "0.613748", "0.6132314", "0.61314774", "0.6112311", "0.60790336", "0.60783833", "0.6068949", "0.60495025", "0.60495025", "0.60439897", "0.60395116", "0.6031826" ]
0.67409545
34
convenience method for self::getSubdivisions
public function getStates($countryIdent = NULL) { return $this->getSubDivisions($countryIdent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function divisions(): array { return $this->divisions; }", "public function getSubdivisionList();", "public function subdivision()\n {\n $city = $this->city;\n\n $this->subdivision = $city ? $city->subdivision : null;\n }", "public function getDivision()\n {\n return $this->division;\n }", "public function get_division()\n\t\t{\n\t\t\treturn $this->obj->find()->getBasics();\n\t\t}", "public function division($division = null)\n {\n }", "public function put_division()\n\t\t{\n\t\t\t$retArr = array();\n \n\t\t\t// Scaffolding Code For Single:\n\t\t\t$retArr = $this->obj->getBasics();\n\n\t\t\treturn $retArr;\n\t\t}", "public function getDivisionSelect($project_id)\n\t{\t\t\n\t $app = JFactory::getApplication();\n $db = sportsmanagementHelper::getDBConnection(); \n $query = $db->getQuery(true);\n$options = array();\n\n\t\t$query = ' SELECT d.id AS value, d.name AS text ' \n\t\t . ' FROM #__sportsmanagement_division AS d ' \n\t\t . ' WHERE d.project_id = ' . $project_id \n\t\t . ($this->getParam(\"show_only_subdivisions\", 0) ? ' AND parent_id > 0' : '') \n\t\t ;\n\t\t$this->_db->setQuery($query);\n\t\t$res = $this->_db->loadObjectList();\n\t\tif ($res) \n {\n $options = array(JHTML::_('select.option', 0, JText::_($this->getParam('divisions_text'))));\n\t\t$options = array_merge($options, $res);\n\t\t}\n//\t\treturn JHTML::_('select.genericlist', $options, 'd', 'class=\"jlnav-division\"', 'value', 'text', $this->getDivisionId());\n return $options;\n\t}", "static function add_divisions(): void {\r\n\t\tself::add_acf_field(self::divisions, [\r\n\t\t\t'label' => 'Divisions',\r\n\t\t\t'type' => 'repeater',\r\n\t\t\t'instructions' => '',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'collapsed' => '',\r\n\t\t\t'min' => '',\r\n\t\t\t'max' => '',\r\n\t\t\t'layout' => 'block',\r\n\t\t\t'button_label' => 'Add division'\r\n\t\t]);\r\n\t}", "function loaded_divisions(): bool { return $this->loaded_divisions; }", "function subDivByCountry(Country $country) {\n $out = [];\n $r = $this->db->query(\"SELECT divcode, divname FROM country_state WHERE country = '{$country->code}' and type!='Outlying area'\");\n while($row = $r->fetchArray(SQLITE3_ASSOC)) {\n $out[] = new SubDivision($country, $row['divcode'], $row['divname']);\n }\n return $out;\n }", "public function getCoDivision()\n\t{\n\t\treturn $this->co_division;\n\t}", "function GetDivision () {\n return new Division ($this->hunt_division, $this->roster_coder);\n }", "private function getDivision() {\n\t\t$return = NULL;\n\t\t$sql = 'SELECT `#__Division`.* FROM `#__Division` LEFT JOIN `#__Division_User` ON `#__Division_User`.`division_id` = `#__Division`.`id` WHERE `#__Division_User`.`user_id` = ?';\n\t\t$result = $this->execute($sql, $this->id);\n\n\t\tif (count($result) > 0) {\n\t\t\t$return[$result[0]['id']] = $result[0];\n\t\t}\n\t\treturn $return;\n\t}", "function GetDivisionID () {\n return $this->hunt_division;\n }", "public function getSubGroups() {}", "function allDivisiontoCombo2() {\n $this->load->model('territory/territory_model');\n $fetchAllTerritory = $this->territory_model->fetchFromAnyTable(\"tbl_division\", null, null, null, 10000, 0, \"RESULTSET\", array('division_status' => 1), null);\n $pushdata = array('territory' => $fetchAllTerritory);\n $this->template->draw('territory/allParentDivisionCombo', false, $pushdata);\n }", "public function getDivision() { \n if(!$this->department || !$this->department->department || !$this->department->department->division)\n return false;\n\n return $this->department->department->division;\n }", "public function getDivisions(){\n $result_arr=[];\n $query=\"SELECT * FROM division ORDER BY div_name ASC\";\n $result=$this->connection->query($query);\n while($row=$result->fetch_assoc()){\n array_push($result_arr,[$row['div_id'],$row['div_name']]);\n }\n return $result_arr;\n }", "function get_division_by_standard($eid=null){\n\t\t$html='<option value=\"\">--Select--</option>';\n\t\t$result=$this->ObjM->get_division_by_standard($eid);\n\t\t\n\t\tif(count($result)==0){\n\t\t\t$html1.='<option '.$sel.' value=\"0\">--NO DIVISION--</option>';\n\treturn $html1;\n\t\t\t}\n\t\t\telse{\n\t\tfor($i=0;$i<count($result);$i++){\n\t\t\t$sel=($result[$i]['id']==$selected) ? \"selected='selected'\" : \"\";\n\t\t\t$html.='<option '.$sel.' value=\"'.$result[$i]['id'].'\">'.$result[$i]['name'].'</option>';\n\t\t}\n\t\t\treturn $html;\n\t\t\t}\n\t\t\n\t}", "function getDividers() {\n return $this->dividers;\n }", "public static function getDivision() \n {\n return CHtml::ListData(self::model()->findAllBySql(\"SELECT * FROM division ORDER BY name;\"),\"id\",\"name\"); \n }", "public function getTeamIdsByDiv(){\n\t\t$aByDiv = array();\n\t\t$aTms = $this->getTeams();\n\t\t\n\t\tforeach($aTms as $id => $team){\n\t\t\t\t\n\t\t\t$tc = $team->getProp('conference');\n\t\t\t$td = $team->getProp('division');\n\t\t\t\n\t\t\tif(!array_key_exists($tc,$aByDiv))\n\t\t\t\t$aByDiv[$tc] = array();\n\t\t\t\n\t\t\tif(!array_key_exists($td, $aByDiv[$tc]))\n\t\t\t\t$aByDiv[$tc][$td] = array();\n\t\t\t\n\t\t\t$aByDiv[$tc][$td][] = $team;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tksort($aByDiv);\n\t\tforeach($aByDiv as $confId => $conf){\n\t\t\tksort($aByDiv[$confId]);\n\t\t\tforeach($conf as $divId => $div){\n\t\t\t\tusort($aByDiv[$confId][$divId], sortByCity);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $aByDiv;\n\t}", "public function getBoundaries()\n {\n }", "function testSubdivisions() {\n $field_name = $this->field->getName();\n // Using China since it has predefined subdivisions on all three levels.\n $country = 'CN';\n $administrativeArea = 'CN-13';\n $locality = 'CN-13-2c7460';\n $administrativeAreas = $this->subdivisionRepository->getList($country);\n $localities = $this->subdivisionRepository->getList($country, $administrativeArea);\n $dependentLocalities = $this->subdivisionRepository->getList($country, $locality);\n // Confirm the presence and format of the administrative area dropdown.\n $edit = [];\n $edit[$field_name . '[0][country_code]'] = $country;\n $this->drupalPostAjaxForm($this->nodeAddUrl, $edit, $field_name . '[0][country_code]');\n $this->assertOptions($field_name . '[0][administrative_area]', array_keys($administrativeAreas), 'All administrative areas for country ' . $country . ' are present.');\n\n // Confirm the presence and format of the locality dropdown.\n $edit = [];\n $edit[$field_name . '[0][administrative_area]'] = $administrativeArea;\n $this->drupalPostAjaxForm(NULL, $edit, $field_name . '[0][administrative_area]');\n $this->assertResponse(200);\n $this->assertOptionSelectedWithDrupalSelector('edit-field-address-0-administrative-area', $administrativeArea, 'Selected administrative area ' . $administrativeAreas[$administrativeArea]);\n $this->assertOptions($field_name . '[0][locality]', array_keys($localities), 'All localities for administrative area ' . $administrativeAreas[$administrativeArea] . ' are present.');\n\n // Confirm the presence and format of the dependent locality dropdown.\n $edit[$field_name . '[0][locality]'] = $locality;\n $this->drupalPostAjaxForm(NULL, $edit, $field_name . '[0][locality]');\n $this->assertResponse(200);\n $this->assertOptionSelectedWithDrupalSelector('edit-field-address-0-locality', $locality, 'Selected locality ' . $localities[$locality]);\n $this->assertOptions($field_name . '[0][dependent_locality]', array_keys($dependentLocalities), 'All dependent localities for locality ' . $localities[$locality] . ' are present.');\n }", "protected function _createSubset() {}", "function division(string $name): ?MJKMH_Division {\r\n \treturn isset($this->divisions[$name]) ? $this->divisions[$name] : null;\r\n }", "function _get_regions_subregions(){\n $this->gen_contents['regions'] = $this->admin_career_event_model->dbSelectAllRegions();\n $arr_data = $this->admin_career_event_model->dbSelectAllSubRegions();\n $this->gen_contents['raw_subregion']= $arr_data;\n $id \t\t\t\t\t= 0;\n $arr_subregion\t\t\t\t= array();\n\n foreach ($arr_data as $value){\n if($id != $value->regionid){\n $id = $value->regionid;\n $arr_subregion['R'][$id] = array();\n }\n $arr_subregion['R'][$id][] = array('id' =>$value->id,'name'=>$value->sub_name);\n }\n //gets all the region and subregion for the purpose of displaying filter\n //used to diaply subregion using jason array \t\t\t\t\n $this->gen_contents['json_array'] \t= json_encode($arr_subregion);\n\t\t\t\n\t\t}", "public function getDividerWrapper()\n {\n }", "function subArea($a,$b,$c){\r\n\t\t$fSArea= new fachada_subArea();\r\n\t\t$oSArea=$fSArea->subArea($a,$b,$c);\r\n\t\treturn $oSArea;\r\n\t}", "public function getItems()\n\t\t{\n\t\t\t$items = parent::getItems();\n\t\t\tforeach ($items as $item)\n\t\t\t{\n\t\t\t\t$item->subdivision = JText::_('COM_POLYUS_USERS_USERS_SUBDIVISION_OPTION_' . strtoupper($item->subdivision));\n\t\t\t}\n\t\t\treturn $items;\n\t\t}", "public function getCountriesPerRegion();", "abstract protected function getArea();", "public function getBounds();", "function variant_div($left, $right) {}", "protected function sectionDivisionsProducts()\n {\n $output = '<h1>' . $this->tableAdmin->translate('Divisions and products') . '</h1><div id=\"agenda-products\">';\n // TODO consider implementing from project F\n $divisions = $this->MyCMS->fetchAndReindexStrictArray('SELECT '\n // TODO TAB_PREFIX below instead of mycmsprojectspecific_\n . '* FROM mycmsprojectspecific_content LIMIT 0'); // always return empty set - replace by working code below\n// . 'id,division_' . $_SESSION['language'] .\n// ' AS division,' . ($tmp = 'sort+IF(id=' . Tools::set($_SESSION['division-switch'], 0) . ',' .\n// Tools::set($_SESSION['division-delta'], 0) . ',0)') . ' AS sort,active FROM `' . TAB_PREFIX .\n// 'division` ORDER BY ' . $tmp);\n $parents = $this->MyCMS->fetchAll('SELECT '\n// . 'division_id,'\n . 'id,name_' . $_SESSION['language']\n . ' AS product,' . ($tmp = 'sort+IF(id=' . Tools::set($_SESSION['product-switch'], 0) . ','\n . Tools::set($_SESSION['product-delta'], 0) . ',0)') . ' AS sort,active FROM `' . TAB_PREFIX\n . 'product`'\n //. ' WHERE parent_product_id = 0'\n . ' ORDER BY '\n //. 'division_id,'\n . $tmp);\n $children = $this->MyCMS->fetchAll('SELECT '\n// . 'parent_product_id,'\n . 'id,name_' . $_SESSION['language']\n . ' AS product,' . ($tmp = 'sort+IF(id=' . Tools::set($_SESSION['product-switch'], 0) . ','\n . Tools::set($_SESSION['product-delta'], 0) . ',0)') . ' AS sort,active'\n . ' FROM ' . TAB_PREFIX . 'product'\n //. ' WHERE parent_product_id <> 0'\n . ' ORDER BY '\n //. 'parent_product_id,'\n . $tmp);\n $sort = array(0, 0, 0);\n $correctOrder = array();\n if (!empty($divisions)) {\n foreach ($divisions as $divisionId => $division) {\n Assert::isArray($division);\n $output .= '<details open><summary class=\"d-inline-block\"><big'\n . ($division['active'] == 1 ? '' : ' class=\"inactive\"') . '><a href=\"?table=' . TAB_PREFIX\n . 'division&amp;where[id]=' . $divisionId . '\" title=\"' . $this->tableAdmin->translate('Edit')\n . '\">'\n . '<i class=\"fa fa-edit\" aria-hidden=\"true\"></i></a> '\n . '<button type=\"button\" class=\"btn btn-sm d-inline\" name=\"division-up\" value=\"' . $divisionId\n . '\" title=\"' . $this->tableAdmin->translate('Move up') . '\">'\n . '<i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i></button> '\n . '<button type=\"button\" class=\"btn btn-sm d-inline mr-2\" name=\"division-down\" value=\"'\n . $divisionId\n . '\" title=\"' . $this->tableAdmin->translate('Move down') . '\">'\n . '<i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i></button>'\n . Tools::h($division['division'] ?: 'N/A') . '</big></summary>' . PHP_EOL;\n if (++$sort[0] != $division['sort']) {\n $correctOrder[] = array($divisionId, $sort[0], false);\n }\n $sort[1] = 0;\n if (!empty($parents)) {\n foreach ($parents as $parent) {\n if ($parent['division_id'] == $divisionId) {\n $output .= '<details class=\"ml-4\"><summary class=\"d-inline-block\"><a href=\"?table='\n . TAB_PREFIX . 'product&amp;where[id]=' . $parent['id'] . '\" target=\"_blank\" title=\"'\n . $this->tableAdmin->translate('Link will open in a new window')\n . '\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></a> '\n . '<button type=\"button\" class=\"btn btn-xs d-inline\" name=\"product-up\" value=\"'\n . $parent['id'] . '\" title=\"' . $this->tableAdmin->translate('Move up') . '\">'\n . '<i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i></button> '\n . '<button type=\"button\" class=\"btn btn-xs d-inline mr-2\" name=\"product-down\" value=\"'\n . $parent['id'] . '\" title=\"' . $this->tableAdmin->translate('Move down') . '\">'\n . '<i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i></button>';\n $sort[1]++;\n if ($sort[1] != $parent['sort']) {\n $correctOrder[] = array($parent['id'], $sort[1]);\n }\n $sort[2] = 0;\n $tmp = [];\n if (!empty($children)) {\n foreach ($children as $child) {\n if ($child['parent_product_id'] == $parent['id']) {\n Assert::string($child['product']);\n $tmp [] = '<div class=\"ml-4\"><a href=\"?table='\n . TAB_PREFIX . 'product&amp;where[id]=' . $child['id']\n . '\" target=\"_blank\" title=\"' . $this->tableAdmin->translate('Edit')\n . '\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></a> '\n . '<button type=\"button\" class=\"btn btn-xs d-inline\" '\n . 'name=\"product-up\" value=\"'\n . $child['id'] . '\" title=\"' . $this->tableAdmin->translate('Move up')\n . '\"><i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i></button> '\n . '<button type=\"button\" class=\"btn btn-xs d-inline mr-2\" '\n . 'name=\"product-down\" '\n . 'value=\"' . $child['id']\n . '\" title=\"' . $this->tableAdmin->translate('Move down')\n . '\"><i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i></button>'\n . Tools::h($child['product'])\n . '</div>';\n $sort[2]++;\n if ($sort[2] != $child['sort']) {\n $correctOrder[] = array($child['id'], $sort[2]);\n }\n }\n }\n }\n $output .= '<span class=\"' . ($parent['active'] ? 'active' : 'inactive') . '\">'\n . Tools::h((string) $parent['product']) . '</span>'\n . '<sup class=\"badge badge-secondary ml-1\">' . count($tmp) . '</sup></summary>'\n . implode(PHP_EOL, $tmp)\n . '<a href=\"?table=' . TAB_PREFIX . 'product&amp;where[]=&amp;prefill[division_id]='\n . $divisionId . '&amp;prefill[parent_product_id]=' . $parent['id']\n . '&amp;prefill[sort]=' . $sort[1]\n . '\" class=\"ml-4\"><i class=\"fa fa-plus-square-o\" aria-hidden=\"true\"></i></a> '\n . $this->tableAdmin->translate('New record')\n . '</details>' . PHP_EOL;\n }\n }\n }\n $output .= '<a href=\"?table=' . TAB_PREFIX . 'product&amp;where[]=&amp;prefill[division_id]='\n . $divisionId . '&amp;prefill[sort]=' . $sort[0] . '\" class=\"ml-4\">'\n . '<i class=\"fa fa-plus-square-o\" aria-hidden=\"true\"></i></a> '\n . $this->tableAdmin->translate('New record') . '</summary></details>';\n }\n }\n $output .= '</div><form action=\"\" method=\"post\">'\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden')\n . '<button name=\"export-offline\" type=\"submit\" class=\"btn btn-sm invisible\">Export off-line</button>'\n . '</form>';\n foreach ($correctOrder as $value) {\n $this->MyCMS->dbms->query('UPDATE `' . TAB_PREFIX . (count($value) == 3 ? 'division' : 'product')\n . '` SET sort = ' . $value[1] . ' WHERE id = ' . $value[0]);\n }\n unset(\n $_SESSION['division-switch'],\n $_SESSION['division-delta'],\n $_SESSION['product-switch'],\n $_SESSION['product-delta']\n );\n return $output;\n }", "protected function GetSubDivsX($axis)\n {\n return $this->x_axes[$axis]->GetGridSubdivisions(\n $this->minimum_subdivision,\n $this->flip_axes ? $this->ArrayOption($this->minimum_units_y, $axis) : 1,\n $this->pad_left,\n $this->ArrayOption($this->subdivision_h, $axis));\n }", "public function get_region_categories()\n\t{\n\t\t\n\t\treturn null;\n\t\t\t\n\t}", "protected function DivisionOverlap($x_axes, $y_axes)\n {\n $l = $r = $t = $b = 0;\n if($this->show_divisions || $this->show_subdivisions) {\n\n $x_count = count($x_axes);\n $y_count = count($y_axes);\n for($i = 0; $i < $x_count; ++$i) {\n if(is_null($x_axes[$i]))\n continue;\n $dx = $this->DOverlap(\n $this->GetFirst($this->ArrayOption($this->division_style_h, $i),\n $this->division_style),\n $this->GetFirst($this->ArrayOption($this->division_size_h, $i), \n $this->division_size));\n $sx = $this->DOverlap(\n $this->GetFirst($this->ArrayOption($this->subdivision_style_h, $i),\n $this->subdivision_style),\n $this->GetFirst($this->ArrayOption($this->subdivision_size_h, $i),\n $this->subdivision_size));\n $x = max($dx, $sx);\n if($i > 0)\n $t = $x;\n else\n $b = $x;\n }\n\n for($i = 0; $i < $y_count; ++$i) {\n if(is_null($y_axes[$i]))\n continue;\n $dy = $this->DOverlap(\n $this->GetFirst($this->ArrayOption($this->division_style_v, $i),\n $this->division_style),\n $this->GetFirst($this->ArrayOption($this->division_size_v, $i),\n $this->division_size));\n $sy = $this->DOverlap(\n $this->GetFirst($this->ArrayOption($this->subdivision_style_v, $i),\n $this->subdivision_style),\n $this->GetFirst($this->ArrayOption($this->subdivision_size_v, $i),\n $this->subdivision_size));\n $y = max($dy, $sy);\n if($i > 0)\n $r = $y;\n else\n $l = $y;\n }\n }\n return compact('l', 'r', 't', 'b');\n }", "function subDivByID(Country $country, $code) {\n $r = $this->db->query(\"SELECT divcode, divname FROM country_state WHERE country = '{$country->code}' AND divcode='{$code}'\");\n $row = $r->fetchArray(SQLITE3_ASSOC);\n if(!$row) throw new NotFoundEx(\"SubDivision could not be found ({$country->code}-{$code})\");\n return new SubDivision($country, $row['divcode'], $row['divname']);\n }", "function getArea(){}", "function list_divisions(){\n\n\t $this->load->view('header',$this->data); \n $this->data['division_details']=$this->Masters_model->list_divisions();\n $this->load->view('Masters/list_divisions',$this->data);\n $this->load->view('footer');\n\t}", "function viewDivisionFromTerritoryID($id) {\n $this->load->model('territory/territory_model');\n $fetchAllDivision = $this->territory_model->getAllDivisionfromID($id);\n $this->template->draw('territory/territoryMapView', false, $fetchAllDivision);\n }", "public function get_division_data($company_id)\n\t{\n\t\t\tif ($this->file_maintenance_model->check_division_value($company_id)) \n\t\t\t{\n\t\t\t\t$this->data['options'] = 'division';\n\t\t\t\t$this->data['divisionList'] = $this->file_maintenance_model->divisionList($company_id);\n\t\t\t\t$this->load->view('app/administrator/file_maintenance/result_checkbox',$this->data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->data['options'] = 'department';\n\t\t\t\t$this->data['divisionList'] = '';\n\t\t\t\t$this->data['departmentList'] = $this->file_maintenance_model->deptList($company_id);\n\t\t\t\t$this->load->view('app/administrator/file_maintenance/result_checkbox',$this->data);\n\t\t\t}\n\t}", "public function getDomainParts();", "function getSubfolders() ;", "public function division(){\n\t\t//$this->data['companyList']\t= $this->file_maintenance_model->get_comp_w_div();\n\t\t$this->load->view('app/administrator/file_maintenance/division', $this->data);\n\t}", "public function getDivisionNames() {\n\t\t$q = strtolower($_GET['term']); //this is stable\n $this->load->model('territory/territory_model');\n $column = array('division_name', 'id_division');\n $result = $this->territory_model->getDivisionNames($q, $column);\n echo json_encode($result);\n }", "public static function getSubnets(){\n\t\t\tglobal $wpdb;\n\n\t\t\tif( is_multisite() ){\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t/*\n\t\t\t\t\tRetrieves all of the subnets with\n\t\t\t\t\trespect to the current site.\n\t\t\t\t*/\n\t\t\t\t$subnets = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\"SELECT * FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\tWHERE blog_id = '%d'\",\n\t\t\t\t\t$currentBlogID\n\t\t\t\t), ARRAY_A );\n\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t/*\n\t\t\t\t\tRetrieves all of the subnets.\n\t\t\t\t*/\n\t\t\t\t$subnets = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.\"wps_subnets\", ARRAY_A );\n\t\t\t}\n\n\t\t\treturn $subnets;\n\t\t}", "protected function _prepareSubset() {}", "function viewDivisionFromDivisionID($id) {\n $this->load->model('territory/territory_model');\n $fetchAllDivision = $this->territory_model->getAllDivisionfromDivisionID($id);\n $this->template->draw('territory/territoryMapManage', false, $fetchAllDivision);\n }", "public function index()\n {\n $divisions = Division::with('gender', 'level')->get();\n\n if (request()->expectsJson()) {\n return $divisions;\n }\n\n return view('properties.races.divisions.index', compact('divisions'));\n }", "public function getSeasons();", "public function getSubrogationPartielle() {\n return $this->subrogationPartielle;\n }", "public function div($dividend, $divisor);", "public function getDimensions() {}", "public function segments() : array;", "public function getPartOfSeason() {\n\t\treturn $this->partOfSeason;\n\t}", "public function setBranchesAndIntervals($divisions, $intervals)\n {\n $this->numIntervals = count($intervals);\n\n $children = [];\n\n /** @var Division $division */\n foreach ($divisions as $division) {\n if (empty($division->getParentDivId())) {\n $this->setBranchStatistic($division, $intervals);\n } else {\n $children[] = $division;\n }\n }\n\n foreach ($children as $division) {\n $this->setDivisionStatistic($division, $intervals);\n }\n }", "public function getRanges(): UnitRangesCollection;", "public function getChunksList(){\n return $this->_get(2);\n }", "public function getDimensions();", "public function getDimensions();", "protected function _getRanges() {}", "public function split(int $numberOfGroups): CollectionInterface;", "abstract public function getPanelGroup();", "public function read($params) {\n\t //return $params;\n\t if (isset($params['division_id'])) {\n\t //from division_id\n\t $division = $this->api->read(\"Division\",array(\"id\" => $params['division_id']));\n\t } else {\n\t //from division source code + parliament\n\t if (isset($params['parliament_code']) and isset($params['source_code'])) {\n\t $query = new Query;\n\t $query->setQuery(\"SELECT * FROM division_from_source($1,$2)\");\n\t $query->appendParam($params['parliament_code']);\n\t $query->appendParam($params['source_code']);\n\t $division = $query->execute();\n\t } else \n\t $division = array();\n\t }\n\t return $division;\n\t}", "function inters($bbox1) {\r\n// echo \"$this -> BBox::inters($bbox1)<br>\\n\";\r\n $xmin = max($bbox1->min()->x(),$this->min()->x());\r\n $ymin = max($bbox1->min()->y(),$this->min()->y());\r\n $xmax = min($bbox1->max()->x(),$this->max()->x());\r\n $ymax = min($bbox1->max()->y(),$this->max()->y());\r\n if (($xmax < $xmin) or ($ymax < $ymin))\r\n return 0;\r\n// echo \"area=\",$this->area(),\", \",$bbox1->area(),\"<br>\\n\";\r\n return (($xmax-$xmin)*($ymax-$ymin)) / max($bbox1->area(), $this->area());\r\n }", "public function getNGroups() {}", "public abstract function getBoundingBox(): Rectangle;", "public function subitDegats($degats){\n\n }", "public function divide(...$params)\n {\n return $this->div(...$params);\n }", "public function getSubgroup() {}", "public function getRegions($countryIdent = NULL, $subdivisionIdent = NULL) {\n\t\t$params = '';\n\n\t\tif (NULL !== $countryIdent) {\n\t\t\t$params = '?land=' . $countryIdent;\n\t\t}\n\n\t\tif (NULL !== $subdivisionIdent) {\n\t\t\t$params = '?bundesland=' . $subdivisionIdent;\n\t\t}\n\n\t\treturn $this->getData('/objekt/regionen' . $params);\n\t}", "abstract protected function getGroupList() ;", "public function getDivision(){\r\n\t$division=$this->db->get('division_tab')->result_array();\r\n\treturn $division;\r\n}", "function divide_array( &$vet, $ini, $fim, $tipo )\n{\n $i = $ini;\n $j = $fim;\n $dir = 1;\n \n while( $i < $j )\n {\n \tif(strcasecmp($tipo,'cenario') == 0){\n \t\tif( strlen( $vet[$i]->titulo ) < strlen( $vet[$j]->titulo ) )\n\t {\n\t $str_temp = $vet[$i];\n\t $vet[$i] = $vet[$j];\n\t $vet[$j] = $str_temp;\n\t $dir--;\n\t }\t\n \t}else{\n\t if( strlen( $vet[$i]->nome ) < strlen( $vet[$j]->nome ) )\n\t {\n\t $str_temp = $vet[$i];\n\t $vet[$i] = $vet[$j];\n\t $vet[$j] = $str_temp;\n\t $dir--;\n\t }\n \t}\n if( $dir == 1 )\n $j--;\n else\n $i++;\n }\n \n return $i;\n}", "public function getBoundingBox() {}", "public function addDivision() {\n /* get job title from db contract array */\n $jobQuery = $this->db2->table('hr_division')->select('id', 'div_name')->get();\n //return $jobQuery; \n return View::make('settings/division.division')->with(array('divisionList' => $jobQuery));\n }", "public function getHierarchy()\n {\n \t$hierarchy = array();\n \tif ($this->parentid) {\n \t\t$parent = $this->projectService->getProject($this->parentid);\n \t\t$hierarchy = $parent->getHierarchy();\n \t\t$hierarchy[] = $parent;\n \t} else {\n \t\t$client = $this->clientService->getClient($this->clientid);\n \t\t$hierarchy[] = $client;\n \t}\n \t\n \treturn $hierarchy;\n }", "abstract public function region();", "public function subunits(Money $money);", "function getCultPlaces($divid) {\n\tglobal $conn;\n\t$sql = \"SELECT * FROM division_place_types JOIN place ON division_place_types.place = place.id AND division_place_types.division = '$divid' AND division_place_types.types = '2'\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch all places as an associative array called $cults\n\t$cults = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t$cultplaces = array();\n\tforeach ($cults as $cult) { \n\t\tarray_push($cultplaces, $cult);\n\t}\n\treturn $cultplaces;\n}", "public function getGroups() {}", "abstract protected function getGroupStructure();", "public static abstract function getGroupList();", "public function getVolume(){ // calcolo il volume del cubo che è area del quadrato * lato (lato * lato * lato)\n return parent::getArea() * $this -> side; \n }", "public function getSubBlocks();", "public function getGroups();", "public function getGroups();", "public function getBounds()\n {\n return $this->bounds;\n }", "function AllIntervals() {\r\n\r\n\t# return the complete NvP interval array\r\n\treturn $this->intervals;\r\n\r\n# end function\r\n}", "public function setCoDivision($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->co_division !== $v) {\n\t\t\t$this->co_division = $v;\n\t\t\t$this->modifiedColumns[] = C060InventarioPeer::CO_DIVISION;\n\t\t}\n\n\t\treturn $this;\n\t}", "function variant_sub($left, $right) {}", "abstract public function getIntervalColumnCount(): int;", "public function getRectangles()\n {\n return $this->rectangles;\n }", "function getDimensiones() {\n return $this->dimensiones;\n }", "protected function division($array)\n {\n $all_data = [];\n \n foreach($array as $data){\n\n array_push($all_data, $data); \n }\n return $all_data;\n }", "abstract public function subfolder($manipulation_name = '');", "private function getGrupoSubgrupo() {\n\n $oGrupo = new stdClass();\n $oGrupo->codigo = 0;\n $oGrupo->estrutural = \"\";\n $oGrupo->descricao = \"\";\n $oGrupo->grupoPai = 0;\n $oGrupo->nivel = 1;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n $this->aGrupos = $aGrupos;\n\n if ($this->lAgruparGrupoSubgrupo) {\n\n $aGrupos = array();\n\n $oDaoGrupoSubGrupo = new cl_materialestoquegrupo();\n\n /**\n * Busca todos os grupos e subgrupos e seus respectivos grupos pais.\n */\n $sCampos = \" db121_sequencial, m65_sequencial, db121_estrutural, db121_descricao, db121_estruturavalorpai, db121_nivel \";\n $sWhere = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n $sOrdem = \" db121_estrutural \";\n $sql = $oDaoGrupoSubGrupo->sql_query(null, $sCampos, $sOrdem, $sWhere);\n $rsGrupoSubgrupo = $oDaoGrupoSubGrupo->sql_record($sql);\n\n for ($i = 0; $i < $oDaoGrupoSubGrupo->numrows; $i++) {\n\n $oGrupoAux = db_utils::fieldsMemory($rsGrupoSubgrupo, $i);\n $oGrupoMaterial = new MaterialGrupo($oGrupoAux->m65_sequencial);\n $oGrupo = new stdClass();\n $oGrupo->codigo = $oGrupoAux->m65_sequencial;\n $oGrupo->estrutural = $oGrupoAux->db121_estrutural;\n $oGrupo->descricao = $oGrupo->estrutural . \" - \" . $oGrupoAux->db121_descricao;\n $oGrupo->grupoPai = 0;\n if ($oGrupoMaterial->getEstruturaPai() != '') {\n $oGrupo->grupoPai = $oGrupoMaterial->getEstruturaPai()->getCodigo();\n }\n $oGrupo->nivel = $oGrupoAux->db121_nivel;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n }\n\n $this->aGrupos = $aGrupos;\n /**\n * Agrupamos os grupos conforme sua organizacao\n */\n foreach ($this->aGrupos as $oGrupo) {\n $this->criarGrupoPai($oGrupo);\n }\n uasort($this->aGrupos,\n function ($oGrupo, $oGrupoDepois) {\n return $oGrupo->estrutural > $oGrupoDepois->estrutural;\n }\n );\n }\n\n foreach ($this->aDepartamentos as $oDepartamento) {\n\n foreach ($this->aGrupos as $oGrupo) {\n $oDepartamento->itens[$oGrupo->codigo] = clone $oGrupo;\n }\n }\n return $this->aGrupos;\n }", "public function getSubegionsByRegionAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $regionId = $request->get('regionId');\n $type = $request->get('type');\n $typeClass = $request->get('typeClass');\n\n $subregions = $em->getRepository('AppBundle:Subregion')->getByRegion($regionId);\n\n $response = $this->render('AppBundle:Location/ajax:subregions.html.twig', array(\n 'subregions' => $subregions,\n 'type' => $type,\n 'typeClass'=> $typeClass\n ))->getContent();\n\n return new Response(json_encode($response));\n }" ]
[ "0.73897374", "0.7162535", "0.62324107", "0.59804314", "0.5962689", "0.5841205", "0.5816145", "0.57918316", "0.56583506", "0.56470126", "0.5508616", "0.5484569", "0.54537404", "0.5405672", "0.53856593", "0.5354913", "0.53397465", "0.52791154", "0.5244185", "0.52121353", "0.51921314", "0.5153724", "0.51472646", "0.5138223", "0.51136076", "0.50567484", "0.50254065", "0.5012567", "0.5012389", "0.5002302", "0.5000638", "0.49919593", "0.4982313", "0.49643794", "0.49561298", "0.49455664", "0.49408135", "0.49259833", "0.492485", "0.489358", "0.48815098", "0.48384628", "0.4805808", "0.4803774", "0.4771399", "0.47430316", "0.47419", "0.47305518", "0.47258332", "0.47253934", "0.47224477", "0.47139928", "0.46953675", "0.4691168", "0.46715555", "0.46460643", "0.46432385", "0.46368918", "0.4627895", "0.46219385", "0.4616951", "0.4596505", "0.4596505", "0.45935124", "0.45857745", "0.45754993", "0.45715448", "0.4565693", "0.45536938", "0.4537832", "0.45349723", "0.4534495", "0.45341977", "0.4529839", "0.45210674", "0.45114738", "0.45102674", "0.45102558", "0.45060724", "0.4495826", "0.4493036", "0.44922957", "0.44877285", "0.44861218", "0.4484281", "0.44800258", "0.44659588", "0.44600525", "0.44443393", "0.44443393", "0.44384444", "0.44317508", "0.44239992", "0.44207388", "0.44173086", "0.44138986", "0.44129553", "0.44055182", "0.43949792", "0.4393093", "0.4391358" ]
0.0
-1
fetches a list of regions for a given country OR subdivision $subdivision has a higher priority than country, if it is set, countryIdent is ignored.
public function getRegions($countryIdent = NULL, $subdivisionIdent = NULL) { $params = ''; if (NULL !== $countryIdent) { $params = '?land=' . $countryIdent; } if (NULL !== $subdivisionIdent) { $params = '?bundesland=' . $subdivisionIdent; } return $this->getData('/objekt/regionen' . $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadCountriesFromRegion($region,$companyID) {\n\tif($region) {\n\t\tglobal $trailSessionUser;\n\t\n\t\t$theUserID=0;\n\t\t//ensure $trailSessionUser is not a visitor\n\t\tif(substr($trailSessionUser,0,7)!=\"visitor\") {\n\t\t\t$theUserID=getUserID($trailSessionUser);\n\t\t}\n\t\n\t\t//get the towns first\n\t\t$query=0;\n\t\t$query=mysqlquery(\"select distinct countryID,country from vl_countries where region='$region' order by country\");\n\t\tif(mysqlnumrows($query)) {\n\t\t\t$return=0;\n\t\t\t$return=\"\n\t\t\t\t<table width=\\\"100%\\\" border=\\\"0\\\">\n\t\t\t\t <tr>\n\t\t\t\t\t<td colspan=\\\"2\\\">Select the markets covered:</td>\n\t\t\t\t </tr>\";\n\t\t\t$q=array();\n\t\t\twhile($q=mysqlfetcharray($query)) {\n\t\t\t\t$return.=\"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td width=\\\"1%\\\"><input type=\\\"checkbox\\\" name=\\\"marketscoveredUnique[]\\\" value=\\\"$q[countryID]\\\" \".(checkMarketAgainstProvider($theUserID,$q[\"countryID\"],$companyID)?\"checked\":\"\").\"></td>\n\t\t\t\t\t\t\t<td width=\\\"99%\\\">\".removeSpecialCharacters($q[country]).\"</td>\n\t\t\t\t\t\t</tr>\";\n\t\t\t}\n\t\t\t$return.=\"</table>\";\n\t\n\t\t\treturn $return;\n\t\t} else {\n\t\t\t$return=0;\n\t\t\t//$return=\"No countries found in database!\";\n\t\t\t$return=\"\";\n\t\n\t\t\treturn $return;\n\t\t}\n\t}\n}", "function subDivByCountry(Country $country) {\n $out = [];\n $r = $this->db->query(\"SELECT divcode, divname FROM country_state WHERE country = '{$country->code}' and type!='Outlying area'\");\n while($row = $r->fetchArray(SQLITE3_ASSOC)) {\n $out[] = new SubDivision($country, $row['divcode'], $row['divname']);\n }\n return $out;\n }", "function getCustomerEngRegion($customer_id)\n {\n /* @changes: intersect of region\n * @author: Sagar Jogi dt: 09/08/2017\n */\n $user=DB::query(\"SELECT r.region FROM \" . CFG::$tblPrefix . \"user AS r WHERE active='1' and r.id=%d\",$_SESSION['user_login']['id']);\n $cust=DB::query(\" SELECT c.region_id as cregion FROM \" . CFG::$tblPrefix . \"user_region AS c WHERE c.user_id=%d\",$customer_id);\n foreach($cust as $k=>$v){\n $abc.=$cust[$k]['cregion'].',';\n }\n $check=DB::query(\"SELECT all_region FROM \" . CFG::$tblPrefix . \"user WHERE id=%d\",$_SESSION['user_login']['id']);\n if($check[0]['all_region']=='1') {\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region r WHERE status='1' and FIND_IN_SET( r.id, '$abc') order by name asc\");\n } else {\n \n \n// pre($abc);exit;\n $userexp= explode(',',$user[0]['region']);\n $custexp= explode(',',$abc);\n \n// pre($cust);exit;\n $result=array_intersect($userexp,$custexp);\n $resimp= implode(',', $result);\n// pre($cust);exit;\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r WHERE FIND_IN_SET( r.id, '$resimp')\"); \n }\n /*return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r LEFT JOIN \" . CFG::$tblPrefix . \"user AS u ON FIND_IN_SET( r.id, u.region ) >0\nWHERE u.id =%d and u.active='1' and r.status='1'\",$customer_id); */\n \n }", "public function countryRegionAction()\n {\n $arrRes = array();\n\n $countryId = $this->getRequest()->getParam('parent');\n $colRegions = Mage::getResourceModel('directory/region_collection')\n ->addCountryFilter($countryId)\n ->load();\n \n\t$arrRegions = $this->_toOptionArray($colRegions);\n if (!empty($arrRegions)) {\n foreach ($arrRegions as $region) {\n $arrRes[] = $region;\n }\n }\n\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($arrRes));\n }", "function _get_regions_subregions(){\n $this->gen_contents['regions'] = $this->admin_career_event_model->dbSelectAllRegions();\n $arr_data = $this->admin_career_event_model->dbSelectAllSubRegions();\n $this->gen_contents['raw_subregion']= $arr_data;\n $id \t\t\t\t\t= 0;\n $arr_subregion\t\t\t\t= array();\n\n foreach ($arr_data as $value){\n if($id != $value->regionid){\n $id = $value->regionid;\n $arr_subregion['R'][$id] = array();\n }\n $arr_subregion['R'][$id][] = array('id' =>$value->id,'name'=>$value->sub_name);\n }\n //gets all the region and subregion for the purpose of displaying filter\n //used to diaply subregion using jason array \t\t\t\t\n $this->gen_contents['json_array'] \t= json_encode($arr_subregion);\n\t\t\t\n\t\t}", "public function getCountriesPerRegion();", "public function getCountriesData(string $country = null, string $options = null, array $headers = ['Content-Type' => 'application/json'])\n\t{\n\t\ttry {\n\t\t\t$getContent = collect(Http::get($this->api)->json());\n\t\t\t$data = $getContent->flatten(1);\n\t\t\tif (! is_null($country)) {\n\t\t\t\t$countryData = $data->filter(function($element) use ($country) {\n\t\t\t\t\treturn false !== stripos($element['Country_Region'], $country);\n\t\t\t\t})->first();\n\t\t\t\tif($countryData) {\n\t\t\t\t\tif(! is_null($options)) {\n\t\t\t\t\t\tswitch ($options) {\n\t\t\t\t\t\t\tcase 'Confirmed':\n\t\t\t\t\t\t\tcase 'confirmed':\n\t\t\t\t\t\t\tcase 'Positif':\n\t\t\t\t\t\t\tcase 'positif':\n\t\t\t\t\t\t\t\t$getCase[$countryData['Country_Region'] . '_Confirmed'] = $countryData['Confirmed'];\n\t\t\t\t\t\t\t\treturn response()->json($getCase)->withHeaders($headers);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 'Deaths':\n\t\t\t\t\t\t\tcase 'deaths':\n\t\t\t\t\t\t\tcase 'Meninggal':\n\t\t\t\t\t\t\tcase 'meninggal':\n\t\t\t\t\t\t\t\t$getCase[$countryData['Country_Region'] . '_Deaths'] = $countryData['Deaths'];\n\t\t\t\t\t\t\t\treturn response()->json($getCase)->withHeaders($headers);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'Recovered':\n\t\t\t\t\t\t\tcase 'recovered':\n\t\t\t\t\t\t\tcase 'Sembuh':\n\t\t\t\t\t\t\tcase 'sembuh':\n\t\t\t\t\t\t\t\t$getCase[$countryData['Country_Region'] . '_Recovered'] = $countryData['Recovered'];\n\t\t\t\t\t\t\t\treturn response()->json($getCase)->withHeaders($headers);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tabort(404, 'Sorry, Please Input Your Query Correctly!');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif(is_null($options)) {\n\t\t\t\t\t\treturn response()->json($countryData)->withHeaders($headers);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tabort(500, 'Something Went Wrong!');\n\t\t\t\t\t}\n\t\t\t\t} elseif(! $countryData) {\n\t\t\t\t\tabort(404, 'Sorry, the Country You are For Looking Doesn\\'t Exists');\n\t\t\t\t} else {\n\t\t\t\t\tabort(500, 'Something Went Wrong!');\n\t\t\t\t}\n\t\t\t} elseif(is_null($country)) {\n\t\t\t\t$getCountry = Arr::pluck($data, 'Country_Region');\n\t\t\t\treturn response()->json($getCountry);\n\t\t\t} else {\n\t\t\t\tabort(500, 'Something Went Wrong!');\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t\tthrow new \\Exception($e->getMessage());\n\t\t}\n\t}", "function getRegionsStub($country)\n{\n return array(\"Kentriki Makedonia\", \"Thraki\", \"Peloponisos\", \"Kriti\");\n}", "public function get_regions($country_code)\n\t{\n\t\t$query = \"SELECT `country`, `region`, `name` FROM `regions` WHERE `country` = '\".$country_code.\"' ORDER BY CASE WHEN `region` = '\".NO_REGION.\"' THEN 1 ELSE 0 END, `region`\";\n\t\t$result = $this->db->query($query);\n\t\tif ($result->num_rows() > 0 ) \n\t\t\treturn $result->result();\n\t\treturn false;\n\t}", "function getCountryRegion($country) {\n\treturn getDetailedTableInfo2(\"vl_countries\",\"lower(country)=lower('$country')\",\"region\");\n}", "public function getRegionsByCountryAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $countryId = $request->get('countryId');\n $type = $request->get('type');\n $typeClass = $request->get('typeClass');\n\n $regions = $em->getRepository('AppBundle:Region')->getByCountry($countryId);\n\n $response = $this->render('AppBundle:Location/ajax:regions.html.twig', array(\n 'regions' => $regions,\n 'type' => $type,\n 'typeClass'=> $typeClass\n ))->getContent();\n\n return new Response(json_encode($response));\n }", "public function getRegions($countryId = NULL) {\n if (isset($countryId) && $countryId != '') {\n $html = '<option value=\"\">--Select State--</option> ';\n\n $countryData = $this->get_single_row_by_id(TBL_COUNTRIES, 'id', $countryId, 'array');\n\n $this->db->select('id, country_id, region, code'); \n $this->db->where('country_id', $countryData['id']);\n $result = $this->db->get(TBL_REGIONS);\n if ($result->num_rows() > 0 )\n $data = $result->result_array();\n \n if (is_array($data) && !empty($data)) {\n foreach ($data as $states) {\n if ($countryData['country_name'] != $states['region'])\n $html .= '<option value=\"' . $states['id'] . '\">' . $states['region'] . '</option>';\n }\n } else {\n $html = '';\n $html .= '<option value=\"\">No States Available</option>';\n }\n return $html;\n } else {\n $this->db->select('id, country_id, region, code'); \n $result = $this->db->get(TBL_REGIONS);\n if ($result->num_rows() > 0 )\n return $result->result_array();\n else\n return FALSE;\n }\n }", "public function getInstitutionsByCountry($id);", "function getCustomerRegion($customer_id)\n {\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r LEFT JOIN \" . CFG::$tblPrefix . \"user AS u ON FIND_IN_SET( r.id, u.region ) >0\nWHERE u.id =%d and u.active='1' and r.status='1'\",$customer_id);\n }", "function subDivByID(Country $country, $code) {\n $r = $this->db->query(\"SELECT divcode, divname FROM country_state WHERE country = '{$country->code}' AND divcode='{$code}'\");\n $row = $r->fetchArray(SQLITE3_ASSOC);\n if(!$row) throw new NotFoundEx(\"SubDivision could not be found ({$country->code}-{$code})\");\n return new SubDivision($country, $row['divcode'], $row['divname']);\n }", "function get_continent_by_country($country, $countrytocontinent = array(\"AD\"=>\"EU\",\"AE\"=>\"AS\",\"AF\"=>\"AS\",\"AG\"=>\"NA\",\"AI\"=>\"NA\",\"AL\"=>\"EU\",\"AM\"=>\"AS\",\"AN\"=>\"NA\",\"AO\"=>\"AF\",\"AP\"=>\"AS\",\"AR\"=>\"SA\",\"AS\"=>\"OC\",\"AT\"=>\"EU\",\"AU\"=>\"OC\",\"AW\"=>\"NA\",\"AX\"=>\"EU\",\"AZ\"=>\"AS\",\"BA\"=>\"EU\",\"BB\"=>\"NA\",\"BD\"=>\"AS\",\"BE\"=>\"EU\",\"BF\"=>\"AF\",\"BG\"=>\"EU\",\"BH\"=>\"AS\",\"BI\"=>\"AF\",\"BJ\"=>\"AF\",\"BL\"=>\"NA\",\"BM\"=>\"NA\",\"BN\"=>\"AS\",\"BO\"=>\"SA\",\"BR\"=>\"SA\",\"BS\"=>\"NA\",\"BT\"=>\"AS\",\"BV\"=>\"AN\",\"BW\"=>\"AF\",\"BY\"=>\"EU\",\"BZ\"=>\"NA\",\"CA\"=>\"NA\",\"CC\"=>\"AS\",\"CD\"=>\"AF\",\"CF\"=>\"AF\",\"CG\"=>\"AF\",\"CH\"=>\"EU\",\"CI\"=>\"AF\",\"CK\"=>\"OC\",\"CL\"=>\"SA\",\"CM\"=>\"AF\",\"CN\"=>\"AS\",\"CO\"=>\"SA\",\"CR,NA\",\"CU\"=>\"NA\",\"CV\"=>\"AF\",\"CX\"=>\"AS\",\"CY\"=>\"AS\",\"CZ\"=>\"EU\",\"DE\"=>\"EU\",\"DJ\"=>\"AF\",\"DK\"=>\"EU\",\"DM\"=>\"NA\",\"DO\"=>\"NA\",\"DZ\"=>\"AF\",\"EC\"=>\"SA\",\"EE\"=>\"EU\",\"EG\"=>\"AF\",\"EH\"=>\"AF\",\"ER\"=>\"AF\",\"ES\"=>\"EU\",\"ET\"=>\"AF\",\"EU\"=>\"EU\",\"FI\"=>\"EU\",\"FJ\"=>\"OC\",\"FK\"=>\"SA\",\"FM\"=>\"OC\",\"FO\"=>\"EU\",\"FR\"=>\"EU\",\"FX\"=>\"EU\",\"GA\"=>\"AF\",\"GB\"=>\"EU\",\"GD\"=>\"NA\",\"GE\"=>\"AS\",\"GF\"=>\"SA\",\"GG\"=>\"EU\",\"GH\"=>\"AF\",\"GI\"=>\"EU\",\"GL\"=>\"NA\",\"GM\"=>\"AF\",\"GN\"=>\"AF\",\"GP\"=>\"NA\",\"GQ\"=>\"AF\",\"GR\"=>\"EU\",\"GS\"=>\"AN\",\"GT\"=>\"NA\",\"GU\"=>\"OC\",\"GW\"=>\"AF\",\"GY\"=>\"SA\",\"HK\"=>\"AS\",\"HM\"=>\"AN\",\"HN\"=>\"NA\",\"HR\"=>\"EU\",\"HT\"=>\"NA\",\"HU\"=>\"EU\",\"ID\"=>\"AS\",\"IE\"=>\"EU\",\"IL\"=>\"AS\",\"IM\"=>\"EU\",\"IN\"=>\"AS\",\"IO\"=>\"AS\",\"IQ\"=>\"AS\",\"IR\"=>\"AS\",\"IS\"=>\"EU\",\"IT\"=>\"EU\",\"JE\"=>\"EU\",\"JM\"=>\"NA\",\"JO\"=>\"AS\",\"JP\"=>\"AS\",\"KE\"=>\"AF\",\"KG\"=>\"AS\",\"KH\"=>\"AS\",\"KI\"=>\"OC\",\"KM\"=>\"AF\",\"KN\"=>\"NA\",\"KP\"=>\"AS\",\"KR\"=>\"AS\",\"KW\"=>\"AS\",\"KY\"=>\"NA\",\"KZ\"=>\"AS\",\"LA\"=>\"AS\",\"LB\"=>\"AS\",\"LC\"=>\"NA\",\"LI\"=>\"EU\",\"LK\"=>\"AS\",\"LR\"=>\"AF\",\"LS\"=>\"AF\",\"LT\"=>\"EU\",\"LU\"=>\"EU\",\"LV\"=>\"EU\",\"LY\"=>\"AF\",\"MA\"=>\"AF\",\"MC\"=>\"EU\",\"MD\"=>\"EU\",\"ME\"=>\"EU\",\"MF\"=>\"NA\",\"MG\"=>\"AF\",\"MH\"=>\"OC\",\"MK\"=>\"EU\",\"ML\"=>\"AF\",\"MM\"=>\"AS\",\"MN\"=>\"AS\",\"MO\"=>\"AS\",\"MP\"=>\"OC\",\"MQ\"=>\"NA\",\"MR\"=>\"AF\",\"MS\"=>\"NA\",\"MT\"=>\"EU\",\"MU\"=>\"AF\",\"MV\"=>\"AS\",\"MW\"=>\"AF\",\"MX\"=>\"NA\",\"MY\"=>\"AS\",\"MZ\"=>\"AF\",\"NA\"=>\"AF\",\"NC\"=>\"OC\",\"NE\"=>\"AF\",\"NF\"=>\"OC\",\"NG\"=>\"AF\",\"NI\"=>\"NA\",\"NL\"=>\"EU\",\"NO\"=>\"EU\",\"NP\"=>\"AS\",\"NR\"=>\"OC\",\"NU\"=>\"OC\",\"NZ\"=>\"OC\",\"OM\"=>\"AS\",\"PA\"=>\"NA\",\"PE\"=>\"SA\",\"PF\"=>\"OC\",\"PG\"=>\"OC\",\"PH\"=>\"AS\",\"PK\"=>\"AS\",\"PL\"=>\"EU\",\"PM\"=>\"NA\",\"PN\"=>\"OC\",\"PR\"=>\"NA\",\"PS\"=>\"AS\",\"PT\"=>\"EU\",\"PW\"=>\"OC\",\"PY\"=>\"SA\",\"QA\"=>\"AS\",\"RE\"=>\"AF\",\"RO\"=>\"EU\",\"RS\"=>\"EU\",\"RU\"=>\"EU\",\"RW\"=>\"AF\",\"SA\"=>\"AS\",\"SB\"=>\"OC\",\"SC\"=>\"AF\",\"SD\"=>\"AF\",\"SE\"=>\"EU\",\"SG\"=>\"AS\",\"SH\"=>\"AF\",\"SI\"=>\"EU\",\"SJ\"=>\"EU\",\"SK\"=>\"EU\",\"SL\"=>\"AF\",\"SM\"=>\"EU\",\"SN\"=>\"AF\",\"SO\"=>\"AF\",\"SR\"=>\"SA\",\"ST\"=>\"AF\",\"SV\"=>\"NA\",\"SY\"=>\"AS\",\"SZ\"=>\"AF\",\"TC\"=>\"NA\",\"TD\"=>\"AF\",\"TF\"=>\"AN\",\"TG\"=>\"AF\",\"TH\"=>\"AS\",\"TJ\"=>\"AS\",\"TK\"=>\"OC\",\"TL\"=>\"AS\",\"TM\"=>\"AS\",\"TN\"=>\"AF\",\"TO\"=>\"OC\",\"TR\"=>\"EU\",\"TT\"=>\"NA\",\"TV\"=>\"OC\",\"TW\"=>\"AS\",\"TZ\"=>\"AF\",\"UA\"=>\"EU\",\"UG\"=>\"AF\",\"UM\"=>\"OC\",\"US\"=>\"NA\",\"UY\"=>\"SA\",\"UZ\"=>\"AS\",\"VA\"=>\"EU\",\"VC\"=>\"NA\",\"VE\"=>\"SA\",\"VG\"=>\"NA\",\"VI\"=>\"NA\",\"VN\"=>\"AS\",\"VU\"=>\"OC\",\"WF\"=>\"OC\",\"WS\"=>\"OC\",\"YE\"=>\"AS\",\"YT\"=>\"AF\",\"ZA\"=>\"AF\",\"ZM\"=>\"AF\",\"ZW\"=>\"AF\")) {\n\n // Check if given array contains continent of given country\n if(isset($country) && isset($countrytocontinent) && array_key_exists($country, $countrytocontinent)) {\n // Return continent\n return $countrytocontinent[$country];\n }\n\n // Return null if continent is unknown\n return null;\n}", "function getcountries_get(){\n\n $from = 'countries';\n $where = array();\n $select = '*';\n $records = 2;\n\n $countries = $this->base_model->getCommon($from, $where, $select, $records);\n\n if ($countries) {\n \n $response = array(\n 'status' => TRUE,\n 'message' => 'Countries found successfully.',\n 'result' => $countries);\n\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code \n }else{\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country not found.');\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }", "function sbs_get_countries($countries_id = '', $with_iso_codes = false) {\n $countries_array = array();\n\n if ($countries_id) {\n\n if ($with_iso_codes) {\n $countries = tep_db_query(\"select countries_name, countries_iso_code_2, countries_iso_code_3 from \" . TABLE_COUNTRIES . \" where countries_id = '\" . $countries_id . \"' order by countries_name\");\n $countries_values = tep_db_fetch_array($countries);\n $countries_array = array('countries_name' => $countries_values['countries_name'],\n 'countries_iso_code_2' => $countries_values['countries_iso_code_2'],\n 'countries_iso_code_3' => $countries_values['countries_iso_code_3']);\n } else {\n $countries = tep_db_query(\"select countries_name from \" . TABLE_COUNTRIES . \" where countries_id = '\" . $countries_id . \"'\");\n $countries_values = tep_db_fetch_array($countries);\n $countries_array = array('countries_name' => $countries_values['countries_name']);\n }\n\n } else {\n\n $countries = tep_db_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n\n while ($countries_values = tep_db_fetch_array($countries)) {\n\n $countries_array[] = array('countries_id' => $countries_values['countries_id'],\n 'countries_name' => $countries_values['countries_name']);\n }\n }\n\n return $countries_array;\n }", "function tep_get_countries($countries_id = '', $with_iso_codes = false) {\n\t$countries_array = array();\n\tif (tep_not_null($countries_id)) {\n\t\tif ($with_iso_codes == true) {\n\t\t\t$countries = tep_db_query(\"select countries_name, countries_iso_code_2, countries_iso_code_3 from \" . TABLE_COUNTRIES . \" where countries_id = '\" . (int)$countries_id . \"' order by countries_name\");\n\t\t\t$countries_values = tep_db_fetch_array($countries);\n\t\t\t$countries_array = array('countries_name' => $countries_values['countries_name'],\n\t\t\t\t\t\t\t\t\t 'countries_iso_code_2' => $countries_values['countries_iso_code_2'],\n\t\t\t\t\t\t\t\t\t 'countries_iso_code_3' => $countries_values['countries_iso_code_3']);\n\t\t} else {\n\t\t\t$countries = tep_db_query(\"select countries_name from \" . TABLE_COUNTRIES . \" where countries_id = '\" . (int)$countries_id . \"'\");\n\t\t\t$countries_values = tep_db_fetch_array($countries);\n\t\t\t$countries_array = array('countries_name' => $countries_values['countries_name']);\n\t\t}\n\t} else {\n\t\t$countries = tep_db_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n\t\twhile ($countries_values = tep_db_fetch_array($countries)) {\n\t\t\t$countries_array[] = array('countries_id' => $countries_values['countries_id'],\n\t\t\t\t\t\t\t\t\t 'countries_name' => $countries_values['countries_name']);\n\t\t}\n\t}\n\treturn $countries_array;\n}", "public function getAllStatesByCountryId($country) {\n $countryName = '';\n $countryId = '';\n $countries = explode(\"/\", $country);\n $countryName = $countries[0]; // piece1\n $countryId = $countries[1]; // piece2\n\n $sql = \"SELECT * FROM states WHERE country_id = '$countryId'\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n return false;\n } else {\n return $result->result_array();\n }\n }", "public function getRegionJsonList()\n {\n $collectionByCountry = [];\n /** @var \\Magento\\Directory\\Model\\ResourceModel\\Region\\Collection $collection */\n $collection = $this->regionCollectionFactory->create();\n /** @var \\Magento\\Directory\\Model\\Region $item */\n foreach ($collection as $item) {\n $collectionByCountry[$item->getData('country_id')][] = $item->getData();\n }\n\n return $collectionByCountry;\n }", "public function findRegionFromCountry ( $country = '' ) {\n\n if(empty($country))\n return '';\n\n $return = array_keys($this->regionToCountry, strtoupper($country));\n\n if(!empty($return))\n return $return[0];\n else\n return '';\n }", "public function GetRegions($flags=null, $excludeFlags=null, $start=0, $count=10, $sortRegionName=null, $sortLocX=null, $sortLocY=null, $asArray=false){\n\t\t\tif(isset($flags) === false){\n\t\t\t\t$flags = RegionFlags::RegionOnline;\n\t\t\t}\n\t\t\tif(isset($excludeFlags) === false){\n\t\t\t\t$excludeFlags = 0;\n\t\t\t}\n\t\t\tif(is_string($flags) === true && ctype_digit($flags) === true){\n\t\t\t\t$flags = (integer)$flags;\n\t\t\t}\n\t\t\tif(is_string($excludeFlags) === true && ctype_digit($excludeFlags) === true){\n\t\t\t\t$excludeFlags = (integer)$excludeFlags;\n\t\t\t}\n\t\t\tif(is_string($start) === true && ctype_digit($start) === true){\n\t\t\t\t$start = (integer)$start;\n\t\t\t}\n\t\t\tif(is_string($count) === true && ctype_digit($count) === true){\n\t\t\t\t$count = (integer)$count;\n\t\t\t}\n\n\t\t\tif(is_bool($asArray) === false){\n\t\t\t\tthrow new InvalidArgumentException('asArray flag must be a boolean.');\n\t\t\t}else if(is_integer($flags) === false){\n\t\t\t\tthrow new InvalidArgumentException('RegionFlags argument should be supplied as integer.');\n\t\t\t}else if($flags < 0){\n\t\t\t\tthrow new InvalidArgumentException('RegionFlags cannot be less than zero');\n\t\t\t}else if(RegionFlags::isValid($flags) === false){ // Aurora::Framework::RegionFlags::isValid() does do a check for integerness, but we want to throw a different exception message if it is an integer.\n\t\t\t\tthrow new InvalidArgumentException('RegionFlags value is invalid, aborting call to API');\n\t\t\t}else if($excludeFlags < 0){\n\t\t\t\tthrow new InvalidArgumentException('Region ExcludeFlags cannot be less than zero');\n\t\t\t}else if(RegionFlags::isValid($excludeFlags) === false){ // Aurora::Framework::RegionFlags::isValid() does do a check for integerness, but we want to throw a different exception message if it is an integer.\n\t\t\t\tthrow new InvalidArgumentException('Region ExcludeFlags value is invalid, aborting call to API');\n\t\t\t}else if(is_integer($start) === false){\n\t\t\t\tthrow new InvalidArgumentException('Start point must be an integer.');\n\t\t\t}else if(isset($count) === true){\n\t\t\t\tif(is_integer($count) === false){\n\t\t\t\t\tthrow new InvalidArgumentException('Count must be an integer.');\n\t\t\t\t}else if($count < 1){\n\t\t\t\t\tthrow new InvalidArgumentException('Count must be greater than zero.');\n\t\t\t\t}\n\t\t\t}else if(isset($sortRegionName) === true && is_bool($sortRegionName) === false){\n\t\t\t\tthrow new InvalidArgumentException('If set, the sort by region name flag must be a boolean.');\n\t\t\t}else if(isset($sortLocX) === true && is_bool($sortLocX) === false){\n\t\t\t\tthrow new InvalidArgumentException('If set, the sort by x-axis flag must be a boolean.');\n\t\t\t}else if(isset($sortLocY) === true && is_bool($sortLocY) === false){\n\t\t\t\tthrow new InvalidArgumentException('If set, the sort by y-axis flag must be a boolean.');\n\t\t\t}\n\t\t\t$response = array();\n\t\t\t$input = array(\n\t\t\t\t'RegionFlags' => $flags,\n\t\t\t\t'ExcludeRegionFlags' => $excludeFlags,\n\t\t\t\t'Start' => $start,\n\t\t\t\t'Count' => $count\n\t\t\t);\n\t\t\tif(isset($sortRegionName) === true){\n\t\t\t\t$input['SortRegionName'] = $sortRegionName;\n\t\t\t}\n\t\t\tif(isset($sortLocX) === true){\n\t\t\t\t$input['SortLocX'] = $sortLocX;\n\t\t\t}\n\t\t\tif(isset($sortLocY) === true){\n\t\t\t\t$input['SortLocY'] = $sortLocY;\n\t\t\t}\n\t\t\t$has = WebUI\\GetRegions::hasInstance($this, $flags, $excludeFlags, $sortRegionName, $sortLocX, $sortLocY);\n\t\t\tif($asArray === true || $has === false){\n\t\t\t\t$result = $this->makeCallToAPI('GetRegions', true, $input, array(\n\t\t\t\t\t'Regions' => array('array'=>array(static::GridRegionValidator())),\n\t\t\t\t\t'Total' => array('integer'=>array())\n\t\t\t\t));\n\t\t\t\tforeach($result->Regions as $val){\n\t\t\t\t\t$response[] = WebUI\\GridRegion::fromEndPointResult($val);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $asArray ? $response : WebUI\\GetRegions::r($this, $flags, $excludeFlags, $start, $has ? null : $result->Total, $sortRegionName, $sortLocX, $sortLocY, $response);\n\t\t}", "function loadUbicaciones($where, $paso, $pais){\n\tinclude 'libcon.php';\n //$ubica = \"\";\n $bandera = false;\n if($pais == \"\"){\n $sql = \"SELECT * FROM web_salones WHERE concepto = $where AND estado = 1 ORDER BY regionsalon ASC;\";\n $result = miBusquedaSQL($sql);\n $ubica = armarUbicaciones($result, $paso);\n return $ubica;\n } else{\n $nuevoarray = array();$i=0;\n $sqlreg = \"SELECT campo, campo2, campo3, campo4, B.CONCEPTO, B.REGIONSALON, B.ESTADO FROM ms_configuracion A INNER JOIN (SELECT CONCEPTO, ESTADO, REGIONSALON FROM web_salones) B ON A.campo = B.REGIONSALON WHERE A.grupo = 'regiones' AND B.CONCEPTO = \".$where.\" AND B.ESTADO = 1;\";\n $regiones = (array) json_decode(miBusquedaSQL($sqlreg), true);\n foreach ($regiones as $r) {\n if($r[3] == $pais){\n $region = $r[0];\n $bandera = true;\n }\n\n $nuevoarray[$i] = $r[0];\n $i++;\n }\n\n if($bandera == true){\n $sql = \"SELECT * FROM web_salones WHERE concepto = $where AND estado = 1 AND regionsalon = \".$region.\" ORDER BY regionsalon ASC;\";\n $result = miBusquedaSQL($sql);\n $ubica = armarUbicaciones($result, $paso);\n } else if($bandera == false){\n $ubica = \"<b>No hubo resultados en la región consultada. Consulte en: </b><br><br><div class='blog-posts grid-view grid-concepto'><div class='isotope row'>\";\n $flag = \"\";$j=0;$hola=\"\";\n $unique = array_keys(array_flip($nuevoarray)); \n //var_dump($unique);\n $first_names = array_column($regiones, 'campo3');\n $unique2 = array_keys(array_flip($first_names)); \n //print_r($unique2);\n\n foreach ($unique as $r) {\n //$flag .= \"<img src='\".$r[2].\"' width='30px!important' height='22px' style='width:30px!important;''><br>\";\n \n\n $flag .= '<div class=\"col-md-2 col-sm-3 grid-view-post item\">\n <div class=\"item1 post\">\n <div class=\"box text-center\">\n <a href=\"?country='.abrevRegion($r).'\"><img class=\"ubiflags\" src=\"'.$unique2[$j].'\"><strong>'.cambiarRegion($r).'</strong></a>\n </div> \n </div>\n </div>';\n \n $j++;\n }\n\n $ubica .= $flag . \"</div></div>\";\n }\n\n return $ubica;\n }\n }", "function getCountries($region_id) {\n global $myPDODB, $whereFilter;\n\n\n $whereLocal = array();\n array_push($whereLocal, \"c.region_id = $region_id\");\n\n $whereClause = getWhereClause($whereLocal);\n\n $sql = \"SELECT c.name AS 'name', c.id AS 'id', c.map_id as 'map_id',COUNT( s.id ) AS 'number', 'country' AS 'type'\nFROM countries AS c\nJOIN students AS s ON c.id = s.destination_country \njoin regions as r on c.region_id = r.id \n$whereClause\nGROUP BY c.name\nORDER BY c.name\";\n\n $sth = $myPDODB->prepare($sql);\n $result = $sth->execute();\n\n $output = array();\n\n if ($result) {\n $countries = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($countries as $country) {\n // get the unis for each country\n $unis = getUnis($country['id']);\n array_push($output, array(\"item_id\" => ($country['map_id'] * 10) + ($region_id * 100000), \"name\" => $country['name'], \"number\" => $country['number'], \"type\" => $country['type'], \"children\" => $unis));\n }\n }\n\n // add the country details to the output array\n return $output;\n}", "public static function findAll( $countryid ) {\n\t\t\n \treturn Doctrine_Query::create ()->from ( 'Regions s' )\n ->where('s.country_id = ?', array($countryid))\n \t\t\t\t\t\t\t\t->orderBy('s.name')\n \t\t\t\t\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\t\t\n\t}", "function loadCountriesForSelection($companyID) {\n\tglobal $trailSessionUser;\n\n\t$theUserID=0;\n\t//ensure $trailSessionUser is not a visitor\n\tif(substr($trailSessionUser,0,7)!=\"visitor\") {\n\t\t$theUserID=getUserID($trailSessionUser);\n\t}\n\n\t//get the towns first\n\t$query=0;\n\t$query=mysqlquery(\"select distinct countryID,country from vl_countries order by country\");\n\tif(mysqlnumrows($query)) {\n\t\t$return=0;\n\t\t$return=\"\n\t\t\t<table width=\\\"100%\\\" border=\\\"0\\\">\n\t\t\t <tr>\n\t\t\t\t<td colspan=\\\"2\\\">Select the markets covered:</td>\n\t\t\t </tr>\";\n\t\t$q=array();\n\t\twhile($q=mysqlfetcharray($query)) {\n\t\t\t$return.=\"\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\\\"1%\\\"><input type=\\\"checkbox\\\" name=\\\"marketscoveredUnique[]\\\" value=\\\"$q[countryID]\\\" \".(checkMarketAgainstProvider($theUserID,$q[\"countryID\"],$companyID)?\"checked\":\"\").\"></td>\n\t\t\t\t\t\t<td width=\\\"99%\\\">\".removeSpecialCharacters($q[country]).\"</td>\n\t\t\t\t\t</tr>\";\n\t\t}\n\t\t$return.=\"</table>\";\n\n\t\treturn $return;\n\t} else {\n\t\t$return=0;\n\t\t//$return=\"No countries found in database!\";\n\t\t$return=\"\";\n\n\t\treturn $return;\n\t}\n}", "function getRegions() {\n global $myPDODB, $whereFilter;\n $output = array();\n\n $whereLocal = array();\n $whereClause = getWhereClause($whereLocal);\n\n $sql = \"SELECT r.name AS 'name', r.id AS 'id', COUNT( s.id ) AS 'number', 'region' AS 'type'\nFROM regions AS r\nJOIN countries AS c ON r.id = c.region_id\nJOIN students AS s ON c.id = s.destination_country \n$whereClause\nGROUP BY r.name\nORDER BY r.name;\";\n\n $sth = $myPDODB->prepare($sql);\n $result = $sth->execute();\n\n if ($result) {\n $regions = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($regions as $region) {\n // get the country details for each region\n $countries = getCountries($region['id']);\n array_push($output, array(\"item_id\" => $region['id'] * 100000, \"fixed\" => true, \"name\" => $region['name'], \"number\" => $region['number'], \"type\" => $region['type'], \"children\" => $countries));\n }\n }\n\n // add the regions to the output array\n return $output;\n}", "function get_accounts_for_country($county_ids)\n{\n if (!is_array($county_ids)) {\n $county_ids = array($county_ids);\n }\n // watchdog('test', json_encode(var_dump($county_ids)));\n $nodes = array();\n if (!empty($county_ids)) {\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')\n ->entityCondition('bundle', 'account')\n ->fieldCondition('field_single_country', 'target_id', $county_ids, 'IN')\n ->addMetaData('account', user_load(1));\n\n $nodes = $query->execute();\n }\n\n // watchdog('test', json_encode($nodes));\n if (empty($nodes)) {\n return [];\n }\n\n // Extract ids from the nodes.\n $accounts = array_keys($nodes['node']);\n return $accounts;\n}", "function getCountries($type, $query, $countriesParams) {\n if ($type === 'alpha' && (strLen($query) > 3 || strLen($query) < 2)) {\n echo json_encode(['error' => 'Country codes must be 2-3 characters long']);\n return;\n }\n $client = new Client(['base_uri' => 'https://restcountries.eu/rest/v2/', 'http_errors' => false]);\n $response = $client->request('GET', \"$type/$query\", [\n 'query' => $countriesParams\n ]);\n if ($response->getStatusCode() == 404) {\n echo json_encode(['error' => 'No results found']);\n return;\n }\n $response = json_decode($response->getBody());\n returnCountries((array)$response);\n}", "protected function _initCountryRegions()\n {\n /** @var $region \\Magento\\Directory\\Model\\Region */\n foreach ($this->_regionCollection as $region) {\n $countryNormalized = strtolower($region->getCountryId());\n $regionCode = strtolower($region->getCode());\n $regionName = strtolower($region->getDefaultName());\n $this->_countryRegions[$countryNormalized][$regionCode] = $region->getId();\n $this->_countryRegions[$countryNormalized][$regionName] = $region->getId();\n $this->_regions[$region->getId()] = $region->getDefaultName();\n }\n return $this;\n }", "function get_state_options_by_country($country) {\r\n\r\n /* $states = [\"India\" =>[ \"Tamil Nadu\",\"Kerala\", \"Andra Pradesh\" , \"Telungana\", \"Karnataka\"]];\r\n $options = $states[$country]; \r\n\treturn $options; */\r\n}", "function get_all_countries($obj, $continent='')\n{\n\t$country_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_countries_list', array('continent'=>$continent)));\n\t\n\treturn $country_result->result_array();\n}", "public function getCountryInfo($countryId);", "function testSubdivisions() {\n $field_name = $this->field->getName();\n // Using China since it has predefined subdivisions on all three levels.\n $country = 'CN';\n $administrativeArea = 'CN-13';\n $locality = 'CN-13-2c7460';\n $administrativeAreas = $this->subdivisionRepository->getList($country);\n $localities = $this->subdivisionRepository->getList($country, $administrativeArea);\n $dependentLocalities = $this->subdivisionRepository->getList($country, $locality);\n // Confirm the presence and format of the administrative area dropdown.\n $edit = [];\n $edit[$field_name . '[0][country_code]'] = $country;\n $this->drupalPostAjaxForm($this->nodeAddUrl, $edit, $field_name . '[0][country_code]');\n $this->assertOptions($field_name . '[0][administrative_area]', array_keys($administrativeAreas), 'All administrative areas for country ' . $country . ' are present.');\n\n // Confirm the presence and format of the locality dropdown.\n $edit = [];\n $edit[$field_name . '[0][administrative_area]'] = $administrativeArea;\n $this->drupalPostAjaxForm(NULL, $edit, $field_name . '[0][administrative_area]');\n $this->assertResponse(200);\n $this->assertOptionSelectedWithDrupalSelector('edit-field-address-0-administrative-area', $administrativeArea, 'Selected administrative area ' . $administrativeAreas[$administrativeArea]);\n $this->assertOptions($field_name . '[0][locality]', array_keys($localities), 'All localities for administrative area ' . $administrativeAreas[$administrativeArea] . ' are present.');\n\n // Confirm the presence and format of the dependent locality dropdown.\n $edit[$field_name . '[0][locality]'] = $locality;\n $this->drupalPostAjaxForm(NULL, $edit, $field_name . '[0][locality]');\n $this->assertResponse(200);\n $this->assertOptionSelectedWithDrupalSelector('edit-field-address-0-locality', $locality, 'Selected locality ' . $localities[$locality]);\n $this->assertOptions($field_name . '[0][dependent_locality]', array_keys($dependentLocalities), 'All dependent localities for locality ' . $localities[$locality] . ' are present.');\n }", "public function get_regions()\n\t{\n\t\t$this->load->model('promo_model');\n\t\t$region= $this->promo_model->regions();\n\t\t\n\t\techo json_encode($region);\n\t}", "function tep_get_countries_with_iso_codes($countries_id) {\n\treturn tep_get_countries($countries_id, true);\n}", "public function findListByCountryCode($countryCode) {\n $conditions = [];\n\n $conditions['country_code'] = $countryCode;\n// $conditions['status'] = 1;\n\n $arr_result = array();\n $lang_code = CakeSession::read('lang_code');\n if (empty($lang_code)) {\n $lang_code = Configure::read('S.Lang_code_default');\n }\n if (empty($countryCode)) {\n return array();\n }\n\n $list_data = $this->find('all', ['conditions' => $conditions, 'order' => ['order' => 'ASC', 'name' => 'ASC']]);\n\n if (count($list_data) > 0) {\n foreach ($list_data as $key => $item) {\n if (!empty($item['Region'][$lang_code])) {\n $arr_result[$item['Region']['id']] = $item['Region'][$lang_code]['name'];\n }\n }\n return $arr_result;\n }else{\n return array();\n }\n }", "function getStatesProv($country = null) {\n $stpr = [];\n $data = getDataCsv('states.csv');\n\n if (($data) && is_array($data) && ($country)) {\n foreach ($data as $row) {\n if ($country === $row[0]) {\n $stpr[] = $row[1];\n }\n }\n sort($stpr);\n }\n\n return $stpr;\n}", "function _get_countries($iso=false, $code=null, $limit=null) \n {\n\n $cc = array(\n 'US' => \t'United States',\n 'CA' => \t'Canada',\n 'AF' => \t'Afghanistan',\n 'AX' => \t'Åland Islands',\n 'AL' => \t'Albania',\n 'DZ' => \t'Algeria',\n 'AS' => \t'American Samoa',\n 'AD' => \t'Andorra',\n 'AO' => \t'Angola',\n 'AI' => \t'Anguilla',\n 'AG' => \t'Antigua and Barbuda',\n 'AR' => \t'Argentina',\n 'AM' => \t'Armenia',\n 'AW' => \t'Aruba',\n 'AU' => \t'Australia',\n 'AT' => \t'Austria',\n 'AZ' => \t'Azerbaijan',\n 'BS' => \t'Bahamas',\n 'BH' => \t'Bahrain',\n 'BD' => \t'Bangladesh',\n 'BB' => \t'Barbados',\n 'BY' => \t'Belarus',\n 'BE' => \t'Belgium',\n 'BZ' => \t'Belize',\n 'BJ' => \t'Benin',\n 'BM' => \t'Bermuda',\n 'BT' => \t'Bhutan',\n 'BO' => \t'Bolivia',\n 'BA' => \t'Bosnia and Herzegovina',\n 'BW' => \t'Botswana',\n 'BR' => \t'Brazil',\n 'IO' => \t'British Indian Ocean Territory',\n 'BN' => \t'Brunei Darussalam',\n 'BG' => \t'Bulgaria',\n 'BF' => \t'Burkina Faso',\n 'BI' => \t'Burundi',\n 'KH' => \t'Cambodia',\n 'CM' => \t'Cameroon',\n 'CA' => \t'Canada',\n 'CV' => \t'Cape Verde',\n 'KY' => \t'Cayman Islands',\n 'CF' => \t'Central African Republic',\n 'TD' => \t'Chad',\n 'CL' => \t'Chile',\n 'CN' => \t'China, People\\'s Republic of',\n 'CX' => \t'Christmas Island',\n 'CC' => \t'Cocos (Keeling) Islands',\n 'CO' => \t'Colombia',\n 'KM' => \t'Comoros',\n 'CD' => \t'Congo',\n 'CK' => \t'Cook Islands',\n 'CR' => \t'Costa Rica',\n 'CI' => \t'Côte d\\'Ivoire',\n 'HR' => \t'Croatia',\n 'CU' => \t'Cuba',\n 'CY' => \t'Cyprus',\n 'CZ' => \t'Czech Republic',\n 'DK' => \t'Denmark',\n 'DJ' => \t'Djibouti',\n 'DM' => \t'Dominica',\n 'DO' => \t'Dominican Republic',\n 'EC' => \t'Ecuador',\n 'EG' => \t'Egypt',\n 'SV' => \t'El Salvador',\n 'GQ' => \t'Equatorial Guinea',\n 'ER' => \t'Eritrea',\n 'EE' => \t'Estonia',\n 'ET' => \t'Ethiopia',\n 'FK' => \t'Falkland Islands',\n 'FO' => \t'Faroe Islands',\n 'FJ' => \t'Fiji',\n 'FI' => \t'Finland',\n 'FR' => \t'France',\n 'GF' => \t'French Guiana',\n 'PF' => \t'French Polynesia',\n 'TF' => \t'French Southern Territories',\n 'GA' => \t'Gabon',\n 'GM' => \t'Gambia',\n 'GE' => \t'Georgia',\n 'DE' => \t'Germany',\n 'GH' => \t'Ghana',\n 'GI' => \t'Gibraltar',\n 'GR' => \t'Greece',\n 'GL' => \t'Greenland',\n 'GD' => \t'Grenada',\n 'GP' => \t'Guadeloupe',\n 'GU' => \t'Guam',\n 'GT' => \t'Guatemala',\n 'GN' => \t'Guinea',\n 'GW' => \t'Guinea-Bissau',\n 'GY' => \t'Guyana',\n 'HT' => \t'Haiti',\n 'HN' => \t'Honduras',\n 'HK' => \t'Hong Kong',\n 'HU' => \t'Hungary',\n 'IS' => \t'Iceland',\n 'IN' => \t'India',\n 'ID' => \t'Indonesia',\n 'IR' => \t'Iran',\n 'IQ' => \t'Iraq',\n 'IE' => \t'Ireland',\n 'IL' => \t'Israel',\n 'IT' => \t'Italy',\n 'JM' => \t'Jamaica',\n 'JP' => \t'Japan',\n 'JO' => \t'Jordan',\n 'KZ' => \t'Kazakhstan',\n 'KE' => \t'Kenya',\n 'KI' => \t'Kiribati',\n 'KP' => \t'Korea, DPR',\n 'KR' => \t'Korea, Republic of',\n 'KW' => \t'Kuwait',\n 'KG' => \t'Kyrgyzstan',\n 'LA' => \t'Lao People\\'s Democratic Republic',\n 'LV' => \t'Latvia',\n 'LB' => \t'Lebanon',\n 'LS' => \t'Lesotho',\n 'LR' => \t'Liberia',\n 'LY' => \t'Libyan Arab Jamahiriya',\n 'LI' => \t'Liechtenstein',\n 'LT' => \t'Lithuania',\n 'LU' => \t'Luxembourg',\n 'MO' => \t'Macao',\n 'MK' => \t'Macedonia',\n 'MG' => \t'Madagascar',\n 'MW' => \t'Malawi',\n 'MY' => \t'Malaysia',\n 'MV' => \t'Maldives',\n 'ML' => \t'Mali',\n 'MT' => \t'Malta',\n 'MH' => \t'Marshall Islands',\n 'MQ' => \t'Martinique',\n 'MR' => \t'Mauritania',\n 'MU' => \t'Mauritius',\n 'YT' => \t'Mayotte',\n 'MX' => \t'Mexico',\n 'FM' => \t'Micronesia',\n 'MD' => \t'Moldova',\n 'MC' => \t'Monaco',\n 'MN' => \t'Mongolia',\n 'MS' => \t'Montserrat',\n 'MA' => \t'Morocco',\n 'MZ' => \t'Mozambique',\n 'MM' => \t'Myanmar',\n 'NA' => \t'Namibia',\n 'NR' => \t'Nauru',\n 'NP' => \t'Nepal',\n 'NL' => \t'Netherlands',\n 'AN' => \t'Netherlands Antilles',\n 'NC' => \t'New Caledonia',\n 'NZ' => \t'New Zealand',\n 'NI' => \t'Nicaragua',\n 'NE' => \t'Niger',\n 'NG' => \t'Nigeria',\n 'NU' => \t'Niue',\n 'NF' => \t'Norfolk Island',\n 'MP' => \t'Northern Mariana Islands',\n 'NO' => \t'Norway',\n 'OM' => \t'Oman',\n 'PK' => \t'Pakistan',\n 'PW' => \t'Palau',\n 'PS' => \t'Palestinian Territory, Occupied',\n 'PA' => \t'Panama',\n 'PG' => \t'Papua New Guinea',\n 'PY' => \t'Paraguay',\n 'PE' => \t'Peru',\n 'PH' => \t'Philippines',\n 'PN' => \t'Pitcairn',\n 'PL' => \t'Poland',\n 'PT' => \t'Portugal',\n 'PR' => \t'Puerto Rico',\n 'QA' => \t'Qatar',\n 'RE' => \t'Réunion',\n 'RO' => \t'Romania',\n 'RU' => \t'Russian Federation',\n 'RW' => \t'Rwanda',\n 'SH' => \t'Saint Helena',\n 'KN' => \t'Saint Kitts and Nevis',\n 'LC' => \t'Saint Lucia',\n 'PM' => \t'Saint-Pierre and Miquelon',\n 'VC' => \t'Saint Vincent and the Grenadines',\n 'WS' => \t'Samoa',\n 'SM' => \t'San Marino',\n 'ST' => \t'São Tomé and Príncipe',\n 'SA' => \t'Saudi Arabia',\n 'SN' => \t'Senegal',\n 'CS' => \t'Serbia and Montenegro',\n 'SC' => \t'Seychelles',\n 'SL' => \t'Sierra Leone',\n 'SG' => \t'Singapore',\n 'SK' => \t'Slovakia',\n 'SI' => \t'Slovenia',\n 'SB' => \t'Solomon Islands',\n 'SO' => \t'Somalia',\n 'ZA' => \t'South Africa',\n 'ES' => \t'Spain',\n 'LK' => \t'Sri Lanka',\n 'SD' => \t'Sudan',\n 'SR' => \t'Suriname',\n 'SJ' => \t'Svalbard and Jan Mayen',\n 'SZ' => \t'Swaziland',\n 'SE' => \t'Sweden',\n 'CH' => \t'Switzerland',\n 'SY' => \t'Syrian Arab Republic',\n 'TW' => \t'Taiwan',\n 'TJ' => \t'Tajikistan',\n 'TZ' => \t'Tanzania',\n 'TH' => \t'Thailand',\n 'TL' => \t'Timor-Leste',\n 'TG' => \t'Togo',\n 'TK' => \t'Tokelau',\n 'TO' => \t'Tonga',\n 'TT' => \t'Trinidad and Tobago',\n 'TN' => \t'Tunisia',\n 'TR' => \t'Turkey',\n 'TM' => \t'Turkmenistan',\n 'TC' => \t'Turks and Caicos Islands',\n 'TV' => \t'Tuvalu',\n 'UG' => \t'Uganda',\n 'UA' => \t'Ukraine',\n 'AE' => \t'United Arab Emirates',\n 'GB' => \t'United Kingdom',\n 'US' => \t'United States',\n 'UY' => \t'Uruguay',\n 'UZ' => \t'Uzbekistan',\n 'VU' => \t'Vanuatu',\n 'VA' => \t'Vatican City State',\n 'VE' => \t'Venezuela',\n 'VN' => \t'Viet Nam',\n 'VG' => \t'Virgin Islands, British',\n 'VI' => \t'Virgin Islands, U.S.',\n 'WF' => \t'Wallis and Futuna',\n 'EH' => \t'Western Sahara',\n 'YE' => \t'Yemen',\n 'ZM' => \t'Zambia',\n 'ZW' => \t'Zimbabwe',);\n\n if ($limit && is_array($limit)) {\n foreach (array_keys($cc) as $iso) {\n if (!in_array($iso, $limit)) {\n unset($cc[$iso]);\n }\n }\n }\n\n if (!$iso) {\n return array_values($cc);\n }\n elseif ($code) {\n return (isset($cc[$code]))? $cc[$code] : null;\n }\n else {\n return $cc;\n }\n }", "public function getSubegionsByRegionAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $regionId = $request->get('regionId');\n $type = $request->get('type');\n $typeClass = $request->get('typeClass');\n\n $subregions = $em->getRepository('AppBundle:Subregion')->getByRegion($regionId);\n\n $response = $this->render('AppBundle:Location/ajax:subregions.html.twig', array(\n 'subregions' => $subregions,\n 'type' => $type,\n 'typeClass'=> $typeClass\n ))->getContent();\n\n return new Response(json_encode($response));\n }", "function getCountry($country_id) {\n\t\treturn !empty($this->country_data[$country_id]) ? array($this->country_data[$country_id]) : $this->getCountryList(array('country_id' => $country_id));\n\t}", "public function getStates($countryIdent = NULL) {\n\t\treturn $this->getSubDivisions($countryIdent);\n\t}", "public function getSubdivisionList();", "abstract public function country();", "public function loadPrioritized() {\n /* handle prioritized countries */\n $this->prioritizedCountries = array();\n $prioritized = $this->getOption('prioritized','');\n if (!empty($prioritized)) {\n $prioritized = explode(',',$prioritized);\n foreach ($this->countries as $countryKey => $countryName) {\n if (in_array($countryKey,$prioritized)) {\n $this->prioritizedCountries[] = $countryKey;\n }\n }\n }\n return $this->prioritizedCountries;\n }", "public function testReturnsRegionsByCountryCodeFromCollection()\n {\n $data = [\n ['region_name' => 'test1'],\n ['region_name' => 'test2'],\n ];\n\n $regions = ['test1', 'test2'];\n\n $countryCode = 'code';\n\n $collectionLocationsMock = $this->getResourceModelMock('oggetto_geodetection/location_collection', [\n 'selectRegions', 'filterByCountryCode', 'getData'\n ]);\n\n $collectionLocationsMock->expects($this->once())\n ->method('selectRegions')\n ->willReturnSelf();\n\n $collectionLocationsMock->expects($this->once())\n ->method('filterByCountryCode')\n ->with($countryCode)\n ->willReturnSelf();\n\n $collectionLocationsMock->expects($this->once())\n ->method('getData')\n ->willReturn($data);\n\n $this->replaceByMock('resource_model', 'oggetto_geodetection/location_collection', $collectionLocationsMock);\n\n\n $this->assertEquals($regions, $this->_model->getRegions($countryCode));\n }", "public static function getRegionOptions() {\n $file = fopen(drupal_get_path('module', 'smart_content_smart_ip') . '/data/region_codes.csv', \"r\");\n $region_codes = [];\n while (!feof($file)) {\n $regions = fgetcsv($file);\n if (!empty($regions[2])) {\n $country_name = self::getCountryNameFromCode($regions[0]);\n $region_codes[$country_name][$regions[2]] = $regions[2];\n }\n }\n ksort($region_codes);\n foreach ($region_codes as $key => $value) {\n ksort($value);\n $region_codes[$key] = $value;\n }\n return $region_codes;\n }", "public function getDataCountries($countries, $radTech, $moreTechs=False)\n\t{\n\t\t$radTechs = ($moreTechs) ? $radTech : array($radTech);\n\t\t$iterator = 0;\n\t\t$records = array();\n\t\t// Getting list of all existing radio technology types from AggregatedDataCountries table\n\t\t$aData = $this->database->table('AggregatedDataCountries');\n\t\t$radioTechList = $aData->select('DISTINCT radioTechnology')\n\t\t\t\t->order('radioTechnology ASC')\n\t\t\t\t->fetchPairs('radioTechnology', 'radioTechnology');\n\n\t\t// Getting list of all existing iso country codes from AggregatedDataCountries table\n\t\t$aData = $this->database->table('AggregatedDataCountries');\n\t\t$countryList = $aData->select('DISTINCT isoCountryCode')\n\t\t\t\t->order('isoCountryCode ASC')\n\t\t\t\t->fetchPairs('isoCountryCode', 'isoCountryCode');\n\n\t\tforeach ($countries as $country) {\n\t\t\t// Check if input country exist in AggregationDataCountries table\n\t\t\tif (!$this->in_array_insensitive($country, $countryList)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach($radTechs as $radTech) {\n\t\t\t\tif (!$this->in_array_insensitive($radTech, $radioTechList)) {\n \t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// loading data from database for specific country and radio technology\n\t\t\t\t$aData = $this->database->table('AggregatedDataCountries');\n\t\t\t\t$selection = $aData->select('avgDownloadSpeed, avgLatency, avgQoe, medDownloadSpeed, medLatency, medQoe')\n\t\t\t\t\t\t->where('isoCountryCode = ? AND radioTechnology = ?', $country, $radTech);\n\t\t\t\t/* parsing from single line selection, loop runs only once but did not get how \n\t\t\t\tto read from this special variable representing output of mysql selection */\n\t\t\t\tforeach ($selection as $one) {\n\t\t\t\t\t$avgSpeed = $one->avgDownloadSpeed;\n\t\t\t\t\t$avgLatency = $one->avgLatency;\n\t\t\t\t\t$avgQoe = $one->avgQoe;\n\t\t\t\t\t$medSpeed = $one->medDownloadSpeed;\n\t\t\t\t\t$medLatency = $one->medLatency;\n\t\t\t\t\t$medQoe = $one->medQoe;\n\t\t\t\t}\n\n\t\t\t\t// saving loaded data from database as record for better JSON formating\n\t\t\t\t$record = new \\stdClass();\n\t\t\t\t$record->country = $country;\n\t\t\t\t$record->radTech = $radTech;\n\t\t\t\t$record->avgDownloadSpeed = $avgSpeed;\n\t\t\t\t$record->avgLatency = $avgLatency;\n\t\t\t\t$record->avgQoe = $avgQoe;\n\t\t\t\t$record->medDownloadSpeed = $medSpeed;\n\t\t\t\t$record->medLatency = $medLatency;\n\t\t\t\t$record->medQoe = $medQoe;\n\t\t\t\t\n\t\t\t\t// saving array of records with data to be encoded into JSON format\n\t\t\t\t$records[$iterator] = $record;;\t\n\t\t\t\t$iterator = $iterator + 1;\n\t\t\t}\n\t\t}\n\t\treturn $records;\n\t}", "public function getRegions()\n {\n\n $regions = array(\n \"\" => \"Default (empty)\",\n \"us-east-2\"\t\t\t=> \"US East (Ohio)\",\n \"us-east-1\"\t\t\t=> \"US East (N. Virginia)\",\n \"us-west-1\"\t\t\t=> \"US West (N. California)\",\n \"us-west-2\"\t\t\t=> \"US West (Oregon)\",\n //\"ap-east-1\" => \"Asia Pacific (Hong Kong)***\",\n \"ap-south-1\"\t\t=> \"Asia Pacific (Mumbai)\",\n //\"ap-northeast-3\"\t=> \"Asia Pacific (Osaka-Local)****\",\n \"ap-northeast-2\"\t=> \"Asia Pacific (Seoul)\",\n \"ap-southeast-1\"\t=> \"Asia Pacific (Singapore)\",\n \"ap-southeast-2\"\t=> \"Asia Pacific (Sydney)\",\n \"ap-northeast-1\"\t=> \"Asia Pacific (Tokyo)\",\n \"ca-central-1\"\t\t=> \"Canada (Central)\",\n \"cn-north-1\"\t => \"China (Beijing)\",\n \"cn-northwest-1\"\t=> \"China (Ningxia)\",\n \"eu-central-1\"\t\t=> \"EU (Frankfurt)\",\n \"eu-west-1\"\t\t => \"EU (Ireland)\",\n \"eu-west-2\"\t\t => \"EU (London)\",\n \"eu-west-3\"\t\t => \"EU (Paris)\",\n \"eu-north-1\"\t\t=> \"EU (Stockholm)\",\n \"sa-east-1\"\t\t => \"South America (São Paulo)\",\n \"me-south-1\"\t\t=> \"Middle East (Bahrain)\",\n );\n // ***You must enable this Region before you can use it.\n // ****You can use the Asia Pacific (Osaka-Local) Region only in conjunction with the Asia Pacific\n // (Tokyo) Region. To request access to the Asia Pacific (Osaka-Local) Region, contact your sales representative.\n\n return $regions;\n }", "function getstate_get(){\n\n $countryID = $this->uri->segment(4);\n\n $countryID = isset($countryID) ? $countryID : \"\";\n\n if ($countryID == FALSE) {\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country id should not be empty.'\n );\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n \n $from = 'states';\n $where = array('country_id' => $countryID);\n $select = '*';\n $records = 2;\n\n $states = $this->base_model->getCommon($from, $where, $select, $records);\n\n if ($states) {\n \n $response = array(\n 'status' => TRUE,\n 'message' => 'States found successfully.',\n 'result' => $states);\n\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code \n }else{\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country not found.');\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }", "public function getCountry(){\n\t\n\t\tif(!isset($_SESSION['country_list'])){\n\t\t\t$country = $this->getData(\"select id,country,currency,flag,is_active,contact_email,address from country order by id\");\n\t\t\tforeach ($country as $k => $countrys) {\n\t\t\t\t$_SESSION['country_list'][$countrys['id']]=['id' => $countrys['id'],'country' => $countrys['country'], 'currency' => $countrys['currency'], 'flag'=>$countrys['flag'], 'is_active' => $countrys['is_active'], 'contact_email' => $countrys['contact_email'], 'address' => $countrys['address'] ];\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function testReturnsPopularRegionsByCountryCodeFromCollection()\n {\n $data = [\n [\n 'region_name' => 'test1',\n 'city_name' => 'testC1'\n ],\n [\n 'region_name' => 'test2',\n 'city_name' => 'testC3'\n ],\n [\n 'region_name' => 'test1',\n 'city_name' => 'testC2'\n ],\n ];\n\n $regionsAndCities = [\n 'test1' => ['testC1', 'testC2'],\n 'test2' => ['testC3']\n ];\n\n $countryCode = 'code';\n\n $collectionLocationsMock = $this->getResourceModelMock('oggetto_geodetection/location_collection', [\n 'selectRegionsAndCities', 'filterByCountryCode',\n 'groupByRegionAndCity', 'orderByIpCount',\n 'innerJoinWithRelations', 'getData'\n ]);\n\n $collectionLocationsMock->expects($this->once())\n ->method('selectRegionsAndCities')\n ->willReturnSelf();\n\n $collectionLocationsMock->expects($this->once())\n ->method('filterByCountryCode')\n ->with($countryCode)\n ->willReturnSelf();\n\n $collectionLocationsMock->expects($this->once())\n ->method('innerJoinWithRelations')\n ->willReturnSelf();\n\n $collectionLocationsMock->expects($this->once())\n ->method('groupByRegionAndCity')\n ->willReturnSelf();\n\n $collectionLocationsMock->expects($this->once())\n ->method('orderByIpCount')\n ->willReturnSelf();\n\n $collectionLocationsMock->expects($this->once())\n ->method('getData')\n ->willReturn($data);\n\n $this->replaceByMock('resource_model', 'oggetto_geodetection/location_collection', $collectionLocationsMock);\n\n $this->assertEquals($regionsAndCities, $this->_model->getPopularLocations($countryCode));\n }", "public function sGetCountry($country)\n {\n if (empty($country)) {\n return false;\n }\n if (isset($this->cache['country'][$country])) {\n return $this->cache['country'][$country];\n }\n\n if (is_numeric($country)) {\n $sql = $this->db->quoteInto('c.id = ?', $country);\n } elseif (is_string($country)) {\n $sql = $this->db->quoteInto('c.countryiso = ?', $country);\n } else {\n return false;\n }\n\n $sql = \"\n SELECT c.id, c.id as countryID, countryname, countryiso,\n (SELECT name FROM s_core_countries_areas WHERE id = areaID ) AS countryarea,\n countryen, c.position, notice\n FROM s_core_countries c\n WHERE $sql\n \";\n\n return $this->cache['country'][$country] = $this->db->fetchRow($sql) ?: [];\n }", "function get_country_reps($country)\n{\n if (!$country) {\n return NULL;\n }\n\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'user')\n ->entityCondition('bundle', 'user')\n ->fieldCondition('field_country', 'target_id', $country, '=')\n ->propertyCondition('status', 1)\n ->addMetaData('account', user_load(1));\n\n $records = $query->execute();\n if (isset($records['user'])) {\n return array_keys($records['user']);\n }\n return array();\n}", "public function getCountries();", "function getCountry($countryId=1 )\n{\n\tglobal $SQL;\n\t $sqlString = '';\n\t \n if($countryId > 0 && $countryId != '') {\n\t $sqlString .= \" AND country_id = '$countryId' \";\n } \n \n $sqlQuery = \"SELECT country_id , country_name \n\t\t\t\tFROM country \n\t\t\t\tWHERE is_active = '1' $sqlString \n\t\t\t\tORDER BY country_name \";\n \n\t$data = $SQL->getSqlData( $sqlQuery );\n\n\tif(is_array($data))\n\t{\n\t\tforeach($data as $key=>$row)\n\t\t{\n\t\t\t \n\t\t\t$result[$data['country_id']] = __x($data['country_name']);\n\t\t\t \n\t\t}\n\t\t\n\t\treturn $result;\n\t}\n\t\n}", "public function getCountryBasedContinentAction()\n {\n $continent = $this->getRequest()->getParam(\"continent_name\"); \n $countryList = array(); \n $storeCol = Mage::getModel('archana_storelocator/storelocator')->getCollection()\n ->addFieldToFilter('continent', $continent); \n $storeCol->getSelect()->group('country');\n $html = '<select name=\"country\" id=\"country\">\n\t\t\t<option value=\"\"> -- Please Select -- </option>';\n foreach ($storeCol as $_country) {\n $countryCode= $_country->getCountry();\n $country = Mage::helper('archana_storelocator')->getCountryNameByCode($countryCode);\n $html .= '<option value=\"' . $countryCode . '\">' . $country . '</option>';\n }\n $html.='</select>'; \n echo $html; \n }", "function getRegions() {\n $query = \" SELECT ID,Name,CityID FROM #__ssregions \";\n $this->_db->setQuery($query);\n return $this->_db->loadAssocList();\n }", "public function getCitiesBySubregionAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $subregionId = $request->get('subregionId');\n $type = $request->get('type');\n $typeClass = $request->get('typeClass');\n\n $cities = $em->getRepository('AppBundle:City')->getBySubregion($subregionId);\n\n $response = $this->render('AppBundle:Location/ajax:cities.html.twig', array(\n 'cities' => $cities,\n 'type' => $type,\n 'typeClass'=> $typeClass\n ))->getContent();\n\n return new Response(json_encode($response));\n }", "public function GetRegionsByXY($x, $y, $flags=null, $excludeFlags=null, $scopeID='00000000-0000-0000-0000-000000000000'){\n\t\t\tif(isset($flags) === false){\n\t\t\t\t$flags = RegionFlags::RegionOnline;\n\t\t\t}\n\t\t\tif(is_string($x) === true && ctype_digit($x) === true){\n\t\t\t\t$x = (integer)$x;\n\t\t\t}\n\t\t\tif(is_string($y) === true && ctype_digit($y) === true){\n\t\t\t\t$y = (integer)$y;\n\t\t\t}\n\n\t\t\tif(is_integer($flags) === false){\n\t\t\t\tthrow new InvalidArgumentException('RegionFlags argument should be supplied as integer.');\n\t\t\t}else if($flags < 0){\n\t\t\t\tthrow new InvalidArgumentException('RegionFlags cannot be less than zero');\n\t\t\t}else if(RegionFlags::isValid($flags) === false){ // Aurora::Framework::RegionFlags::isValid() does do a check for integerness, but we want to throw a different exception message if it is an integer.\n\t\t\t\tthrow new InvalidArgumentException('RegionFlags value is invalid, aborting call to API');\n\t\t\t}else if(is_string($scopeID) === false){\n\t\t\t\tthrow new InvalidArgumentException('ScopeID must be specified as a string.');\n\t\t\t}else if(preg_match(self::regex_UUID, $scopeID) != 1){\n\t\t\t\tthrow new InvalidArgumentException('ScopeID must be a valid UUID.');\n\t\t\t}\n\t\t\tif(isset($excludeFlags) === true){\n\t\t\t\tif(is_integer($excludeFlags) === false){\n\t\t\t\t\tthrow new InvalidArgumentException('RegionFlags exclusion argument should be supplied as integer.');\n\t\t\t\t}else if($excludeFlags < 0){\n\t\t\t\t\tthrow new InvalidArgumentException('RegionFlags exclusion cannot be less than zero');\n\t\t\t\t}else if(RegionFlags::isValid($excludeFlags) === false){ // Aurora::Framework::RegionFlags::isValid() does do a check for integerness, but we want to throw a different exception message if it is an integer.\n\t\t\t\t\tthrow new InvalidArgumentException('RegionFlags exclusion value is invalid, aborting call to API');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$input = array(\n\t\t\t\t'X' => $x,\n\t\t\t\t'Y' => $y,\n\t\t\t\t'ScopeID' => $scopeID,\n\t\t\t\t'RegionFlags' => $flags\n\t\t\t);\n\t\t\tif(isset($excludeFlags) === true){\n\t\t\t\t$input['ExcludeRegionFlags'] = $excludeFlags;\n\t\t\t}\n\n\t\t\t$result = $this->makeCallToAPI('GetRegionsByXY', true, $input, array(\n\t\t\t\t'Regions' => array('array'=>array(static::GridRegionValidator())),\n\t\t\t\t'Total' => array('integer'=>array())\n\t\t\t));\n\t\t\t$response = array();\n\t\t\tforeach($result->Regions as $val){\n\t\t\t\t$response[] = WebUI\\GridRegion::fromEndPointResult($val);\n\t\t\t}\n\n\t\t\treturn WebUI\\GetRegionsByXY::r($this, $x, $y, $flags, isset($excludeFlags) ? $excludeFlags : 0, $scopeID, $response);\n\t\t}", "public function GetRegionsInArea($startX, $startY, $endX, $endY, $scopeID='00000000-0000-0000-0000-000000000000', $asArray=false){\n\t\t\t$has = WebUI\\GetRegionsInArea::hasInstance($this, $startX, $startY, $endX, $endY, $scopeID);\n\t\t\t$response = array();\n\t\t\tif($asArray === true || $has === false){\n\t\t\t\t$result = $this->makeCallToAPI('GetRegionsInArea', true, array(\n\t\t\t\t\t'StartX' => $startX,\n\t\t\t\t\t'StartY' => $startY,\n\t\t\t\t\t'EndX' => $endX,\n\t\t\t\t\t'EndY' => $endY,\n\t\t\t\t\t'ScopeID' => $scopeID\n\t\t\t\t), array(\n\t\t\t\t\t'Regions' => array('array'=>array(static::GridRegionValidator())),\n\t\t\t\t\t'Total' => array('integer'=>array())\n\t\t\t\t));\n\t\t\t\tforeach($result->Regions as $val){\n\t\t\t\t\t$response[] = WebUI\\GridRegion::fromEndPointResult($val);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $asArray ? $response : WebUI\\GetRegionsInArea::r($this, $startX, $startY, $endX, $endY, $scopeID, 0, $result->Total, $response);\n\t\t}", "function tep_prepare_country_zones_pull_down($country_id = '') {\n $pre = '';\n if ( (!tep_browser_detect('MSIE')) && (tep_browser_detect('Mozilla/4')) ) {\n for ($i=0; $i<45; $i++) $pre .= '&nbsp;';\n }\n\n $zones = tep_get_country_zones($country_id);\n\n if (sizeof($zones) > 0) {\n $zones_select = array(array('id' => '', 'text' => PLEASE_SELECT));\n $zones = tep_array_merge($zones_select, $zones);\n } else {\n $zones = array(array('id' => '', 'text' => TYPE_BELOW));\n // create dummy options for Netscape to preset the height of the drop-down\n if ( (!tep_browser_detect('MSIE')) && (tep_browser_detect('Mozilla/4')) ) {\n for ($i=0; $i<9; $i++) {\n $zones[] = array('id' => '', 'text' => $pre);\n }\n }\n }\n\n return $zones;\n}", "function getRelatedLocations($data = array(), $cond = array(), $json = false) {\n $ci = & get_instance();\n $result = array();\n if (isset($data['country_id'])) {\n//get country details\n $whereCountry = array('id' => $data['country_id']);\n if (isset($cond['country'])) {\n $whereCountry = array_merge($whereCountry, $cond['country']);\n }\n $result['country'] = $ci->crud->get(ES_COUNTRIES, $whereCountry);\n//get all states corresponding country id\n $whereState = array('country_id' => $data['country_id']);\n if (isset($cond['state'])) {\n $whereState = array_merge($whereState, $cond['state']);\n }\n $states = $ci->crud->getAll(ES_STATES, $whereState);\n if (count($states) > 0) {\n foreach ($states as $state) {\n $result['states'][$state['id']]['name'] = $state['name'];\n//get all cities corresponding each state id\n $whereCity = array('state_id' => $state['id']);\n if (isset($cond['city'])) {\n $whereCity = array_merge($whereCity, $cond['city']);\n }\n $cities = $ci->crud->getAll(ES_CITIES, $whereCity);\n foreach ($cities as $city) {\n $result['states'][$state['id']]['cities'][$city['id']] = $city['name'];\n }\n }\n }\n } elseif (isset($data['state_id'])) {\n//get state and country details\n $ci->db->select('s.id as state_id, c.id as country_id, s.name as state, c.name as country, c.sortname as sortname, c.phonecode as phonecode');\n $ci->db->from(ES_STATES . \" s\");\n $ci->db->join(ES_COUNTRIES . \" c\", \"c.id = s.country_id\");\n $ci->db->where(array('s.id' => $data['state_id']));\n if (isset($cond['state'])) {\n $ci->db->where($cond['state']);\n }\n $query = $ci->db->get();\n $return = $query->result_array();\n $result = $return[0];\n//get all cities corresponding state_id\n $whereCity = array('state_id' => $data['state_id']);\n if (isset($cond['city'])) {\n $whereCity = array_merge($whereCity, $cond['city']);\n }\n $cities = $ci->crud->getAll(ES_CITIES, $whereCity);\n foreach ($cities as $city) {\n $result['cities'][$city['id']] = $city['name'];\n }\n } elseif (isset($data['city_id'])) {\n//get city, state and country details using joins\n $ci->db->select('s.id as state_id, c.id as country_id, s.name as state, c.name as country, c.sortname as sortname, c.phonecode as phonecode, city.id as city_id, city.name as city');\n $ci->db->from(ES_CITIES . \" city\");\n $ci->db->join(ES_STATES . \" s\", \"s.id = city.state_id\");\n $ci->db->join(ES_COUNTRIES . \" c\", \"c.id = s.country_id\");\n $ci->db->where(array('city.id' => $data['city_id']));\n if (isset($cond['city'])) {\n $ci->db->where($cond['city']);\n }\n $query = $ci->db->get();\n $return = $query->result_array();\n $result = $return[0];\n } elseif (count($data) == 0) {\n $whereCountry = array();\n if (isset($cond['country'])) {\n $whereCountry = array_merge($whereCountry, $cond['country']);\n }\n $countries = $ci->crud->getAll(ES_COUNTRIES, $whereCountry);\n if (count($countries) > 0) {\n foreach ($countries as $key => $country) {\n $result[$country['id']] = getRelatedLocations(array('country_id' => $country['id']));\n }\n }\n }\n if ($json == true) {\n return json_encode($result);\n } else {\n return $result;\n }\n}", "protected function operatingCountries()\n {\n return OperatingCountry::all();\n }", "function related_region () {\n\t\t\t$this->gen_contents['modal_path'] \t\t= 'home/class_details';\n\t\t\t$this->gen_contents['modal_form'] \t\t= 'tonightclassform';\n\t\t\tif(!empty($_POST)) {\n\t\t\t\t$this->gen_contents['dated']\t \t= $_POST['dated'];\t\n\t\t\t\t$this->gen_contents['subregion'] \t= $_POST['subregion'];\t\n\t\t\t\t$this->gen_contents[\"offset_hidden\"]= $_POST['offset'];\n\t\t\t\t$this->gen_contents[\"num_hidden\"] \t= 5;\n\t\t\t\t\n\t\t\t\t$this->commonListRelatedRegion ();\t\t\t\t\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->gen_contents[\"arr_result\"] \t= array ();\n\t\t\t}\n\t\t\t$related_regions = $this->load->view ('user/display_related_class', $this->gen_contents); \n\t\t\techo $related_regions;\n\t\t}", "function commonListRelatedRegion() {\n\t\t\t\n\t\t\t$this->gen_contents[\"tot_num_related_region\"] = $this->admin_career_event_model->dbGetCountTonitesClasslist($this->gen_contents['dated']);\n\t\t\t\n\t\t\t$this->gen_contents[\"next_active\"] \t= 0; //1 for enable and 0 for disable\t\t\t\n\t\t\t$this->gen_contents[\"prev_active\"] \t= 0; //1 for enable and 0 for disable\n \n\t\t\t$num_pages = ceil($this->gen_contents[\"tot_num_related_region\"] / $this->gen_contents[\"num_hidden\"])-1;\n\t\t\t$cur_page \t\t\t\t= ceil(($this->gen_contents[\"offset_hidden\"]/$this->gen_contents[\"num_hidden\"]));\n\t\t\tif($cur_page < $num_pages) {\n\t\t\t\t$this->gen_contents[\"next_active\"] = 1;\n\t\t\t} \n\t\t\tif($cur_page > 0) {\n\t\t\t\t$this->gen_contents[\"prev_active\"] = 1;\n\t\t\t}\t\t\t\n\t\t\t$this->gen_contents['image_path'] \t= $this->config->item('image_upload_url').'thumbs/';\n \n\t\t\t$this->gen_contents[\"arr_result\"] \t= $this->admin_career_event_model->dbGetTonitesClasslist($this->gen_contents['dated'],$this->gen_contents[\"num_hidden\"],$this->gen_contents[\"offset_hidden\"]);\n \n\t\t}", "public function getCountryOrRegion()\n {\n if (array_key_exists(\"countryOrRegion\", $this->_propDict)) {\n return $this->_propDict[\"countryOrRegion\"];\n } else {\n return null;\n }\n }", "function gsAreaIds($course, $savedArray) {\n $c_id = $r_id = $d_id = 0;\n $cCode = $course->sCou;\n $rCode = $course->sReg;\n $dCode = $course->sAr;\n if($cCode) {\n $c_id = $savedArray['country'][$cCode] ?: find_object('golf_country', array('code' => $cCode), 'id'); \n if($rCode && $c_id) {\n $r_id = $savedArray['region'][$rCode] ?: find_object('golf_region', array('code' => $rCode, 'golf_country_id' => $c_id), 'id');\n //if(!$r_id) list($r_id, $errors) = gsAddGolfRegion($c_id, $region);\n if($dCode && $r_id) {\n $d_id = $savedArray['district'][$dCode] ?: find_object('golf_district', array('code' => $dCode, 'golf_region_id' => $r_id), 'id'); \n }\n }\n }\n return array($c_id ?: 0, $r_id ?: 0, $d_id ?: 0);\n}", "public static function getISOCountryList()\r\n\t{\r\n\t\t$iclISOCountryList = new PYS_ISOCountryList();\r\n\t\t\r\n\t\t$iclISOCountryList->add(826,\"United Kingdom\",\"GBR\",3);\r\n\t\t$iclISOCountryList->add(840,\"United States\",\"USA\",2);\r\n\t\t$iclISOCountryList->add(36,\"Australia\",\"AUS\",1);\r\n\t\t$iclISOCountryList->add(124,\"Canada\",\"CAN\",1);\r\n\t\t$iclISOCountryList->add(250,\"France\",\"FRA\",1);\r\n\t\t$iclISOCountryList->add(276,\"Germany\",\"DEU\",1);\r\n\t\t$iclISOCountryList->add(4,\"Afghanistan\",\"AFG\",0);\r\n\t\t$iclISOCountryList->add(248,\"Åland Islands\",\"ALA\",0);\t\r\n\t\t$iclISOCountryList->add(8,\"Albania\",\"ALB\",0);\r\n\t\t$iclISOCountryList->add(12,\"Algeria\",\"DZA\",0);\r\n\t\t$iclISOCountryList->add(16,\"American Samoa\",\"ASM\",0);\r\n\t\t$iclISOCountryList->add(20,\"Andorra\",\"AND\",0);\r\n\t\t$iclISOCountryList->add(24,\"Angola\",\"AGO\",0);\r\n\t\t$iclISOCountryList->add(660,\"Anguilla\",\"AIA\",0);\r\n\t\t$iclISOCountryList->add(10,\"Antarctica\",\"ATA\",0);\r\n\t\t$iclISOCountryList->add(28,\"Antigua and Barbuda\",\"ATG\",0);\r\n\t\t$iclISOCountryList->add(32,\"Argentina\",\"ARG\",0);\r\n\t\t$iclISOCountryList->add(51,\"Armenia\",\"ARM\",0);\r\n\t\t$iclISOCountryList->add(533,\"Aruba\",\"ABW\",0);\r\n\t\t$iclISOCountryList->add(40,\"Austria\",\"AUT\",0);\r\n\t\t$iclISOCountryList->add(31,\"Azerbaijan\",\"AZE\",0);\r\n\t\t$iclISOCountryList->add(44,\"Bahamas\",\"BHS\",0);\r\n\t\t$iclISOCountryList->add(48,\"Bahrain\",\"BHR\",0);\r\n\t\t$iclISOCountryList->add(50,\"Bangladesh\",\"BGD\",0);\r\n\t\t$iclISOCountryList->add(52,\"Barbados\",\"BRB\",0);\r\n\t\t$iclISOCountryList->add(112,\"Belarus\",\"BLR\",0);\r\n\t\t$iclISOCountryList->add(56,\"Belgium\",\"BEL\",0);\r\n\t\t$iclISOCountryList->add(84,\"Belize\",\"BLZ\",0);\r\n\t\t$iclISOCountryList->add(204,\"Benin\",\"BEN\",0);\r\n\t\t$iclISOCountryList->add(60,\"Bermuda\",\"BMU\",0);\r\n\t\t$iclISOCountryList->add(64,\"Bhutan\",\"BTN\",0);\r\n\t\t$iclISOCountryList->add(68,\"Bolivia\",\"BOL\",0);\r\n\t\t$iclISOCountryList->add(70,\"Bosnia and Herzegovina\",\"BIH\",0);\r\n\t\t$iclISOCountryList->add(72,\"Botswana\",\"BWA\",0);\r\n\t\t$iclISOCountryList->add(74,\"Bouvet Island\",\"BVT\",0);\r\n\t\t$iclISOCountryList->add(76,\"Brazil Federative\",\"BRA\",0);\r\n\t\t$iclISOCountryList->add(86,\"British Indian Ocean Territory\",\"IOT\",0);\r\n\t\t$iclISOCountryList->add(96,\"Brunei\",\"BRN\",0);\r\n\t\t$iclISOCountryList->add(100,\"Bulgaria\",\"BGR\",0);\r\n\t\t$iclISOCountryList->add(854,\"Burkina Faso\",\"BFA\",0);\r\n\t\t$iclISOCountryList->add(108,\"Burundi\",\"BDI\",0);\r\n\t\t$iclISOCountryList->add(116,\"Cambodia\",\"KHM\",0);\r\n\t\t$iclISOCountryList->add(120,\"Cameroon\",\"CMR\",0);\r\n\t\t$iclISOCountryList->add(132,\"Cape Verde\",\"CPV\",0);\r\n\t\t$iclISOCountryList->add(136,\"Cayman Islands\",\"CYM\",0);\r\n\t\t$iclISOCountryList->add(140,\"Central African Republic\",\"CAF\",0);\r\n\t\t$iclISOCountryList->add(148,\"Chad\",\"TCD\",0);\r\n\t\t$iclISOCountryList->add(152,\"Chile\",\"CHL\",0);\r\n\t\t$iclISOCountryList->add(156,\"China\",\"CHN\",0);\r\n\t\t$iclISOCountryList->add(162,\"Christmas Island\",\"CXR\",0);\r\n\t\t$iclISOCountryList->add(166,\"Cocos (Keeling) Islands\",\"CCK\",0);\r\n\t\t$iclISOCountryList->add(170,\"Colombia\",\"COL\",0);\r\n\t\t$iclISOCountryList->add(174,\"Comoros\",\"COM\",0);\r\n\t\t$iclISOCountryList->add(180,\"Congo\",\"COD\",0);\r\n\t\t$iclISOCountryList->add(178,\"Congo\",\"COG\",0);\r\n\t\t$iclISOCountryList->add(184,\"Cook Islands\",\"COK\",0);\r\n\t\t$iclISOCountryList->add(188,\"Costa Rica\",\"CRI\",0);\r\n\t\t$iclISOCountryList->add(384,\"Côte d'Ivoire\",\"CIV\",0);\r\n\t\t$iclISOCountryList->add(191,\"Croatia\",\"HRV\",0);\r\n\t\t$iclISOCountryList->add(192,\"Cuba\",\"CUB\",0);\r\n\t\t$iclISOCountryList->add(196,\"Cyprus\",\"CYP\",0);\r\n\t\t$iclISOCountryList->add(203,\"Czech Republic\",\"CZE\",0);\r\n\t\t$iclISOCountryList->add(208,\"Denmark\",\"DNK\",0);\r\n\t\t$iclISOCountryList->add(262,\"Djibouti\",\"DJI\",0);\r\n\t\t$iclISOCountryList->add(212,\"Dominica\",\"DMA\",0);\r\n\t\t$iclISOCountryList->add(214,\"Dominican Republic\",\"DOM\",0);\r\n\t\t$iclISOCountryList->add(626,\"East Timor\",\"TMP\",0);\r\n\t\t$iclISOCountryList->add(218,\"Ecuador\",\"ECU\",0);\r\n\t\t$iclISOCountryList->add(818,\"Egypt\",\"EGY\",0);\r\n\t\t$iclISOCountryList->add(222,\"El Salvador\",\"SLV\",0);\r\n\t\t$iclISOCountryList->add(226,\"Equatorial Guinea\",\"GNQ\",0);\r\n\t\t$iclISOCountryList->add(232,\"Eritrea\",\"ERI\",0);\r\n\t\t$iclISOCountryList->add(233,\"Estonia\",\"EST\",0);\r\n\t\t$iclISOCountryList->add(231,\"Ethiopia\",\"ETH\",0);\r\n\t\t$iclISOCountryList->add(238,\"Falkland Islands (Malvinas)\",\"FLK\",0);\r\n\t\t$iclISOCountryList->add(234,\"Faroe Islands\",\"FRO\",0);\r\n\t\t$iclISOCountryList->add(242,\"Fiji\",\"FJI\",0);\r\n\t\t$iclISOCountryList->add(246,\"Finland\",\"FIN\",0);\r\n\t\t$iclISOCountryList->add(254,\"French Guiana\",\"GUF\",0);\r\n\t\t$iclISOCountryList->add(258,\"French Polynesia\",\"PYF\",0);\r\n\t\t$iclISOCountryList->add(260,\"French Southern Territories\",\"ATF\",0);\r\n\t\t$iclISOCountryList->add(266,\"Gabon\",\"GAB\",0);\r\n\t\t$iclISOCountryList->add(270,\"Gambia\",\"GMB\",0);\r\n\t\t$iclISOCountryList->add(268,\"Georgia\",\"GEO\",0);\r\n\t\t$iclISOCountryList->add(288,\"Ghana\",\"GHA\",0);\r\n\t\t$iclISOCountryList->add(292,\"Gibraltar\",\"GIB\",0);\r\n\t\t$iclISOCountryList->add(300,\"Greece\",\"GRC\",0);\r\n\t\t$iclISOCountryList->add(304,\"Greenland\",\"GRL\",0);\r\n\t\t$iclISOCountryList->add(308,\"Grenada\",\"GRD\",0);\r\n\t\t$iclISOCountryList->add(312,\"Guadaloupe\",\"GLP\",0);\r\n\t\t$iclISOCountryList->add(316,\"Guam\",\"GUM\",0);\r\n\t\t$iclISOCountryList->add(320,\"Guatemala\",\"GTM\",0);\r\n\t\t$iclISOCountryList->add(831,\"Guernsey\",\"GGY\",0);\r\n\t\t$iclISOCountryList->add(324,\"Guinea\",\"GIN\",0);\r\n\t\t$iclISOCountryList->add(624,\"Guinea-Bissau\",\"GNB\",0);\r\n\t\t$iclISOCountryList->add(328,\"Guyana\",\"GUY\",0);\r\n\t\t$iclISOCountryList->add(332,\"Haiti\",\"HTI\",0);\r\n\t\t$iclISOCountryList->add(334,\"Heard Island and McDonald Islands\",\"HMD\",0);\r\n\t\t$iclISOCountryList->add(340,\"Honduras\",\"HND\",0);\r\n\t\t$iclISOCountryList->add(344,\"Hong Kong\",\"HKG\",0);\r\n\t\t$iclISOCountryList->add(348,\"Hungary\",\"HUN\",0);\r\n\t\t$iclISOCountryList->add(352,\"Iceland\",\"ISL\",0);\r\n\t\t$iclISOCountryList->add(356,\"India\",\"IND\",0);\r\n\t\t$iclISOCountryList->add(360,\"Indonesia\",\"IDN\",0);\r\n\t\t$iclISOCountryList->add(364,\"Iran\",\"IRN\",0);\r\n\t\t$iclISOCountryList->add(368,\"Iraq\",\"IRQ\",0);\r\n\t\t$iclISOCountryList->add(372,\"Ireland\",\"IRL\",0);\r\n\t\t$iclISOCountryList->add(833,\"Isle of Man\",\"IMN\",0);\r\n\t\t$iclISOCountryList->add(376,\"Israel\",\"ISR\",0);\r\n\t\t$iclISOCountryList->add(380,\"Italy\",\"ITA\",0);\r\n\t\t$iclISOCountryList->add(388,\"Jamaica\",\"JAM\",0);\r\n\t\t$iclISOCountryList->add(392,\"Japan\",\"JPN\",0);\r\n\t\t$iclISOCountryList->add(832,\"Jersey\",\"JEY\",0);\r\n\t\t$iclISOCountryList->add(400,\"Jordan\",\"JOR\",0);\r\n\t\t$iclISOCountryList->add(398,\"Kazakhstan\",\"KAZ\",0);\r\n\t\t$iclISOCountryList->add(404,\"Kenya\",\"KEN\",0);\r\n\t\t$iclISOCountryList->add(296,\"Kiribati\",\"KIR\",0);\r\n\t\t$iclISOCountryList->add(410,\"Korea\",\"KOR\",0);\r\n\t\t$iclISOCountryList->add(408,\"Korea\",\"PRK\",0);\r\n\t\t$iclISOCountryList->add(414,\"Kuwait\",\"KWT\",0);\r\n\t\t$iclISOCountryList->add(417,\"Kyrgyzstan\",\"KGZ\",0);\r\n\t\t$iclISOCountryList->add(418,\"Lao\",\"LAO\",0);\r\n\t\t$iclISOCountryList->add(428,\"Latvia\",\"LVA\",0);\r\n\t\t$iclISOCountryList->add(422,\"Lebanon\",\"LBN\",0);\r\n\t\t$iclISOCountryList->add(426,\"Lesotho\",\"LSO\",0);\r\n\t\t$iclISOCountryList->add(430,\"Liberia\",\"LBR\",0);\r\n\t\t$iclISOCountryList->add(434,\"Libyan Arab Jamahiriya\",\"LBY\",0);\r\n\t\t$iclISOCountryList->add(438,\"Liechtenstein\",\"LIE\",0);\r\n\t\t$iclISOCountryList->add(440,\"Lithuania\",\"LTU\",0);\r\n\t\t$iclISOCountryList->add(442,\"Luxembourg\",\"LUX\",0);\r\n\t\t$iclISOCountryList->add(446,\"Macau\",\"MAC\",0);\r\n\t\t$iclISOCountryList->add(807,\"Macedonia\",\"MKD\",0);\r\n\t\t$iclISOCountryList->add(450,\"Madagascar\",\"MDG\",0);\r\n\t\t$iclISOCountryList->add(454,\"Malawi\",\"MWI\",0);\r\n\t\t$iclISOCountryList->add(458,\"Malaysia\",\"MYS\",0);\r\n\t\t$iclISOCountryList->add(462,\"Maldives\",\"MDV\",0);\r\n\t\t$iclISOCountryList->add(466,\"Mali\",\"MLI\",0);\r\n\t\t$iclISOCountryList->add(470,\"Malta\",\"MLT\",0);\r\n\t\t$iclISOCountryList->add(584,\"Marshall Islands\",\"MHL\",0);\r\n\t\t$iclISOCountryList->add(474,\"Martinique\",\"MTQ\",0);\r\n\t\t$iclISOCountryList->add(478,\"Mauritania Islamic\",\"MRT\",0);\r\n\t\t$iclISOCountryList->add(480,\"Mauritius\",\"MUS\",0);\r\n\t\t$iclISOCountryList->add(175,\"Mayotte\",\"MYT\",0);\r\n\t\t$iclISOCountryList->add(484,\"Mexico\",\"MEX\",0);\r\n\t\t$iclISOCountryList->add(583,\"Micronesia\",\"FSM\",0);\r\n\t\t$iclISOCountryList->add(498,\"Moldova\",\"MDA\",0);\r\n\t\t$iclISOCountryList->add(492,\"Monaco\",\"MCO\",0);\r\n\t\t$iclISOCountryList->add(496,\"Mongolia\",\"MNG\",0);\r\n\t\t$iclISOCountryList->add(499,\"Montenegro\",\"MNE\",0);\t\r\n\t\t$iclISOCountryList->add(500,\"Montserrat\",\"MSR\",0);\r\n\t\t$iclISOCountryList->add(504,\"Morocco\",\"MAR\",0);\r\n\t\t$iclISOCountryList->add(508,\"Mozambique\",\"MOZ\",0);\r\n\t\t$iclISOCountryList->add(104,\"Myanmar\",\"MMR\",0);\r\n\t\t$iclISOCountryList->add(516,\"Namibia\",\"NAM\",0);\r\n\t\t$iclISOCountryList->add(520,\"Nauru\",\"NRU\",0);\r\n\t\t$iclISOCountryList->add(524,\"Nepal\",\"NPL\",0);\r\n\t\t$iclISOCountryList->add(528,\"Netherlands\",\"NLD\",0);\r\n\t\t$iclISOCountryList->add(530,\"Netherlands Antilles\",\"ANT\",0);\r\n\t\t$iclISOCountryList->add(540,\"New Caledonia\",\"NCL\",0);\r\n\t\t$iclISOCountryList->add(554,\"New Zealand\",\"NZL\",0);\r\n\t\t$iclISOCountryList->add(558,\"Nicaragua\",\"NIC\",0);\r\n\t\t$iclISOCountryList->add(562,\"Niger\",\"NER\",0);\r\n\t\t$iclISOCountryList->add(566,\"Nigeria\",\"NGA\",0);\r\n\t\t$iclISOCountryList->add(570,\"Niue\",\"NIU\",0);\r\n\t\t$iclISOCountryList->add(574,\"Norfolk Island\",\"NFK\",0);\r\n\t\t$iclISOCountryList->add(580,\"Northern Mariana Islands\",\"MNP\",0);\r\n\t\t$iclISOCountryList->add(578,\"Norway\",\"NOR\",0);\r\n\t\t$iclISOCountryList->add(512,\"Oman\",\"OMN\",0);\r\n\t\t$iclISOCountryList->add(586,\"Pakistan\",\"PAK\",0);\r\n\t\t$iclISOCountryList->add(585,\"Palau\",\"PLW\",0);\r\n\t\t$iclISOCountryList->add(275,\"Palestine\",\"PSE\",0);\t\r\n\t\t$iclISOCountryList->add(591,\"Panama\",\"PAN\",0);\r\n\t\t$iclISOCountryList->add(598,\"Papua New Guinea\",\"PNG\",0);\r\n\t\t$iclISOCountryList->add(600,\"Paraguay\",\"PRY\",0);\r\n\t\t$iclISOCountryList->add(604,\"Peru\",\"PER\",0);\r\n\t\t$iclISOCountryList->add(608,\"Philippines\",\"PHL\",0);\r\n\t\t$iclISOCountryList->add(612,\"Pitcairn\",\"PCN\",0);\r\n\t\t$iclISOCountryList->add(616,\"Poland\",\"POL\",0);\r\n\t\t$iclISOCountryList->add(620,\"Portugal\",\"PRT\",0);\r\n\t\t$iclISOCountryList->add(630,\"Puerto Rico\",\"PRI\",0);\r\n\t\t$iclISOCountryList->add(634,\"Qatar\",\"QAT\",0);\r\n\t\t$iclISOCountryList->add(638,\"Réunion\",\"REU\",0);\r\n\t\t$iclISOCountryList->add(642,\"Romania\",\"ROM\",0);\r\n\t\t$iclISOCountryList->add(643,\"Russian Federation\",\"RUS\",0);\r\n\t\t$iclISOCountryList->add(646,\"Rwanda\",\"RWA\",0);\r\n\t\t$iclISOCountryList->add(652,\"Saint Barthélemy\",\"BLM\",0);\r\n\t\t$iclISOCountryList->add(654,\"Saint Helena\",\"SHN\",0);\r\n\t\t$iclISOCountryList->add(659,\"Saint Kitts and Nevis\",\"KNA\",0);\r\n\t\t$iclISOCountryList->add(662,\"Saint Lucia\",\"LCA\",0);\r\n\t\t$iclISOCountryList->add(663,\"Saint Martin (French part)\",\"MAF\",0);\r\n\t\t$iclISOCountryList->add(666,\"Saint Pierre and Miquelon\",\"SPM\",0);\r\n\t\t$iclISOCountryList->add(670,\"Saint Vincent and the Grenadines\",\"VCT\",0);\r\n\t\t$iclISOCountryList->add(882,\"Samoa\",\"WSM\",0);\r\n\t\t$iclISOCountryList->add(674,\"San Marino\",\"SMR\",0);\r\n\t\t$iclISOCountryList->add(678,\"São Tomé and Príncipe Democratic\",\"STP\",0);\r\n\t\t$iclISOCountryList->add(682,\"Saudi Arabia\",\"SAU\",0);\r\n\t\t$iclISOCountryList->add(686,\"Senegal\",\"SEN\",0);\r\n\t\t$iclISOCountryList->add(688,\"Serbia\",\"SRB\",0);\r\n\t\t$iclISOCountryList->add(690,\"Seychelles\",\"SYC\",0);\r\n\t\t$iclISOCountryList->add(694,\"Sierra Leone\",\"SLE\",0);\r\n\t\t$iclISOCountryList->add(702,\"Singapore\",\"SGP\",0);\r\n\t\t$iclISOCountryList->add(703,\"Slovakia\",\"SVK\",0);\r\n\t\t$iclISOCountryList->add(705,\"Slovenia\",\"SVN\",0);\r\n\t\t$iclISOCountryList->add(90,\"Solomon Islands\",\"SLB\",0);\r\n\t\t$iclISOCountryList->add(706,\"Somalia\",\"SOM\",0);\r\n\t\t$iclISOCountryList->add(710,\"South Africa\",\"ZAF\",0);\r\n\t\t$iclISOCountryList->add(239,\"South Georgia and the South Sandwich Islands\",\"SGS\",0);\r\n\t\t$iclISOCountryList->add(724,\"Spain\",\"ESP\",0);\r\n\t\t$iclISOCountryList->add(144,\"Sri Lanka\",\"LKA\",0);\r\n\t\t$iclISOCountryList->add(736,\"Sudan\",\"SDN\",0);\r\n\t\t$iclISOCountryList->add(740,\"Suriname\",\"SUR\",0);\r\n\t\t$iclISOCountryList->add(744,\"Svalbard and Jan Mayen\",\"SJM\",0);\r\n\t\t$iclISOCountryList->add(748,\"Swaziland\",\"SWZ\",0);\r\n\t\t$iclISOCountryList->add(752,\"Sweden\",\"SWE\",0);\r\n\t\t$iclISOCountryList->add(756,\"Switzerland\",\"CHE\",0);\r\n\t\t$iclISOCountryList->add(760,\"Syrian Arab Republic\",\"SYR\",0);\r\n\t\t$iclISOCountryList->add(158,\"Taiwan,\",\"TWN\",0);\r\n\t\t$iclISOCountryList->add(762,\"Tajikistan\",\"TJK\",0);\r\n\t\t$iclISOCountryList->add(834,\"Tanzania\",\"TZA\",0);\r\n\t\t$iclISOCountryList->add(764,\"Thailand\",\"THA\",0);\r\n\t\t$iclISOCountryList->add(768,\"Togo\",\"TGO\",0);\r\n\t\t$iclISOCountryList->add(772,\"Tokelau\",\"TKL\",0);\r\n\t\t$iclISOCountryList->add(776,\"Tonga\",\"TON\",0);\r\n\t\t$iclISOCountryList->add(780,\"Trinidad and Tobago\",\"TTO\",0);\r\n\t\t$iclISOCountryList->add(788,\"Tunisia\",\"TUN\",0);\r\n\t\t$iclISOCountryList->add(792,\"Turkey\",\"TUR\",0);\r\n\t\t$iclISOCountryList->add(795,\"Turkmenistan\",\"TKM\",0);\r\n\t\t$iclISOCountryList->add(796,\"Turks and Caicos Islands\",\"TCA\",0);\r\n\t\t$iclISOCountryList->add(798,\"Tuvalu\",\"TUV\",0);\r\n\t\t$iclISOCountryList->add(800,\"Uganda\",\"UGA\",0);\r\n\t\t$iclISOCountryList->add(804,\"Ukraine\",\"UKR\",0);\r\n\t\t$iclISOCountryList->add(784,\"United Arab Emirates\",\"ARE\",0);\r\n\t\t$iclISOCountryList->add(581,\"United States Minor Outlying Islands\",\"UMI\",0);\r\n\t\t$iclISOCountryList->add(858,\"Uruguay Eastern\",\"URY\",0);\r\n\t\t$iclISOCountryList->add(860,\"Uzbekistan\",\"UZB\",0);\r\n\t\t$iclISOCountryList->add(548,\"Vanuatu\",\"VUT\",0);\r\n\t\t$iclISOCountryList->add(336,\"Vatican City State\",\"VAT\",0);\r\n\t\t$iclISOCountryList->add(862,\"Venezuela\",\"VEN\",0);\r\n\t\t$iclISOCountryList->add(704,\"Vietnam\",\"VNM\",0);\r\n\t\t$iclISOCountryList->add(92,\"Virgin Islands, British\",\"VGB\",0);\r\n\t\t$iclISOCountryList->add(850,\"Virgin Islands, U.S.\",\"VIR\",0);\r\n\t\t$iclISOCountryList->add(876,\"Wallis and Futuna\",\"WLF\",0);\r\n\t\t$iclISOCountryList->add(732,\"Western Sahara\",\"ESH\",0);\r\n\t\t$iclISOCountryList->add(887,\"Yemen\",\"YEM\",0);\r\n\t\t$iclISOCountryList->add(894,\"Zambia\",\"ZMB\",0);\r\n\t\t$iclISOCountryList->add(716,\"Zimbabwe\",\"ZWE\",0);\r\n\t\t\r\n\t\treturn $iclISOCountryList;\r\n\t}", "public function get_cities($region_code, $country_code)\n\t{\n\t\tif($region_code === NO_REGION)\n\t\t\t$query = \"SELECT `id`, `city` FROM `cities` WHERE `country` = '\".$country_code.\"' ORDER BY `city`\";\n\t\telse\n\t\t\t$query = \"SELECT `id`, `city` FROM `cities` WHERE `region` = '\".$region_code.\"' AND `country` = '\".$country_code.\"' ORDER BY `city`\";\n\t\t$result = $this->db->query($query);\n\t\tif ($result->num_rows() > 0 ) \n\t\t\treturn $result->result();\n\t\treturn false;\n\t}", "public static function getCountries()\n\t{\n\t\t$country[\"AFG\"] = Array(\"iso2\" => \"AF\", \"name\" => \"Afghanistan, Islamic Republic \");\n\t\t$country[\"ALA\"] = Array(\"iso2\" => \"AX\", \"name\" => \"Åland Islands\");\n\t\t$country[\"ALB\"] = Array(\"iso2\" => \"AL\", \"name\" => \"Albania, Republic of\");\n\t\t$country[\"DZA\"] = Array(\"iso2\" => \"DZ\", \"name\" => \"Algeria, People's Democratic Republic\");\n\t\t$country[\"ASM\"] = Array(\"iso2\" => \"AS\", \"name\" => \"American Samoa\");\n\t\t$country[\"AND\"] = Array(\"iso2\" => \"AD\", \"name\" => \"Andorra, Principality of\");\n\t\t$country[\"AGO\"] = Array(\"iso2\" => \"AO\", \"name\" => \"Angola, Republic of\");\n\t\t$country[\"AIA\"] = Array(\"iso2\" => \"AI\", \"name\" => \"Anguilla\");\n\t\t$country[\"ATA\"] = Array(\"iso2\" => \"AQ\", \"name\" => \"Antarctica (the territory Sout\");\n\t\t$country[\"ATG\"] = Array(\"iso2\" => \"AG\", \"name\" => \"Antigua and Barbuda\");\n\t\t$country[\"ARG\"] = Array(\"iso2\" => \"AR\", \"name\" => \"Argentina, Argentine Republic\");\n\t\t$country[\"ARM\"] = Array(\"iso2\" => \"AM\", \"name\" => \"Armenia, Republic of\");\n\t\t$country[\"ABW\"] = Array(\"iso2\" => \"AW\", \"name\" => \"Aruba\");\n\t\t$country[\"AUS\"] = Array(\"iso2\" => \"AU\", \"name\" => \"Australia, Commonwealth of\");\n\t\t$country[\"AUT\"] = Array(\"iso2\" => \"AT\", \"name\" => \"Austria, Republic of\");\n\t\t$country[\"AZE\"] = Array(\"iso2\" => \"AZ\", \"name\" => \"Azerbaijan, Republic of\");\n\t\t$country[\"BHS\"] = Array(\"iso2\" => \"BS\", \"name\" => \"Bahamas, Commonwealth of the\");\n\t\t$country[\"BHR\"] = Array(\"iso2\" => \"BH\", \"name\" => \"Bahrain, Kingdom of\");\n\t\t$country[\"BGD\"] = Array(\"iso2\" => \"BD\", \"name\" => \"Bangladesh, People's Republic \");\n\t\t$country[\"BRB\"] = Array(\"iso2\" => \"BB\", \"name\" => \"Barbados\");\n\t\t$country[\"BLR\"] = Array(\"iso2\" => \"BY\", \"name\" => \"Belarus, Republic of\");\n\t\t$country[\"BEL\"] = Array(\"iso2\" => \"BE\", \"name\" => \"Belgium, Kingdom of\");\n\t\t$country[\"BLZ\"] = Array(\"iso2\" => \"BZ\", \"name\" => \"Belize\");\n\t\t$country[\"BEN\"] = Array(\"iso2\" => \"BJ\", \"name\" => \"Benin, Republic of\");\n\t\t$country[\"BMU\"] = Array(\"iso2\" => \"BM\", \"name\" => \"Bermuda\");\n\t\t$country[\"BTN\"] = Array(\"iso2\" => \"BT\", \"name\" => \"Bhutan, Kingdom of\");\n\t\t$country[\"BOL\"] = Array(\"iso2\" => \"BO\", \"name\" => \"Bolivia, Republic of\");\n\t\t$country[\"BIH\"] = Array(\"iso2\" => \"BA\", \"name\" => \"Bosnia and Herzegovina\");\n\t\t$country[\"BWA\"] = Array(\"iso2\" => \"BW\", \"name\" => \"Botswana, Republic of\");\n\t\t$country[\"BVT\"] = Array(\"iso2\" => \"BV\", \"name\" => \"Bouvet Island (Bouvetoya)\");\n\t\t$country[\"BRA\"] = Array(\"iso2\" => \"BR\", \"name\" => \"Brazil, Federative Republic of\");\n\t\t$country[\"IOT\"] = Array(\"iso2\" => \"IO\", \"name\" => \"British Indian Ocean Territory\");\n\t\t$country[\"VGB\"] = Array(\"iso2\" => \"VG\", \"name\" => \"British Virgin Islands\");\n\t\t$country[\"BRN\"] = Array(\"iso2\" => \"BN\", \"name\" => \"Brunei Darussalam\");\n\t\t$country[\"BGR\"] = Array(\"iso2\" => \"BG\", \"name\" => \"Bulgaria, Republic of\");\n\t\t$country[\"BFA\"] = Array(\"iso2\" => \"BF\", \"name\" => \"Burkina Faso\");\n\t\t$country[\"BDI\"] = Array(\"iso2\" => \"BI\", \"name\" => \"Burundi, Republic of\");\n\t\t$country[\"KHM\"] = Array(\"iso2\" => \"KH\", \"name\" => \"Cambodia, Kingdom of\");\n\t\t$country[\"CMR\"] = Array(\"iso2\" => \"CM\", \"name\" => \"Cameroon, Republic of\");\n\t\t$country[\"CAN\"] = Array(\"iso2\" => \"CA\", \"name\" => \"Canada\");\n\t\t$country[\"CPV\"] = Array(\"iso2\" => \"CV\", \"name\" => \"Cape Verde, Republic of\");\n\t\t$country[\"CYM\"] = Array(\"iso2\" => \"KY\", \"name\" => \"Cayman Islands\");\n\t\t$country[\"CAF\"] = Array(\"iso2\" => \"CF\", \"name\" => \"Central African Republic\");\n\t\t$country[\"TCD\"] = Array(\"iso2\" => \"TD\", \"name\" => \"Chad, Republic of\");\n\t\t$country[\"CHL\"] = Array(\"iso2\" => \"CL\", \"name\" => \"Chile, Republic of\");\n\t\t$country[\"CHN\"] = Array(\"iso2\" => \"CN\", \"name\" => \"China, People's Republic of\");\n\t\t$country[\"CXR\"] = Array(\"iso2\" => \"CX\", \"name\" => \"Christmas Island\");\n\t\t$country[\"CCK\"] = Array(\"iso2\" => \"CC\", \"name\" => \"Cocos (Keeling) Islands\");\n\t\t$country[\"COL\"] = Array(\"iso2\" => \"CO\", \"name\" => \"Colombia, Republic of\");\n\t\t$country[\"COM\"] = Array(\"iso2\" => \"KM\", \"name\" => \"Comoros, Union of the\");\n\t\t$country[\"COD\"] = Array(\"iso2\" => \"CD\", \"name\" => \"Congo, Democratic Republic of \");\n\t\t$country[\"COG\"] = Array(\"iso2\" => \"CG\", \"name\" => \"Congo, Republic of the\");\n\t\t$country[\"COK\"] = Array(\"iso2\" => \"CK\", \"name\" => \"Cook Islands\");\n\t\t$country[\"CRI\"] = Array(\"iso2\" => \"CR\", \"name\" => \"Costa Rica, Republic of\");\n\t\t$country[\"CIV\"] = Array(\"iso2\" => \"CI\", \"name\" => \"Cote d'Ivoire, Republic of\");\n\t\t$country[\"HRV\"] = Array(\"iso2\" => \"HR\", \"name\" => \"Croatia, Republic of\");\n\t\t$country[\"CUB\"] = Array(\"iso2\" => \"CU\", \"name\" => \"Cuba, Republic of\");\n\t\t$country[\"CYP\"] = Array(\"iso2\" => \"CY\", \"name\" => \"Cyprus, Republic of\");\n\t\t$country[\"CZE\"] = Array(\"iso2\" => \"CZ\", \"name\" => \"Czech Republic\");\n\t\t$country[\"DNK\"] = Array(\"iso2\" => \"DK\", \"name\" => \"Denmark, Kingdom of\");\n\t\t$country[\"DJI\"] = Array(\"iso2\" => \"DJ\", \"name\" => \"Djibouti, Republic of\");\n\t\t$country[\"DMA\"] = Array(\"iso2\" => \"DM\", \"name\" => \"Dominica, Commonwealth of\");\n\t\t$country[\"DOM\"] = Array(\"iso2\" => \"DO\", \"name\" => \"Dominican Republic\");\n\t\t$country[\"ECU\"] = Array(\"iso2\" => \"EC\", \"name\" => \"Ecuador, Republic of\");\n\t\t$country[\"EGY\"] = Array(\"iso2\" => \"EG\", \"name\" => \"Egypt, Arab Republic of\");\n\t\t$country[\"SLV\"] = Array(\"iso2\" => \"SV\", \"name\" => \"El Salvador, Republic of\");\n\t\t$country[\"GNQ\"] = Array(\"iso2\" => \"GQ\", \"name\" => \"Equatorial Guinea, Republic of\");\n\t\t$country[\"ERI\"] = Array(\"iso2\" => \"ER\", \"name\" => \"Eritrea, State of\");\n\t\t$country[\"EST\"] = Array(\"iso2\" => \"EE\", \"name\" => \"Estonia, Republic of\");\n\t\t$country[\"ETH\"] = Array(\"iso2\" => \"ET\", \"name\" => \"Ethiopia, Federal Democratic R\");\n\t\t$country[\"FRO\"] = Array(\"iso2\" => \"FO\", \"name\" => \"Faroe Islands\");\n\t\t$country[\"FLK\"] = Array(\"iso2\" => \"FK\", \"name\" => \"Falkland Islands (Malvinas)\");\n\t\t$country[\"FJI\"] = Array(\"iso2\" => \"FJ\", \"name\" => \"Fiji, Republic of the Fiji Isl\");\n\t\t$country[\"FIN\"] = Array(\"iso2\" => \"FI\", \"name\" => \"Finland, Republic of\");\n\t\t$country[\"FRA\"] = Array(\"iso2\" => \"FR\", \"name\" => \"France, French Republic\");\n\t\t$country[\"GUF\"] = Array(\"iso2\" => \"GF\", \"name\" => \"French Guiana\");\n\t\t$country[\"PYF\"] = Array(\"iso2\" => \"PF\", \"name\" => \"French Polynesia\");\n\t\t$country[\"ATF\"] = Array(\"iso2\" => \"TF\", \"name\" => \"French Southern Territories\");\n\t\t$country[\"GAB\"] = Array(\"iso2\" => \"GA\", \"name\" => \"Gabon, Gabonese Republic\");\n\t\t$country[\"GMB\"] = Array(\"iso2\" => \"GM\", \"name\" => \"Gambia, Republic of the\");\n\t\t$country[\"GEO\"] = Array(\"iso2\" => \"GE\", \"name\" => \"Georgia\");\n\t\t$country[\"DEU\"] = Array(\"iso2\" => \"DE\", \"name\" => \"Germany, Federal Republic of\");\n\t\t$country[\"GHA\"] = Array(\"iso2\" => \"GH\", \"name\" => \"Ghana, Republic of\");\n\t\t$country[\"GIB\"] = Array(\"iso2\" => \"GI\", \"name\" => \"Gibraltar\");\n\t\t$country[\"GRC\"] = Array(\"iso2\" => \"GR\", \"name\" => \"Greece, Hellenic Republic\");\n\t\t$country[\"GRL\"] = Array(\"iso2\" => \"GL\", \"name\" => \"Greenland\");\n\t\t$country[\"GRD\"] = Array(\"iso2\" => \"GD\", \"name\" => \"Grenada\");\n\t\t$country[\"GLP\"] = Array(\"iso2\" => \"GP\", \"name\" => \"Guadeloupe\");\n\t\t$country[\"GUM\"] = Array(\"iso2\" => \"GU\", \"name\" => \"Guam\");\n\t\t$country[\"GTM\"] = Array(\"iso2\" => \"GT\", \"name\" => \"Guatemala, Republic of\");\n\t\t$country[\"GGY\"] = Array(\"iso2\" => \"GG\", \"name\" => \"Guernsey, Bailiwick of\");\n\t\t$country[\"GIN\"] = Array(\"iso2\" => \"GN\", \"name\" => \"Guinea, Republic of\");\n\t\t$country[\"GNB\"] = Array(\"iso2\" => \"GW\", \"name\" => \"Guinea-Bissau, Republic of\");\n\t\t$country[\"GUY\"] = Array(\"iso2\" => \"GY\", \"name\" => \"Guyana, Co-operative Republic \");\n\t\t$country[\"HTI\"] = Array(\"iso2\" => \"HT\", \"name\" => \"Haiti, Republic of\");\n\t\t$country[\"HMD\"] = Array(\"iso2\" => \"HM\", \"name\" => \"Heard Island and McDonald Isla\");\n\t\t$country[\"VAT\"] = Array(\"iso2\" => \"VA\", \"name\" => \"Holy See (Vatican City State)\");\n\t\t$country[\"HND\"] = Array(\"iso2\" => \"HN\", \"name\" => \"Honduras, Republic of\");\n\t\t$country[\"HKG\"] = Array(\"iso2\" => \"HK\", \"name\" => \"Hong Kong, Special Administrat\");\n\t\t$country[\"HUN\"] = Array(\"iso2\" => \"HU\", \"name\" => \"Hungary, Republic of\");\n\t\t$country[\"ISL\"] = Array(\"iso2\" => \"IS\", \"name\" => \"Iceland, Republic of\");\n\t\t$country[\"IND\"] = Array(\"iso2\" => \"IN\", \"name\" => \"India, Republic of\");\n\t\t$country[\"IDN\"] = Array(\"iso2\" => \"ID\", \"name\" => \"Indonesia, Republic of\");\n\t\t$country[\"IRN\"] = Array(\"iso2\" => \"IR\", \"name\" => \"Iran, Islamic Republic of\");\n\t\t$country[\"IRQ\"] = Array(\"iso2\" => \"IQ\", \"name\" => \"Iraq, Republic of\");\n\t\t$country[\"IRL\"] = Array(\"iso2\" => \"IE\", \"name\" => \"Ireland\");\n\t\t$country[\"IMN\"] = Array(\"iso2\" => \"IM\", \"name\" => \"Isle of Man\");\n\t\t$country[\"ISR\"] = Array(\"iso2\" => \"IL\", \"name\" => \"Israel, State of\");\n\t\t$country[\"ITA\"] = Array(\"iso2\" => \"IT\", \"name\" => \"Italy, Italian Republic\");\n\t\t$country[\"JAM\"] = Array(\"iso2\" => \"JM\", \"name\" => \"Jamaica\");\n\t\t$country[\"JPN\"] = Array(\"iso2\" => \"JP\", \"name\" => \"Japan\");\n\t\t$country[\"JEY\"] = Array(\"iso2\" => \"JE\", \"name\" => \"Jersey, Bailiwick of\");\n\t\t$country[\"JOR\"] = Array(\"iso2\" => \"JO\", \"name\" => \"Jordan, Hashemite Kingdom of\");\n\t\t$country[\"KAZ\"] = Array(\"iso2\" => \"KZ\", \"name\" => \"Kazakhstan, Republic of\");\n\t\t$country[\"KEN\"] = Array(\"iso2\" => \"KE\", \"name\" => \"Kenya, Republic of\");\n\t\t$country[\"KIR\"] = Array(\"iso2\" => \"KI\", \"name\" => \"Kiribati, Republic of\");\n\t\t$country[\"PRK\"] = Array(\"iso2\" => \"KP\", \"name\" => \"Korea, Democratic People's Rep\");\n\t\t$country[\"KOR\"] = Array(\"iso2\" => \"KR\", \"name\" => \"Korea, Republic of\");\n\t\t$country[\"KWT\"] = Array(\"iso2\" => \"KW\", \"name\" => \"Kuwait, State of\");\n\t\t$country[\"KGZ\"] = Array(\"iso2\" => \"KG\", \"name\" => \"Kyrgyz Republic\");\n\t\t$country[\"LAO\"] = Array(\"iso2\" => \"LA\", \"name\" => \"Lao People's Democratic Republ\");\n\t\t$country[\"LVA\"] = Array(\"iso2\" => \"LV\", \"name\" => \"Latvia, Republic of\");\n\t\t$country[\"LBN\"] = Array(\"iso2\" => \"LB\", \"name\" => \"Lebanon, Lebanese Republic\");\n\t\t$country[\"LSO\"] = Array(\"iso2\" => \"LS\", \"name\" => \"Lesotho, Kingdom of\");\n\t\t$country[\"LBR\"] = Array(\"iso2\" => \"LR\", \"name\" => \"Liberia, Republic of\");\n\t\t$country[\"LBY\"] = Array(\"iso2\" => \"LY\", \"name\" => \"Libyan Arab Jamahiriya\");\n\t\t$country[\"LIE\"] = Array(\"iso2\" => \"LI\", \"name\" => \"Liechtenstein, Principality of\");\n\t\t$country[\"LTU\"] = Array(\"iso2\" => \"LT\", \"name\" => \"Lithuania, Republic of\");\n\t\t$country[\"LUX\"] = Array(\"iso2\" => \"LU\", \"name\" => \"Luxembourg, Grand Duchy of\");\n\t\t$country[\"MAC\"] = Array(\"iso2\" => \"MO\", \"name\" => \"Macao, Special Administrative \");\n\t\t$country[\"MKD\"] = Array(\"iso2\" => \"MK\", \"name\" => \"Macedonia, the former Yugoslav\");\n\t\t$country[\"MDG\"] = Array(\"iso2\" => \"MG\", \"name\" => \"Madagascar, Republic of\");\n\t\t$country[\"MWI\"] = Array(\"iso2\" => \"MW\", \"name\" => \"Malawi, Republic of\");\n\t\t$country[\"MYS\"] = Array(\"iso2\" => \"MY\", \"name\" => \"Malaysia\");\n\t\t$country[\"MDV\"] = Array(\"iso2\" => \"MV\", \"name\" => \"Maldives, Republic of\");\n\t\t$country[\"MLI\"] = Array(\"iso2\" => \"ML\", \"name\" => \"Mali, Republic of\");\n\t\t$country[\"MLT\"] = Array(\"iso2\" => \"MT\", \"name\" => \"Malta, Republic of\");\n\t\t$country[\"MHL\"] = Array(\"iso2\" => \"MH\", \"name\" => \"Marshall Islands, Republic of \");\n\t\t$country[\"MTQ\"] = Array(\"iso2\" => \"MQ\", \"name\" => \"Martinique\");\n\t\t$country[\"MRT\"] = Array(\"iso2\" => \"MR\", \"name\" => \"Mauritania, Islamic Republic o\");\n\t\t$country[\"MUS\"] = Array(\"iso2\" => \"MU\", \"name\" => \"Mauritius, Republic of\");\n\t\t$country[\"MYT\"] = Array(\"iso2\" => \"YT\", \"name\" => \"Mayotte\");\n\t\t$country[\"MEX\"] = Array(\"iso2\" => \"MX\", \"name\" => \"Mexico, United Mexican States\");\n\t\t$country[\"FSM\"] = Array(\"iso2\" => \"FM\", \"name\" => \"Micronesia, Federated States o\");\n\t\t$country[\"MDA\"] = Array(\"iso2\" => \"MD\", \"name\" => \"Moldova, Republic of\");\n\t\t$country[\"MCO\"] = Array(\"iso2\" => \"MC\", \"name\" => \"Monaco, Principality of\");\n\t\t$country[\"MNG\"] = Array(\"iso2\" => \"MN\", \"name\" => \"Mongolia\");\n\t\t$country[\"MNE\"] = Array(\"iso2\" => \"ME\", \"name\" => \"Montenegro, Republic of\");\n\t\t$country[\"MSR\"] = Array(\"iso2\" => \"MS\", \"name\" => \"Montserrat\");\n\t\t$country[\"MAR\"] = Array(\"iso2\" => \"MA\", \"name\" => \"Morocco, Kingdom of\");\n\t\t$country[\"MOZ\"] = Array(\"iso2\" => \"MZ\", \"name\" => \"Mozambique, Republic of\");\n\t\t$country[\"MMR\"] = Array(\"iso2\" => \"MM\", \"name\" => \"Myanmar, Union of\");\n\t\t$country[\"NAM\"] = Array(\"iso2\" => \"NA\", \"name\" => \"Namibia, Republic of\");\n\t\t$country[\"NRU\"] = Array(\"iso2\" => \"NR\", \"name\" => \"Nauru, Republic of\");\n\t\t$country[\"NPL\"] = Array(\"iso2\" => \"NP\", \"name\" => \"Nepal, State of\");\n\t\t$country[\"ANT\"] = Array(\"iso2\" => \"AN\", \"name\" => \"Netherlands Antilles\");\n\t\t$country[\"NLD\"] = Array(\"iso2\" => \"NL\", \"name\" => \"Netherlands, Kingdom of the\");\n\t\t$country[\"NCL\"] = Array(\"iso2\" => \"NC\", \"name\" => \"New Caledonia\");\n\t\t$country[\"NZL\"] = Array(\"iso2\" => \"NZ\", \"name\" => \"New Zealand\");\n\t\t$country[\"NIC\"] = Array(\"iso2\" => \"NI\", \"name\" => \"Nicaragua, Republic of\");\n\t\t$country[\"NER\"] = Array(\"iso2\" => \"NE\", \"name\" => \"Niger, Republic of\");\n\t\t$country[\"NGA\"] = Array(\"iso2\" => \"NG\", \"name\" => \"Nigeria, Federal Republic of\");\n\t\t$country[\"NIU\"] = Array(\"iso2\" => \"NU\", \"name\" => \"Niue\");\n\t\t$country[\"NFK\"] = Array(\"iso2\" => \"NF\", \"name\" => \"Norfolk Island\");\n\t\t$country[\"MNP\"] = Array(\"iso2\" => \"MP\", \"name\" => \"Northern Mariana Islands, Comm\");\n\t\t$country[\"NOR\"] = Array(\"iso2\" => \"NO\", \"name\" => \"Norway, Kingdom of\");\n\t\t$country[\"OMN\"] = Array(\"iso2\" => \"OM\", \"name\" => \"Oman, Sultanate of\");\n\t\t$country[\"PAK\"] = Array(\"iso2\" => \"PK\", \"name\" => \"Pakistan, Islamic Republic of\");\n\t\t$country[\"PLW\"] = Array(\"iso2\" => \"PW\", \"name\" => \"Palau, Republic of\");\n\t\t$country[\"PSE\"] = Array(\"iso2\" => \"PS\", \"name\" => \"Palestinian Territory, Occupie\");\n\t\t$country[\"PAN\"] = Array(\"iso2\" => \"PA\", \"name\" => \"Panama, Republic of\");\n\t\t$country[\"PNG\"] = Array(\"iso2\" => \"PG\", \"name\" => \"Papua New Guinea, Independent \");\n\t\t$country[\"PRY\"] = Array(\"iso2\" => \"PY\", \"name\" => \"Paraguay, Republic of\");\n\t\t$country[\"PER\"] = Array(\"iso2\" => \"PE\", \"name\" => \"Peru, Republic of\");\n\t\t$country[\"PHL\"] = Array(\"iso2\" => \"PH\", \"name\" => \"Philippines, Republic of the\");\n\t\t$country[\"PCN\"] = Array(\"iso2\" => \"PN\", \"name\" => \"Pitcairn Islands\");\n\t\t$country[\"POL\"] = Array(\"iso2\" => \"PL\", \"name\" => \"Poland, Republic of\");\n\t\t$country[\"PRT\"] = Array(\"iso2\" => \"PT\", \"name\" => \"Portugal, Portuguese Republic\");\n\t\t$country[\"PRI\"] = Array(\"iso2\" => \"PR\", \"name\" => \"Puerto Rico, Commonwealth of\");\n\t\t$country[\"QAT\"] = Array(\"iso2\" => \"QA\", \"name\" => \"Qatar, State of\");\n\t\t$country[\"REU\"] = Array(\"iso2\" => \"RE\", \"name\" => \"Reunion\");\n\t\t$country[\"ROU\"] = Array(\"iso2\" => \"RO\", \"name\" => \"Romania\");\n\t\t$country[\"RUS\"] = Array(\"iso2\" => \"RU\", \"name\" => \"Russian Federation\");\n\t\t$country[\"RWA\"] = Array(\"iso2\" => \"RW\", \"name\" => \"Rwanda, Republic of\");\n\t\t$country[\"BLM\"] = Array(\"iso2\" => \"BL\", \"name\" => \"Saint Barthelemy\");\n\t\t$country[\"SHN\"] = Array(\"iso2\" => \"SH\", \"name\" => \"Saint Helena\");\n\t\t$country[\"KNA\"] = Array(\"iso2\" => \"KN\", \"name\" => \"Saint Kitts and Nevis, Federat\");\n\t\t$country[\"LCA\"] = Array(\"iso2\" => \"LC\", \"name\" => \"Saint Lucia\");\n\t\t$country[\"MAF\"] = Array(\"iso2\" => \"MF\", \"name\" => \"Saint Martin\");\n\t\t$country[\"SPM\"] = Array(\"iso2\" => \"PM\", \"name\" => \"Saint Pierre and Miquelon\");\n\t\t$country[\"VCT\"] = Array(\"iso2\" => \"VC\", \"name\" => \"Saint Vincent and the Grenadin\");\n\t\t$country[\"WSM\"] = Array(\"iso2\" => \"WS\", \"name\" => \"Samoa, Independent State of\");\n\t\t$country[\"SMR\"] = Array(\"iso2\" => \"SM\", \"name\" => \"San Marino, Republic of\");\n\t\t$country[\"STP\"] = Array(\"iso2\" => \"ST\", \"name\" => \"Sao Tome and Principe, Democra\");\n\t\t$country[\"SAU\"] = Array(\"iso2\" => \"SA\", \"name\" => \"Saudi Arabia, Kingdom of\");\n\t\t$country[\"SEN\"] = Array(\"iso2\" => \"SN\", \"name\" => \"Senegal, Republic of\");\n\t\t$country[\"SRB\"] = Array(\"iso2\" => \"RS\", \"name\" => \"Serbia, Republic of\");\n\t\t$country[\"SYC\"] = Array(\"iso2\" => \"SC\", \"name\" => \"Seychelles, Republic of\");\n\t\t$country[\"SLE\"] = Array(\"iso2\" => \"SL\", \"name\" => \"Sierra Leone, Republic of\");\n\t\t$country[\"SGP\"] = Array(\"iso2\" => \"SG\", \"name\" => \"Singapore, Republic of\");\n\t\t$country[\"SVK\"] = Array(\"iso2\" => \"SK\", \"name\" => \"Slovakia (Slovak Republic)\");\n\t\t$country[\"SVN\"] = Array(\"iso2\" => \"SI\", \"name\" => \"Slovenia, Republic of\");\n\t\t$country[\"SLB\"] = Array(\"iso2\" => \"SB\", \"name\" => \"Solomon Islands\");\n\t\t$country[\"SOM\"] = Array(\"iso2\" => \"SO\", \"name\" => \"Somalia, Somali Republic\");\n\t\t$country[\"ZAF\"] = Array(\"iso2\" => \"ZA\", \"name\" => \"South Africa, Republic of\");\n\t\t$country[\"SGS\"] = Array(\"iso2\" => \"GS\", \"name\" => \"South Georgia and the South Sa\");\n\t\t$country[\"ESP\"] = Array(\"iso2\" => \"ES\", \"name\" => \"Spain, Kingdom of\");\n\t\t$country[\"LKA\"] = Array(\"iso2\" => \"LK\", \"name\" => \"Sri Lanka, Democratic Socialis\");\n\t\t$country[\"SDN\"] = Array(\"iso2\" => \"SD\", \"name\" => \"Sudan, Republic of\");\n\t\t$country[\"SUR\"] = Array(\"iso2\" => \"SR\", \"name\" => \"Suriname, Republic of\");\n\t\t$country[\"SJM\"] = Array(\"iso2\" => \"SJ\", \"name\" => \"Svalbard & Jan Mayen Islands\");\n\t\t$country[\"SWZ\"] = Array(\"iso2\" => \"SZ\", \"name\" => \"Swaziland, Kingdom of\");\n\t\t$country[\"SWE\"] = Array(\"iso2\" => \"SE\", \"name\" => \"Sweden, Kingdom of\");\n\t\t$country[\"CHE\"] = Array(\"iso2\" => \"CH\", \"name\" => \"Switzerland, Swiss Confederati\");\n\t\t$country[\"SYR\"] = Array(\"iso2\" => \"SY\", \"name\" => \"Syrian Arab Republic\");\n\t\t$country[\"TWN\"] = Array(\"iso2\" => \"TW\", \"name\" => \"Taiwan\");\n\t\t$country[\"TJK\"] = Array(\"iso2\" => \"TJ\", \"name\" => \"Tajikistan, Republic of\");\n\t\t$country[\"TZA\"] = Array(\"iso2\" => \"TZ\", \"name\" => \"Tanzania, United Republic of\");\n\t\t$country[\"THA\"] = Array(\"iso2\" => \"TH\", \"name\" => \"Thailand, Kingdom of\");\n\t\t$country[\"TLS\"] = Array(\"iso2\" => \"TL\", \"name\" => \"Timor-Leste, Democratic Republ\");\n\t\t$country[\"TGO\"] = Array(\"iso2\" => \"TG\", \"name\" => \"Togo, Togolese Republic\");\n\t\t$country[\"TKL\"] = Array(\"iso2\" => \"TK\", \"name\" => \"Tokelau\");\n\t\t$country[\"TON\"] = Array(\"iso2\" => \"TO\", \"name\" => \"Tonga, Kingdom of\");\n\t\t$country[\"TTO\"] = Array(\"iso2\" => \"TT\", \"name\" => \"Trinidad and Tobago, Republic \");\n\t\t$country[\"TUN\"] = Array(\"iso2\" => \"TN\", \"name\" => \"Tunisia, Tunisian Republic\");\n\t\t$country[\"TUR\"] = Array(\"iso2\" => \"TR\", \"name\" => \"Turkey, Republic of\");\n\t\t$country[\"TKM\"] = Array(\"iso2\" => \"TM\", \"name\" => \"Turkmenistan\");\n\t\t$country[\"TCA\"] = Array(\"iso2\" => \"TC\", \"name\" => \"Turks and Caicos Islands\");\n\t\t$country[\"TUV\"] = Array(\"iso2\" => \"TV\", \"name\" => \"Tuvalu\");\n\t\t$country[\"UGA\"] = Array(\"iso2\" => \"UG\", \"name\" => \"Uganda, Republic of\");\n\t\t$country[\"UKR\"] = Array(\"iso2\" => \"UA\", \"name\" => \"Ukraine\");\n\t\t$country[\"ARE\"] = Array(\"iso2\" => \"AE\", \"name\" => \"United Arab Emirates\");\n\t\t$country[\"GBR\"] = Array(\"iso2\" => \"GB\", \"name\" => \"United Kingdom of Great Britain\");\n\t\t$country[\"USA\"] = Array(\"iso2\" => \"US\", \"name\" => \"United States of America\");\n\t\t$country[\"UMI\"] = Array(\"iso2\" => \"UM\", \"name\" => \"United States Minor Outlying I\");\n\t\t$country[\"VIR\"] = Array(\"iso2\" => \"VI\", \"name\" => \"United States Virgin Islands\");\n\t\t$country[\"URY\"] = Array(\"iso2\" => \"UY\", \"name\" => \"Uruguay, Eastern Republic of\");\n\t\t$country[\"UZB\"] = Array(\"iso2\" => \"UZ\", \"name\" => \"Uzbekistan, Republic of\");\n\t\t$country[\"VUT\"] = Array(\"iso2\" => \"VU\", \"name\" => \"Vanuatu, Republic of\");\n\t\t$country[\"VEN\"] = Array(\"iso2\" => \"VE\", \"name\" => \"Venezuela, Bolivarian Republic\");\n\t\t$country[\"VNM\"] = Array(\"iso2\" => \"VN\", \"name\" => \"Vietnam, Socialist Republic of\");\n\t\t$country[\"WLF\"] = Array(\"iso2\" => \"WF\", \"name\" => \"Wallis and Futuna\");\n\t\t$country[\"ESH\"] = Array(\"iso2\" => \"EH\", \"name\" => \"Western Sahara\");\n\t\t$country[\"YEM\"] = Array(\"iso2\" => \"YE\", \"name\" => \"Yemen\");\n\t\t$country[\"ZMB\"] = Array(\"iso2\" => \"ZM\", \"name\" => \"Zambia, Republic of\");\n\t\t$country[\"ZWE\"] = Array(\"iso2\" => \"ZW\", \"name\" => \"Zimbabwe, Republic of\");\n\t\t$country[\"0\"] = Array(\"iso2\" => \"0\", \"name\" => \"NO VALID COUNTRY\");\n\n\t\treturn $country;\n\t}", "public function subdivision()\n {\n $city = $this->city;\n\n $this->subdivision = $city ? $city->subdivision : null;\n }", "function country_continents($countryCode) {\n\t$COUNTRY_CONTINENTS = [\"AF\"=>\"AS\",\"AX\"=>\"EU\",\"AL\"=>\"EU\",\"DZ\"=>\"AF\",\"AS\"=>\"OC\",\"AD\"=>\"EU\",\"AO\"=>\"AF\",\"AI\"=>\"NA\",\"AQ\"=>\"AN\",\"AG\"=>\"NA\",\"AR\"=>\"SA\",\"AM\"=>\"AS\",\"AW\"=>\"NA\",\"AU\"=>\"OC\",\"AT\"=>\"EU\",\"AZ\"=>\"AS\",\"BS\"=>\"NA\",\"BH\"=>\"AS\",\"BD\"=>\"AS\",\"BB\"=>\"NA\",\"BY\"=>\"EU\",\"BE\"=>\"EU\",\"BZ\"=>\"NA\",\"BJ\"=>\"AF\",\"BM\"=>\"NA\",\"BT\"=>\"AS\",\"BO\"=>\"SA\",\"BA\"=>\"EU\",\"BW\"=>\"AF\",\"BV\"=>\"AN\",\"BR\"=>\"SA\",\"IO\"=>\"AS\",\"BN\"=>\"AS\",\"BG\"=>\"EU\",\"BF\"=>\"AF\",\"BI\"=>\"AF\",\"KH\"=>\"AS\",\"CM\"=>\"AF\",\"CA\"=>\"NA\",\"CV\"=>\"AF\",\"KY\"=>\"NA\",\"CF\"=>\"AF\",\"TD\"=>\"AF\",\"CL\"=>\"SA\",\"CN\"=>\"AS\",\"CX\"=>\"AS\",\"CC\"=>\"AS\",\"CO\"=>\"SA\",\"KM\"=>\"AF\",\"CD\"=>\"AF\",\"CG\"=>\"AF\",\"CK\"=>\"OC\",\"CR\"=>\"NA\",\"CI\"=>\"AF\",\"HR\"=>\"EU\",\"CU\"=>\"NA\",\"CY\"=>\"AS\",\"CZ\"=>\"EU\",\"DK\"=>\"EU\",\"DJ\"=>\"AF\",\"DM\"=>\"NA\",\"DO\"=>\"NA\",\"EC\"=>\"SA\",\"EG\"=>\"AF\",\"SV\"=>\"NA\",\"GQ\"=>\"AF\",\"ER\"=>\"AF\",\"EE\"=>\"EU\",\"ET\"=>\"AF\",\"FO\"=>\"EU\",\"FK\"=>\"SA\",\"FJ\"=>\"OC\",\"FI\"=>\"EU\",\"FR\"=>\"EU\",\"GF\"=>\"SA\",\"PF\"=>\"OC\",\"TF\"=>\"AN\",\"GA\"=>\"AF\",\"GM\"=>\"AF\",\"GE\"=>\"AS\",\"DE\"=>\"EU\",\"GH\"=>\"AF\",\"GI\"=>\"EU\",\"GR\"=>\"EU\",\"GL\"=>\"NA\",\"GD\"=>\"NA\",\"GP\"=>\"NA\",\"GU\"=>\"OC\",\"GT\"=>\"NA\",\"GG\"=>\"EU\",\"GN\"=>\"AF\",\"GW\"=>\"AF\",\"GY\"=>\"SA\",\"HT\"=>\"NA\",\"HM\"=>\"AN\",\"VA\"=>\"EU\",\"HN\"=>\"NA\",\"HK\"=>\"AS\",\"HU\"=>\"EU\",\"IS\"=>\"EU\",\"IN\"=>\"AS\",\"ID\"=>\"AS\",\"IR\"=>\"AS\",\"IQ\"=>\"AS\",\"IE\"=>\"EU\",\"IM\"=>\"EU\",\"IL\"=>\"AS\",\"IT\"=>\"EU\",\"JM\"=>\"NA\",\"JP\"=>\"AS\",\"JE\"=>\"EU\",\"JO\"=>\"AS\",\"KZ\"=>\"AS\",\"KE\"=>\"AF\",\"KI\"=>\"OC\",\"KP\"=>\"AS\",\"KR\"=>\"AS\",\"KW\"=>\"AS\",\"KG\"=>\"AS\",\"LA\"=>\"AS\",\"LV\"=>\"EU\",\"LB\"=>\"AS\",\"LS\"=>\"AF\",\"LR\"=>\"AF\",\"LY\"=>\"AF\",\"LI\"=>\"EU\",\"LT\"=>\"EU\",\"LU\"=>\"EU\",\"MO\"=>\"AS\",\"MK\"=>\"EU\",\"MG\"=>\"AF\",\"MW\"=>\"AF\",\"MY\"=>\"AS\",\"MV\"=>\"AS\",\"ML\"=>\"AF\",\"MT\"=>\"EU\",\"MH\"=>\"OC\",\"MQ\"=>\"NA\",\"MR\"=>\"AF\",\"MU\"=>\"AF\",\"YT\"=>\"AF\",\"MX\"=>\"NA\",\"FM\"=>\"OC\",\"MD\"=>\"EU\",\"MC\"=>\"EU\",\"MN\"=>\"AS\",\"ME\"=>\"EU\",\"MS\"=>\"NA\",\"MA\"=>\"AF\",\"MZ\"=>\"AF\",\"MM\"=>\"AS\",\"NA\"=>\"AF\",\"NR\"=>\"OC\",\"NP\"=>\"AS\",\"AN\"=>\"NA\",\"NL\"=>\"EU\",\"NC\"=>\"OC\",\"NZ\"=>\"OC\",\"NI\"=>\"NA\",\"NE\"=>\"AF\",\"NG\"=>\"AF\",\"NU\"=>\"OC\",\"NF\"=>\"OC\",\"MP\"=>\"OC\",\"NO\"=>\"EU\",\"OM\"=>\"AS\",\"PK\"=>\"AS\",\"PW\"=>\"OC\",\"PS\"=>\"AS\",\"PA\"=>\"NA\",\"PG\"=>\"OC\",\"PY\"=>\"SA\",\"PE\"=>\"SA\",\"PH\"=>\"AS\",\"PN\"=>\"OC\",\"PL\"=>\"EU\",\"PT\"=>\"EU\",\"PR\"=>\"NA\",\"QA\"=>\"AS\",\"RE\"=>\"AF\",\"RO\"=>\"EU\",\"RU\"=>\"EU\",\"RW\"=>\"AF\",\"SH\"=>\"AF\",\"KN\"=>\"NA\",\"LC\"=>\"NA\",\"PM\"=>\"NA\",\"VC\"=>\"NA\",\"WS\"=>\"OC\",\"SM\"=>\"EU\",\"ST\"=>\"AF\",\"SA\"=>\"AS\",\"SN\"=>\"AF\",\"RS\"=>\"EU\",\"SC\"=>\"AF\",\"SL\"=>\"AF\",\"SG\"=>\"AS\",\"SK\"=>\"EU\",\"SI\"=>\"EU\",\"SB\"=>\"OC\",\"SO\"=>\"AF\",\"ZA\"=>\"AF\",\"GS\"=>\"AN\",\"ES\"=>\"EU\",\"LK\"=>\"AS\",\"SD\"=>\"AF\",\"SR\"=>\"SA\",\"SJ\"=>\"EU\",\"SZ\"=>\"AF\",\"SE\"=>\"EU\",\"CH\"=>\"EU\",\"SY\"=>\"AS\",\"TW\"=>\"AS\",\"TJ\"=>\"AS\",\"TZ\"=>\"AF\",\"TH\"=>\"AS\",\"TL\"=>\"AS\",\"TG\"=>\"AF\",\"TK\"=>\"OC\",\"TO\"=>\"OC\",\"TT\"=>\"NA\",\"TN\"=>\"AF\",\"TR\"=>\"AS\",\"TM\"=>\"AS\",\"TC\"=>\"NA\",\"TV\"=>\"OC\",\"UG\"=>\"AF\",\"UA\"=>\"EU\",\"AE\"=>\"AS\",\"GB\"=>\"EU\",\"UM\"=>\"OC\",\"US\"=>\"NA\",\"UY\"=>\"SA\",\"UZ\"=>\"AS\",\"VU\"=>\"OC\",\"VE\"=>\"SA\",\"VN\"=>\"AS\",\"VG\"=>\"NA\",\"VI\"=>\"NA\",\"WF\"=>\"OC\",\"EH\"=>\"AF\",\"YE\"=>\"AS\",\"ZM\"=>\"AF\",\"ZW\"=>\"AF\"];\n //lang\n if(in_array($countryCode, [\"ES\", \"AR\", \"BO\", \"CL\", \"CO\", \"CR\", \"CU\", \"CW\", \"DO\", \"EC\", \"HN\", \"MX\", \"NI\", \"PA\", \"PE\", \"PR\", \"PY\", \"VE\", \"UY\", \"GT\", \"SV\"])) {\n $lang = \"es\";\n } elseif(in_array($countryCode, [\"AG\",\"AU\",\"BS\",\"BB\",\"BZ\",\"CA\",\"DO\",\"EN\",\"IE\",\"JM\",\"GD\",\"GY\",\"LC\",\"NZ\",\"TT\",\"UK\",\"US\",\"VC\"])) {\n $lang = \"en\";\n } elseif(in_array($countryCode, [\"PT\",\"BR\",\"MZ\",\"AO\"])) {\n $lang = \"pt\";\n } elseif(in_array($countryCode, [\"FR\",\"SN\"])) {\n $lang = \"fr\";\n } else {\n $lang = \"en\";\n\t\t}\n\t\treturn $lang;\n}", "function get_country_list()\n\t{\n\t\t$query = \"SELECT `id`, `country` FROM `countries` ORDER BY CASE WHEN `id` = '\".OTHER_COUNTRY.\"' THEN 1 ELSE 0 END, `country`\";\n\t\t$result = $this->db->query($query);\n\t\tif ($result->num_rows() > 0 ) \n\t\t\treturn $result->result();\n\t\treturn false;\n\t}", "function getCountryList($options = array()) {\n\t\t$local_country_data = array();\n\t\t$where = array();\n\n\t\t# possible options of filtering\n\t\tif (!empty($options['country_id']))\n\t\t$where[] = \"id = \".$options['country_id'];\n\n\t\t# build SQL request\n\t\t$_sql = \"SELECT `id`, `iso2`, `iso3`, `name`\n\t\t\t\tFROM `%s` %s ORDER BY `name` ASC\";\n\t\t$sql = sprintf($_sql,\n\t\t$this->country_table,\n\t\t!empty($where) ? \"WHERE \".implode(\" AND \", $where) : \"\"\n\t\t);\n\t\t$result = mysql_query($sql);\n\n\t\twhile ($_city = mysql_fetch_assoc($result)) {\n\t\t\t$this->country_data[$_city['id']] = array (\n\t\t\t'id'\t=> $_city['id'],\n\t\t\t'iso2'\t=> $_city['iso2'],\n\t\t\t'iso3'\t=> $_city['iso3'],\n\t\t\t'name'\t=> $_city['name'],\n\t\t\t);\n\t\t\t$local_country_data[] = $this->country_data[$_city['id']];\n\t\t}\n\n\t\treturn $local_country_data;\n\t}", "public function getRegioni()\n\t{\n\t\t//Ritorna le regioni, tutte le regioni, TUTTE\n\t\t$query = \"SELECT * FROM regioni\";\n\t\tif($result = parent::query($query))\n\t\t{\n\t\t\t//Controlla che il risultato ottenuto non sia 0, quindi ho ottenuto un risultato\n\t\t\tif($result->num_rows > 0)\n\t\t\t{\n\t\t\t\t//Fetch_array di tutte le righe del comune\n\t\t\t\twhile($row = $result->fetch_array())\n\t\t\t\t{\n\t\t\t\t\t//Crea un array associativo (una sorta di matrice)\n\t\t\t\t\t//Due campi, cod_regione e il nome della regione\n\t\t\t\t\t//ritorna alla funzione Ajax l'array appena creato\n\t\t\t\t\t//che conterrà il nostro array associativo delle regioni\n\t\t\t\t\t$regioni[] = array(\n\t\t\t\t\t\t'cod_regione' => $row['cod_regione'],\n\t\t\t\t\t\t'regione' => $row['regione']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn $regioni;\n\t\t\t}\n\t\t}\n\t}", "private function returnCountriesForUser()\n {\n\n $tableCountryExt = CountryExt::tablename();\n $tableCountry = Country::tablename();\n\n /* $role=Yii::$app->user->getIdentity()->role;\n //If I'm admin just get all countries\n if($role==User::ROLE_ADMIN || $role==User::ROLE_SUPERADMIN || $role==User::ROLE_MARKETER)\n {\n $countries = Country::listAllCountries();\n }\n //otherwise find all countries where specific lanuage(language of current user is) is spoken\n else\n {\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n } */\n\n //return countries per language\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n return $countries;\n }", "function zen_get_country_list($name, $selected = '', $parameters = '') {\n $countriesAtTopOfList = array();\n $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));\n $countries = zen_get_countries();\n\n // Set some default entries at top of list:\n if (STORE_COUNTRY != SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY) $countriesAtTopOfList[] = SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;\n $countriesAtTopOfList[] = STORE_COUNTRY;\n // IF YOU WANT TO ADD MORE DEFAULTS TO THE TOP OF THIS LIST, SIMPLY ENTER THEIR NUMBERS HERE.\n // Duplicate more lines as needed\n // Example: Canada is 108, so use 108 as shown:\n //$countriesAtTopOfList[] = 108;\n\n //process array of top-of-list entries:\n foreach ($countriesAtTopOfList as $key=>$val) {\n $countries_array[] = array('id' => $val, 'text' => zen_get_country_name($val));\n }\n // now add anything not in the defaults list:\n for ($i=0, $n=sizeof($countries); $i<$n; $i++) {\n $alreadyInList = FALSE;\n foreach($countriesAtTopOfList as $key=>$val) {\n if ($countries[$i]['countries_id'] == $val)\n {\n // If you don't want to exclude entries already at the top of the list, comment out this next line:\n $alreadyInList = TRUE;\n continue;\n }\n }\n if (!$alreadyInList) $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);\n }\n\n return zen_draw_pull_down_menu($name, $countries_array, $selected, $parameters);\n }", "private function trovaRegione($provincia) {\r\n switch ($provincia) {\r\n case 'CHIETI':\r\n case 'PESCARA':\r\n case \"L'AQUILA\":\r\n case 'TERAMO':\r\n $regione = 'ABRUZZO';\r\n break;\r\n case 'MATERA':\r\n case 'POTENZA':\r\n $regione = 'BASILICATA';\r\n break;\r\n case 'CATANZARO':\r\n case 'COSENZA':\r\n case 'CROTONE':\r\n case 'REGGIO DI CALABRIA':\r\n case 'VIBO VALENTIA':\r\n $regione = 'CALABRIA';\r\n break;\r\n case 'AVELLINO':\r\n case 'BENEVENTO':\r\n case 'CASERTA':\r\n case 'NAPOLI':\r\n case 'SALERNO':\r\n $regione = 'CAMPANIA';\r\n break;\r\n case 'BOLOGNA':\r\n case 'FERRARA':\r\n case 'FORLI’-CESENA':\r\n case 'MODENA':\r\n case 'PARMA':\r\n case 'PIACENZA':\r\n case 'RAVENNA':\r\n case \"REGGIO NELL'EMILIA\":\r\n case 'RIMINI':\r\n $regione = 'EMILIA ROMAGNA';\r\n break;\r\n case 'GORIZIA':\r\n case 'PORDENONE':\r\n case 'TRIESTE':\r\n case 'UDINE':\r\n $regione = 'FRIULI VENEZIA GIULIA';\r\n break;\r\n case 'FROSINONE':\r\n case 'LATINA':\r\n case 'RIETI':\r\n case 'ROMA':\r\n case 'VITERBO':\r\n $regione = 'LAZIO';\r\n break;\r\n case 'GENOVA':\r\n case 'IMPERIA':\r\n case 'LA SPEZIA':\r\n case 'SAVONA':\r\n $regione = 'LIGURIA';\r\n break;\r\n case 'BERGAMO':\r\n case 'BRESCIA':\r\n case 'COMO':\r\n case 'CREMONA':\r\n case 'LECCO':\r\n case 'LODI':\r\n case 'MANTOVA':\r\n case 'MILANO':\r\n case 'MONZA E DELLA BRIANZA':\r\n case 'PAVIA':\r\n case 'SONDRIO':\r\n case 'VARESE':\r\n $regione = 'LOMBARDIA';\r\n break;\r\n case 'ANCONA':\r\n case 'ASCOLI PICENO':\r\n case 'FERMO':\r\n case 'MACERATA':\r\n case 'PESARO E URBINO':\r\n $regione = 'MARCHE';\r\n break;\r\n case 'CAMPOBASSO':\r\n case 'ISERNIA':\r\n $regione = 'MOLISE';\r\n break;\r\n case 'ALESSANDRIA':\r\n case 'ASTI':\r\n case 'BIELLA':\r\n case 'CUNEO':\r\n case 'NOVARA':\r\n case 'TORINO':\r\n case 'VERBANO-CUSIO-OSSOLA':\r\n case 'VERCELLI':\r\n $regione = 'PIEMONTE';\r\n break;\r\n case 'BARI':\r\n case 'BARLETTA-ANDRIA-TRANI':\r\n case 'BRINDISI':\r\n case 'FOGGIA':\r\n case 'LECCE':\r\n case 'TARANTO':\r\n $regione = 'PUGLIA';\r\n break;\r\n case 'CAGLIARI':\r\n case 'CARBONIA-IGLESIAS':\r\n case 'MEDIO CAMPIDANO':\r\n case 'NUORO':\r\n case 'OGLIASTRA':\r\n case 'OLBIA-TEMPIO':\r\n case 'ORISTANO':\r\n case 'SASSARI':\r\n $regione = 'SARDEGNA';\r\n break;\r\n case 'AGRIGENTO':\r\n case 'CALTANISSETTA':\r\n case 'CATANIA':\r\n case 'ENNA':\r\n case 'MESSINA':\r\n case 'PALERMO':\r\n case 'RAGUSA':\r\n case 'SIRACUSA':\r\n case 'TRAPANI':\r\n $regione = 'SICILIA';\r\n break;\r\n case 'AREZZO':\r\n case 'FIRENZE':\r\n case 'GROSSETO':\r\n case 'LIVORNO':\r\n case 'LUCCA':\r\n case 'MASSA-CARRARA':\r\n case 'PISA':\r\n case 'PISTOIA':\r\n case 'PRATO':\r\n case 'SIENA':\r\n $regione = 'TOSCANA';\r\n break;\r\n case 'BOLZANO':\r\n case 'TRENTO':\r\n $regione = 'TRENTINO ALTO ADIGE';\r\n break;\r\n case 'PERUGIA':\r\n case 'TERNI':\r\n $regione = 'UMBRIA';\r\n break;\r\n case 'AOSTA':\r\n $regione = \"VALLE D'AOSTA\";\r\n break;\r\n case 'BELLUNO':\r\n case 'PADOVA':\r\n case 'ROVIGO':\r\n case 'TREVISO':\r\n case 'VENEZIA':\r\n case 'VERONA':\r\n case 'VICENZA':\r\n $regione = 'VENETO';\r\n break;\r\n }\r\n return $regione;\r\n }", "function countryList() {\n $country_array = array(\"Afghanistan\", \"Aland Islands\", \"Albania\", \"Algeria\", \"American Samoa\", \"Andorra\", \"Angola\", \"Anguilla\", \"Antarctica\", \"Antigua\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\", \"Austria\", \"Azerbaijan\", \"Bahamas\", \"Bahrain\", \"Bangladesh\", \"Barbados\", \"Barbuda\", \"Belarus\", \"Belgium\", \"Belize\", \"Benin\", \"Bermuda\", \"Bhutan\", \"Bolivia\", \"Bosnia\", \"Botswana\", \"Bouvet Island\", \"Brazil\", \"British Indian Ocean Trty.\", \"Brunei Darussalam\", \"Bulgaria\", \"Burkina Faso\", \"Burundi\", \"Caicos Islands\", \"Cambodia\", \"Cameroon\", \"Canada\", \"Cape Verde\", \"Cayman Islands\", \"Central African Republic\", \"Chad\", \"Chile\", \"China\", \"Christmas Island\", \"Cocos (Keeling) Islands\", \"Colombia\", \"Comoros\", \"Congo\", \"Congo, Democratic Republic of the\", \"Cook Islands\", \"Costa Rica\", \"Cote d'Ivoire\", \"Croatia\", \"Cuba\", \"Cyprus\", \"Czech Republic\", \"Denmark\", \"Djibouti\", \"Dominica\", \"Dominican Republic\", \"Ecuador\", \"Egypt\", \"El Salvador\", \"Equatorial Guinea\", \"Eritrea\", \"Estonia\", \"Ethiopia\", \"Falkland Islands (Malvinas)\", \"Faroe Islands\", \"Fiji\", \"Finland\", \"France\", \"French Guiana\", \"French Polynesia\", \"French Southern Territories\", \"Futuna Islands\", \"Gabon\", \"Gambia\", \"Georgia\", \"Germany\", \"Ghana\", \"Gibraltar\", \"Greece\", \"Greenland\", \"Grenada\", \"Guadeloupe\", \"Guam\", \"Guatemala\", \"Guernsey\", \"Guinea\", \"Guinea-Bissau\", \"Guyana\", \"Haiti\", \"Heard\", \"Herzegovina\", \"Holy See\", \"Honduras\", \"Hong Kong\", \"Hungary\", \"Iceland\", \"India\", \"Indonesia\", \"Iran (Islamic Republic of)\", \"Iraq\", \"Ireland\", \"Isle of Man\", \"Israel\", \"Italy\", \"Jamaica\", \"Jan Mayen Islands\", \"Japan\", \"Jersey\", \"Jordan\", \"Kazakhstan\", \"Kenya\", \"Kiribati\", \"Korea\", \"Korea (Democratic)\", \"Kuwait\", \"Kyrgyzstan\", \"Lao\", \"Latvia\", \"Lebanon\", \"Lesotho\", \"Liberia\", \"Libyan Arab Jamahiriya\", \"Liechtenstein\", \"Lithuania\", \"Luxembourg\", \"Macao\", \"Macedonia\", \"Madagascar\", \"Malawi\", \"Malaysia\", \"Maldives\", \"Mali\", \"Malta\", \"Marshall Islands\", \"Martinique\", \"Mauritania\", \"Mauritius\", \"Mayotte\", \"McDonald Islands\", \"Mexico\", \"Micronesia\", \"Miquelon\", \"Moldova\", \"Monaco\", \"Mongolia\", \"Montenegro\", \"Montserrat\", \"Morocco\", \"Mozambique\", \"Myanmar\", \"Namibia\", \"Nauru\", \"Nepal\", \"Netherlands\", \"Netherlands Antilles\", \"Nevis\", \"New Caledonia\", \"New Zealand\", \"Nicaragua\", \"Niger\", \"Nigeria\", \"Niue\", \"Norfolk Island\", \"Northern Mariana Islands\", \"Norway\", \"Oman\", \"Pakistan\", \"Palau\", \"Palestinian Territory, Occupied\", \"Panama\", \"Papua New Guinea\", \"Paraguay\", \"Peru\", \"Philippines\", \"Pitcairn\", \"Poland\", \"Portugal\", \"Principe\", \"Puerto Rico\", \"Qatar\", \"Reunion\", \"Romania\", \"Russian Federation\", \"Rwanda\", \"Saint Barthelemy\", \"Saint Helena\", \"Saint Kitts\", \"Saint Lucia\", \"Saint Martin (French part)\", \"Saint Pierre\", \"Saint Vincent\", \"Samoa\", \"San Marino\", \"Sao Tome\", \"Saudi Arabia\", \"Senegal\", \"Serbia\", \"Seychelles\", \"Sierra Leone\", \"Singapore\", \"Slovakia\", \"Slovenia\", \"Solomon Islands\", \"Somalia\", \"South Africa\", \"South Georgia\", \"South Sandwich Islands\", \"Spain\", \"Sri Lanka\", \"Sudan\", \"Suriname\", \"Svalbard\", \"Swaziland\", \"Sweden\", \"Switzerland\", \"Syrian Arab Republic\", \"Taiwan\", \"Tajikistan\", \"Tanzania\", \"Thailand\", \"The Grenadines\", \"Timor-Leste\", \"Tobago\", \"Togo\", \"Tokelau\", \"Tonga\", \"Trinidad\", \"Tunisia\", \"Turkey\", \"Turkmenistan\", \"Turks Islands\", \"Tuvalu\", \"Uganda\", \"Ukraine\", \"United Arab Emirates\", \"United Kingdom\", \"United States\", \"Uruguay\", \"US Minor Outlying Islands\", \"Uzbekistan\", \"Vanuatu\", \"Vatican City State\", \"Venezuela\", \"Vietnam\", \"Virgin Islands (British)\", \"Virgin Islands (US)\", \"Wallis\", \"Western Sahara\", \"Yemen\", \"Zambia\", \"Zimbabwe\");\n foreach($country_array as $country) {\n echo \"\n <option>\n $country\n </option>\n\n \";\n }\n}", "public function executeCountryRegions(sfWebRequest $oRequest) {\n $oI18n = $this->getContext()->getI18N();\n\n /** @var myUser $oUser */\n $oUser = $this->getUser();\n\n $this->sCurrentSubject = $oI18n->__('subject.countryInformation');\n $this->aRegion = $oUser->getCountry()->getRegions($oUser->getCulture());\n $this->oCountry = $oUser->getCountry();\n\n $aBc = array();\n $aBc[MSHTools::getCountryRegionsUrl($this->oCountry)] = $oI18n->__('subject.regions');\n $this->getResponse()->setSlot('bc', $aBc);\n\n $oPageType = PageTypePeer::retrieveByPK(sfConfig::get('app_page_type_phase2_region_overview'));\n if(null!==$oPageType) {\n $aSeoReplacements = array();\n $aSeoReplacements['country'] = $this->oCountry->getTitle();\n $this->getResponse()->setSlot('seoReplacements', $aSeoReplacements);\n $this->getResponse()->setSlot('meta_title', $oPageType->getMetaTitle());\n $this->getResponse()->setSlot('meta_description', $oPageType->getMetaDescription());\n $this->getResponse()->setSlot('doubleclick', $oPageType->getDoubleclickAd());\n $this->getResponse()->setSlot('doubleclick_head', $oPageType->getDoubleclickHead());\n }\n }", "public function getState($countryId) {\n $data = [];\n $countries = $this->countryInformationAcquirer->getCountriesInfo();\n foreach ($countries as $country) {\n if ($country->getId() == $countryId) { \n $regions = [];\n if ($availableRegions = $country->getAvailableRegions()) {\n foreach ($availableRegions as $region) {\n $data[] = [\n 'code' => $region->getCode(),\n 'region_id' => $region->getId(),\n 'name' => $region->getName()\n ];\n }\n }\n }\n }\n\n return $data;\n }", "public function competition_country_get()\n\t{\n\n\t\tif($_SERVER['REQUEST_METHOD'] != \"GET\")\n\t\t{\n\t\t $this->response('Not Acceptable',406);\n\t\t}\n\t\t$comp_country_list_arr=array();\n\n\t\t$this->load->model('Table_model');\n\t\t$comp_country_list_arr=$this->Table_model->GetLeagueCountry();\n\t\tif(count($comp_country_list_arr)>0)\n\t\t{\n\t\t\t$this->response(array('status'=>'success','competition_country'=>$comp_country_list_arr), 200);\n\t\t}\n\t\telse\n\t\t\t$this->response(array('status'=>'failed','message'=>'No records in database'),200);\n\t\n\t\n\t}", "public function all(Country $country)\n {\n /*if (Auth::user()->can('divisions.viewAny')) {*/\n $countries = Country::all();\n $divisions = $country->division;\n /*foreach ($divisions as $division) {\n echo $division->name;\n }*/\n return view('admin.division.show', compact('countries', 'divisions'));\n /*}*/\n /*return redirect(route('admin.home'));*/\n }", "public function getCountriesInfo();", "public function index_get($regional = 0)\n {\n if(!empty($regional)){\n $total_data = $this->data_model->total_data_user3($regional);\n $this->response($total_data\n , REST_Controller::HTTP_OK);\n }else {\n $total_data = $this->data_model->listing();\n $this->response($total_data\n , REST_Controller::HTTP_OK);\n }\n }", "public function getCountry();", "public function getCountry();", "public function countryOptionList();", "public function requestCountry();", "public function addRegions()\n {\n if (isset($this->regions) && $this->regions) { \n for ($j=count($this->regions)-1; $j>=0; $j--) {\n //clear out previous loop's selection\n $color = array();\n $title = ($this->regions[$j]['title']) ? stripslashes($this->regions[$j]['title']) : \"\";\n if ($this->regions[$j]['color']) {\n $color = explode(\" \", $this->regions[$j]['color']);\n if (count($color) != 3) {\n $color = array();\n }\n }\n\n $data = trim($this->regions[$j]['data']);\n\n if ($data) {\n $this->_legend_required = true;\n $baselayer = true;\n //grab the textarea for regions & split\n $rows = explode(\"\\n\", self::removeEmptyLines($data));\n $qry = array();\n foreach ($rows as $row) {\n $regions = preg_split(\"/[,;]+/\", $row); //split by a comma, semicolon\n foreach ($regions as $region) {\n if ($region) {\n $pos = strpos($region, '[');\n if ($pos !== false) {\n $baselayer = false;\n $split = explode(\"[\", str_replace(\"]\", \"\", trim(strtoupper($region))));\n $states = preg_split(\"/[\\s|]+/\", $split[1]);\n $statekey = array();\n foreach ($states as $state) {\n $statekey[] = \"'[code_hasc]' ~* '\\.\".$state.\"$'\";\n }\n $qry['stateprovince'][] = \"'[adm0_a3]' = '\".trim($split[0]).\"' && (\".implode(\" || \", $statekey).\")\";\n $qry['country'][] = \"'[iso_a3]' = '\".trim($split[0]).\"'\";\n } else {\n $region = addslashes(trim($region));\n $qry['stateprovince'][] = \"'[name]' ~* '\".$region.\"$'\";\n $qry['country'][] = \"'[NAME]' ~* '\".$region.\"$' || '[NAME_LONG]' ~* '\".$region.\"$' || '[GEOUNIT]' ~* '\".$region.\"$' || '[FORMAL_EN]' ~* '\".$region.\"$'\";\n }\n }\n }\n }\n\n $layer = ms_newLayerObj($this->map_obj);\n $layer->set(\"name\", \"query_layer_\".$j);\n\n if ($baselayer) {\n $layer->set(\"data\", $this->shapes['countries']['shape']);\n $layer->set(\"type\", MS_LAYER_POLYGON);\n } else {\n $layer->set(\"data\", $this->shapes['stateprovinces_polygon']['shape']);\n $layer->set(\"type\", $this->shapes['stateprovinces_polygon']['type']);\n }\n\n $layer->set(\"template\", \"template.html\");\n $layer->setProjection(self::getProjection($this->default_projection));\n\n $query = ($baselayer) ? $qry['country'] : $qry['stateprovince'];\n\n $layer->setFilter(\"(\".implode(\" || \", $query).\")\");\n\n $class = ms_newClassObj($layer);\n $class->set(\"name\", $title);\n\n $style = ms_newStyleObj($class);\n if (!empty($color)) {\n $style->color->setRGB($color[0], $color[1], $color[2]);\n }\n $style->outlinecolor->setRGB(30, 30, 30);\n $style->set(\"opacity\", 75);\n $style->set(\"width\", $this->_determineWidth());\n $layer->set(\"status\", MS_ON);\n }\n\n }\n }\n }", "function getTheRegionIDs(){\n\t\treturn isEmptyString($this->getRegionIDs()) ? array() : explode(\",\", trim($this->getRegionIDs())); \n\t}", "function getRegionJson2() {\n\t\t\tif (!$this->_regionJson2) {\n\t\t\t\t$cacheKey = 'CORE_DIRECTORY_REGIONS_JSON2_STORE' . Mage::app( )->getStore( )->getId( );\n\n\t\t\t\tif (Mage::app( )->useCache( 'config' )) {\n\t\t\t\t\t$json = Mage::app( )->loadCache( $cacheKey );\n\t\t\t\t}\n\n\n\t\t\t\tif (empty( $$json )) {\n\t\t\t\t\t$countryIds = array( );\n\t\t\t\t\tforeach ($this->getCountryCollection( ) as $country) {\n\t\t\t\t\t\t$countryIds[] = $country->getCountryId( );\n\t\t\t\t\t}\n\n\t\t\t\t\t$collection = Mage::getModel( 'directory/region' )->getResourceCollection( )->addCountryFilter( $countryIds )->load( );\n\t\t\t\t\t$regions = array( 'config' => array( 'show_all_regions' => true, 'regions_required' => Mage::helper( 'core' )->jsonEncode( array( ) ) ) );\n\t\t\t\t\tforeach ($collection as $region) {\n\n\t\t\t\t\t\tif (!$region->getRegionId( )) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$regions[$region->getCountryId( )][$region->getRegionId( )] = array( 'code' => $region->getCode( ), 'name' => $this->__( $region->getName( ) ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t$json = Mage::helper( 'core' )->jsonEncode( $regions );\n\n\t\t\t\t\tif (Mage::app( )->useCache( 'config' )) {\n\t\t\t\t\t\tMage::app( )->saveCache( $json, $cacheKey, array( 'config' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->_regionJson2 = $json;\n\t\t\t}\n\n\t\t\treturn $this->_regionJson2;\n\t\t}", "public function country_id($country)\n {\n $result = common_select_values('id', 'ad_countries', ' name = \"'.$country.'\"', 'row');\n return $result; \n }", "public static function getIdByIso($iso_code, $id_country = null)\n {\n }", "public function getDataOperators($countries, $radTechs)\n {\n $iterator = 0;\n $records = array();\n // Getting list of all existing radio technology types from AggregatedDataOperators table\n $aData = $this->database->table('AggregatedDataOperators');\n $radioTechList = $aData->select('DISTINCT radioTechnology')\n ->order('radioTechnology ASC')\n ->fetchPairs('radioTechnology', 'radioTechnology');\n\n // Getting list of all existing iso country codes from AggregatedDataOperators table\n $aData = $this->database->table('AggregatedDataOperators');\n $countryList = $aData->select('DISTINCT isoCountryCode')\n ->order('isoCountryCode ASC')\n ->fetchPairs('isoCountryCode', 'isoCountryCode');\n\n // main iteration to get data from aggreagationdata table in database\n foreach ($radTechs as $radTech) {\n // SQL ignore case but I am comparing arrays in PHP so need to check if this technology exist and ignoring case\n if (!$this->in_array_insensitive($radTech, $radioTechList)) {\n continue;\n } \n foreach ($countries as $country) {\n // Check if input country exist in AggregationDataOperators table\n if (!$this->in_array_insensitive($country, $countryList)) {\n continue;\n } \n $aData = $this->database->table('AggregatedDataOperators');\n $operatorList = $aData->select('DISTINCT operator')\n ->where('isoCountryCode = ?', $country)\n ->order('operator ASC')\n ->fetchPairs('operator', 'operator');\n foreach ($operatorList as $operator) {\n\n // loading data from database for specific country and radio technology\n $aData = $this->database->table('AggregatedDataOperators');\n $selection = $aData->select('avgDownloadSpeed, avgLatency, avgQoe, medDownloadSpeed, medLatency, medQoe')\n ->where('isoCountryCode = ? AND radioTechnology = ? AND operator = ?', $country, $radTech, $operator);\n\t\t\t\t\t/* parsing from single line selection, loop runs only once but did not get how \n\t\t\t to read from this special variable representing output of mysql selection */\n foreach ($selection as $one) {\n $avgSpeed = $one->avgDownloadSpeed;\n $avgLatency = $one->avgLatency;\n $avgQoe = $one->avgQoe;\n $medSpeed = $one->medDownloadSpeed;\n $medLatency = $one->medLatency;\n $medQoe = $one->medQoe;\n }\n\n // saving loaded data from database as record for better JSON formating\n $record = new \\stdClass();\n $record->country = $country;\n $record->radTech = $radTech;\n $record->operator = $operator;\n $record->avgDownloadSpeed = $avgSpeed;\n $record->avgLatency = $avgLatency;\n $record->avgQoe = $avgQoe;\n $record->medDownloadSpeed = $medSpeed;\n $record->medLatency = $medLatency;\n $record->medQoe = $medQoe;\n\n // saving array of records with data to be encoded into JSON format\n $records[$iterator] = $record;;\n $iterator = $iterator + 1;\n }\n }\n }\n\n return $records;\n\t}", "function olc_prepare_country_zones_pull_down($country_id = '') {\n\t$pre = EMPTY_STRING;\n\tif ( (!olc_browser_detect('MSIE')) && (olc_browser_detect('Mozilla/4')) ) {\n\t\tfor ($i=0; $i<45; $i++) $pre .= HTML_NBSP;\n\t}\n\n\t$zones = olc_get_country_zones($country_id);\n\n\tif (sizeof($zones) > 0) {\n\t\t$zones_select = array(array('id' => EMPTY_STRING, 'text' => PLEASE_SELECT));\n\t\t$zones = olc_array_merge($zones_select, $zones);\n\t} else {\n\t\t$zones = array(array('id' => EMPTY_STRING, 'text' => TYPE_BELOW));\n\t\t// create dummy options for Netscape to preset the height of the drop-down\n\t\tif ( (!olc_browser_detect('MSIE')) && (olc_browser_detect('Mozilla/4')) ) {\n\t\t\tfor ($i=0; $i<9; $i++) {\n\t\t\t\t$zones[] = array('id' => EMPTY_STRING, 'text' => $pre);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $zones;\n}", "function tep_cfg_pull_down_country_list($country_id) {\n return tep_draw_pull_down_menu('configuration_value', tep_get_countries(), $country_id);\n}", "function getCustomerData()\n {\n if(isset($_SESSION['user_login']) && $_SESSION['user_login']['roll_id']==6)\n {\n /* @changes: all customer display if all_region=1\n * @author: Sagar Jogi dt: 09/08/2017\n */\n $check=DB::query(\"SELECT all_region FROM \" . CFG::$tblPrefix . \"user WHERE id=%d\",$_SESSION['user_login']['id']);\n if($check[0]['all_region']=='1') {\n return DB::query(\"SELECT id,name FROM \" . CFG::$tblPrefix . \"user where roll_id='7' and active='1' order by id desc\");\n } else {\n $customer_array=array();\n //$query=\"SELECT GROUP_CONCAT(DISTINCT(ID)) as id FROM \" . CFG::$tblPrefix . \"region WHERE find_in_set('\".$_SESSION['user_login']['id'].\"',engineer) <> 0\";\n $query=\"SELECT region as id FROM \" . CFG::$tblPrefix . \"user WHERE id=\".$_SESSION['user_login']['id'];\n \n $result=DB::query($query);\n \n if(count($result) > 0)\n {\n foreach($result as $key=>$value)\n {\n $region=explode(\",\",$value[\"id\"]);\n for($i=0;$i<count($region);$i++)\n {\n $customer_query=\"SELECT u.id, u.name\n FROM \" . CFG::$tblPrefix . \"user AS u\n WHERE active='1' and FIND_IN_SET( u.id, (\n\n SELECT GROUP_CONCAT( DISTINCT (\n ID\n ) ) AS id\n FROM \" . CFG::$tblPrefix . \"user\n WHERE find_in_set( '\".$region[$i].\"', region ) <>0 )\n ) and roll_id=7 \";\n \n $customer_result=DB::query($customer_query);\n if(count($customer_result) > 0)\n {\n foreach($customer_result as $ckey=>$cvalue)\n {\n \n array_push($customer_array,$cvalue);\n }\n } \n }\n }\n $customer_unique_array = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $customer_array)));\n \n return $customer_unique_array;\n }\n }\n \n }\n else \n return DB::query(\"SELECT id,name FROM \" . CFG::$tblPrefix . \"user where roll_id='7' and active='1' order by id desc\");\n }" ]
[ "0.591614", "0.588374", "0.572429", "0.5716984", "0.56642544", "0.56364155", "0.5634883", "0.5538464", "0.5441478", "0.54394996", "0.54124194", "0.53636754", "0.5238547", "0.5189449", "0.5092153", "0.5081505", "0.5063675", "0.5063472", "0.5034281", "0.50044245", "0.498959", "0.4983426", "0.49699736", "0.496205", "0.4915985", "0.49080282", "0.4904461", "0.48904976", "0.48765594", "0.4872025", "0.4864003", "0.4855357", "0.48130774", "0.47998303", "0.47990742", "0.47986704", "0.47972256", "0.47963506", "0.4792821", "0.478379", "0.47784066", "0.476394", "0.47626996", "0.47387704", "0.47332808", "0.47282785", "0.47252378", "0.47141498", "0.47095582", "0.46927422", "0.4690318", "0.46441877", "0.4639072", "0.46306768", "0.46247151", "0.46235916", "0.46206924", "0.46186575", "0.46022835", "0.46008122", "0.45978668", "0.45896953", "0.4573403", "0.4566981", "0.4566", "0.45569286", "0.45551896", "0.4553303", "0.4541038", "0.45380008", "0.4533397", "0.45245236", "0.45176777", "0.4515782", "0.45107228", "0.4499336", "0.4496618", "0.4492075", "0.44842508", "0.4482692", "0.44795057", "0.44691235", "0.4468315", "0.44654235", "0.4460186", "0.44590375", "0.4450342", "0.44493476", "0.44493476", "0.44483146", "0.44432405", "0.4441972", "0.44386095", "0.44377056", "0.44331306", "0.44250622", "0.4416955", "0.44143724", "0.4411801", "0.44092014" ]
0.6667048
0
returned on insert and edit
public function _callback_field_citizen($value, $primary_key){ $module_path = $this->cms_module_path(); $this->config->load('grocery_crud'); $date_format = $this->config->item('grocery_crud_date_format'); if(!isset($primary_key)) $primary_key = -1; $query = $this->db->select('DetailCutiId,CutiId,TglCuti,IsAllocate,Keterangan') ->from($this->cms_complete_table_name('formcutidetail')) ->where('CutiId', $primary_key) ->get(); $result = $query->result_array(); // add "hobby" to $result // get options $options = array(); $options['CutiId'] = array(); // get options $options = array(); $options['IsAllocate'] = array(); $query = $this->db->select('IsAllocate,active_name') ->from($this->cms_complete_table_name('active')) ->get(); foreach($query->result() as $row){ $options['IsAllocate'][] = array('value' => $row->IsAllocate, 'caption' => $row->active_name); } $data = array( 'result' => $result, 'options' => $options, 'date_format' => $date_format, ); return $this->load->view($this->cms_module_path().'/field_cuti_detail',$data, TRUE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "function dbInsert($edit)\r\n\t{\r\n\r\n\t}", "public function getEdit()\n\t{\n\t}", "public function save(){\r\n\t\tif ($this->new){\r\n\t\t\treturn $this->insert();\r\n\t\t} else {\r\n\t\t\treturn $this->update();\r\n\t\t}\r\n\t}", "public function save(){\n\t\treturn isset($this->id)?$this->update():$this->create();\t\n\t}", "public function save(){\r\n\t \t\treturn isset($this->id) ? $this->update() : $this->create();\r\n\t\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function save(){\n return isset($this->id) ? $this->update() : $this->create();\n \n }", "protected function saveInsert()\n {\n }", "public function save(){\r\n return isset($this->id) ? $this->update() : $this->create();\r\n }", "protected function beforeSaveInDB(){}", "abstract protected function renderEdit();", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function edit()\r\n {\r\n return null;\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function save() \n\t{\n\t\tif (isset($this->id)) {\t\n\t\t\n\t\t\t// Return update when id exists\n\t\t\treturn $this->update();\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\t// Return insert when id does not exists\n\t\t\treturn $this->insert();\n\t\t}\n\t}", "public function edit()\n {\n \n }", "public function edit()\n { \n }", "public function save(){\n // if(isset($this->id)){$this->update();} else {$this->create();}\n return isset($this->id)? $this->update(): $this->create() ;\n\n }", "function OnBeforeEdit(){\n }", "public function save(){\n\t\t$res = true;\n\t\t$changedData = $this->changedData();\n\t\tif(count($changedData)){\n\t\t\tif(!empty($this->orig)){\n\t\t\t\t$res = (dbHelper::updateQry($this->tableName,$changedData,array($this->primaryKey=>$this->data[$this->primaryKey]))?true:false);\n\t\t\t\t$this->orig = $this->data;\n\t\t\t} else {\n\t\t\t\t//if this row has been deleted but someone else saves data to it this will automatically restore the row from $data\n\t\t\t\t$res = (dbHelper::insertQry($this->tableName,$this->data)?true:false);\n\t\t\t\t$this->data[$this->primaryKey] = db::insertID();\n\t\t\t\tdbData::addRow($this->tableName,$this->primaryKey,$this->data);\n\t\t\t\t$this->orig =& dbData::rowRefrence($this->tableName,$this->primaryKey,$this->data[$this->primaryKey]);\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "public function edit()\n {\n //\n }", "function OnAfterEdit(){\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function afterSave(){\n\t\t$Log = Logger::getLogger(\"accessLog\");\n\n\t\tif($this->oldAttributes==NULL)\n \t\t$action=\"create\";\n \telse \t\n \t\t$action=\"update\";\n \t\n\t\t$uid=Yii::app()->user->getState(\"uid\");\n\t \t$Log->info($uid.\"\\t\".Yii::app()->user->name.\"\\t\".$this->getModelName().\"\\t\".$action.\"\\t\".$this->orgId);\t\n\t \n\t \tif($this->orgName != $this->oldAttributes['orgName'])\n\t \t\t{$Log->info(\"orgName \".$this->oldAttributes['orgName'].\" \".$this->orgName);}\n\t \tif($this->noEmp != $this->oldAttributes['noEmp'])\n\t \t\t{$Log->info(\"noEmp \".$this->oldAttributes['noEmp'].\" \".$this->noEmp);}\n\t\tif($this->phone != $this->oldAttributes['phone'])\n\t \t\t{$Log->info(\"phone \".$this->oldAttributes['phone'].\" \".$this->phone);}\n\t\tif($this->email != $this->oldAttributes['email'])\n\t \t\t{$Log->info(\"email \".$this->oldAttributes['email'].\" \".$this->email);}\n\t\tif($this->addr1 != $this->oldAttributes['addr1'])\n\t \t\t{$Log->info(\"addr1 \".$this->oldAttributes['addr1'].\" \".$this->addr1);}\n\t\tif($this->addr2 != $this->oldAttributes['addr2'])\n\t \t\t{$Log->info(\"addr2 \".$this->oldAttributes['addr2'].\" \".$this->addr2);}\n\t\tif($this->state != $this->oldAttributes['state'])\n\t \t\t{$Log->info(\"state \".$this->oldAttributes['state'].\" \".$this->state);}\n\t\tif($this->country != $this->oldAttributes['country'])\n\t \t\t{$Log->info(\"country \".$this->oldAttributes['country'].\" \".$this->country);}\n\t\tif($this->orgType != $this->oldAttributes['orgType'])\n\t \t\t{$Log->info(\"orgType \".$this->oldAttributes['orgType'].\" \".$this->orgType);}\n\t\tif($this->description != $this->oldAttributes['description'])\n\t \t\t{$Log->info(\"description \".$this->oldAttributes['description'].\" \".$this->description);}\n\t\tif($this->fax != $this->oldAttributes['fax'])\n\t \t\t{$Log->info(\"fax \".$this->oldAttributes['fax'].\" \".$this->fax);}\n\t\tif($this->validity != $this->oldAttributes['validity'])\n\t \t\t{$Log->info(\"validity \".$this->oldAttributes['validity'].\" \".$this->validity);}\t\t\t\t\t\t\t\t\n\treturn parent::afterSave();\t\n\t}", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function crudUpdated()\n {\n }", "public function save()\n {\n return $this->edit($this->id, $this->data);\n }", "public function onBeforeSave();", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "protected function _postInsert()\n\t{\n\t}", "protected function hook_beforeSave(){}", "public function edit()\n {\n\t$this->log(\"edit function\");\n\n \t// Check whether client is logged in\n // $logged_in = false;\n // if ($this->isLoggedIn()) {\n // $logged_in = true;\n // }\n\n // Get custom fields from Client controller => save\n \t$client_custom_fields = $this->Clients->getCustomFieldValues(1);\n return $this->set('client_custom_fields', $client_custom_fields);\n }", "public function editAction() {}", "public function _addOrEdit() {\n\t\tif($this->getRequest()->getParam('id')) { return true; } else { return false; }\n\t}", "protected function _insert()\n\t{\n\t}", "public function save()\n { \n return $this->checkForRows() ? $this->updateRow() : $this->insertRow();\n }", "public function edit() {\n\n }", "public function save()\n\t{\n\t\tif( $this->isExist )\n\t\t{\n\t\t\treturn $this->update();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->insert();\n\t\t}\n\t}", "function save() {\n $modified_fields = $this->modified_fields;\n $is_new = $this->isNew();\n\n if($is_new && ($this->getToken() == '')) {\n $this->resetToken();\n } // if\n\n $save = parent::save();\n if($save && !is_error($save)) {\n if($is_new || in_array('email', $modified_fields) || in_array('first_name', $modified_fields) || in_array('last_name', $modified_fields)) {\n $content = $this->getEmail();\n if($this->getFirstName() || $this->getLastName()) {\n $content .= \"\\n\\n\" . trim($this->getFirstName() . ' ' . $this->getLastName());\n } // if\n\n search_index_set($this->getId(), 'User', $content);\n cache_remove_by_pattern('object_assignments_*_rendered');\n } // if\n\n // Role changed?\n if(in_array('role_id', $modified_fields)) {\n clean_user_permissions_cache($this);\n } // if\n } // if\n\n return $save;\n }", "protected function afterInserting()\n {\n }", "public function beforeSave() {\n if ($this->isNewRecord && $this->document_id == null){\n $this->document_id = $this->getParent()->document_id;\n }\n\n $this->edited = date('Y-m-d H:i:s');\n\n //todo\n //$this->edited_by = current user\n\n return parent::beforeSave();\n }", "public function edit()\n {\n \n \n }", "function pre_editview(){\n\t\tif (empty($this->bean->id) && !empty($_REQUEST['return_module']) &&$_REQUEST['return_module'] == 'Prospects' ) {\n\t\t\t\n\t\t\t$prospect = BeanFactory::getBean('Prospects', $_REQUEST['return_id']);\n\t\t\tforeach($prospect->field_defs as $key=>$value)\n\t\t\t{\n\t\t\t\tif ($key == 'id' or $key=='deleted' )continue;\n\t\t\t\tif (isset($this->bean->field_defs[$key])) {\n\t\t\t\t\t$this->bean->$key = $prospect->$key;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$_POST['is_converted']=true;\n\t\t}\n\t\treturn true;\n\t}", "public function edit() {\n }", "public function insert(){\n\n }", "public function showEdit()\n {\n\n }", "public function getInsert(): string;", "public function postSave() {}", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit()\n { }", "public function save() {\n return $this->{static::$primaryKey} === null? $this->create() : $this->update();\n }", "public function beforeSave(){\n //$this->updated = date('Y-m-d H:i:s');\n return parent::beforeSave();\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function save(){\n\t\tglobal $wpdb;\n\t\t$wpdb->insert( $wpdb->prefix . 'cf_form_entry_values', $this->to_array() );\n\t\treturn (int) $wpdb->insert_id;\n\n\t}", "protected function afterInsert()\n {\n }", "protected function saveUpdate()\n {\n }", "public function beforeSave() {\n\t\t\t\t\t\t\tif ($this->isNewRecord) {\n\t\t\t\t\t\t\t\t\t\t$this->usuario=Yii::app()->user->name;\n\t\t\t\t\t\t\t\t\t\t$this->creadoel=date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t\t\t $this->iduser=Yii::app()->user->id;\n\t\t\t\t\t\t\t\t\t\t$this->mes=substr($this->fechacontable,5,2);\n\t\t\t\t\t\t\t\t\t\t$this->ano=substr($this->fechacontable,0,4);\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn parent::beforeSave();\n\t\t\t\t}", "protected function _postSave()\r\n\t{\r\n\t}", "public function onAfterSave();", "public function annimalEditAction()\n {\n }", "public function save()\n\t{\n\n\t\treturn parent::save();\n\t}", "protected function hook_afterSave(){}", "public function save(){\r\n\t\tif(empty($this->idPrestamoEjemplar)){\t\t\t\r\n\t\t\t$this->idPrestamoEjemplar = $this->con->autoInsert(array(\r\n\t\t\t\"Prestamo_idPrestamo\" => $this->prestamoIdPrestamo,\r\n\t\t\t\"Ejemplar_idEjemplar\" => $this->ejemplarIdEjemplar,\r\n\t\t\t),\"prestamo_has_ejemplar\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\treturn $this->con->autoUpdate(array(\r\n\t\t\t\"Prestamo_idPrestamo\" => $this->prestamoIdPrestamo,\r\n\t\t\t\"Ejemplar_idEjemplar\" => $this->ejemplarIdEjemplar,\r\n\t\t\t),\"prestamo_has_ejemplar\",\"idPrestamo_Ejemplar=\".$this->getId());\r\n\t}", "protected function afterInsertAccepting()\n {\n }", "protected function beforeInserting()\n {\n }", "public function save() {\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}", "public function save() {\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}", "public function save() {\r\n\t return isset($this->userid) ? $this->update() : $this->create();\r\n\t}", "public function save() {\r\n\t return isset($this->clientid) ? $this->update() : $this->create();\r\n\t}", "public function save() {\r\n\t return isset($this->clientid) ? $this->update() : $this->create();\r\n\t}", "public function editAction()\r\n {\r\n }", "public function save() {\n return isset($this->id) ? $this->update() : $this->create();\n }", "public function save() {\n if ($this->id) {\n return $this->update();\n } else {\n return $this->insert();\n }\n }", "public function insert()\n {\n # code...\n }", "public function save(): bool\n {\n $status = false;\n if ($this->new === false) {\n if ($this->deletionFlag === true) {\n $status = $this->delete();\n } elseif (\\count($this->modified) > 0) {\n $updateQuery = new Update($this->getDatabaseName());\n $updateQuery->update($this->getTableName());\n\n $where = array();\n foreach ($this->getPrimary() as $primary) {\n $field = $this->{'field' . \\ucfirst($primary)};\n $realName = (string) \\constant(static::class . '::FIELD_' . \\strtoupper(Helper::codifyName($primary)));\n $where[$realName] = ':primary' . \\ucfirst($primary);\n $updateQuery->bind('primary' . \\ucfirst($primary), $field['value']);\n }\n $updateQuery->where($where);\n\n $set = array();\n foreach ($this->modified as $key => $value) {\n if ($value === true) {\n $field = $this->{'field' . \\ucfirst($key)};\n $realName = (string) \\constant(static::class . '::FIELD_' . \\strtoupper(Helper::codifyName($key)));\n $set[$realName] = ':field' . \\ucfirst($key);\n $updateQuery->bind(':field' . \\ucfirst($key), $field['value']);\n }\n }\n $updateQuery->set($set);\n\n $this->modified = array();\n\n $status = $updateQuery->execute();\n }\n } else {\n if ($this->deletionFlag === false) {\n $insertQuery = new Insert($this->getDatabaseName());\n $insertQuery->into($this->getTableName());\n\n $returning = array();\n foreach ($this->getPrimary() as $primary) {\n $field = $this->{'field' . \\ucfirst($primary)};\n $realName = \\constant(static::class . '::FIELD_' . \\strtoupper(Helper::codifyName($primary)));\n $returning[] = $realName;\n }\n $insertQuery->returning($returning);\n\n $values = array();\n foreach ($this->getAllFieldsAliases() as $name) {\n $field = $this->{'field' . \\ucfirst($name)};\n if (isset($field['value']) === true) {\n $realName = \\constant(static::class . '::FIELD_' . \\strtoupper(Helper::codifyName($name)));\n $values[$realName] = ':field' . \\ucfirst($name);\n $insertQuery->bind('field' . \\ucfirst($name), $field['value']);\n }\n }\n $insertQuery->values($values);\n\n $status = $insertQuery->execute();\n\n if ($status === true) {\n $this->modified = array();\n $statement = $insertQuery->getStatement();\n if (!$statement) {\n throw new AppException('Database/Postgres/Model.save: insert query statement is null');\n }\n $rows = $statement->fetch(\\PDO::FETCH_ASSOC);\n $imax = \\count($rows);\n for ($i = 0; $i < $imax; $i++) {\n $field = &$this->{'field' . \\ucfirst($this->getPrimary()[$i])};\n $realName = \\constant(static::class . '::FIELD_' . \\strtoupper(Helper::codifyName($this->getPrimary()[$i])));\n $realName = \\substr($realName, \\stripos($realName, '.') + 1);\n $field['value'] = $rows[$realName];\n }\n $this->new = false;\n }\n }\n }\n\n return $status;\n }" ]
[ "0.70557076", "0.6800617", "0.6754231", "0.6729945", "0.6541951", "0.6531574", "0.6528749", "0.6527722", "0.650526", "0.6487748", "0.64423954", "0.6418852", "0.6390175", "0.6373371", "0.63712245", "0.6342614", "0.632036", "0.632036", "0.6308311", "0.6307087", "0.6288791", "0.6271313", "0.6270689", "0.62609094", "0.6260625", "0.62451893", "0.620301", "0.620301", "0.620301", "0.61983347", "0.61957437", "0.61957437", "0.6195233", "0.6194509", "0.6178672", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.617487", "0.61703676", "0.6167652", "0.6167652", "0.6167652", "0.6167652", "0.61608267", "0.61608267", "0.61608267", "0.61584413", "0.61436206", "0.61356217", "0.6130278", "0.6117037", "0.61067826", "0.61001647", "0.6099037", "0.6077457", "0.6076717", "0.6074668", "0.60721004", "0.607054", "0.6065673", "0.6064827", "0.60563445", "0.60524917", "0.6050476", "0.60489756", "0.6046729", "0.6036953", "0.60356385", "0.6034967", "0.6029387", "0.60239834", "0.60192454", "0.6015706", "0.60101146", "0.6007626", "0.6006143", "0.6003358", "0.5993182", "0.59905934", "0.59855866", "0.59785587", "0.5978245", "0.59756196", "0.59756196", "0.59739375", "0.59562296", "0.59562296", "0.5943156", "0.594187", "0.5931721", "0.592671", "0.5921685" ]
0.0
-1
change dPeriodEndDate format to dMY
public function _Date1_call($value, $row) { //return $value." - scale: <b>".$row->date."</b>"; $Date1 = date('d-M-Y', strtotime($row->TglActive1)); return $Date1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormattedEndDate() {\n\t\t$format_1 = 'Y-m-d';\n\t\t$format_2 = 'Y-m-d H:i';//format coming from web page\n\t\t$format_3 = 'Y-m-d H:i:s';//format coming from mysql\n\t\t$date = null;\n\t\t$formatted_date = \"\";\n\t\t\n\t\tif (!isset($this -> end_time) ) \n\t\t\treturn \"\";\n\t\t$date = DateTime::createFromFormat($format_2, $this -> end_time);\n\t\tif ( $date == false )\n\t\t\t$date = DateTime::createFromFormat($format_3, $this -> end_time);\n\t\t// var_dump($date);\n\t\treturn $date == false ? \"\" : $date->format($format_1) ;\n\t\t\n\t}", "private function formatEndDate($enddate) {\n\t\treturn $enddate . ' 23:59:59';\n\t}", "function updateSubscriptionEndDate($subscription_start_date, $timePeriodForService) {\n $subscriptionEndDate = '';\n if ($timePeriodForService == \"1 Month\") {\n $timePeriod = \"1 month\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"3 months\" || $timePeriodForService == \"3 Months\"){ // Added as per discussion with Faizan CCP-5379\n $timePeriod = \"3 months\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"1 Year\" || ($timePeriodForService == '' || $timePeriodForService == null)) {\n $timePeriod = \"365 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"2 Years\") {\n $timePeriod = \"730 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"3 Years\") {\n $timePeriod = \"1095 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n }\n\n return $subscriptionEndDate;\n }", "public static function formatDateYmd2Dmy($date){\n\t\t$newdate = new DateTime($date);\n\t\treturn $newdate->format('d/m/Y');\n\t}", "private function format()\n {\n return config('app.locale') != 'en' ? 'd/m/Y' : 'm/d/Y';\n }", "public function dateTimeFormat();", "private function _radius_format_date($d){\n $arr_date = explode('/',$d);\n $month = intval($arr_date[0]);\n $m_arr = array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');\n $day = intval($arr_date[1]);\n $year = intval($arr_date[2]);\n return \"$day \".$m_arr[($month-1)].\" $year\";\n }", "function dateFormat($D) {\n $D = date('d-m-Y', strtotime($D));\n return $D;\n }", "function convert_period_string($period) {\n\tswitch($period)\n\t{\n\t\tcase \"1\":\n\t\t\t$period = '1st';\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\t$period = '2nd';\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\t$period = '3rd';\n\t\t\tbreak;\n\t\tcase \"OT\":\n\t\t\t$period = 'Overtime';\n\t\t\tbreak;\n\t\tcase \"complete\":\n\t\t\t$period = 'Final';\n\t\t\tbreak;\n\t}\n\treturn $period;\n}", "function formatFechaBD($value){\n\t$partes = explode(\"-\", $value);\n\t$value = $partes[2].\"-\".$partes[1].\"-\".$partes[0];\n\treturn $value;\n}", "public function periodo() {\n $carbon = new Carbon($this->created_at);\n\n $string = $carbon->toFormattedDateString() . \" - \";\n if($this->created_at != $this->updated_at) {\n $carbon = new Carbon($this->updated_at);\n $string .= $carbon->toFormattedDateString();\n } else {\n $string .= \"Actual\";\n }\n return $string;\n }", "public function getDateFormatted()\n\t{\n\t\t$dateKey = self::arrayKeyExistsNc('date', $this->dimensions);\n\t\t$date = $this->dimensions[$dateKey];\n\n\t\tif ($date == '00000000') {\n\t\t\t$date = '19000101';\n\t\t}\n\n\t\t$hour = '00';\n\t\tif ($hourKey = self::arrayKeyExistsNc('hour', $this->dimensions)) {\n\t\t\t$hour = $this->dimensions[$hourKey];\n\t\t}\n\t\t$result = substr($date, 0, 4) . '-' . substr($date, 4, 2) . '-' . substr($date, 6, 2) . ' ' . $hour . ':00:00';\n\n\t\treturn $result;\n\t}", "public function getEndDateAttribute($value)\n {\n return Carbon::parse($value)->format('m/d/Y');\n }", "function dateExcelFormat ( $w ) {\n\t$w=explode(\"-\",$w);\n\t$y= $w[0];\n\t$m= $w[1];\n\t$d= $w[2];\n\treturn \"$m/$d/$y\";\n}", "public function getDMY($leadingZeros = false)\r\n\t{\r\n\t\tif ($leadingZeros)\r\n\t\t{\r\n\t\t\treturn $this->format('d/m/Y');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->format('j/n/Y');\r\n\t\t}\r\n\t}", "static function mysqlToFullDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.Y'), $date);\r\n\t}", "public function formatDate($var, DataContainer $dc)\r\n {\r\n\r\n $datum = date(\"Y-m-d\", $var);\r\n return $datum;\r\n }", "public function getHTMLDatePickerFormatValue(): string\n {\n return Carbon::parse($this->value)->format('Y-m-d');\n }", "private function changeDateFormat($val,$format){\n \n if($val != \"\" && count($this->dbConfigs) > 0){\n switch ($this->dbConfigs['driver']){\n case \"mysql\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\", strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\", strtotime($val));\n }\n break;\n case \"sqlsrv\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\",strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\",strtotime($val));\n }\n break;\n }\n return $val;\n }\n }", "public function set_end_date()\n {\n if ($this->end_date === NULL && $this->start_date === NULL) {\n $this->formated_end_date = \"the game has not started yet\";\n } elseif($this->end_date === NULL && $this->start_date !== NULL) {\n $this->formated_end_date = \"the game is not finished yet\";\n } else {\n $end_date = Carbon::createFromTimestamp($this->end_date / 1000);\n $this->formated_end_date = $end_date->toDayDateTimeString();\n }\n return $this->formated_end_date; \n }", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "function carton_date_format() {\n\treturn apply_filters( 'carton_date_format', get_option( 'date_format' ) );\n}", "public function getFormattedEndAt(): string\n {\n\n return $this->endAt->format('d-m-Y');\n\n }", "public function getDateFormat()\n {\n return 'Y-m-d H:i:s.u0';\n }", "private function getParamPeriodEnd()\n {\n $periodEnd = JFactory::getApplication()->input->get('periodEnd', '', 'string');\n return $periodEnd === '' ? null : new DateTime( $periodEnd );\n }", "public function toFormattedDateString()\n {\n return $this->toLocalizedString('MMM d, yyyy');\n }", "function shwThaiDate($dte) { //where $dte is a Date format\r\n\t\treturn date(\"d-m-Y\",strtotime($dte));//formulate date format for displaying\r\n\t}", "function NiceFromToDate() {\r\n\t\tif (!$this->ToDate && $this->FromDate) return '';\r\n\t\t\r\n\t\t$from_date = new Date();\r\n\t\t$to_date = new Date();\r\n\t\t$from_date->setValue($this->FromDate);\r\n\t\t$to_date->setValue($this->ToDate);\r\n\t\t\t\t\r\n\t\tif (!$this->ToDate && $this->FromDate) return $from_date->FormatI18N('%e. %B %Y');\r\n\r\n\t\t$from_month = $from_date->FormatI18N('%B');\r\n\t\t$to_month = $to_date->FormatI18N('%B');\r\n\t\t\r\n\t\t$from_year = $from_date->Format('Y');\r\n\t\t$to_year = $from_date->Format('Y');\r\n\t\t\r\n\t\tif($from_month == $to_month) {\r\n\t\t\t$long_from_to_date = $from_date->Format('j. - ').$to_date->Format('j. ').$to_month.' '.$to_year;\r\n\t\t}\r\n\t\telseif($from_year == $to_year) {\r\n\t\t\t$long_from_to_date = $from_date->Format('j. ').$from_month.' - '.$to_date->Format('j. ').$to_month.' '.$to_year;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$long_from_to_date = $from_date->FormatI18N('%e. %B %Y') . ' - ' . $to_date->FormatI18N('%e. %B %Y');\r\n\t\t}\r\n\t\treturn $long_from_to_date;\r\n\t\t//$this->FromDate->setConfig('dateformat','dd/MM/y');//.FormatI18N('%e. %B %Y');\r\n\t}", "protected function getDateFormat()\n {\n return \\MUtil_Model_Bridge_FormBridge::getFixedOption('datetime', 'dateFormat');\n }", "public function dateViewHelperFormatsDateLocalizedDataProvider() {}", "static function mysqlToDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.'), $date);\r\n\t}", "public function formEndDateAttribute($value)\n {\n return Carbon::parse($value)->format('Y-m-d');\n }", "function dateENtoFR($dateYMD) {\n $exp = explode('-', $dateYMD);\n return $exp[2] . '/' . $exp[1] . '/' . $exp[0];\n}", "public function getDateFormat()\n {\n return 'Y-m-d H:i:s.uO';\n }", "public function getDateFormat()\n {\n return 'Y-m-d H:i:s.uO';\n }", "function googleDateFormat($strDate)\n {\n $date = new DateTime($strDate);\n return $date->format('Y-m-d\\TH:i:sP');\n //return $stDate;\n }", "function remove_day_from_date_and_format($date_in)\n{\n//print_r($date_ro);\n // $date_out = substr_replace($date_in, \"\", 4);\n $date_in = explode(' ', $date_in);\n $date_out = $date_in[3] . \"-\" . $date_in[2] . \"-\" . $date_in[1];\n return $date_out;\n}", "public function format($format) {\n \t$spf = str_replace(array(\"d\",\"m\",\"Y\"),array(\"%3$02d\",\"%2$02d\",\"%1$04d\"),$format);\n \t\treturn sprintf($spf, $this->dt[0], $this->dt[1], $this->dt[2]);\n\t}", "public static function setDateFormatDay()\n {\n self::$settings[0] = 'Y-m-d';\n }", "public function changeDate($d) {\n\n $str = strtotime($d);\n\n return date('M d Y', $str);\n }", "function DBDate($d)\r\n\t{\r\n\t\t// note that we are limited to 1970 to 2038\r\n\t\treturn date($this->fmtDate,$d);\r\n\t}", "public function getPeriod(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\treturn date('Ym', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, false);\n\t\t\treturn $dateParts['year'].$dateParts['mon'];\n\t\t}\n\t}", "function modify_date($fe)\n\t{\n\t\t$cdate = mktime(substr($fe,5,2), substr($fe,7,2), 0, 1, 1, 2000+substr($fe,0,2)) + (substr($fe,2,3)-1)*24*60*60;\n\t\treturn Date(\"Y.m.d H:i\", $cdate);\n\t}", "public function getDateFormat()\n {\n return Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);\n }", "function jtpl_modifier_common_dateLong ($_zInputDate)\n{\n\n\t\t $tab1 = explode(\" \",$_zInputDate) ;\n\t\t $tab2 = explode(\"-\",$tab1[0]);\n\t\t $tab3 = explode(\":\",$tab1[1]);\n\t\t $zOutputDate = $tab2[2].\"/\".$tab2[1].\"/\".$tab2[0].\" - \".$tab3[0].\":\".$tab3[1];\n \n return $zOutputDate ;\n\n}", "public static function getDateFormats()\n {\n return array( 'm/d/y' => 'mm/dd/yy', 'd/m/y' => 'dd/mm/yy' );\n }", "public function period_fun($type){\n\t\tif($type == 'D'){\n\t\t\t$st = 'Daily';\n\t\t}else if($type == 'M'){\t\n\t \t\t$st = 'Monthly';\n\t\t}else if($type == 'H'){\n\t\t\t$st = 'Half yearly';\n\t\t}\n\t\treturn $st;\n\t}", "public function getDateFormat()\n {\n return 'Y-m-d';\n }", "public function toDateString()\n {\n return $this->toLocalizedString('yyyy-MM-dd');\n }", "private function _validatePeriodValue($periodValue) {\n if($periodValue == Config::PERIOD_KEY_NOW) {\n $periodValue = date('Ymd');\n }\n return $periodValue;\n }", "function getFormattedCreatedDateExtended()\r\n {\r\n return $this->created_at->format('d').\" de \".$this->getMes_ptBR((int) $this->created_at->format('m') ).\" de \".$this->created_at->format('Y') ;\r\n }", "public function format_date_text($date,$b_date_only=false,$force_user_language='')\n {\n global $Ccontroller_main;\n global $GLOBAL_DAYS;\n global $GLOBAL_MONTHS;\n \n if($force_user_language!='')\n {\n $user_language = $force_user_language;\n }\n else\n {\n $user_language = $Ccontroller_main->get_m_user_language();\n }\n \n //YESTERDAY\n if(!$b_date_only && date(\"Y-m-d\", strtotime(\"yesterday\")) == date(\"Y-m-d\",strtotime($date)))\n {\n \n switch($user_language)\n {\n case 'FR': \n $date = 'Hier';\n break;\n case 'EN': \n $date = 'Yesterday';\n break;\n } \n }\n \n //TODAY\n else if(!$b_date_only && date(\"Y-m-d\") == date(\"Y-m-d\",strtotime($date)))\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $Cdate_time_now = new Cmydatetime(\"now\", new DateTimeZone('EUROPE/Paris'));\n $interval = $Cdate_time->diff($Cdate_time_now);\n //echo $Cdate_time_now->format('H i s').':'.$Cdate_time->format('H i s').'<br>';\n switch($user_language)\n {\n case 'FR':\n if($interval->H>0){$date = $interval->format('Il y a %h heure(s), %i minute(s)');}\n else if($interval->i>0){$date = $interval->format('Il y a %i minute(s)');}\n else {$date = $interval->format('Il y a %s seconde(s)');}\n break;\n case 'EN': \n if($interval->H>0){$date = $interval->format('%h hour(s), %i minute(s) ago');}\n else if($interval->i>0){$date = $interval->format('%i minute(s) ago');}\n else {$date = $interval->format('%s second(s) ago');} \n break;\n } \n }\n \n //OTHER DATE\n else\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $date ='';\n\n switch($user_language)\n {\n case 'FR': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['fr'].' '.$Cdate_time->format('d').' '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['fr'].' '.$Cdate_time->format('Y');\n break;\n case 'EN': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['en'].', '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['en'].' '.$Cdate_time->format('d').' '.$Cdate_time->format('Y');\n break;\n } \n }\n \n return $date;\n }", "public function getDuedateAttribute(){\n\n if($this->attributes['duedate']){\n return Helpers::custom_date_format(env('SITE_DATEPICKERFORMAT'),$this->attributes['duedate']);\n }\n\n\n }", "function convertDate($date,$symbol='-',$format){\r\n\r\n//define the months\r\n\r\n\t\t\t$months = array( '01' => 'Jan' , '02' => 'Feb' , '03' => 'Mar' , '04' => 'Apr' , '05' => 'May' , '06' => 'Jun' , '07' => 'Jul' , '08' => 'Aug' , '09' => 'Sep' , '10' => 'Oct' , '11' => 'Nov' , '12' => 'Dec' );\r\n\t \r\n\t\tif(trim($date)==\"\") return \"\";\r\n\t\tif($symbol=='/'){\r\n\t\t\t$arrydate=explode(\"/\",$date);\r\n\t\t}else if($symbol=='-'){\r\n\t\t\t$arrydate=explode(\"-\",$date);\r\n\t\t}\r\n\t\t\r\n\t\t//MDY\r\n\t\tif($format==DATE_YMD){\t//that means segments contain year /month/date,here we getting format in MDY now convert in YMD\r\n\r\n\t\t\t$m=$arrydate[0];\r\n\t\t\t$d=$arrydate[1];\r\n\t\t\t$y=$arrydate[2]; //getting year/month/day\r\n\r\n\t\t\tforeach( $months as $key => $value ){\r\n\t\t\t\t\tif ( $value == $m ){\r\n\t\t\t\t\t$m = $key;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$date=date(\"Y-m-d\",mktime(0, 0, 0,$m,$d,$y));\r\n\t\t}else if($format==DATE_MDY){\t\t//here we getting format in YMD now convert in MDY\r\n\t\t\r\n\t\t\t$y=$arrydate[0];$m=$arrydate[1];$d=$arrydate[2]; //getting year/month/day\r\n\t\t\tforeach( $months as $key => $value ){\r\n\t\t\t\t\tif ( $key == $m ){\r\n\t\t\t\t\t$m = $value;\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$date=$m.\"-\".$d.\"-\".$y;\r\n\t\t\t//$date=date(\"m-d-Y\",mktime(0, 0, 0,$m,$d,$y));\r\n\t\t}\r\n\t\treturn $date;\r\n\t}", "public static function yersterday(): string\n {\n $d = new DateTime;\n $i = new DateInterval(\"P1D\");\n $d->sub($i);\n return $d->format(\"Y-m-d\");\n }", "function dayNumberFormat() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_dayNumberFormat = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_dayNumberFormat;\n\t}", "public function format($format)\n {\n if (preg_match(\"/^.*[f]+.*$/\", $format)) {\n $format = str_replace('f', 'F', $format);\n \n $date = parent::format($format);\n \n $english = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); \n \n return str_replace($english, self::$polish_months, $date);\n }\n \n return parent::format($format);\n }", "public function convert_period($month){\n\t\tif(($month != '') && ($month != '0')){\n\t\t\tif($month == '04' || $month == '05' || $month == '06' || $month == '07' || $month == '08' || $month == '09'){\n\t\t\t\t$period1 = '04';\n\t\t\t\t$period2 = '09';\n\t\t\t}elseif($month == '10' || $month == '11' || $month == '12' || $month == '01' || $month == '02' || $month == '03'){\t\n\t\t\t\t$period1 = '10';\n\t\t\t\t$period2 = '03';\n\t\t\t}\n\t\t}\n\t\treturn $period1.'-'.$period2;\n\t}", "public function getFormattedPaymentDate(): string;", "function internationalDate($todate)\n\t{\n\t\t$myDate=date_create($todate);\n\t\treturn date_format($myDate, \"m/d/y\");\n\t}", "function sc_date_format($date){\n\t$CI =& get_instance();\n\tif($CI->session->userdata('locale') =='uk'){\n\t\treturn date('d/m/Y', $date);\n\t}else{\n\t\treturn date('m/d/Y', $date);\n\t}\n}", "function string_format_complete_date( $p_date ) {\r\n\t$t_timestamp = db_unixtimestamp( $p_date );\r\n\treturn date( config_get( 'complete_date_format' ), $t_timestamp );\r\n}", "function erp_financial_end_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['end'];\n}", "function _field_date_us($fval) \n {\n $f_date = \"\";\n if ($fval) {\n list($m,$d,$y) = split('/', $fval);\n $f_date = array($y, $m, $d);\n }\n return $this->_field_date($f_date);\n }", "protected function getDateFormat()\n {\n return 'Y-m-d H:i:s';\n }", "function _reformat_date($inDate) {\n $outDate = $inDate;\n $months = array(\n \"Maa\" => \"Mar\",\n \"Mei\" => \"May\",\n \"Okt\" => \"Oct\"\n );\n if (empty($inDate)) {\n return $outDate;\n }\n $parts = explode(\"-\", $inDate);\n if (!isset($parts[1]) || !isset($parts[2])) {\n return $outDate;\n } else {\n $newMonth = CRM_Utils_Array::value($parts[1], $months);\n if (!empty($newMonth)) {\n $outDate = $parts[0].\"-\".$newMonth.\"-\".$parts[2];\n }\n }\n return $outDate;\n}", "public function getDateFormat()\n {\n return 'Y-m-d H:i:sP';\n }", "public function setEndDate( KCommandContext $context )\n {\n $data = $context->data;\n \n if( $data->day || $data->month || $data->year )\n { \n $date = new KDate();\n \n $date->day( (int) $data->day );\n \n $date->month( (int) $data->month );\n \n $date->year( (int) $data->year );\n \n $data->endDate = $date;\n }\n }", "public function getDateFormatter();", "public function getDateFormatWithLongYear();", "public function getDateFormatWithLongYear();", "public function getDateFormat(){\n\t\t$this->_dateFormat = $date;\n\t}", "public function dateTimeDefaultFormat($astep) {\r\n return ($astep <= 1) ?\r\n \"d/m/y\" : \"d/m/y\";\r\n }", "public function getExpirationDateFormattedAttribute()\n {\n if (empty($this->nextBillingDate)) {\n return null;\n } else {\n return Carbon::createFromFormat('Y-m-d H:i:s', $this->endsAt ?? $this->nextBillingDate)->format('M d Y');\n }\n }", "function eo_format_datetime($datetime,$format='d-m-Y'){\n\tglobal $wp_locale;\n\n\tif ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) :\n\t\t\t//Translate\n\t\t\t$datemonth = $wp_locale->get_month($datetime->format('m'));\n\t\t\t$datemonth_abbrev = $wp_locale->get_month_abbrev($datemonth);\n\t\t\t$dateweekday = $wp_locale->get_weekday($datetime->format('w'));\n\t\t\t$dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday );\n\t\t\t$datemeridiem = trim($wp_locale->get_meridiem($datetime->format('a')));\n\t\t\t$datemeridiem_capital =$wp_locale->get_meridiem($datetime->format('A'));\n\n\t\t\t$datemeridiem = (empty($datemeridiem) ? $datetime->format('a') : $datemeridiem);\n\t\n\t\t\t$dateformatstring = ' '.$format;\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])D/\", \"\\\\1\" . backslashit( $dateweekday_abbrev ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])F/\", \"\\\\1\" . backslashit( $datemonth ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])l/\", \"\\\\1\" . backslashit( $dateweekday ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])M/\", \"\\\\1\" . backslashit( $datemonth_abbrev ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])a/\", \"\\\\1\" . backslashit( $datemeridiem ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])A/\", \"\\\\1\" . backslashit( $datemeridiem_capital ), $dateformatstring );\n\t\t\t$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );\n\t endif;\t\n\n\treturn $datetime->format($dateformatstring);\n}", "public function dateFormat();", "public static function setDateTimeFormat($val) {\n self::$_sDateTimeFormat = $val;\n }", "private function getEndDate( $end_date )\n {\n return $this->matchDateFormat( $end_date )\n ? $end_date\n : Carbon::now()->format('Y-m-d');\n }", "function get_long_date_format() {\n\t\tstatic $site_long_date_format = FALSE;\n\n\t\tif( !$site_long_date_format ) {\n\t\t\t$site_long_date_format = $this->getConfig( 'site_long_date_format', '%A %d of %B, %Y' );\n\t\t}\n\n\t\treturn $site_long_date_format;\n\t}", "function datum($db_date) {\r\n return strftime('%d.%m.%Y', strtotime($db_date));\r\n }", "public function setEndDateAttribute($value)\n\t{\n\t\treturn $this->attributes['end_date'] = Carbon::parse($value)->format('Y-m-d H:i:s');\n\t}", "private function getEndDate( $end_date )\n {\n return $this->matchDateFormat( $end_date )\n ? $end_date\n : Carbon::now()->format('Y-m-d');\n }", "public function getFormattedExpirationDate();", "function convert_date( $uglydate ){\n\t$date = new DateTime( $uglydate );\n\treturn $nicedate = $date->format('F j, Y');\n}", "public function fixdate($olddate) {\n return date('Y-m-d', self::date_to_timestamp($olddate));\n }", "public function getDueDates(){\n\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t$monthDay = $startDate->format('d');\n\t\t$periodDueDate = new DateTime($this->Params['due_date']);\n\t\tswitch($this->Params['payment_mode']){\n\t\t\tcase 1: // DAILY\n\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\tif($this->Params['amortization_type'] == 2){ // STRAIGHT-LINE\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t$datePeriodTimeStamp = strtotime($datePeriod);\n\t\t\t\t\t\t$getPeriodDay = date('D', $datePeriodTimeStamp);\n\t\t\t\t\t\tif($getPeriodDay === \"Sun\") $periodDueDate->modify('+1 day');\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 2: // WEEKLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 3: // SEMI-MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 3: // 15th and End of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 'last_day_month'];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 'last_day_month', 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif(is_int($dueDatePeriod)){\n\t\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5: // 5th and 20th of the Month\n\t\t\t\t\t\tif($monthDay <= 5){\n\t\t\t\t\t\t\t$dueDateDay = [1 => '05', 2 => 20];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 20, 2 => '05'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == '05' && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6: // 10th and 25th of the Month\n\t\t\t\t\t\tif($monthDay <= 10){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 10, 2 => 25];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 25, 2 => 10];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 10 && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7: // 15th and 30th of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 30];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 30, 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 15 && $this->Params['num'] > 1) $periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\tif($monthName == \"February\"){\n\t\t\t\t\t\t\tif($dueDatePeriod == 15){\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4: // MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 2: // END OF THE MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\t\t\t$periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}else{ // ALLOWANCE OF 15 DAYS\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('+15 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: // SAME DAY OF EACH MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($this->Params['isFebruary']) && $this->Params['isFebruary']){\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['due_date']);\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\tunset($this->Params['isFebruary']);\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t\t\t\t\t\t$monthDay = $startDate->format('d');\n\t\t\t\t\t\t\t$periodDueDate->format($monthDay);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$monthDay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t$isLeapYear = $periodDueDate->format('L'); // CHECK IF LEAPYEAR\n\t\t\t\t\t\t$leapDays = ($isLeapYear > 0) ? 29 : 28;\n\t\t\t\t\t\tif($monthName == \"January\" && $monthDay > $leapDays){ // TO SET ON FEBRUARY\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 5: // QUARTERLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 6: // SEMESTRAL\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 7: // YEARLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+1 year');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 9: // LUMPSUM\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $datePeriod;\n\t}", "function date_sql2en($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[1].\"/\".$date[2].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "public function get_end_date($date_format = '') {\r\n\t\tif ( $this->is_endless() ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( ! strlen( $date_format ) ) {\r\n\t\t\t$date_format = get_option('date_format', 'd/m/Y');\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Filter the end date format using the charitable_campaign_end_date_format hook.\r\n\t\t */\r\n\t\t$date_format = apply_filters( 'charitable_campaign_end_date_format', $date_format, $this );\r\n\r\n\t\t/**\r\n\t\t * This is how the end date is stored in the database, so just return that directly.\r\n\t\t */\r\n\t\tif ( 'Y-m-d H:i:s' == $date_format ) {\r\n\t\t\treturn $this->end_date;\r\n\t\t}\r\n\t\t\r\n\t\treturn date( $date_format, $this->get_end_time() );\r\n\t}", "public static function checkfront_date_format() {\n return (string)static::config()->get('checkfront_date_format');\n }", "public function getEndDate();", "public function getEndDate();", "function format_date($d) {\r\n\t$month = array(\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\r\n\t$date = explode(\"-\",$d);\r\n\tif(($date[1]-1) != 10) $index = str_replace(\"0\",\"\",$date[1]-1);\r\n\telse $index = $date[1]-1;\r\n\treturn $date[2].\" \".$month[$index].\" \".$date[0];\r\n}", "function get_delivery_date_in_period($std,$end){\n $query = \"\n\t\t\tSELECT\n\t\t\t tbl_delivery_date.delivery_date_id,\n\t\t\t\ttbl_delivery_date.delivery_date,\n\t\t\t\ttbl_delivery_date.delivered_date,\n\t\t\t\ttbl_delivery_date.delivery_remarks,\n\t\t\t\ttbl_tender_basic_details.mgo_file_ref,\n\t\t\t\ttbl_items_list.item_name,\n\t\t\t\ttbl_tender_basic_details.quantity,\n\t\t\t\ttbl_unit_types.unit_name,\n\t\t\t\ttbl_tender_basic_details.dos_file_ref,\n\t\t\t\ttbl_vote_master.vote_name,\n\t\t\t\ttbl_tender_basic_details.tndr_open_date,\n\t\t\t\ttbl_tec_due_date.tec_due_date\n\t\tFROM\n\t\t\ttbl_delivery_date\n\t\t\tINNER JOIN tbl_tender_basic_details ON tbl_tender_basic_details.mgo_file_ref = tbl_delivery_date.delivery_date_mgo_ref\n\t\t\tINNER JOIN tbl_items_list ON tbl_tender_basic_details.item_id = tbl_items_list.item_id\n\t\t\tINNER JOIN tbl_unit_types ON tbl_unit_types.unit_id = tbl_tender_basic_details.unit_type_id\n\t\t\tINNER JOIN tbl_vote_master ON tbl_tender_basic_details.vote_id = tbl_vote_master.vote_id\n\t\t\tINNER JOIN tbl_tec_due_date ON tbl_tender_basic_details.mgo_file_ref = tbl_tec_due_date.tec_due_mgo_ref\n\n WHERE tbl_delivery_date.delivery_date BETWEEN '$std' AND '$end'\n \";\n $query_result = $this->mDbm->setData($query);\n return $query_result;\n }", "public function getPeriod() {}", "function cfdef_prepare_date_default( $p_value ) {\n\tif( is_blank( $p_value ) ) {\n\t\treturn '';\n\t}\n\n\t$t_value = trim( $p_value );\n\t$t_value_length = utf8_strlen( $t_value );\n\n\t# We are expanding {tomorrow}, {yesterday}, {+3 days}, {-7 days}, {next week}\n\t# See strtotime() for more details about supported formats.\n\tif( $t_value_length >= 3 && $t_value[0] == '{' && $t_value[$t_value_length - 1] == '}' ) {\n\t\t$t_value = utf8_substr( $t_value, 1, $t_value_length - 2 );\n\t\t$t_value = @strtotime( $t_value );\n\n\t\t# Different versions of PHP return different values in case of error.\n\t\tif( $t_value == -1 || $t_value === false ) {\n\t\t\treturn '';\n\t\t}\n\t}\n\n\treturn $t_value;\n}", "function join_ymd($y, $m, $d) {\n $y = str_pad($y, 4, \"0\", STR_PAD_LEFT); \n $m = str_pad($m, 2, \"0\", STR_PAD_LEFT); \n $d = str_pad($d, 2, \"0\", STR_PAD_LEFT); \n return $y.'-'.$m.'-'.$d;\n}", "function get_date_numeral($format = 'Y-m-d') {\n\t$format = ($format == '') ? 'Y-m-d' : $format;\n\t$format = str_replace('Y', '9999', $format);\n\t$format = str_replace('m', '99', $format);\n\t$format = str_replace('d', '99', $format);\n\treturn $format;\n}", "public function testFormatUsDate()\n {\n $this->assertEquals('04/30/2013', StringFilter::formatUsDate('2013-04-30'));\n }", "public function getSpecialToDate()\n {\n return $this->_getData('special_to_date');\n }", "public static function setDateFormatMonth()\n {\n self::$settings[0] = 'Y-m';\n }", "function cfdef_prepare_date_value_for_email( $p_value ) {\n\tif( $p_value != null ) {\n\t\treturn date( config_get( 'short_date_format' ), $p_value ) ;\n\t}\n}" ]
[ "0.5906998", "0.5815273", "0.5797222", "0.5707938", "0.5572766", "0.5504607", "0.54426825", "0.5406424", "0.53707916", "0.53574276", "0.5349055", "0.5337913", "0.52257496", "0.5222003", "0.520685", "0.5204343", "0.5188877", "0.51437086", "0.51326275", "0.5123626", "0.5120643", "0.5107841", "0.5106555", "0.5105861", "0.51018596", "0.5093003", "0.50885445", "0.5074168", "0.5068735", "0.5053508", "0.50418794", "0.50405765", "0.50350404", "0.5033299", "0.5033299", "0.5032673", "0.5023302", "0.50222874", "0.501443", "0.5004189", "0.49984646", "0.49949265", "0.4985988", "0.49849263", "0.49794972", "0.49765486", "0.49764013", "0.4975604", "0.49754468", "0.4973482", "0.49679857", "0.4961864", "0.49597323", "0.49574134", "0.49521536", "0.4939847", "0.49351656", "0.49335322", "0.49180788", "0.4917247", "0.4912454", "0.4911098", "0.4904825", "0.49045545", "0.49009752", "0.48961937", "0.4891843", "0.488626", "0.4882846", "0.48786545", "0.48786545", "0.48773283", "0.48752806", "0.48727474", "0.4872378", "0.48711503", "0.48632094", "0.48608088", "0.48573327", "0.4857075", "0.4855448", "0.48532373", "0.48522916", "0.48499504", "0.4849584", "0.4841974", "0.4841873", "0.48410243", "0.48409855", "0.48386848", "0.48386848", "0.48345545", "0.48264456", "0.4821942", "0.48207423", "0.4819359", "0.48184073", "0.4812135", "0.48113453", "0.48037785", "0.4799012" ]
0.0
-1
change dPeriodEndDate format to dMY
public function _Date2_call($value, $row) { //$session_id = $this->cms_user_name(); //return $value." - scale: <b>".$row->date."</b>"; $Date2 = date('d-M-Y', strtotime($row->TglActive2)); return $Date2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormattedEndDate() {\n\t\t$format_1 = 'Y-m-d';\n\t\t$format_2 = 'Y-m-d H:i';//format coming from web page\n\t\t$format_3 = 'Y-m-d H:i:s';//format coming from mysql\n\t\t$date = null;\n\t\t$formatted_date = \"\";\n\t\t\n\t\tif (!isset($this -> end_time) ) \n\t\t\treturn \"\";\n\t\t$date = DateTime::createFromFormat($format_2, $this -> end_time);\n\t\tif ( $date == false )\n\t\t\t$date = DateTime::createFromFormat($format_3, $this -> end_time);\n\t\t// var_dump($date);\n\t\treturn $date == false ? \"\" : $date->format($format_1) ;\n\t\t\n\t}", "private function formatEndDate($enddate) {\n\t\treturn $enddate . ' 23:59:59';\n\t}", "function updateSubscriptionEndDate($subscription_start_date, $timePeriodForService) {\n $subscriptionEndDate = '';\n if ($timePeriodForService == \"1 Month\") {\n $timePeriod = \"1 month\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"3 months\" || $timePeriodForService == \"3 Months\"){ // Added as per discussion with Faizan CCP-5379\n $timePeriod = \"3 months\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"1 Year\" || ($timePeriodForService == '' || $timePeriodForService == null)) {\n $timePeriod = \"365 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"2 Years\") {\n $timePeriod = \"730 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"3 Years\") {\n $timePeriod = \"1095 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n }\n\n return $subscriptionEndDate;\n }", "public static function formatDateYmd2Dmy($date){\n\t\t$newdate = new DateTime($date);\n\t\treturn $newdate->format('d/m/Y');\n\t}", "private function format()\n {\n return config('app.locale') != 'en' ? 'd/m/Y' : 'm/d/Y';\n }", "public function dateTimeFormat();", "private function _radius_format_date($d){\n $arr_date = explode('/',$d);\n $month = intval($arr_date[0]);\n $m_arr = array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');\n $day = intval($arr_date[1]);\n $year = intval($arr_date[2]);\n return \"$day \".$m_arr[($month-1)].\" $year\";\n }", "function dateFormat($D) {\n $D = date('d-m-Y', strtotime($D));\n return $D;\n }", "function convert_period_string($period) {\n\tswitch($period)\n\t{\n\t\tcase \"1\":\n\t\t\t$period = '1st';\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\t$period = '2nd';\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\t$period = '3rd';\n\t\t\tbreak;\n\t\tcase \"OT\":\n\t\t\t$period = 'Overtime';\n\t\t\tbreak;\n\t\tcase \"complete\":\n\t\t\t$period = 'Final';\n\t\t\tbreak;\n\t}\n\treturn $period;\n}", "function formatFechaBD($value){\n\t$partes = explode(\"-\", $value);\n\t$value = $partes[2].\"-\".$partes[1].\"-\".$partes[0];\n\treturn $value;\n}", "public function periodo() {\n $carbon = new Carbon($this->created_at);\n\n $string = $carbon->toFormattedDateString() . \" - \";\n if($this->created_at != $this->updated_at) {\n $carbon = new Carbon($this->updated_at);\n $string .= $carbon->toFormattedDateString();\n } else {\n $string .= \"Actual\";\n }\n return $string;\n }", "public function getDateFormatted()\n\t{\n\t\t$dateKey = self::arrayKeyExistsNc('date', $this->dimensions);\n\t\t$date = $this->dimensions[$dateKey];\n\n\t\tif ($date == '00000000') {\n\t\t\t$date = '19000101';\n\t\t}\n\n\t\t$hour = '00';\n\t\tif ($hourKey = self::arrayKeyExistsNc('hour', $this->dimensions)) {\n\t\t\t$hour = $this->dimensions[$hourKey];\n\t\t}\n\t\t$result = substr($date, 0, 4) . '-' . substr($date, 4, 2) . '-' . substr($date, 6, 2) . ' ' . $hour . ':00:00';\n\n\t\treturn $result;\n\t}", "function dateExcelFormat ( $w ) {\n\t$w=explode(\"-\",$w);\n\t$y= $w[0];\n\t$m= $w[1];\n\t$d= $w[2];\n\treturn \"$m/$d/$y\";\n}", "public function getEndDateAttribute($value)\n {\n return Carbon::parse($value)->format('m/d/Y');\n }", "public function getDMY($leadingZeros = false)\r\n\t{\r\n\t\tif ($leadingZeros)\r\n\t\t{\r\n\t\t\treturn $this->format('d/m/Y');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->format('j/n/Y');\r\n\t\t}\r\n\t}", "static function mysqlToFullDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.Y'), $date);\r\n\t}", "public function formatDate($var, DataContainer $dc)\r\n {\r\n\r\n $datum = date(\"Y-m-d\", $var);\r\n return $datum;\r\n }", "public function getHTMLDatePickerFormatValue(): string\n {\n return Carbon::parse($this->value)->format('Y-m-d');\n }", "private function changeDateFormat($val,$format){\n \n if($val != \"\" && count($this->dbConfigs) > 0){\n switch ($this->dbConfigs['driver']){\n case \"mysql\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\", strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\", strtotime($val));\n }\n break;\n case \"sqlsrv\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\",strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\",strtotime($val));\n }\n break;\n }\n return $val;\n }\n }", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "public function set_end_date()\n {\n if ($this->end_date === NULL && $this->start_date === NULL) {\n $this->formated_end_date = \"the game has not started yet\";\n } elseif($this->end_date === NULL && $this->start_date !== NULL) {\n $this->formated_end_date = \"the game is not finished yet\";\n } else {\n $end_date = Carbon::createFromTimestamp($this->end_date / 1000);\n $this->formated_end_date = $end_date->toDayDateTimeString();\n }\n return $this->formated_end_date; \n }", "function carton_date_format() {\n\treturn apply_filters( 'carton_date_format', get_option( 'date_format' ) );\n}", "public function getDateFormat()\n {\n return 'Y-m-d H:i:s.u0';\n }", "public function getFormattedEndAt(): string\n {\n\n return $this->endAt->format('d-m-Y');\n\n }", "private function getParamPeriodEnd()\n {\n $periodEnd = JFactory::getApplication()->input->get('periodEnd', '', 'string');\n return $periodEnd === '' ? null : new DateTime( $periodEnd );\n }", "public function toFormattedDateString()\n {\n return $this->toLocalizedString('MMM d, yyyy');\n }", "function shwThaiDate($dte) { //where $dte is a Date format\r\n\t\treturn date(\"d-m-Y\",strtotime($dte));//formulate date format for displaying\r\n\t}", "function NiceFromToDate() {\r\n\t\tif (!$this->ToDate && $this->FromDate) return '';\r\n\t\t\r\n\t\t$from_date = new Date();\r\n\t\t$to_date = new Date();\r\n\t\t$from_date->setValue($this->FromDate);\r\n\t\t$to_date->setValue($this->ToDate);\r\n\t\t\t\t\r\n\t\tif (!$this->ToDate && $this->FromDate) return $from_date->FormatI18N('%e. %B %Y');\r\n\r\n\t\t$from_month = $from_date->FormatI18N('%B');\r\n\t\t$to_month = $to_date->FormatI18N('%B');\r\n\t\t\r\n\t\t$from_year = $from_date->Format('Y');\r\n\t\t$to_year = $from_date->Format('Y');\r\n\t\t\r\n\t\tif($from_month == $to_month) {\r\n\t\t\t$long_from_to_date = $from_date->Format('j. - ').$to_date->Format('j. ').$to_month.' '.$to_year;\r\n\t\t}\r\n\t\telseif($from_year == $to_year) {\r\n\t\t\t$long_from_to_date = $from_date->Format('j. ').$from_month.' - '.$to_date->Format('j. ').$to_month.' '.$to_year;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$long_from_to_date = $from_date->FormatI18N('%e. %B %Y') . ' - ' . $to_date->FormatI18N('%e. %B %Y');\r\n\t\t}\r\n\t\treturn $long_from_to_date;\r\n\t\t//$this->FromDate->setConfig('dateformat','dd/MM/y');//.FormatI18N('%e. %B %Y');\r\n\t}", "protected function getDateFormat()\n {\n return \\MUtil_Model_Bridge_FormBridge::getFixedOption('datetime', 'dateFormat');\n }", "public function dateViewHelperFormatsDateLocalizedDataProvider() {}", "static function mysqlToDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.'), $date);\r\n\t}", "public function formEndDateAttribute($value)\n {\n return Carbon::parse($value)->format('Y-m-d');\n }", "function dateENtoFR($dateYMD) {\n $exp = explode('-', $dateYMD);\n return $exp[2] . '/' . $exp[1] . '/' . $exp[0];\n}", "function googleDateFormat($strDate)\n {\n $date = new DateTime($strDate);\n return $date->format('Y-m-d\\TH:i:sP');\n //return $stDate;\n }", "public function getDateFormat()\n {\n return 'Y-m-d H:i:s.uO';\n }", "public function getDateFormat()\n {\n return 'Y-m-d H:i:s.uO';\n }", "function remove_day_from_date_and_format($date_in)\n{\n//print_r($date_ro);\n // $date_out = substr_replace($date_in, \"\", 4);\n $date_in = explode(' ', $date_in);\n $date_out = $date_in[3] . \"-\" . $date_in[2] . \"-\" . $date_in[1];\n return $date_out;\n}", "public function format($format) {\n \t$spf = str_replace(array(\"d\",\"m\",\"Y\"),array(\"%3$02d\",\"%2$02d\",\"%1$04d\"),$format);\n \t\treturn sprintf($spf, $this->dt[0], $this->dt[1], $this->dt[2]);\n\t}", "public static function setDateFormatDay()\n {\n self::$settings[0] = 'Y-m-d';\n }", "public function changeDate($d) {\n\n $str = strtotime($d);\n\n return date('M d Y', $str);\n }", "function DBDate($d)\r\n\t{\r\n\t\t// note that we are limited to 1970 to 2038\r\n\t\treturn date($this->fmtDate,$d);\r\n\t}", "public function getPeriod(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\treturn date('Ym', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, false);\n\t\t\treturn $dateParts['year'].$dateParts['mon'];\n\t\t}\n\t}", "function modify_date($fe)\n\t{\n\t\t$cdate = mktime(substr($fe,5,2), substr($fe,7,2), 0, 1, 1, 2000+substr($fe,0,2)) + (substr($fe,2,3)-1)*24*60*60;\n\t\treturn Date(\"Y.m.d H:i\", $cdate);\n\t}", "public function getDateFormat()\n {\n return Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);\n }", "function jtpl_modifier_common_dateLong ($_zInputDate)\n{\n\n\t\t $tab1 = explode(\" \",$_zInputDate) ;\n\t\t $tab2 = explode(\"-\",$tab1[0]);\n\t\t $tab3 = explode(\":\",$tab1[1]);\n\t\t $zOutputDate = $tab2[2].\"/\".$tab2[1].\"/\".$tab2[0].\" - \".$tab3[0].\":\".$tab3[1];\n \n return $zOutputDate ;\n\n}", "public static function getDateFormats()\n {\n return array( 'm/d/y' => 'mm/dd/yy', 'd/m/y' => 'dd/mm/yy' );\n }", "public function period_fun($type){\n\t\tif($type == 'D'){\n\t\t\t$st = 'Daily';\n\t\t}else if($type == 'M'){\t\n\t \t\t$st = 'Monthly';\n\t\t}else if($type == 'H'){\n\t\t\t$st = 'Half yearly';\n\t\t}\n\t\treturn $st;\n\t}", "public function toDateString()\n {\n return $this->toLocalizedString('yyyy-MM-dd');\n }", "public function getDateFormat()\n {\n return 'Y-m-d';\n }", "private function _validatePeriodValue($periodValue) {\n if($periodValue == Config::PERIOD_KEY_NOW) {\n $periodValue = date('Ymd');\n }\n return $periodValue;\n }", "function getFormattedCreatedDateExtended()\r\n {\r\n return $this->created_at->format('d').\" de \".$this->getMes_ptBR((int) $this->created_at->format('m') ).\" de \".$this->created_at->format('Y') ;\r\n }", "public function format_date_text($date,$b_date_only=false,$force_user_language='')\n {\n global $Ccontroller_main;\n global $GLOBAL_DAYS;\n global $GLOBAL_MONTHS;\n \n if($force_user_language!='')\n {\n $user_language = $force_user_language;\n }\n else\n {\n $user_language = $Ccontroller_main->get_m_user_language();\n }\n \n //YESTERDAY\n if(!$b_date_only && date(\"Y-m-d\", strtotime(\"yesterday\")) == date(\"Y-m-d\",strtotime($date)))\n {\n \n switch($user_language)\n {\n case 'FR': \n $date = 'Hier';\n break;\n case 'EN': \n $date = 'Yesterday';\n break;\n } \n }\n \n //TODAY\n else if(!$b_date_only && date(\"Y-m-d\") == date(\"Y-m-d\",strtotime($date)))\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $Cdate_time_now = new Cmydatetime(\"now\", new DateTimeZone('EUROPE/Paris'));\n $interval = $Cdate_time->diff($Cdate_time_now);\n //echo $Cdate_time_now->format('H i s').':'.$Cdate_time->format('H i s').'<br>';\n switch($user_language)\n {\n case 'FR':\n if($interval->H>0){$date = $interval->format('Il y a %h heure(s), %i minute(s)');}\n else if($interval->i>0){$date = $interval->format('Il y a %i minute(s)');}\n else {$date = $interval->format('Il y a %s seconde(s)');}\n break;\n case 'EN': \n if($interval->H>0){$date = $interval->format('%h hour(s), %i minute(s) ago');}\n else if($interval->i>0){$date = $interval->format('%i minute(s) ago');}\n else {$date = $interval->format('%s second(s) ago');} \n break;\n } \n }\n \n //OTHER DATE\n else\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $date ='';\n\n switch($user_language)\n {\n case 'FR': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['fr'].' '.$Cdate_time->format('d').' '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['fr'].' '.$Cdate_time->format('Y');\n break;\n case 'EN': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['en'].', '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['en'].' '.$Cdate_time->format('d').' '.$Cdate_time->format('Y');\n break;\n } \n }\n \n return $date;\n }", "function convertDate($date,$symbol='-',$format){\r\n\r\n//define the months\r\n\r\n\t\t\t$months = array( '01' => 'Jan' , '02' => 'Feb' , '03' => 'Mar' , '04' => 'Apr' , '05' => 'May' , '06' => 'Jun' , '07' => 'Jul' , '08' => 'Aug' , '09' => 'Sep' , '10' => 'Oct' , '11' => 'Nov' , '12' => 'Dec' );\r\n\t \r\n\t\tif(trim($date)==\"\") return \"\";\r\n\t\tif($symbol=='/'){\r\n\t\t\t$arrydate=explode(\"/\",$date);\r\n\t\t}else if($symbol=='-'){\r\n\t\t\t$arrydate=explode(\"-\",$date);\r\n\t\t}\r\n\t\t\r\n\t\t//MDY\r\n\t\tif($format==DATE_YMD){\t//that means segments contain year /month/date,here we getting format in MDY now convert in YMD\r\n\r\n\t\t\t$m=$arrydate[0];\r\n\t\t\t$d=$arrydate[1];\r\n\t\t\t$y=$arrydate[2]; //getting year/month/day\r\n\r\n\t\t\tforeach( $months as $key => $value ){\r\n\t\t\t\t\tif ( $value == $m ){\r\n\t\t\t\t\t$m = $key;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$date=date(\"Y-m-d\",mktime(0, 0, 0,$m,$d,$y));\r\n\t\t}else if($format==DATE_MDY){\t\t//here we getting format in YMD now convert in MDY\r\n\t\t\r\n\t\t\t$y=$arrydate[0];$m=$arrydate[1];$d=$arrydate[2]; //getting year/month/day\r\n\t\t\tforeach( $months as $key => $value ){\r\n\t\t\t\t\tif ( $key == $m ){\r\n\t\t\t\t\t$m = $value;\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$date=$m.\"-\".$d.\"-\".$y;\r\n\t\t\t//$date=date(\"m-d-Y\",mktime(0, 0, 0,$m,$d,$y));\r\n\t\t}\r\n\t\treturn $date;\r\n\t}", "public function getDuedateAttribute(){\n\n if($this->attributes['duedate']){\n return Helpers::custom_date_format(env('SITE_DATEPICKERFORMAT'),$this->attributes['duedate']);\n }\n\n\n }", "public static function yersterday(): string\n {\n $d = new DateTime;\n $i = new DateInterval(\"P1D\");\n $d->sub($i);\n return $d->format(\"Y-m-d\");\n }", "function dayNumberFormat() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_dayNumberFormat = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_dayNumberFormat;\n\t}", "public function format($format)\n {\n if (preg_match(\"/^.*[f]+.*$/\", $format)) {\n $format = str_replace('f', 'F', $format);\n \n $date = parent::format($format);\n \n $english = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); \n \n return str_replace($english, self::$polish_months, $date);\n }\n \n return parent::format($format);\n }", "public function convert_period($month){\n\t\tif(($month != '') && ($month != '0')){\n\t\t\tif($month == '04' || $month == '05' || $month == '06' || $month == '07' || $month == '08' || $month == '09'){\n\t\t\t\t$period1 = '04';\n\t\t\t\t$period2 = '09';\n\t\t\t}elseif($month == '10' || $month == '11' || $month == '12' || $month == '01' || $month == '02' || $month == '03'){\t\n\t\t\t\t$period1 = '10';\n\t\t\t\t$period2 = '03';\n\t\t\t}\n\t\t}\n\t\treturn $period1.'-'.$period2;\n\t}", "function internationalDate($todate)\n\t{\n\t\t$myDate=date_create($todate);\n\t\treturn date_format($myDate, \"m/d/y\");\n\t}", "public function getFormattedPaymentDate(): string;", "function sc_date_format($date){\n\t$CI =& get_instance();\n\tif($CI->session->userdata('locale') =='uk'){\n\t\treturn date('d/m/Y', $date);\n\t}else{\n\t\treturn date('m/d/Y', $date);\n\t}\n}", "function string_format_complete_date( $p_date ) {\r\n\t$t_timestamp = db_unixtimestamp( $p_date );\r\n\treturn date( config_get( 'complete_date_format' ), $t_timestamp );\r\n}", "function _field_date_us($fval) \n {\n $f_date = \"\";\n if ($fval) {\n list($m,$d,$y) = split('/', $fval);\n $f_date = array($y, $m, $d);\n }\n return $this->_field_date($f_date);\n }", "function erp_financial_end_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['end'];\n}", "protected function getDateFormat()\n {\n return 'Y-m-d H:i:s';\n }", "function _reformat_date($inDate) {\n $outDate = $inDate;\n $months = array(\n \"Maa\" => \"Mar\",\n \"Mei\" => \"May\",\n \"Okt\" => \"Oct\"\n );\n if (empty($inDate)) {\n return $outDate;\n }\n $parts = explode(\"-\", $inDate);\n if (!isset($parts[1]) || !isset($parts[2])) {\n return $outDate;\n } else {\n $newMonth = CRM_Utils_Array::value($parts[1], $months);\n if (!empty($newMonth)) {\n $outDate = $parts[0].\"-\".$newMonth.\"-\".$parts[2];\n }\n }\n return $outDate;\n}", "public function getDateFormat()\n {\n return 'Y-m-d H:i:sP';\n }", "public function getDateFormatter();", "public function setEndDate( KCommandContext $context )\n {\n $data = $context->data;\n \n if( $data->day || $data->month || $data->year )\n { \n $date = new KDate();\n \n $date->day( (int) $data->day );\n \n $date->month( (int) $data->month );\n \n $date->year( (int) $data->year );\n \n $data->endDate = $date;\n }\n }", "public function getDateFormat(){\n\t\t$this->_dateFormat = $date;\n\t}", "public function getDateFormatWithLongYear();", "public function getDateFormatWithLongYear();", "public function dateTimeDefaultFormat($astep) {\r\n return ($astep <= 1) ?\r\n \"d/m/y\" : \"d/m/y\";\r\n }", "function eo_format_datetime($datetime,$format='d-m-Y'){\n\tglobal $wp_locale;\n\n\tif ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) :\n\t\t\t//Translate\n\t\t\t$datemonth = $wp_locale->get_month($datetime->format('m'));\n\t\t\t$datemonth_abbrev = $wp_locale->get_month_abbrev($datemonth);\n\t\t\t$dateweekday = $wp_locale->get_weekday($datetime->format('w'));\n\t\t\t$dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday );\n\t\t\t$datemeridiem = trim($wp_locale->get_meridiem($datetime->format('a')));\n\t\t\t$datemeridiem_capital =$wp_locale->get_meridiem($datetime->format('A'));\n\n\t\t\t$datemeridiem = (empty($datemeridiem) ? $datetime->format('a') : $datemeridiem);\n\t\n\t\t\t$dateformatstring = ' '.$format;\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])D/\", \"\\\\1\" . backslashit( $dateweekday_abbrev ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])F/\", \"\\\\1\" . backslashit( $datemonth ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])l/\", \"\\\\1\" . backslashit( $dateweekday ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])M/\", \"\\\\1\" . backslashit( $datemonth_abbrev ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])a/\", \"\\\\1\" . backslashit( $datemeridiem ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])A/\", \"\\\\1\" . backslashit( $datemeridiem_capital ), $dateformatstring );\n\t\t\t$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );\n\t endif;\t\n\n\treturn $datetime->format($dateformatstring);\n}", "public function dateFormat();", "public function getExpirationDateFormattedAttribute()\n {\n if (empty($this->nextBillingDate)) {\n return null;\n } else {\n return Carbon::createFromFormat('Y-m-d H:i:s', $this->endsAt ?? $this->nextBillingDate)->format('M d Y');\n }\n }", "public static function setDateTimeFormat($val) {\n self::$_sDateTimeFormat = $val;\n }", "function datum($db_date) {\r\n return strftime('%d.%m.%Y', strtotime($db_date));\r\n }", "function get_long_date_format() {\n\t\tstatic $site_long_date_format = FALSE;\n\n\t\tif( !$site_long_date_format ) {\n\t\t\t$site_long_date_format = $this->getConfig( 'site_long_date_format', '%A %d of %B, %Y' );\n\t\t}\n\n\t\treturn $site_long_date_format;\n\t}", "private function getEndDate( $end_date )\n {\n return $this->matchDateFormat( $end_date )\n ? $end_date\n : Carbon::now()->format('Y-m-d');\n }", "public function setEndDateAttribute($value)\n\t{\n\t\treturn $this->attributes['end_date'] = Carbon::parse($value)->format('Y-m-d H:i:s');\n\t}", "function convert_date( $uglydate ){\n\t$date = new DateTime( $uglydate );\n\treturn $nicedate = $date->format('F j, Y');\n}", "public function getFormattedExpirationDate();", "private function getEndDate( $end_date )\n {\n return $this->matchDateFormat( $end_date )\n ? $end_date\n : Carbon::now()->format('Y-m-d');\n }", "public function fixdate($olddate) {\n return date('Y-m-d', self::date_to_timestamp($olddate));\n }", "function date_sql2en($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[1].\"/\".$date[2].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "public static function checkfront_date_format() {\n return (string)static::config()->get('checkfront_date_format');\n }", "public function getDueDates(){\n\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t$monthDay = $startDate->format('d');\n\t\t$periodDueDate = new DateTime($this->Params['due_date']);\n\t\tswitch($this->Params['payment_mode']){\n\t\t\tcase 1: // DAILY\n\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\tif($this->Params['amortization_type'] == 2){ // STRAIGHT-LINE\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t$datePeriodTimeStamp = strtotime($datePeriod);\n\t\t\t\t\t\t$getPeriodDay = date('D', $datePeriodTimeStamp);\n\t\t\t\t\t\tif($getPeriodDay === \"Sun\") $periodDueDate->modify('+1 day');\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 2: // WEEKLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 3: // SEMI-MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 3: // 15th and End of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 'last_day_month'];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 'last_day_month', 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif(is_int($dueDatePeriod)){\n\t\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5: // 5th and 20th of the Month\n\t\t\t\t\t\tif($monthDay <= 5){\n\t\t\t\t\t\t\t$dueDateDay = [1 => '05', 2 => 20];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 20, 2 => '05'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == '05' && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6: // 10th and 25th of the Month\n\t\t\t\t\t\tif($monthDay <= 10){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 10, 2 => 25];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 25, 2 => 10];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 10 && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7: // 15th and 30th of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 30];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 30, 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 15 && $this->Params['num'] > 1) $periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\tif($monthName == \"February\"){\n\t\t\t\t\t\t\tif($dueDatePeriod == 15){\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4: // MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 2: // END OF THE MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\t\t\t$periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}else{ // ALLOWANCE OF 15 DAYS\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('+15 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: // SAME DAY OF EACH MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($this->Params['isFebruary']) && $this->Params['isFebruary']){\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['due_date']);\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\tunset($this->Params['isFebruary']);\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t\t\t\t\t\t$monthDay = $startDate->format('d');\n\t\t\t\t\t\t\t$periodDueDate->format($monthDay);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$monthDay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t$isLeapYear = $periodDueDate->format('L'); // CHECK IF LEAPYEAR\n\t\t\t\t\t\t$leapDays = ($isLeapYear > 0) ? 29 : 28;\n\t\t\t\t\t\tif($monthName == \"January\" && $monthDay > $leapDays){ // TO SET ON FEBRUARY\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 5: // QUARTERLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 6: // SEMESTRAL\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 7: // YEARLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+1 year');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 9: // LUMPSUM\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $datePeriod;\n\t}", "public function get_end_date($date_format = '') {\r\n\t\tif ( $this->is_endless() ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( ! strlen( $date_format ) ) {\r\n\t\t\t$date_format = get_option('date_format', 'd/m/Y');\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Filter the end date format using the charitable_campaign_end_date_format hook.\r\n\t\t */\r\n\t\t$date_format = apply_filters( 'charitable_campaign_end_date_format', $date_format, $this );\r\n\r\n\t\t/**\r\n\t\t * This is how the end date is stored in the database, so just return that directly.\r\n\t\t */\r\n\t\tif ( 'Y-m-d H:i:s' == $date_format ) {\r\n\t\t\treturn $this->end_date;\r\n\t\t}\r\n\t\t\r\n\t\treturn date( $date_format, $this->get_end_time() );\r\n\t}", "function format_date($d) {\r\n\t$month = array(\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\r\n\t$date = explode(\"-\",$d);\r\n\tif(($date[1]-1) != 10) $index = str_replace(\"0\",\"\",$date[1]-1);\r\n\telse $index = $date[1]-1;\r\n\treturn $date[2].\" \".$month[$index].\" \".$date[0];\r\n}", "public function getEndDate();", "public function getEndDate();", "function get_delivery_date_in_period($std,$end){\n $query = \"\n\t\t\tSELECT\n\t\t\t tbl_delivery_date.delivery_date_id,\n\t\t\t\ttbl_delivery_date.delivery_date,\n\t\t\t\ttbl_delivery_date.delivered_date,\n\t\t\t\ttbl_delivery_date.delivery_remarks,\n\t\t\t\ttbl_tender_basic_details.mgo_file_ref,\n\t\t\t\ttbl_items_list.item_name,\n\t\t\t\ttbl_tender_basic_details.quantity,\n\t\t\t\ttbl_unit_types.unit_name,\n\t\t\t\ttbl_tender_basic_details.dos_file_ref,\n\t\t\t\ttbl_vote_master.vote_name,\n\t\t\t\ttbl_tender_basic_details.tndr_open_date,\n\t\t\t\ttbl_tec_due_date.tec_due_date\n\t\tFROM\n\t\t\ttbl_delivery_date\n\t\t\tINNER JOIN tbl_tender_basic_details ON tbl_tender_basic_details.mgo_file_ref = tbl_delivery_date.delivery_date_mgo_ref\n\t\t\tINNER JOIN tbl_items_list ON tbl_tender_basic_details.item_id = tbl_items_list.item_id\n\t\t\tINNER JOIN tbl_unit_types ON tbl_unit_types.unit_id = tbl_tender_basic_details.unit_type_id\n\t\t\tINNER JOIN tbl_vote_master ON tbl_tender_basic_details.vote_id = tbl_vote_master.vote_id\n\t\t\tINNER JOIN tbl_tec_due_date ON tbl_tender_basic_details.mgo_file_ref = tbl_tec_due_date.tec_due_mgo_ref\n\n WHERE tbl_delivery_date.delivery_date BETWEEN '$std' AND '$end'\n \";\n $query_result = $this->mDbm->setData($query);\n return $query_result;\n }", "function join_ymd($y, $m, $d) {\n $y = str_pad($y, 4, \"0\", STR_PAD_LEFT); \n $m = str_pad($m, 2, \"0\", STR_PAD_LEFT); \n $d = str_pad($d, 2, \"0\", STR_PAD_LEFT); \n return $y.'-'.$m.'-'.$d;\n}", "public function getPeriod() {}", "function cfdef_prepare_date_default( $p_value ) {\n\tif( is_blank( $p_value ) ) {\n\t\treturn '';\n\t}\n\n\t$t_value = trim( $p_value );\n\t$t_value_length = utf8_strlen( $t_value );\n\n\t# We are expanding {tomorrow}, {yesterday}, {+3 days}, {-7 days}, {next week}\n\t# See strtotime() for more details about supported formats.\n\tif( $t_value_length >= 3 && $t_value[0] == '{' && $t_value[$t_value_length - 1] == '}' ) {\n\t\t$t_value = utf8_substr( $t_value, 1, $t_value_length - 2 );\n\t\t$t_value = @strtotime( $t_value );\n\n\t\t# Different versions of PHP return different values in case of error.\n\t\tif( $t_value == -1 || $t_value === false ) {\n\t\t\treturn '';\n\t\t}\n\t}\n\n\treturn $t_value;\n}", "function get_date_numeral($format = 'Y-m-d') {\n\t$format = ($format == '') ? 'Y-m-d' : $format;\n\t$format = str_replace('Y', '9999', $format);\n\t$format = str_replace('m', '99', $format);\n\t$format = str_replace('d', '99', $format);\n\treturn $format;\n}", "public function testFormatUsDate()\n {\n $this->assertEquals('04/30/2013', StringFilter::formatUsDate('2013-04-30'));\n }", "public function getSpecialToDate()\n {\n return $this->_getData('special_to_date');\n }", "public static function setDateFormatMonth()\n {\n self::$settings[0] = 'Y-m';\n }", "function cfdef_prepare_date_value_for_email( $p_value ) {\n\tif( $p_value != null ) {\n\t\treturn date( config_get( 'short_date_format' ), $p_value ) ;\n\t}\n}" ]
[ "0.59033847", "0.58115864", "0.57940847", "0.5708879", "0.55722374", "0.5505724", "0.5443558", "0.5406822", "0.53719544", "0.5357661", "0.5346917", "0.5339205", "0.5223847", "0.522263", "0.5207538", "0.52046776", "0.5187526", "0.51433307", "0.51322323", "0.5121725", "0.51208913", "0.51091844", "0.5105801", "0.51037174", "0.509845", "0.50939786", "0.50884384", "0.5073335", "0.5068533", "0.5055386", "0.5043303", "0.5037027", "0.50365376", "0.5032793", "0.5032711", "0.5032711", "0.5023639", "0.50229424", "0.5013313", "0.50043976", "0.49982703", "0.49942428", "0.49856275", "0.49855408", "0.4980196", "0.4976684", "0.49766147", "0.49744707", "0.4974411", "0.49719304", "0.49676448", "0.49617144", "0.49589476", "0.49583992", "0.49502894", "0.49413165", "0.49369112", "0.49350473", "0.49187094", "0.4918509", "0.49127966", "0.49111927", "0.49052", "0.49015254", "0.49000186", "0.48973617", "0.48909706", "0.48836276", "0.48828304", "0.48781958", "0.4877912", "0.4877912", "0.48749596", "0.487315", "0.4872151", "0.4870504", "0.48634902", "0.48575258", "0.48574015", "0.48566797", "0.4852039", "0.48512638", "0.4851183", "0.48491472", "0.48482534", "0.48441678", "0.48416376", "0.48404002", "0.48380914", "0.4835847", "0.4833296", "0.4833296", "0.4825632", "0.48214108", "0.48210034", "0.4820957", "0.4819835", "0.4812821", "0.48105332", "0.4805412", "0.47996712" ]
0.0
-1
Add Default Tagging Asset
public function _callback_add_field_FormCutiNIK() { //$stateID = $this->uri->segment(5); $NIK = $this->cms_user_id(); $query = $this->db->select('*') ->from($this->cms_complete_table_name('profile')) ->where('NIK', $NIK) ->get(); foreach ($query->result() as $rown){ return $rown->Nama."<input type='hidden' maxlength='50' value='".$rown->NIK."' name='FormCutiNIK'>"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTag()\n {\n return 'assets';\n }", "public static function tagit() {\r\n $document = JFactory::getDocument();\r\n $document->addStyleSheet(JURI::root().'administrator/components/com_jresearch/scripts/tag-it/css/jquery.tagit.css');\r\n $document->addStyleSheet(JURI::root().'administrator/components/com_jresearch/scripts/tag-it/css/tagit.ui-zendesk.css');\r\n $document->addScript(JURI::root().'administrator/components/com_jresearch/scripts/jquery-ui.min.js');\r\n $document->addScript(JURI::root().'administrator/components/com_jresearch/scripts/tag-it/js/tag-it.js');\r\n }", "public function getDefaultTag(): string|null;", "public function addAssets() {}", "public function addAssets() {}", "public function tag()\n\t{\n\t\t$crud = $this->generate_crud('blog_tags');\n\t\t$this->mPageTitle = 'Blog Tags';\n\t\t$this->render_crud();\n\t}", "private function registerGtag()\r\n {\r\n // Only load the JS if this integration is enabled.\r\n if (!(bool) $this->config->get('event_tracking::settings.integrations.gtag', true)) {\r\n return;\r\n }\r\n\r\n $al = AssetList::getInstance();\r\n\r\n $al->register(\r\n 'javascript',\r\n 'event_tracking/gtag',\r\n 'js/gtag.js',\r\n [],\r\n 'event_tracking'\r\n );\r\n\r\n $assetGroup = ResponseAssetGroup::get();\r\n $assetGroup->requireAsset('javascript', 'event_tracking/gtag');\r\n }", "function load_tag_widget() {\n register_widget( 'custom_tag_widget' );\n}", "function gtags_enqueue() {\n\twp_enqueue_script('gtags=group-tags', WP_PLUGIN_URL.'/tela-botanica/formulaires/etiquettes/etiquettes.js', array('jquery') );\n\tload_plugin_textdomain( 'gtags', false, dirname( plugin_basename( __FILE__ ) ).'/lang' );\n}", "function initializeTagDialog() {\n include_once(PAPAYA_INCLUDE_PATH.'system/papaya_taglinks.php');\n if ($tags = papaya_taglinks::getInstance($this, 'tg')) {\n $tags->setLinkParams(\n $this->paramName,\n array(\n 'cmd' => $this->params['cmd'],\n 'file_id' => $this->params['file_id'],\n )\n );\n $this->layout->addRight($tags->getTagLinker('media', $this->params['file_id'], TRUE));\n } else {\n $this->addMsg(MSG_WARNING, $this->_gt('You don\\'t have the permission to tag files.'));\n }\n }", "function register_block_core_tag_cloud()\n {\n }", "public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}", "public function autoTag()\n {\n $tags = Tag::string2array($this->tags);\n \n if(isset($this->name) && !empty($this->name)) {\n $tags[] = $this->name;\n }\n \n $tags[] = $this->arena->name;\n $tags[] = $this->ltype->display_name;\n \n $this->tags = Tag::array2string(array_unique($tags));\n }", "function doTagStuff(){}", "public function registerAssets () {\n }", "function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t//'js'=>'templates/js',\n\t\t\t//'css'=>'templates/css',\n //'template'=>'templates',\n\t\t))->setParent($l);\n\n //return array('view/lister/tags');\n return parent::defaultTemplate();\n }", "public function set_tag_base($tag_base)\n {\n }", "function convert_tag( &$obj )\n\t{\n\t\t// set default photo\n\t\t$obj->default_photo = $this->get_default_photo( $obj->id, 'tag' );\n\n\t\t// set default icon \n\t\t$obj->default_icon = $this->get_default_photo( $obj->id, 'tag-icon' );\n\n\t}", "protected function defaultTags()\n\t{\n\t\t//TODO: Terminar a referencia html\n\t\treturn array(\n\t\t\t'div' => array(\n\t\t\t\t'tagName' => 'div',\n\t\t\t\t'hasClosingTag' => true,\n\t\t\t),\n\t\t\t'p' => array(\n\t\t\t\t'tagName' => 'p',\n\t\t\t\t'hasClosingTag' => true,\n\t\t\t),\n\t\t\t'span' => array(\n\t\t\t\t'tagName' => 'span',\n\t\t\t\t'hasClosingTag' => true,\n\t\t\t),\n\t\t\t'input' => array(\n\t\t\t\t'tagName' => 'input',\n\t\t\t\t'hasClosingTag' => false,\n\t\t\t),\n\t\t);\n\t}", "function register_block_core_site_tagline()\n {\n }", "public function tagged( $tag );", "public function init(){\n parent::init();\n $this->registerAssets();\n \n echo CHtml::openTag($this->tag, $this->getTitleOptions());\n echo $this->getTitleText();\n }", "function kalatheme_icon_default_settings(){\n return array(\n 'tag' => 'span'\n );\n}", "protected function addDefaultTypoScript() {}", "public function register_assets() {\n\t}", "function add_tags($tags) {\n array_merge($this->tags, $tags);\n }", "function getTag($name, $default = 0) {\n if(empty($this -> $name)) {\n return $default ;\n } else {\n return $this -> $name ;\n }\n }", "private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }", "function bp_tag_my_fav_content_init() {\n\trequire( dirname( __FILE__ ) . '/my-tagged-content.php' );\n}", "public function registerAssets()\n {\n $view = $this->getView();\n Asset::register($view);\n//\n// $attr = $this->attribute;\n// $js = <<<SCRIPT\n//\n//SCRIPT;\n//\n// $view->registerJs($js);\n }", "protected function add_tags_input()\n {\n $tags = DataManager::retrieve_content_object_tags_for_user(Session::get_user_id());\n\n if ($this->content_object->is_identified())\n {\n $default_tags = DataManager::retrieve_content_object_tags_for_content_object(\n $this->content_object->get_id()\n );\n }\n\n $tags_form_builder = new TagsFormBuilder($this);\n $tags_form_builder->build_form($tags, $default_tags);\n }", "function add_type_attribute($tag, $handle, $src) {\n if ( 'charts' !== $handle ) {\n return $tag;\n }\n // change the script tag by adding type=\"module\" and return it.\n $tag = '<script type=\"module\" src=\"' . esc_url( $src ) . '\"></script>';\n return $tag;\n}", "final public function Add_Google_Tag_Manager_HEAD() {\n\t\tif (isset(self::$GOOGLE_TAG_MANAGER_ID) && !empty(self::$GOOGLE_TAG_MANAGER_ID)) {\n\t\t?>\n<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\nnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\nj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n})(window,document,'script','dataLayer','<?= self::$GOOGLE_TAG_MANAGER_ID; ?>');</script>\n<?\n \t}\n\t}", "public function registerAssets()\n {\n $view = $this->getView();\n StarRatingAsset::register($view);\n $this->registerPlugin('rating');\n }", "public function tags()\r\n {\r\n }", "public function addTagToPostInTheMiddle() {}", "public function registerAssets()\n\t{\n\t\t$view = $this->getView();\n\t\tFilterCategoriesWithLimitsAssets::register($view);\n\t}", "function add_tag($tag) {\n array_push($this->tags, $tag);\n }", "protected function _initTag()\n {\n $tagId = (int)$this->getRequest()->getParam('tag_id', false);\n $storeId = (int)$this->getRequest()->getParam('store', false);\n $tag = $this->_objectManager->create(\\Magepow\\ProductTags\\Model\\Tag::class);\n if ($tagId) {\n $tag->load($tagId);\n }\n $coreRegistry = $this->_objectManager->get(\\Magento\\Framework\\Registry::class);\n $coreRegistry->register('tag', $tag);\n $coreRegistry->register('current_tag', $tag);\n $this->_objectManager->get(\\Magento\\Cms\\Model\\Wysiwyg\\Config::class)\n ->setStoreId($storeId);\n return $tag;\n }", "protected function setOgTags()\n {\n if ($this->arResult['OG_TAGS']['TITLE'])\n {\n Asset::getInstance()->addString('<meta property=\"og:title\" content=\"'.$this->arResult['OG_TAGS']['TITLE'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['DESCRIPTION'])\n {\n Asset::getInstance()->addString('<meta property=\"og:description\" content=\"'.$this->arResult['OG_TAGS']['DESCRIPTION'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['URL'])\n {\n Asset::getInstance()->addString('<meta property=\"og:url\" content=\"'.$this->arResult['OG_TAGS']['URL'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['IMAGE'])\n {\n Asset::getInstance()->addString('<meta property=\"og:image\" content=\"'.$this->arResult['OG_TAGS']['IMAGE'].'\" />', true);\n }\n }", "function tag_agenda() {\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x('Tag', 'taxonomy general name'),\n 'singular_name' => _x('Tag', 'taxonomy singular name'),\n 'search_items' => __('Cari Tag'),\n 'popular_items' => __('Tag Populer'),\n 'all_items' => __('Semua Tag'),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __('Edit Tag'),\n 'update_item' => __('Update Tag'),\n 'add_new_item' => __('Tambah Tag Baru'),\n 'new_item_name' => __('New Tag Name'),\n 'separate_items_with_commas' => __('Pisahkan tag dengan koma.'),\n 'add_or_remove_items' => __('Tambah atau hapus tag'),\n 'choose_from_most_used' => __('Pilih dari tag populer'),\n 'menu_name' => __('Tags'),\n );\n\n register_taxonomy('tag_agenda', 'agenda', array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array('slug' => 'tag-agenda'),\n ));\n}", "public function add($name)\n\t{\n\t\tif ( ! isset($this->assets[$name]))\n\t\t{\n\t\t\t$this->assets[$name] = new Asset($this->type, $name, $this, $this->app);\n\t\t}\n\t}", "public function addTag( $data = array() ) { \t\n\n $url = $this->_base_url . 'tags';\n $options['data']['tag'] = $data;\n $options['post'] = true;\n $this->_callAPI($url, $options);\n }", "public function ogTags()\n {\n include $this->partial_selector( 'head/og' );\n }", "public function tags();", "public function setDefaultTags()\n {\n\n if (!ToursTags::where('title', 'data_viezda')->exists()) {\n $newTag = new ToursTags();\n $newTag->title = 'data_viezda';\n $newTag->alias = 'Дата выезда';\n $newTag->save();\n\n $tagDataId = $newTag->id;\n } else {\n $tag = ToursTags::where('title', 'data_viezda')->select('id')->first();\n $tagDataId = $tag->id;\n }\n\n // Set default tag travel_type\n\n if (!ToursTags::where('title', 'travel_type')->exists()) {\n $newTag = new ToursTags();\n $newTag->title = 'travel_type';\n $newTag->alias = 'Способ путешествия';\n $newTag->save();\n\n $tagTravelId = $newTag->id;\n } else {\n $tag = ToursTags::where('title', 'travel_type')->select('id')->first();\n $tagTravelId = $tag->id;\n }\n\n return [0 => $tagTravelId, 1 => $tagDataId];\n\n }", "protected function registerAssets()\n {\n // register the necessary script files\n $bundle = TradingViewAsset::register($this->view)->withScripts($this->scripts);\n \n $this->options['library_path'] = $bundle->baseUrl . '/charting_library/';\n\n // prepare and register JavaScript code block\n $jsOptions = Json::encode($this->options);\n $js = \"var widget = window.tvWidget = new TradingView.widget($jsOptions);\";\n $key = __CLASS__ . '#' . $this->id;\n \n $this->view->registerJs($js, View::POS_READY, $key);\n }", "function tagConfig() {\n\n global $SM_siteManager;\n\n // template tag\n // requires NAME tag\n if ($this->attributes['NAME']) {\n $this->templateName = $this->attributes['NAME'];\n }\n else {\n // warning -- type not found, ignore\n $this->debugLog(\"warning: SM tag type INCLUDE had no NAME parameter\");\n return;\n }\n\n // now load that template and stick it in the new area\n $tpt = $SM_siteManager->loadTemplate($this->templateName);\n if (is_object($tpt)) {\n\n // yes! convert it into a template and add it in\n $this->tptPointer = $tpt;\n\n }\n else { \n // if it wasn't an object (ie, the template failed to load)\n // it will be ignored by the template\n $this->debugLog(\"warning: SM tag type INCLUDE, file name ($templateName) failed to load, ignoring\");\n }\n\n }", "function wp_img_tag_add_loading_optimization_attrs($image, $context)\n {\n }", "function addExtraAssets()\n\t{\n\t\t$base = JURI::base(true);\n\t\t$regurl = '#(http|https)://([a-zA-Z0-9.]|%[0-9A-Za-z]|/|:[0-9]?)*#iu';\n\n\t\tforeach (array(T3_PATH, T3_TEMPLATE_PATH) as $bpath) {\n\t\t\t//full path\n\t\t\t$afile = $bpath . '/etc/assets.xml';\n\t\t\tif (is_file($afile)) {\n\n\t\t\t\t//load xml\n\t\t\t\t$axml = JFactory::getXML($afile);\n\n\t\t\t\t//process if exist\n\t\t\t\tif ($axml) {\n\t\t\t\t\tforeach ($axml as $node => $nodevalue) {\n\t\t\t\t\t\t//ignore others node\n\t\t\t\t\t\tif ($node == 'stylesheets' || $node == 'scripts') {\n\t\t\t\t\t\t\tforeach ($nodevalue->file as $file) {\n\t\t\t\t\t\t\t\t$compatible = $file['compatible'];\n\t\t\t\t\t\t\t\tif ($compatible) {\n\t\t\t\t\t\t\t\t\t$parts = explode(' ', $compatible);\n\t\t\t\t\t\t\t\t\t$operator = '='; //exact equal to\n\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\tif (count($parts) == 2) {\n\t\t\t\t\t\t\t\t\t\t$operator = $parts[0];\n\t\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//compare with Joomla version\n\t\t\t\t\t\t\t\t\tif (!version_compare(JVERSION, $operand, $operator)) {\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$url = (string)$file;\n\t\t\t\t\t\t\t\tif (substr($url, 0, 2) == '//') { //external link\n\n\t\t\t\t\t\t\t\t} else if ($url[0] == '/') { //absolute link from based folder\n\t\t\t\t\t\t\t\t\t$url = is_file(JPATH_ROOT . $url) ? $base . $url : false;\n\t\t\t\t\t\t\t\t} else if (!preg_match($regurl, $url)) { //not match a full url -> sure internal link\n\t\t\t\t\t\t\t\t\t$url = T3Path::getUrl($url); // so get it\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($url) {\n\t\t\t\t\t\t\t\t\tif ($node == 'stylesheets') {\n\t\t\t\t\t\t\t\t\t\t$this->addStylesheet($url);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->addScript($url);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// template extended styles\n\t\t$aparams = $this->_tpl->params->toArray();\n\t\t$extras = array();\n\t\t$itemid = JFactory::getApplication()->input->get ('Itemid');\n\t\tforeach ($aparams as $name => $value) {\n\t\t\tif (preg_match ('/^theme_extras_(.+)$/', $name, $m)) {\n\t\t\t\t$extras[$m[1]] = $value;\n\t\t\t}\n\t\t}\n\t\tif (count ($extras)) {\n\t\t\tforeach ($extras as $extra => $pages) {\n\t\t\t\tif (!is_array($pages) || !count($pages) || in_array (0, $pages)) {\n\t\t\t\t\tcontinue; // disabled\n\t\t\t\t}\n\t\t\t\tif (in_array (-1, $pages) || in_array($itemid, $pages)) {\n\t\t\t\t\t// load this style\n\t\t\t\t\t$this->addCss ('extras/'.$extra);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function load_wp_auto_tagging(){\n\t\tif ( is_admin() ) {\n\t\t\tif ( apply_filters( 'wp_auto_tag_pre_check', class_exists( 'wp_auto_tagging' ) && wp_auto_tagging::prerequisites() ) ) {\n\t\t\t\trequire_once 'settings.php';\n\t\t\t\tregister_activation_hook( __FILE__, array('wp_auto_tagging_settings', 'register_defaults'));\n\t\t\t\tadd_action('init', array('wp_auto_tagging', 'instance'), -100, 0); \n\t\t\t} else {\n\t\t\t\t// let the user know prerequisites weren't met\n\t\t\t\tadd_action('admin_head', array('wp_auto_tagging', 'fail_notices'), 0, 0);\n\t\t\t}\n\t\t}\n\t}", "public function addLoginAssets() {}", "public function addLoginAssets() {}", "protected function setTags()\n {\n $this->authBasedTag();\n $this->nameBasedTag($this->relatedEntities);\n }", "function add_head_tag($tag)\n {\n $this->addHeadTag($tag);\n }", "function assetTags ($type, $paths, $incTag, $blockTag) {\n\n $paths = uv($paths);\n if (!is_array($paths)) {\n $paths = !$paths ? [] : [$paths];\n }\n // if ($type == 'js') {\n // $jsData = Tht::module('Js')->u_plugin('jsData');\n // if ($jsData) { array_unshift($paths, $jsData); }\n // }\n\n if (!count($paths)) { return ''; }\n\n $nonce = Tht::module('Web')->u_nonce();\n\n $includes = [];\n $blocks = [];\n foreach ($paths as $path) {\n\n if (!OTypeString::isa($path)) {\n $this->error(\"Path must be a `url` or `$type` TypeString: `$path`\");\n }\n\n if (HtmlTypeString::isa($path)) {\n $tag = $path->u_stringify();\n $blocks []= $tag;\n }\n else if (!UrlTypeString::isa($path)){\n\n // Inline it in the HTML document\n $str = $path->u_stringify();\n if ($type == 'js' && !preg_match('#\\s*\\(function\\(\\)\\{#', $str)) {\n $str = \"(function(){\" . $str . \"})();\";\n }\n\n $vals = [\n 'body' => OTypeString::create('html', $str),\n ];\n if ($type == 'js') {\n $vals['nonce'] = $nonce;\n }\n $blockTag->u_fill(OMap::create($vals));\n $blocks []= $blockTag->u_stringify();\n }\n else {\n if ($path->u_is_relative()) {\n // TODO: Link to asset, with cache time set to file modtime\n\n // $basePath = ;\n // if (defined('BASE_URL')) {\n // $basePath = preg_replace('#' . BASE_URL . '#', '', $basePath);\n // }\n\n // $filePath = Tht::getThtFileName(Tht::path('pages', $basePath));\n // $path->u_query([ 'cache' => filemtime($filePath));\n }\n\n $vals = [\n 'url' => $path\n ];\n if ($type == 'js') {\n $vals['nonce'] = $nonce;\n }\n $incTag->u_fill(OMap::create($vals));\n $includes []= $incTag->u_stringify();\n }\n }\n\n $sIncludes = implode(\"\\n\", $includes);\n $sBlocks = implode(\"\\n\\n\", $blocks);\n\n return $sIncludes . \"\\n\" . $sBlocks;\n }", "protected function getDefaultTags()\n {\n return [\n 'canonical' => ['link[rel=\"canonical\"]', 'href'],\n 'og' => ['meta[property=\"og:url\"]', 'content'],\n 'twitter' => ['meta[name=\"twitter:url\"]', 'content'],\n 'http-refresh' => ['meta[http-equiv=\"refresh\"]', 'content'],\n ];\n }", "public static function add_tag_generator() {\n\t\twpcf7_add_tag_generator(\n\t\t\tself::$tag_name,\n\t\t\t__( 'Dynamic Dropdown', 'wpcf7' ),\n\t\t\t'wpcf7-tg-pane-dynamicdropdown',\n\t\t\tarray( __CLASS__, 'add_tag_panel' )\n\t\t);\n\t}", "public function onAssetsInitialized(): void\n {\n $isProduction = $this->config->get(\"plugins.$this->name.isProduction\", true);\n $minified = $isProduction ? '.min' : '';\n\n /** @var Assets */\n $assets = $this->grav['assets'];\n\n $assets->addCss(\"plugin://{$this->name}/css/style$minified.css\");\n $assets->addJs(\n \"plugin://{$this->name}/js/taxonomy-filter$minified.js\",\n ['group' => 'head', 'position' => 'after', 'loading' => 'defer']\n );\n $assets->addInlineJs(\n \"const taxonomyFilters = \" . json_encode($this->routes),\n ['group' => 'head', 'position' => 'after']\n );\n }", "public function assets($assets)\r\n\t{\r\n\t\t$assets->group('default');\r\n\t\treturn parent::assets($assets);\r\n\t}", "public function init(){\n parent::init();\n $this -> publishAssets();\n }", "function wp_img_tag_add_loading_attr($image, $context)\n {\n }", "function otm_render_global_tags() {\n\n\t$tags = get_tags();\n\n\t// If we have tags\n\tif ( $tags ) :\n\n\t\t// Render title\n\t\tprintf( '<h3 class=\"c-section-title\">%s</h3>', __( 'Tags', 'otm' ) );\n\n\t\t// Start a list\n\t\techo '<ul class=\"c-menu c-tag-list\">';\n\n\t\t// Render each tag\n\t\tforeach ( $tags as $tag ) {\n\t\t\techo '<li class=\"c-menu__item c-tag-list__item c-read-more c-content-filter__input js-no-menu-toggle\" data-tag=\"' . $tag->slug . '\">' . $tag->name . '</li>';\n\t\t}\n\tendif;\n}", "public function __construct()\n {\n $this->tag = new Tag;\n parent::__construct();\n }", "public function getTag()\n {\n }", "public function actionAdd()\n\t{\n\t\t$tag = array(\n\t\t\t'tag_id' => 0\n\t\t);\n\n\t\treturn $this->_getTagAddEditResponse($tag);\n\t}", "function create_tag_taxonomies()\n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Tags' ),\n 'popular_items' => __( 'Popular Tags' ),\n 'all_items' => __( 'All Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Tag' ),\n 'update_item' => __( 'Update Tag' ),\n 'add_new_item' => __( 'Add New Tag' ),\n 'new_item_name' => __( 'New Tag Name' ),\n 'separate_items_with_commas' => __( 'Separate tags with commas' ),\n 'add_or_remove_items' => __( 'Add or remove tags' ),\n 'choose_from_most_used' => __( 'Choose from the most used tags' ),\n 'menu_name' => __( 'Tags' ),\n );\n\n register_taxonomy('tag','edicoesAnteriores',array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'tag' ),\n ));\n}", "public function getImageTag();", "function _barony_base_file_additions() {\n // Add Font Awesome\n drupal_add_js('//use.fontawesome.com/76948938e9.js', 'external');\n // Add Google Fonts\n drupal_add_css('//fonts.googleapis.com/css?family=Uncial+Antiqua|Metamorphous', array('group' => CSS_THEME));\n\n // Custom additions\n drupal_add_js(drupal_get_path('theme', 'barony_base') . '/js/header-movement.js', array('type' => 'file', 'scope' => 'footer'));\n}", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo( \"buttonBar.css\", dirname(__FILE__) . \"/assets\" );\n $this->addGradientAssets(array(\n $this->gradient, $this->hoverGradient,\n $this->activeGradient, $this->selectedGradient,\n $this->separatorGradient, $this->selectedColor\n ));\n }", "public function registerAssetBundle()\n {\n CosAsset::register($this->getView());\n }", "public function create()\n {\n $tag = new Tag();\n $this->vars['tag'] = $tag;\n $this->title = __('system.tag_add');\n $this->template = 'admin.tag';\n \n return $this->renderOutput();\n }", "public function addAssets()\n {\n $this->addJs('../../graphreport/assets/d3.js');\n $this->addJs('../../graphreport/assets/c3.js');\n $this->addCss('../../graphreport/assets/c3.css'); \n }", "public function Get_Tag() {\n // Populate the curly tags\n $tag = array(\n 'code' => $this->tag,\n 'category' => $this->category,\n 'hint' => $this->hint,\n 'name' => $this->name,\n 'method' => array($this,'_Render'),\n );\n // Return the tag\n return $tag;\n }", "function magimpact_entry_tags()\n\t{\n\t\t$tag_list = get_the_tag_list('', __(', ', 'twentythirteen'));\n\t\tif ($tag_list) {\n\t\t\techo '<span class=\"tags-links\">' . $tag_list . '</span>';\n\t\t}\n\n\t}", "public function addTag(string $name, TagInterface $tag, string $placement = null);", "function green_shortcodes_vc_add_init_script($output, $tag='', $atts=array(), $content='') {\n\t\tif ( (isset($_GET['vc_editable']) && $_GET['vc_editable']=='true') && (isset($_POST['action']) && $_POST['action']=='vc_load_shortcode')\n\t\t\t\t&& ( isset($_POST['shortcodes'][0]['tag']) && $_POST['shortcodes'][0]['tag']==$tag )\n\t\t) {\n\t\t\tif (green_strpos($output, 'green_vc_init_shortcodes')===false) {\n\t\t\t\t$id = \"green_vc_init_shortcodes_\".str_replace('.', '', mt_rand());\n\t\t\t\t$output .= '\n\t\t\t\t\t<script id=\"'.esc_attr($id).'\">\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tgreen_init_post_formats();\n\t\t\t\t\t\t\tgreen_init_shortcodes(jQuery(\"body\").eq(0));\n\t\t\t\t\t\t\tgreen_scroll_actions();\n\t\t\t\t\t\t} catch (e) { };\n\t\t\t\t\t</script>\n\t\t\t\t';\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "public function __construct( $tag ) {\n parent::__construct( $tag );\n }", "function asset_image_tag($asset, $thumbnail_type = 'full', $options = array(), $relative_path = null)\n{\n if ($asset == null) {\n return '';\n }\n $options = array_merge(array(\n 'alt' => $asset->getDescription() . ' ' . $asset->getCopyright(),\n 'title' => $asset->getDescription() . ' ' . $asset->getCopyright()\n ), $options);\n\n if($asset->isImage())\n {\n $src = $asset->getUrl($thumbnail_type, $relative_path);\n }\n else\n {\n if($thumbnail_type == 'full')\n {\n throw new sfAssetException('Impossible to render a non-image asset in an image tag');\n }\n else\n {\n switch($asset->getType())\n {\n case 'txt':\n $src = '/sfAssetsLibraryPlugin/images/txt.png';\n break;\n case 'xls':\n $src = '/sfAssetsLibraryPlugin/images/xls.png';\n break;\n case 'doc':\n $src = '/sfAssetsLibraryPlugin/images/doc.png';\n break;\n case 'pdf':\n $src = '/sfAssetsLibraryPlugin/images/pdf.png';\n break;\n case 'html':\n $src = '/sfAssetsLibraryPlugin/images/html.png';\n break;\n case 'archive':\n $src = '/sfAssetsLibraryPlugin/images/archive.png';\n break;\n case 'bin':\n $src = '/sfAssetsLibraryPlugin/images/bin.png';\n break;\n default:\n $src = '/sfAssetsLibraryPlugin/images/unknown.png';\n }\n }\n }\n return image_tag($src, $options);\n}", "public function initialize()\n {\n // attributes\n $this->setName('tags');\n $this->setPhpName('Tag');\n $this->setClassname('Tag');\n $this->setPackage('ip7website');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n $this->addColumn('NAME', 'Name', 'VARCHAR', true, 16, null);\n // validators\n $this->addValidator('NAME', 'minLength', 'propel.validator.MinLengthValidator', '1', 'Le nom doit faire au moins 1 caractère.');\n $this->addValidator('NAME', 'unique', 'propel.validator.UniqueValidator', '', 'Le nom existe déjà.');\n }", "function create_tag( $tag_name, $tag_color = null, $tag_bg = null ) {\n $tag = E_Tag::new_instance( $tag_name, $tag_color, $tag_bg );\n return $tag;\n}", "function base_tag($path = null) {\n if(!empty($path)) $path = trim($path, '/').\"/\";\n return $this->context->tag('base', array('href' => $this->base_url().\"/$path\")).\"\\n\";\n }", "public function addStaticJavascript()\n {\n JHTML::_('behavior.mootools');\n\n $document = JFactory::getDocument();\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/jquery-ui-base-1.8.20.css\");\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/tagit-stylish-yellow.css\");\n\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery.1.7.2.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery-ui.1.8.20.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/tagit.js\");\n $document->addScriptDeclaration(\"jQuery.noConflict();\");\n }", "public function registerAssets()\n {\n $view = $this->getView();\n CronAsset::register($view);\n if ($this->hasModel()) {\n $attributeId = Html::getInputId($this->model, $this->tagInputName);\n $value = Html::getAttributeValue($this->model, $this->tagInputName);\n } else {\n $attributeId = $this->tagInputName;\n }\n if(!$value){\n $value = $this->value;\n }\n $dictionaries = json_encode([$this->language => require __DIR__ . \"/messages/{$this->language}/dict.php\"], JSON_FORCE_OBJECT);\n $js =<<<JS\n var dict = {$dictionaries};\n $.tr.dictionary(dict);\n $.tr.language('{$this->language}');\n $('#{$this->id}').cron({\n initial: \"{$value}\",\n onChange: function() {\n $('#{$attributeId}').val($(this).cron(\"value\"));\n },\n customValues: {$this->customValues()},\n tr: $.tr.translator(), \n });\nJS;\n $view->registerJs($js);\n }", "public function getFirstTagDataProvider() {}", "public function init(){\n parent::init();\n $this->registerAssets();\n \n echo CHtml::openTag(\"div\", $this->getContainerOptions());\n echo CHtml::openTag(\"div\", $this->getInnerContainerOptions());\n echo CHtml::openTag(\"div\", $this->getContentOptions());\n }", "public function init() {\n parent::init();\n $this -> publishAssets();\n }", "function tags_support_all() {\n\tregister_taxonomy_for_object_type('post_tag', 'page');\n}", "function the_header_image_tag($attr = array())\n {\n }", "public function initialize()\n {\n $this->addTwigFunction('icon', 'twigIcon');\n }", "public function get_tag()\n {\n }", "public function tag($tag) {\n $this->tag = $tag;\n }", "protected function _checkTagDeclaration($name)\n {\n if (!isset($this->_tags[$name])) {\n $this->_tags[$name] = array(\n 'type' => self::TYPE_DEFAULT,\n 'stoppers' => array(\n '[/' . $name . ']',\n '[/]'\n ),\n 'group' => $this->_defaultGroup\n );\n }\n }", "protected function register_assets() {\n\n\t\t// Register block script for backend/editor.\n\t\t\\wp_register_script(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( '/dist/blocks.build.js', __FILE__ ),\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.build.js' ),\n\t\t\ttrue\n\t\t);\n\n\t\t// Register block editor styles for backend/editor.\n\t\t\\wp_register_style(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( 'dist/blocks.editor.build.css', __FILE__ ),\n\t\t\tarray( 'wp-edit-blocks' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.editor.build.css' )\n\t\t);\n\n\t}", "public function tag()\n\t{\n\t\t/* Example usage:\n\t\t{exp:crush:tag \n\t\t\tfilename=\"/_assets/css/style.css\"\n\t\t\tminify=\"y\"\n\t\t\tvars=\"my_var1=#333|my_var2=20px\"\n\t\t\tattributes=\"media=print|title=monkey\"\n\t\t} \n\t\t*/\n\t\treturn csscrush_tag(\n\t\t\t$this->filename, \n\t\t\t$this->get_params(FALSE, array('filename', 'attributes')),\n\t\t\t$this->attributes\n\t\t);\n\n\t}", "protected function loadAssets()\n {\n }", "function update_tag( $tag_id, $tag_name = null, $tag_color = null, $tag_bg = null ) {\n $tag = E_Tag::set_instance( $tag_id, $tag_name, $tag_color, $tag_bg );\n return $tag;\n}", "function _creative_include_layout_additional_assets($file_name) {\n foreach (array('css', 'js') as $type) {\n $file_relative_path = CREATIVE_THEME_PATH . \"/$type/includes/$file_name.$type\";\n\n if (file_exists(DRUPAL_ROOT . '/' . $file_relative_path)) {\n call_user_func(\"drupal_add_$type\", $file_relative_path, array(\n 'group' => constant(strtoupper($type) . '_THEME'),\n ));\n }\n }\n}", "public function action_register_stackitems()\r\n\t{\r\n\t\tStackItem::register( 'multicomplete', Site::get_url( 'vendor' ) . '/multicomplete.js' )->add_dependency( 'jquery.ui' );\r\n\t\t$url = '\"' . URL::get( 'ajax', array( 'context' => 'auto_tags' ) ) . '\"';\r\n\t\t$script = <<< HEADER_JS\r\n$(document).ready(function(){\r\n\t$(\"#tags\").multicomplete({\r\n\t\tsource: $url,\r\n\t\tminLength: 2,\r\n\t\tautoFocus: true,\r\n\t});\r\n});\r\nHEADER_JS;\r\n\t\tStackItem::register( 'tags_auto', $script )->add_dependency( 'multicomplete' );\r\n\t}", "function html5blankgravatar ($avatar_defaults)\n{\n $myavatar = get_template_directory_uri() . '/img/gravatar.jpg';\n $avatar_defaults[$myavatar] = \"Custom Gravatar\";\n return $avatar_defaults;\n}", "public function registerAssets()\n {\n $jsTimeVal = Date('l d/m/Y H:i', $this->timestamp);\n $view = $this->getView();\n WeatherBundleAsset::register($view);\n $uuid = uniqid();\n $js = <<<JS\n var wb = new WeatherBundle({$this->lat}, {$this->lon}, '{$this->weatherUrl}', 'metric', {$this->droneModels}, '{$jsTimeVal}');\n wb.getWeather(\"{$this->imageDir}\", \"{$this->timeVal}\", {$this->callback});\n JS;\n $view->registerJs($js,View::POS_READY);\n }" ]
[ "0.6767079", "0.63187766", "0.60554534", "0.6048157", "0.6048157", "0.602392", "0.5958825", "0.5841171", "0.5744926", "0.5707165", "0.56977105", "0.56849974", "0.56737214", "0.56690353", "0.56613845", "0.56613195", "0.5595326", "0.55868274", "0.5576817", "0.55597466", "0.55420685", "0.5540621", "0.55260056", "0.55242693", "0.55082977", "0.5492298", "0.5467709", "0.54656714", "0.5440474", "0.5430958", "0.542769", "0.53910613", "0.53847325", "0.53769326", "0.53467536", "0.534137", "0.53242624", "0.53090805", "0.5306335", "0.5301489", "0.5298725", "0.5291792", "0.52907056", "0.52825737", "0.5267427", "0.5256662", "0.5242644", "0.5241743", "0.5236294", "0.5228055", "0.5226034", "0.5220241", "0.5220241", "0.5214868", "0.52143043", "0.5202656", "0.5201897", "0.520102", "0.51899815", "0.51837003", "0.516576", "0.515191", "0.5137479", "0.51370203", "0.5115199", "0.5108872", "0.5101099", "0.5100429", "0.5099203", "0.5093675", "0.5085473", "0.5081816", "0.5080693", "0.50787205", "0.5072857", "0.5070051", "0.50684583", "0.5063683", "0.5058449", "0.50561714", "0.50538635", "0.504963", "0.50489837", "0.50398314", "0.5030194", "0.502531", "0.50225705", "0.5017087", "0.50162554", "0.5015607", "0.5000915", "0.49924454", "0.4987647", "0.49868482", "0.49814868", "0.4973372", "0.4973154", "0.49730745", "0.49681708", "0.49649543", "0.49649298" ]
0.0
-1
Entiendo que cuando dice que NO puedan heredar las clases hijas, se refiere a que NO la pueda modificar... (PREGUNTAR a Conchi). Eso o si lo que quiere es que lo pongamos PRIVATE y casque el programa...
public final function asigNombre($nombre){ $this->nombre=$nombre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guardarReclamo()\n\t\t{\n\t\t}", "public function Modificar(): bool\n {\n $retorno = false;\n $objetoAccesoDato = AccesoDatos::RetornarObjetoAcceso();\n\n\n $consulta =$objetoAccesoDato->RetornarConsulta(\"UPDATE usuarios SET nombre = :nombre, correo = :correo, clave = :clave, id_perfil = :id_perfil\n WHERE usuarios.id = :id\");\n // $consulta = $objetoAccesoDato->RetornarConsulta(\"UPDATE `usuarios` SET `nombre`='$this->nombre',`correo`='$this->correo',\"\n // . \"`clave`='$this->clave',`id_perfil`='$this->id_perfil' WHERE `id`='$this->id'\");\n\n\n $consulta->bindParam(':correo', $this->correo, PDO::PARAM_STR);\n $consulta->bindParam(':clave', $this->clave, PDO::PARAM_STR);\n $consulta->bindParam(':nombre', $this->nombre, PDO::PARAM_STR);\n $consulta->bindParam(':id_perfil', $this->perfil, PDO::PARAM_INT);\n $consulta->bindParam(':id', $this->id, PDO::PARAM_INT);\n\n $consulta->execute();\n $filasAfectadas = $consulta->rowCount();\n if ($filasAfectadas > 0)\n $retorno = true;\n\n\n return $retorno;\n }", "public function recivirClases( ) {\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_RECIBIR_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"media\"]);//intensidad media\n AccesoControladoresDispositivos::$ctrlLuz->encenderLucesSuelo();\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaEncender();\n usleep(5000000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n }else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n }\n usleep(1000000);\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaVideoConferencia();\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderPizarra();\n AccesoControladoresDispositivos::$ctrlFoco->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\nAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPlasmas->verVideoSalaEnPlasma();\n ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->activarPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->verVideoconferenciaEnPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->activarNuestroSonido();\n AccesoControladoresDispositivos::$ctrlVideoconferencia->conectar();\n AccesoGui::$guiEscenarios->escenarioRecivirClase();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\n\n }", "private function metodo_privado() {\n }", "function modificarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('herrajeaccesorio','herrajeaccesorio','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function truycapvao_private_cha(){\n }", "function evt__form_cargo__modificacion($datos)\r\n\t{\r\n $res=0;\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){//es una modificacion\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n \r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con($car['id_cargo'],$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']);\r\n }\r\n if($res==1){//hay otro puesto \r\n toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar(); \r\n }\r\n }else{//es un alta\r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con(0,$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']); \r\n }\r\n if($res==1){//hay otro puesto \r\n throw new toba_error('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos');\r\n // toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $pers=$this->controlador()->dep('datos')->tabla('persona')->get(); \r\n $datos['generado_x_pase']=0;\r\n $datos['id_persona']=$pers['id_persona'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar();\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $cargo['id_cargo']=$car['id_cargo'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->cargar($cargo);\r\n } \r\n }\r\n\t}", "function modificarCuentaServSoc()\n {\n // TODO: Implement modificarCuentaServSoc() method.\n }", "function modf_unimed()\n\t{\n\t \t$sql=\"UPDATE slc_unid_medida SET nomenc_unid_medida= '$this->abr', desc_unid_medida= '$this->des' WHERE id_unid_medida ='$this->cod'\";\n\t\t\n\t\t$result=mysql_query($sql,$this->conexion);\n\t\tif ($result) \n\t\t\t return true;\n\t\telse\n\t\t\t return false;\n\t}", "private function modificarCita(){\n $query = \"UPDATE \" . $this->table . \" SET PacienteId ='\" . $this->idpaciente . \"',Fecha = '\" . $this->fecha . \"', HoraInicio = '\" . $this->horarioIn . \"', HoraFin = '\" .\n $this->horarioFn . \"', Motivo = '\" . $this->motivo . \"' WHERE CitaId = '\" . $this->idcita . \"'\"; \n $resp = parent::nonQuery($query);\n if($resp >= 1){\n return $resp;\n }else{\n return 0;\n }\n }", "function opcion__personalizable()\n\t{\n\t\t$proyecto = $this->get_proyecto();\n\n\t\tif (!$proyecto->tiene_clases_extendidas('toba')) {\n\t\t\t$mensaje = \"Debe extender las clases de toba primero con el comando \";\n\t\t\t$mensaje .= \"toba proyecto extender_clases_toba\";\n\t\t\t$this->consola->mensaje($mensaje);\n\t\t\treturn;\n\t\t}\n\t\t$this->hacer_personalizable();\n\t\t$proyecto->generar_autoload($this->consola);\n\n\t\t$mensaje = \"El proyecto ya es personalizable. Ahora debe revincular las clases con el comando toba proyecto revincular\";\n\t\t$this->consola->mensaje($mensaje);\n\t}", "public function Modificar(): bool;", "public function GestorReglasNegocios() {\n $this->gestorAccesoDatos = new GestorAccesoDatos();\n }", "function evt__form_integrante_i__modificacion($datos)\r\n {\r\n $perfil = toba::usuario()->get_perfil_datos();\r\n if ($perfil == null) {//es usuario de SCyT\r\n if($this->chequeo_formato_norma($datos['rescd_bm'])){ \r\n $datos2['rescd_bm']=$datos['rescd_bm'];\r\n $datos2['resaval']=$datos['resaval'];\r\n $datos2['cat_investigador']=$datos['cat_investigador'];\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos2);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar('Guardado. Solo modifica ResCD baja/modif, Res Aval, Cat Investigador', 'info');\r\n }\r\n }else{//es usuario de la UA\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n $int=$this->dep('datos')->tabla('integrante_interno_pi')->get(); \r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){//no puede ir fuera del periodo del proyecto\r\n //toba::notificacion()->agregar('Revise las fechas. Fuera del periodo del proyecto!', 'error'); \r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{ \r\n //Pendiente verificar que la modificacion no haga que se superpongan las fechas\r\n $haysuperposicion=false;//no es igual al del alta porque no tengo que considerar el registro vigente$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->superposicion_modif($pi['id_pinv'],$datos['id_docente'],$datos['desde'],$datos['hasta'],$registro['id_designacion'],$registro['desde']);\r\n if(!$haysuperposicion){\r\n $band=false;\r\n if($pi['estado']=='A'){\r\n $band=$this->dep('datos')->tabla('logs_integrante_interno_pi')->fue_chequeado($int['id_designacion'],$int['pinvest'],$int['desde']);\r\n } \r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if (isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD Baja/Modif invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if($band){//si alguna vez fue chequeado por SCyT entonces solo puede modificar fecha_hasta y nada mas (se supone que lo demas ya es correcto) \r\n //fecha_hasta porque puede ocurrir que haya una baja del participante o la modificacion de funcion o carga horaria\r\n unset($datos['funcion_p']);\r\n unset($datos['cat_investigador']);\r\n unset($datos['identificador_personal']);\r\n unset($datos['carga_horaria']);\r\n unset($datos['desde']);\r\n unset($datos['rescd']);\r\n unset($datos['cat_invest_conicet']);\r\n unset($datos['resaval']);\r\n unset($datos['hs_finan_otrafuente']);\r\n //Solo si cambia hasta y resol bm pierde el check\r\n if( $int['hasta']<>$datos['hasta'] or $int['rescd_bm']<>$datos['rescd_bm'] ){\r\n $datos['check_inv']=0;//pierde el check si es que lo tuviera. Solo cuando cambia algo\r\n }\r\n $mensaje='Ha sido chequeado por SCyT, solo puede modificar fecha hasta y resCD baja/modif';\r\n }else{//band false significa que puede modificar cualquier cosa\r\n //esto lo hago porque el set de toba no modifica la fecha desde por ser parte de la clave \r\n $this->dep('datos')->tabla('integrante_interno_pi')->modificar_fecha_desde($int['id_designacion'],$int['pinvest'],$int['desde'],$datos['desde']);\r\n $mensaje=\"Los datos se han guardado correctamente\";\r\n }\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar($mensaje, 'info'); \r\n }\r\n }\r\n }else{\r\n //toba::notificacion()->agregar('Hay superposicion de fechas', 'error'); \r\n throw new toba_error(\"Hay superposicion de fechas\");\r\n }\r\n }\r\n }\r\n //nuevo Lo coloco para que el formulario se oculte al finalizar\r\n $this->dep('datos')->tabla('integrante_interno_pi')->resetear();\r\n $this->s__mostrar_i=0;\r\n }", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "function modificarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_baja','fecha_baja','date');\n\t\t$this->setParametro('nro_cuenta','nro_cuenta','varchar');\n\t\t$this->setParametro('fecha_alta','fecha_alta','date');\n\t\t$this->setParametro('id_institucion','id_institucion','int4');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('denominacion','denominacion','varchar');\n\t\t$this->setParametro('centro','centro','varchar');\n\t\t\n\t\t$this->setParametro('id_finalidads','id_finalidads','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function modificarConcurso() {\n\n\t\tif(!$_SESSION[\"currentuser\"]){\n\t\t\techo \"<script>window.location.replace('index.php');</script>\";\n\t\t}\n\n\t\t$concu= new Concurso();\n\n\t\tif (isset($_POST[\"nombreC\"])){\n\t\t\t/*Metodo de la clase concurso que devuelve un boolean indicando si\n\t\t\tel concurso existe en la base de datos*/\n\t\t\t$existe=$concu->existConcurso();\n\n\t\t\t/*Si el concurso no existe devuelve un mensaje de error*/\n\t\t\tif(!$existe){\n\t\t\t\t$errors = array();\n\t\t\t\t$errors[\"nombreC\"] = \"Este concurso no existe, por lo que no se puede modificar\";\n\t\t\t\t$this->view->setVariable(\"errors\", $errors);\n\t\t\t\t/*Si el concurso si que existe, se guardan los valores introducidos en la\n\t\t\t\tmodificacion en la clase concurso*/\n\t\t\t}else{\n\t\t\t\t$concu->setIdC('1');\n\t\t\t\t$concu->setNombreC($_POST[\"nombreC\"]);\n\n\t\t\t\t$ruta=\"./resources/bases/\";//ruta carpeta donde queremos copiar las imagenes\n\t\t\t\t$basesCTemp=$_FILES['basesC']['tmp_name'];//guarda el directorio temporal en el que se sube la imagen\n\t\t\t\t$basesC=$ruta.$_FILES['basesC']['name'];//indica el directorio donde se guardaran las imagenes\n\t\t\t\tmove_uploaded_file($basesCTemp, $basesC);\n\n\t\t\t\t$concu->setBasesC($basesC,$basesCTemp);\n\t\t\t\t$concu->setCiudadC($_POST[\"ciudadC\"]);\n\t\t\t\t$concu->setFechaInicioC($_POST[\"fechaInicioC\"]);\n\t\t\t\t$concu->setFechaFinalC($_POST[\"fechaFinalC\"]);\n\t\t\t\t$concu->setFechaFinalistasC($_POST[\"fechaFinalistasC\"]);\n\t\t\t\t$concu->setPremioC($_POST[\"premioC\"]);\n\t\t\t\t$concu->setPatrocinadorC($_POST[\"patrocinadorC\"]);\n\n\t\t\t\ttry{\n\t\t\t\t\t/*Comprueba si los datos introducidos son validos*/\n\t\t\t\t\t$concu->checkIsValidForRegister();\n\n\t\t\t\t\t// Actualiza los datos del concurso\n\t\t\t\t\t$concu->update();\n\n\t\t\t\t\t//mensaje de confirmación y redirige al metodo consultarConcurso del controlador ConcursoCotroller\n\t\t\t\t\techo \"<script> alert('Modificación realizada correctamente'); </script>\";\n\t\t\t\t\techo \"<script>window.location.replace('index.php?controller=concurso&action=consultarConcurso');</script>\";\n\n\t\t\t\t}catch(ValidationException $ex) {\n\n\t\t\t\t\t$errors = $ex->getErrors();\n\t\t\t\t\t$this->view->setVariable(\"errors\", $errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*Devuelve los datos del concurso para mostrarlos en la vista*/\n\t\t$concu = $this->concurso->ver_datos();\n\n\t\t/* Guarda el valor de la variable $concu en la variable concu accesible\n\t\tdesde la vista*/\n\t\t$this->view->setVariable(\"concu\", $concu);\n\n\t\t/*Permite visualizar: view/vistas/modificacionConcurso.php */\n\t\t$this->view->render(\"vistas\", \"modificacionConcurso\");\n\t}", "function modificarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\t\t$this->setParametro('desc_cuenta','desc_cuenta','varchar');\n\t\t$this->setParametro('moneda','moneda','int4');\n\t\t$this->setParametro('cuenta','cuenta','varchar');\n\t\t$this->setParametro('tipo_cuenta','tipo_cuenta','bpchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado_cuenta','estado_cuenta','bpchar');\n\t\t$this->setParametro('banco','banco','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function seminarioClase( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_SEMINARIO_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"maxima\"]);\n usleep(500000);\n ConexionServidorCliente::$ctrlGuiPantallas->subirPantallaElectrica();\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n\t//Comentado mientras se repara el visor de opacos.\n //ConexionServidorCliente::$ctrlGuiCamaraDocumentos->camaraDocumentosApagar();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarCentral();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\tAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPantallas->pipEnPantallaPresi();\n AccesoGui::$guiEscenarios->escenarioSeminario();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n }", "function modificarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_COT_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('lugar_entrega','lugar_entrega','varchar');\n\t\t$this->setParametro('tipo_entrega','tipo_entrega','varchar');\n\t\t$this->setParametro('fecha_coti','fecha_coti','date');\n\t\t$this->setParametro('numero_oc','numero_oc','varchar');\n\t\t$this->setParametro('id_proveedor','id_proveedor','int4');\n\t\t$this->setParametro('precio_total','precio_total','numeric');\n\t\t$this->setParametro('fecha_entrega','fecha_entrega','date');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t$this->setParametro('fecha_venc','fecha_venc','date');\n\t\t$this->setParametro('obs','obs','text');\n\t\t$this->setParametro('fecha_adju','fecha_adju','date');\n\t\t$this->setParametro('nro_contrato','nro_contrato','varchar');\n\t\t$this->setParametro('tipo_cambio_conv','tipo_cambio_conv','numeric');\n $this->setParametro('tiempo_entrega','tiempo_entrega','varchar');\n\t\t$this->setParametro('funcionario_contacto','funcionario_contacto','varchar');\n\t\t$this->setParametro('telefono_contacto','telefono_contacto','varchar');\n\t\t$this->setParametro('correo_contacto','correo_contacto','varchar');\n\t\t$this->setParametro('prellenar_oferta','prellenar_oferta','varchar');\n\t\t$this->setParametro('forma_pago','forma_pago','varchar');\n\n $this->setParametro('id_solicitud','id_solicitud','int4');\n $this->setParametro('justificacion','justificacion','text');\n\n \n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n //var_dump('llega', $this->respuesta);\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function modificarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_analisis_porque_det','id_analisis_porque_det','int4');\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t$this->setParametro('solucion','solucion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('porque','porque','varchar');\n\t\t$this->setParametro('respuesta','respuesta','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function modificarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_ime';\n\t\t$this->transaccion='ADQ_PROC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t$this->setParametro('num_convocatoria','num_convocatoria','varchar');\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('fecha_ini_proc','fecha_ini_proc','date');\n\t\t$this->setParametro('obs_proceso','obs_proceso','varchar');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('num_tramite','num_tramite','varchar');\n\t\t$this->setParametro('codigo_proceso','codigo_proceso','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('num_cotizacion','num_cotizacion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function modificarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_ime';\n\t\t$this->transaccion='SNX_UDOC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_ucedifobracivil','id_ucedifobracivil','int4');\n\t\t$this->setParametro('id_ucedifsubgrupo','id_ucedifsubgrupo','int4');\n\t\t$this->setParametro('cantidadobracivil','cantidadobracivil','numeric');\n\t\t$this->setParametro('id_obracivilmoe','id_obracivilmoe','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function presupuestoModificado(){\n $this->iPresupuestoModificado = $this->iPresupuestoInicial;\n $this->save();\n }", "function modificar_contenido($nick_user, $nivel, $ubi_tema, $nom_user, $cor_user)\r\n\t\t\t{\r\n\t\t\t\t$clave_seccion_enviada = $_GET[\"clave_seccion\"];\r\n\t\t\t\tif(isset($_POST[\"guardar\"]) && $_POST[\"guardar\"]==\"si\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$formulario_final = $_POST[\"formulario_final\"];\r\n\t\t\t\t\t\t$fecha_inicio = $_POST[\"ano_i\"].\"-\".$_POST[\"mes_i\"].\"-\".$_POST[\"dia_i\"];\r\n\t\t\t\t\t\t$fecha_termino = $_POST[\"ano_t\"].\"-\".$_POST[\"mes_t\"].\"-\".$_POST[\"dia_t\"];\r\n\t\t\t\t\t\t$situacion_total = $_POST[\"situacion_total\"];\r\n\t\t\t\t\t\t$ver_actualizacion = $_POST[\"ver_actualizacion\"];\r\n\t\t\t\t\t\t$usar_caducidad = $_POST[\"usar_caducidad\"];\r\n\r\n\t\t\t\t\t\t$clave_seccion = $_POST[\"clave_seccion\"];\r\n\t\t\t\t\t\t$clave_modulo= $_POST[\"clave_modulo\"];\r\n\t\t\t\t\t\t$clave_contenido = $_POST[\"clave_contenido\"];\r\n\t\t\t\t\t\t$fecha_hoy = date(\"Y-m-d\");\r\n\t\t\t\t\t\t$hora_hoy = date (\"H:i:s\");\r\n\t\t\t\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\r\n\t\t\t\t\t\t$motivo = $this->escapar_caracteres($_POST[\"motivo\"]);\r\n\t\t\t\t\t\t$motivo = strip_tags($motivo);\r\n\t\t\t\t\t\t$correo = $_POST[\"correo\"];\r\n\t\t\t\t\t\t$nombre = $_POST[\"nombre\"];\r\n\t\t\t\t\t\t$situacion_temporal = $_POST[\"situacion_temporal\"];\t\r\n\t\t\t\t\t\tif($correo==\"\")\r\n\t\t\t\t\t\t\t{$correo = $cor_user;}\r\n\t\t\t\t\t\tif($nombre==\"\")\r\n\t\t\t\t\t\t\t{$nombre = $nom_user;}\r\n\t\t\t\t\t\t$nombre = strip_tags($nombre);\r\n\t\t\t\t\t\t$sql_adicional = \"null, '0000-00-00','00:00:00', '', '', '','',\";\r\n\t\t\t\t\t\tif($situacion_temporal==\"activo\")\r\n\t\t\t\t\t\t\t{$sql_adicional = \"'$nick_user', '$fecha_hoy', '$hora_hoy', '$ip', '$motivo', '$nombre', '$correo',\";}\r\n\t\t\t\t\t\t$insert_camb = \"insert into nazep_zmod_contenido_cambios \r\n\t\t\t\t\t\t(clave_contenido, situacion, nick_user_propone, fecha_propone, hora_propone, ip_propone, motivo_propone,\r\n\t\t\t\t\t\tnombre_propone, correo_propone,\r\n\t\t\t\t\t\tnick_user_decide, fecha_decide, hora_decide, ip_decide, motivo_decide,\r\n\t\t\t\t\t\tnombre_decide, correo_decide,\r\n\t\t\t\t\t\tnuevo_situacion, nuevo_ver_actualizacion, nuevo_usar_caducidad, nuevo_fecha_incio, nuevo_fecha_fin, \r\n\t\t\t\t\t\tanterior_situacion, anterior_ver_actualizacion, anterior_usar_caducidad, anterior_fecha_incio, anterior_fecha_fin)\t\t\t\t\t\r\n\t\t\t\t\t\tselect '$clave_contenido', '$situacion_temporal','$nick_user', '$fecha_hoy', '$hora_hoy', '$ip', '$motivo',\r\n\t\t\t\t\t\t'$nombre','$correo',\r\n\t\t\t\t\t\t\".$sql_adicional.\"\r\n\t\t\t\t\t\t'$situacion_total', '$ver_actualizacion', '$usar_caducidad', '$fecha_inicio', '$fecha_termino',\r\n\t\t\t\t\t\tsituacion, ver_actualizacion, usar_caducidad, fecha_incio, fecha_fin\r\n\t\t\t\t\t\tfrom nazep_zmod_contenido \r\n\t\t\t\t\t\twhere clave_contenido = '$clave_contenido'\";\r\n\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t$conexion = $this->conectarse();\r\n\t\t\t\t\t\tmysql_query(\"START TRANSACTION;\");\r\n\t\t\t\t\t\tif (!@mysql_query($insert_camb))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t$error = 1;\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$paso = true;\r\n\t\t\t\t\t\t\t\t$clave_contenido_cambios_db = mysql_insert_id();\r\n\t\t\t\t\t\t\t\t$clave_contenido_detalle = $_POST[\"clave_contenido_detalle\"];\r\n\t\t\t\t\t\t\t\t$pagina = $_POST[\"pagina\"];\r\n\t\t\t\t\t\t\t\t$texto = $this->escapar_caracteres($_POST[\"conte_texto\"]);\r\n\t\t\t\t\t\t\t\t$situacion_p = $_POST[\"situacion\"];\r\n\t\t\t\t\t\t\t\t$insert_con_cam = \"insert into nazep_zmod_contenido_detalle_cambios\r\n\t\t\t\t\t\t\t\t(clave_contenido_cambios, clave_contenido_detalle, nuevo_pagina, nuevo_texto, nuevo_situacion,\r\n\t\t\t\t\t\t\t\tanterior_pagina, anterior_texto, anterior_situacion)\r\n\t\t\t\t\t\t\t\tselect '$clave_contenido_cambios_db', '$clave_contenido_detalle',\r\n\t\t\t\t\t\t\t\t'$pagina', '$texto', '$situacion_p', pagina, texto, situacion\r\n\t\t\t\t\t\t\t\tfrom nazep_zmod_contenido_detalle\r\n\t\t\t\t\t\t\t\twhere clave_contenido_detalle = '$clave_contenido_detalle'\";\r\n\t\t\t\t\t\t\t\tif (!@mysql_query($insert_con_cam))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t\t\t$error = \"2\";\r\n\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{$paso = true;}\r\n\t\t\t\t\t\t\t\tif($situacion_temporal==\"activo\")\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$update_2 = \"update nazep_zmod_contenido\r\n\t\t\t\t\t\t\t\t\t\tset situacion = '$situacion_total', ver_actualizacion = '$ver_actualizacion', usar_caducidad ='$usar_caducidad', \r\n\t\t\t\t\t\t\t\t\t\tfecha_incio = '$fecha_inicio', fecha_fin = '$fecha_termino',\r\n\t\t\t\t\t\t\t\t\t\tuser_actualizacion = '$nick_user', fecha_actualizacion = '$fecha_hoy', hora_actualizacion = '$hora_hoy',\r\n\t\t\t\t\t\t\t\t\t\tip_actualizacion = '$ip', nombre_actualizacion = '$nombre', correo_actualizacion = '$correo'\r\n\t\t\t\t\t\t\t\t\t\twhere clave_contenido = '$clave_contenido' and clave_modulo = '$clave_modulo'\";\r\n\t\t\t\t\t\t\t\t\t\tif (!@mysql_query($update_2))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$error = 3;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paso = true;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clave_contenido_detalle = $_POST[\"clave_contenido_detalle\"];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$pagina = $_POST[\"pagina\"];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$situacion = $_POST[\"situacion\"];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$texto = $this->escapar_caracteres($_POST[\"conte_texto\"]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$update3 = \"update nazep_zmod_contenido_detalle set pagina = '$pagina', texto = '$texto', situacion = '$situacion' \r\n\t\t\t\t\t\t\t\t\t\t\t\twhere clave_contenido_detalle = '$clave_contenido_detalle'\";\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (!@mysql_query($update3))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$error = \"4\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{$paso = true;}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($paso)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmysql_query(\"COMMIT;\");\r\n\t\t\t\t\t\t\t\techo \"termino-,*-$formulario_final\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo \"Error: Insertar en la base de datos, la consulta: <strong>$error</strong> <br/> con el siguiente mensaje: $men\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$this->desconectarse($conexion);\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$paginas_contenido= $_POST[\"paginas_contenido\"];\r\n\t\t\t\t\t\t$clave_modulo= $_POST[\"clave_modulo\"];\t\t\t\t\t\t\r\n\t\t\t\t\t\t$nombre_sec = HtmlAdmon::historial($clave_seccion_enviada);\r\n\t\t\t\t\t\tHtmlAdmon::titulo_seccion(\"Modificar contenido html de la secci&oacute;n \\\"$nombre_sec\\\"\");\r\n\t\t\t\t\t\t$con_veri = \"select cc.clave_contenido_cambios from nazep_zmod_contenido_cambios cc, nazep_zmod_contenido c\r\n\t\t\t\t\t\twhere c.clave_seccion = '$clave_seccion_enviada' and c.clave_modulo = '$clave_modulo' and \r\n\t\t\t\t\t\t(cc.situacion = 'pendiente' or cc.situacion = 'nueva_pagina' or cc.situacion = 'nuevo')\r\n\t\t\t\t\t\tand c.clave_contenido = cc.clave_contenido\";\r\n\t\t\t\t\t\t$conexion = $this->conectarse();\r\n\t\t\t\t\t\t$res = mysql_query($con_veri);\r\n\t\t\t\t\t\t$cantidad = mysql_num_rows($res);\r\n\t\t\t\t\t\t$this->desconectarse($conexion);\r\n\t\t\t\t\t\tif($cantidad!=0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\techo '<tr><td align=\"center\"><br /><strong>'.cont_txt_tiene_cambio_pen.'</strong><br /><br /></td></tr>';\r\n\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\tHtmlAdmon::boton_regreso(array('clave_usar'=>$clave_seccion_enviada,'texto'=>regresar_opc_mod));\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$variable_archivos = directorio_archivos.\"$clave_seccion_enviada/\";\r\n\t\t\t\t\t\t\t\t$_SESSION[\"direccion_archivos\"] = $variable_archivos;\t\r\n\t\t\t\t\t\t\t\t$con_contenido = \"select fecha_incio, fecha_fin, situacion, ver_actualizacion, usar_caducidad, clave_contenido \r\n\t\t\t\t\t\t\t\tfrom nazep_zmod_contenido where clave_seccion = '$clave_seccion_enviada' and clave_modulo = '$clave_modulo'\";\r\n\t\t\t\t\t\t\t\t$conexion = $this->conectarse();\r\n\t\t\t\t\t\t\t\t$res_contenido = mysql_query($con_contenido);\r\n\t\t\t\t\t\t\t\t$ren = mysql_fetch_array($res_contenido);\r\n\t\t\t\t\t\t\t\t$fecha_incio = $ren[\"fecha_incio\"];\r\n\t\t\t\t\t\t\t\tlist($ano_i, $mes_i, $dia_i) = explode(\"-\",$fecha_incio);\r\n\t\t\t\t\t\t\t\t$fecha_fin = $ren[\"fecha_fin\"];\r\n\t\t\t\t\t\t\t\tlist($ano_t, $mes_t, $dia_t) = explode(\"-\",$fecha_fin);\r\n\t\t\t\t\t\t\t\t$situacion_total = $ren[\"situacion\"];\r\n\t\t\t\t\t\t\t\t$ver_actualizacion = $ren[\"ver_actualizacion\"];\r\n\t\t\t\t\t\t\t\t$usar_caducidad = $ren[\"usar_caducidad\"];\r\n\t\t\t\t\t\t\t\t$clave_contenido = $ren[\"clave_contenido\"];\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\techo '\r\n\t\t\t\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\t\techo'\r\n\t\t\t\t\t\t\t\t$(document).ready(function()\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$.frm_elem_color(\"#FACA70\",\"\");\r\n\t\t\t\t\t\t\t\t\t\t\t$.guardar_valores(\"frm_modificar_contenido\");\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tfunction validar_form(formulario, situacion_temporal, nombre_formulario)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.situacion_temporal.value = situacion_temporal;\r\n\t\t\t\t\t\t\t\t\t\t\tif(formulario.motivo.value == \"\") \r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.jv_campo_motivo.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.motivo.focus(); \t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tseparador = \"/\";\r\n\t\t\t\t\t\t\t\t\t\t\tfecha_ini = formulario.dia_i.value+\"/\"+formulario.mes_i.value+\"/\"+formulario.ano_i.value;\r\n\t\t\t\t\t\t\t\t\t\t\tfecha_fin = formulario.dia_t.value+\"/\"+formulario.mes_t.value+\"/\"+formulario.ano_t.value;\r\n\t\t\t\t\t\t\t\t\t\t\tif(!Comparar_Fecha(fecha_ini, fecha_fin))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.comparar_fecha_veri.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.dia_i.focus(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif(!verificar_fecha(fecha_ini, separador))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.verificar_fecha_ini.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.dia_i.focus(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif(!verificar_fecha(fecha_fin, separador))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.verificar_fecha_fin.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.dia_t.focus(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tvalorTemporal = FCKeditorAPI.__Instances[\\'conte_texto\\'].GetHTML();\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.conte_texto.value = valorTemporal;\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.btn_guardar1.style.visibility=\"hidden\";\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.btn_guardar1a.style.visibility=\"hidden\";\r\n\t\t\t\t\t\t\t\t\t\t\tdocument.crear_nueva_pagina.btn_nueva_pagina.style.visibility=\"hidden\";\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\t\t\tif($nivel == 1 or $nivel == 2)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\techo 'formulario.btn_guardar2.style.visibility=\"hidden\";\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.btn_guardar2a.style.visibility=\"hidden\";';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\techo '\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.formulario_final.value = nombre_formulario;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\t\techo '</script>';\r\n\t\t\t\t\t\t\t\techo '<form name=\"regresar_pantalla\" id=\"regresar_pantalla\" method=\"post\" action=\"index.php?opc=111&amp;clave_seccion='.$clave_seccion_enviada.'\" class=\"margen_cero\">';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"archivo\" value = \"../librerias/modulos/contenido/contenido_admon.php\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clase\" value = \"clase_contenido\"/>';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"metodo\" value = \"modificar_contenido\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_modulo\" value = \"'.$clave_modulo.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"paginas_contenido\" value = \"'.$paginas_contenido.'\" />';\r\n\t\t\t\t\t\t\t\techo '</form>';\t\r\n\t\t\t\t\t\t\t\techo '<form name=\"recargar_pantalla\" id= \"recargar_pantalla\" method=\"get\" action=\"index.php\" class=\"margen_cero\"><input type=\"hidden\" name=\"opc\" value = \"11\" /><input type=\"hidden\" name=\"clave_seccion\" value = \"'.$clave_seccion_enviada.'\" /></form>';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\techo '<form name=\"frm_modificar_contenido\" id=\"frm_modificar_contenido\" method=\"post\" action=\"index.php?opc=111&amp;clave_seccion='.$clave_seccion_enviada.'\" class=\"margen_cero\" >';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td width=\"400\">'.persona_cambio.'</td><td><input type =\"text\" name = \"nombre\" size = \"60\" /></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.correo_cambio.'</td><td><input type = \"text\" name = \"correo\" size = \"60\" /></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.motivo_cambio.'</td><td><textarea name=\"motivo\" cols=\"45\" rows=\"5\"></textarea></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.situacion.'</td><td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion_total\" id =\"situacion_act\" value=\"activo\" '; if ($situacion_total == \"activo\") { echo 'checked=\"checked\"'; } echo '/> '.activo.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion_total\" id =\"situacion_no\" value=\"cancelado\" '; if ($situacion_total == \"cancelado\") { echo 'checked=\"checked\"'; } echo '/> '.cancelado.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.cont_txt_ver_fec_ac.'</td><td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"ver_actualizacion\" id =\"ver_actualizacion_si\" value=\"SI\" '; if ($ver_actualizacion == \"SI\") { echo 'checked=\"checked\"'; } echo '/> '.si.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"ver_actualizacion\" id =\"ver_actualizacion_no\" value=\"NO\" '; if ($ver_actualizacion == \"NO\") { echo 'checked=\"checked\"'; } echo '/> '.no.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.cont_txt_usar_cad_cont.'</td><td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"usar_caducidad\" id =\"usar_caducidad_si\" value=\"SI\" '; if ($usar_caducidad == \"SI\") { echo 'checked=\"checked\"'; } echo ' /> '.si.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"usar_caducidad\" id =\"usar_caducidad_no\" value=\"NO\" '; if ($usar_caducidad == \"NO\") { echo 'checked=\"checked\"'; } echo ' /> '.no.'&nbsp;';\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.fecha_ini_vig.'</td>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$areglo_meses = FunGral::MesesNumero();\r\n\t\t\t\t\t\t\t\t\t\t\t\techo dia.'&nbsp;<select name = \"dia_i\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($a = 1; $a<=31; $a++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$a.'\" '; if ($dia_i == $a) { echo 'selected=\"selected\"'; } echo ' >'.$a.'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo mes.'&nbsp;<select name = \"mes_i\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($b=1; $b<=12; $b++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$b.'\" '; if ($mes_i == $b) {echo ' selected=\"selected\" ';} echo ' >'. $areglo_meses[$b] .'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo ano.'&nbsp;<select name = \"ano_i\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($c=$ano_i-10; $c<=$ano_i+10; $c++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$c.'\" '; if ($ano_i == $c) {echo ' selected=\"selected\" ';} echo '>'.$c.'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.fecha_fin_vig.'</td>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo dia.'&nbsp;<select name = \"dia_t\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($a = 1; $a<=31; $a++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$a.'\" '; if ($dia_t == $a) { echo 'selected'; } echo '>'.$a.'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo mes.'&nbsp;<select name = \"mes_t\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($b=1; $b<=12; $b++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$b.'\" '; if ($mes_t == $b) {echo 'selected ';} echo '>'.$areglo_meses[$b].'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo ano.'&nbsp;<select name = \"ano_t\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($c=$ano_t-10; $c<=$ano_t+10; $c++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{echo '<option value = \"'.$c.'\" '; if ($ano_t == $c) {echo ' selected ';} echo '>'.$c.'</option>';}\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\t\techo '<br /><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td align=\"center\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"submit\" name=\"btn_guardar1a\" value=\"'.guardar.'\" onclick= \"return validar_form(this.form,\\'pendiente\\', \\'recargar_pantalla\\')\" />';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\t\tif($nivel == 1 or $nivel == 2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{echo '<td align=\"center\"><input type=\"submit\" name=\"btn_guardar2a\" value=\"'.guardar_puliblicar.'\" onclick= \"return validar_form(this.form,\\'activo\\', \\'regresar_pantalla\\')\" /></td>';}\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table><br/>';\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$cons_con_detalle = \"select clave_contenido_detalle, pagina, texto, situacion from nazep_zmod_contenido_detalle\r\n\t\t\t\t\t\t\t\t\twhere clave_contenido = '$clave_contenido' and pagina ='$paginas_contenido' \";\r\n\t\t\t\t\t\t\t\t\t$res = mysql_query($cons_con_detalle);\r\n\t\t\t\t\t\t\t\t\t$con = 1;\r\n\t\t\t\t\t\t\t\t\t$ren = mysql_fetch_array($res);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$pagina = $ren[\"pagina\"];\r\n\t\t\t\t\t\t\t\t\t$texto = stripslashes($ren[\"texto\"]);\r\n\t\t\t\t\t\t\t\t\t$clave_contenido_detalle_base = $ren[\"clave_contenido_detalle\"];\r\n\t\t\t\t\t\t\t\t\t$situacion_texto = $ren[\"situacion\"];\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_contenido_detalle\" value = \"'.$clave_contenido_detalle_base.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td align=\"center\"><strong>'.cont_txt_con_html_pag.' '.$pagina.'</strong></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td width=\"377\">'.cont_txt_num_pag.' '.$pagina.'<input type = \"hidden\" name = \"pagina\" size = \"5\" value =\"'.$pagina.'\" /></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td align=\"center\">'.cont_txt_sit_pag.' '.$pagina.'&nbsp;&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion\" id =\"situacion_act\" value=\"activo\" '; if ($situacion_texto == \"activo\") { echo 'checked=\"checked\"'; } echo '/> '.activo.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion\" id =\"situacion_no\" value=\"cancelado\" '; if ($situacion_texto == \"cancelado\") { echo 'checked=\"checked\"'; } echo '/> '.cancelado.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td><a name=\"texto_link\" id=\"texto_link\"></a>';\r\n\t\t\t\t\t\t\t\t\t\t\t$texto = ($texto!='')?$texto:'&nbsp;'; \r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con] = new FCKeditor(\"conte_texto\");\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->BasePath = '../librerias/fckeditor/';\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Value = $texto;\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Config['EditorAreaCSS'] = $ubi_tema.'fck_editorarea.css';\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Config['StylesXmlPath'] = $ubi_tema.'fckstyles.xml';\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Width = \"100%\";\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Height = \"500\";\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Create();\r\n\t\t\t\t\t\t\t\t\t\techo '</td></tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"formulario_final\" value = \"\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_contenido\" value = \"'.$clave_contenido.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"archivo\" value = \"../librerias/modulos/contenido/contenido_admon.php\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clase\" value = \"clase_contenido\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"metodo\" value = \"modificar_contenido\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"guardar\" value = \"si\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_seccion\" value = \"'.$clave_seccion_enviada.'\" />';\t\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_modulo\" value = \"'.$clave_modulo.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"situacion_temporal\" value = \"pendiente\" />';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td align=\"center\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"submit\" name=\"btn_guardar1\" value=\"'.guardar.'\" onclick= \"return validar_form(this.form,\\'pendiente\\', \\'recargar_pantalla\\')\" />';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\t\tif($nivel == 1 or $nivel == 2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{echo '<td align=\"center\"><input type=\"submit\" name=\"btn_guardar2\" value=\"'.guardar_puliblicar.'\" onclick= \"return validar_form(this.form,\\'activo\\', \\'regresar_pantalla\\')\" /></td>';}\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\techo '</form>';\r\n\t\t\t\t\t\t\t\t\techo '<hr />';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td align=\"center\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<form id=\"crear_nueva_pagina\" name=\"crear_nueva_pagina\" action=\"index.php?opc=111&amp;clave_seccion='.$clave_seccion_enviada.'\" method=\"post\" class=\"margen_cero\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"archivo\" value =\"../librerias/modulos/contenido/contenido_admon.php\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clase\" value = \"clase_contenido\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"metodo\" value = \"nueva_pagina\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_modulo\" value = \"'.$clave_modulo.'\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"paginas_contenido\" value = \"'.$paginas_contenido.'\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"submit\" name=\"btn_nueva_pagina\" value=\"'.cont_btn_7_cre_pag.'\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</form>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\tHtmlAdmon::div_res_oper(array());\r\n\t\t\t\t\t\t\t\tHtmlAdmon::boton_regreso(array('clave_usar'=>$clave_seccion_enviada,'texto'=>regresar_opc_mod));\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$this->desconectarse($conexion);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}", "public function crearNotaCtr($datos){\n\n $resultado = Modelo::crearNotaMdl($datos, \"notas_2\");\n\n if ($resultado == \"exito\") {\n\n }else{\n\n }\n\n\n\n\n }", "static public function ctrEditarOrientaModali(){\r\n\r\n\r\n if(isset($_POST[\"editarIdClase\"])){\r\n\r\n\r\n if(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarIdClase\"])){\r\n\r\n $tabla = \"tbl_mod_orientacion\";\r\n\r\n $datos = array(\"Id_Clase\" => $_POST[\"editarIdClase\"],\r\n \"Id_Modalidad\" => $_POST[\"editarSelecModalidad\"],\r\n \"Id_Orientacion\" => $_POST[\"editarSelecOrientacion\"]);\r\n\r\n $respuesta = ModeloClases::mdlEditarOrientaModali($tabla, $datos);\r\n\r\n\r\n }\r\n\r\n }\r\n }", "static public function ctrCrearClaseOrientaModali(){\r\n\r\n if(isset($_POST[\"nuevoDescripClase\"])){\r\n\r\n if(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoDescripClase\"])){\r\n\r\n $tabla = \"tbl_mod_orientacion\";\r\n\r\n\r\n $datos = array(\"Id_Modalidad\" => $_POST[\"nuevoSelecModalidad\"],\r\n \"Id_Orientacion\" => $_POST[\"nuevoSelecOrientacion\"]);\r\n\r\n\r\n $respuesta = ModeloClases::mdlIngresarClaseOrientaModali($tabla, $datos);\r\n }\r\n }\r\n\r\n }", "function modificarChequera(){\n\t\t$this->procedimiento='tes.f_chequera_ime';\n\t\t$this->transaccion='TES_CHQ_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_chequera','id_chequera','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('nro_chequera','nro_chequera','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function enviarClases( ) {\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_ENVIAR_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n \n\n AccesoControladoresDispositivos::$ctrlAutomata->escenarioEnviarClase();\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n AccesoControladoresDispositivos::$ctrlPantallas->encenderPresidencia();\n AccesoGui::$guiPantallas->pantallaPresidenciaEncender();\n usleep(3000000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n } else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n\n }\n usleep(1000000);\n AccesoControladoresDispositivos::$ctrlGuiPantalla->presidenciaVideoConferencia();\n AccesoControladoresDispositivos::$ctrlPlasma->encender();\n AccesoGui::$guiPlasma->encenderPlasma();\n AccesoControladoresDispositivos::$ctrlProyectores->encenderCentral();\n AccesoControladoresDispositivos::$ctrlProyectores->encenderPizarra();\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarVideo(7,8);\n //AccesoControladoresDispositivos::$ctrlGuiPantalla->presidenciaVideoconferencia();\n AccesoControladoresDispositivos::$ctrlFoco->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\t//AccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n AccesoControladoresDispositivos::$ctrlGuiPlasma->verVideoconferenciaEnPlasma();//begiratzeko\n AccesoControladoresDispositivos::$ctrlProyectores->activarCentral();\n AccesoControladoresDispositivos::$ctrlProyectores->activarPizarra();\n usleep(3000);\n AccesoControladoresDispositivos::$ctrlGuiProyectores->verPCSalaEnCentral();\n AccesoControladoresDispositivos::$ctrlGuiProyectores->verPCSalaEnPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->activarNuestroSonido();//volumen videoconferencia on\n AccesoControladoresDispositivos::$ctrlVideoconferencia->conectar();\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiMenus->menuPrincipal(true);\n //AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n //AccesoGui::$guiEscenarios->escenarioEnviarClase();\n AccesoGui::$guiVideoconferencia->dibujarPantalla();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n sleep(1);\n }", "private function consolaObjetoMetodo($clase = false) {\r\n\t\t\t$metodos = array_flip(get_class_methods($clase));\r\n\t\t\tif(array_key_exists('ejecutar', $metodos) == true):\r\n\t\t\t\t$this->consolaObjetoEjecutar($clase);\r\n\t\t\telseif(method_exists($clase, 'ejecutar') == true):\r\n\t\t\t\tthrow new \\RuntimeException(sprintf('El metodo: ejecutar no es posible ejecutarlo ya que puede ser privado o protegido en la clase: %, aplicación: %s', $this->objeto, $this->aplicacion));\r\n\t\t\telse:\r\n\t\t\t\tthrow new \\RuntimeException(sprintf('El metodo: ejecutar no existe en la clase: %, aplicación: %s', $this->objeto, $this->aplicacion));\r\n\t\t\tendif;\r\n\t\t}", "public function userCadConfirm($codConfirmacao=''){\n \n\n \n if($codConfirmacao==''){//se em branco retorna NULL (erro)\n \n \n return null;\n \n }else{//caso codigo informado procede com a conferencia e a ativacao\n \n \n \n $sql = new Sql();\n $ativacao = $sql->select('SELECT * FROM usuarios \n WHERE cod_ativacao_usuario = :cod_ativacao_usuario',\n array(':cod_ativacao_usuario'=>$codConfirmacao)); \n \n if(count($ativacao)==0){\n \n \n return null;//caso nada encontrado retorna NULL (deve pode ser um codigo invalido)\n \n }elseif(count($ativacao)>0){//caso codigo de confirmacao for OK entao ativa o cadastro\n \n \n //obtem o id do usuario\n $id_usuario = $ativacao[0]['id_usuario'];\n \n \n //verifica se existe a necessidade de ativacao\n if($ativacao[0]['status_usuario']==1){//cadastro JA ATIVO basta notificar\n \n return true;//retorna true confirmando que o cadastro esta atualizado \n \n }elseif($ativacao[0]['status_usuario']==0){//CASO INATIVO ENTÃO PROCEDE COM A ATIVACAO\n \n //atualiza o cadastro do usuario ativando ele\n $res = $sql->query('UPDATE usuarios SET status_usuario = 1\n WHERE id_usuario = :id_usuario',\n array(':id_usuario'=>$id_usuario));\n \n if($res>0){//se o numero de linhas afetadas for maior que ZERO\n \n return true;//retorna true confirmando que o cadastro esta atualizado\n \n }else{\n return false;//caso nada encontrado retorna FALSE (pode ter ocorrido erro na atualizacao)\n\n }\n }\n } \n }\n }", "public function test_character_can_don_one_shield()\n {\n // If he could hold 2 shields, his AC would change after picking up the 2nd one.\n $this->character->use(new Shield());\n $first_shield_ac = $this->character->getAc();\n $this->character->use(new Shield());\n $this->assertEquals($first_shield_ac, $this->character->getAc());\n }", "function modificarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function cl_rhemitecontracheque() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhemitecontracheque\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function get_id_clases(){ \n return (isset($this->_id_clases)) ? $this->_id_clases: null;\n}", "function modificarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_ime';\n\t\t$this->transaccion='VF_REFACOR_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_reenvio_factura','id_reenvio_factura','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_venta','id_venta','int4');\n\t\t$this->setParametro('correo','correo','varchar');\n\t\t$this->setParametro('observacion','observacion','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function isModerador(){ return false; }", "public function publicacaoReabrir()\r\n {\r\n try\r\n {\r\n $resposta = $this->conexao->Conectar()->prepare(\"UPDATE tbmissao SET id_usuario_concluir = null, data_conclusao = null, status = 0, data = NOW(), conclusao = null\"\r\n . \" WHERE id_missao = ?\");\r\n $resposta->bindValue(1, $this->getIdMissao(), PDO::PARAM_STR);\r\n //$resposta->bindValue(3, $this->getData(), PDO::PARAM_STR);\r\n if($resposta->execute())\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch (PDOException $e)\r\n {\r\n return $e->getMenssage();\r\n }\r\n }", "function evt__pantallas_ei__modificacion($datos)\n\t{\n\t\t$busqueda = $this->get_entidad()->tabla('objetos_pantalla')->nueva_busqueda();\n\t\t$busqueda->set_padre('pantallas', $this->get_pant_actual());\n\t\t$ids = $busqueda->buscar_ids();\n\t\tforeach ($ids as $id) {\n\t\t\t$this->get_entidad()->tabla('objetos_pantalla')->eliminar_fila($id);\n\t\t}\n\n\t\t//Seteo los cursores correspondientes y doy de alta los registros\n\t\t$this->get_entidad()->tabla('pantallas')->set_cursor($this->get_pant_actual());\n\t\t$orden = 0;\n\t\tforeach ($datos as $dato) {\n\t\t\t$id = $this->get_entidad()->tabla('dependencias')->get_id_fila_condicion(array('identificador' => $dato['dependencia']));\n\t\t\t$this->get_entidad()->tabla('dependencias')->set_cursor(current($id));\n\t\t\t$this->get_entidad()->tabla('objetos_pantalla')->nueva_fila(array('orden' => $orden, 'dependencia' => $dato['dependencia']));\n\t\t\t$orden++;\n\t\t}\n\t\t//Reseteo el cursor asi no se queda apuntando a donde no debe\n\t\t$this->get_entidad()->tabla('dependencias')->resetear_cursor();\n\t}", "function mod_beneficiario()\r\n\t{\t\r\n\t \t$sql=\"UPDATE slc_beneficiario set ced_titular='$this->cedt', nomb_titular='$this->nomt', telf_titular='$this->telt' where ced_beneficiario='$this->cedb'\";\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n\t\t//echo $sql;\r\n\t\tif ($result) \r\n\t\t return true;\r\n\t\telse\r\n\t\t return false;\r\n\t}", "public function TipoResiduoReglasNegocios() {\n $this->tipoResiduoAccesoDatos = new TipoResiduoAccesoDatos();\n }", "public function codeRetrait()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $frais = $this->compteModel->verifCodeRetrait($fkcarte, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "function confirmReception() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\r\n\t\t$insert = $conn->prepare(\"UPDATE `panier` SET `recu`=1 WHERE `id_internaute`=:id_internaute AND `id_nourriture`=:id_nourriture AND `datep`=:datep\");\r\n\t\ttry {\r\n\t\t\t$result = $insert->execute(array('id_internaute' => $this->getId_internaute(),'id_nourriture' => $this->getId_nourriture(),'datep' => $this->getDate()));\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\t\t$this->connection->closeConnection();\r\n\t}", "static public function ctrMensajeSinRevisar(){\n\n\t\t\t$tabla = \"mensajes\";\n\n\t\t\t$respuesta = ModeloMensajes::mdlMensajeSinRevisar($tabla);\n\n\t\t\t$sumaRevision = 0;\n\n\t\t\tforeach ($respuesta as $key => $value) {\n\n\t\t\t\tif($value[\"revision\"] == 0){\n\n\t\t\t\t\t++$sumaRevision;\n\n\t\t\t\t\techo '<span class=\"badge badge-danger navbar-badge\">'.$sumaRevision.'</span>';\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}", "public function atualizarPermissao($idpermissao,$permissao,$habilitado){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT permissao from tbpermissao where permissao='$permissao' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if(empty($permissao)) {\n return 2;\n }else if($permissao != $row['permissao']){\n $sql = \"SELECT count(*) as total from tbpermissao where permissao='$permissao' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if ($row['total'] >= 1) {\n return 0;\n }else {\n $sql = \"UPDATE tbpermissao SET permissao = '$permissao', habilitado = '$habilitado' WHERE idpermissao = '$idpermissao' \";\n\n echo $this->conexao->query($sql);\n }\n\n }else{\n\n $sql = \"UPDATE tbcategorias SET nome = '$permissao', habilitado = '$habilitado' WHERE idcategoria = '$idpermissao' \";\n\n echo $this->conexao->query($sql);\n \n }\n\n\n }", "public function Registrar_Licencia_noRemunerada3(HojaVida $data) {\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n if($data->lic_id_tipo == 5) \n { // Licencia 3 meses\n $tiporegistro = \"Solicitud Licencia no Remunerada (3 Meses)\";\n }\n else\n {\n $tiporegistro = \"Solicitud Licencia no Remunerada hasta por 2 años\";\n }\n\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario']; // idusuario que registra la solicitud de licencia\n \n $per_DI_other = $_POST['cedula_other'];\n $per_name_other = $_POST['nombre_other'];\n if($per_DI_other != \"\" && $per_name_other != \"\")\n {\n $id_usuario_soli = $_POST['id_servidor']; // id del usuario que solicita la licencia\n $cedula_solicitante = $_POST['cedula_other'];\n $nombre_solicitante = $_POST['nombre_other'];\n $cargo_solicitante = $_POST['cargo_servidor'];\n }\n else\n {\n $id_usuario_soli = $_SESSION['idUsuario']; // id del usuario que solicita la licencia\n $cedula_solicitante = $_SESSION['nomusu'];\n $nombre_solicitante = $_SESSION['nombre'];\n $cargo_solicitante = $_SESSION['cargo'];\n }\n try {\n\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n \n $sql = \"INSERT INTO `th_licencias_no_remunerada`(\n `lic_no_rem_id_tipo_resolucion`, \n `lic_no_rem_fecha_solicitud`, \n `lic_no_rem_fecha_escrito`, \n `lic_no_rem_cedula_servidor`, \n `lic_no_rem_nombre_servidor`, \n `lic_no_rem_fecha_inicio`, \n `lic_no_rem_fecha_fin`, \n `lic_no_rem_motivo`, \n `lic_no_rem_id_user`, \n `lic_no_rem_estado`,\n `lic_no_rem_ruta_doc_escrito`, \n `lic_no_rem_id_user_registra`, \n `lic_no_rem_cargo_cs`) \n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->lic_id_tipo,\n $fechalog,\n $data->fecha_escrito,\n $cedula_solicitante,\n $nombre_solicitante,\n $data->fechaInicio,\n $data->fechaFin,\n $data->comentario,\n $id_usuario_soli,\n 0,\n $data->ruta_doc_adjunto, \n $idusuario, \n $cargo_solicitante\n )\n );\n $this->pdo->exec(\"INSERT INTO log (fecha, accion, detalle, idusuario, idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "function modificarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_ime';\n\t\t$this->transaccion='PRE_PRE_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('gestion','gestion','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function _validate_uso_controladorModulos($idModulo, $idPermiso = null, $rolSessName) {\n $CI =& get_instance();\n if(!isset($_COOKIE[$CI->config->item('sess_cookie_name')])) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $idPersona = $CI->session->userdata('nid_persona');\n $idRol = $CI->session->userdata($rolSessName);\n if($idPersona == null || $idRol == null) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $CI->load->model('../m_utils', 'utiles');\n //VALIDAR QUE EL ROL TENGA EL PERMISO\n if($idPermiso != null) {\n if($CI->utiles->checkIfRolHasPermiso($idRol, $idModulo, $idPermiso) == false) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }\n //VALIDAR QUE EL USUARIO TENGA EL ROL\n if($CI->utiles->checkIfUserHasRol($idPersona, $idRol) == false && $idRol != ID_ROL_FAMILIA) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }", "function evt__form_sub__modificacion($datos)\r\n\t{\r\n if($this->dep('datos')->tabla('subroga')->esta_cargada()){//es modificacion\r\n $sub=$this->dep('datos')->tabla('subroga')->get();\r\n if($datos['desde']!=$sub['desde']){\r\n $this->dep('datos')->tabla('subroga')->modif_desde($datos['desde'],$sub['id_cargo'],$sub['desde']);\r\n }\r\n } \r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n $this->dep('datos')->tabla('subroga')->set($datos);\r\n $this->dep('datos')->tabla('subroga')->sincronizar();\r\n \r\n toba::notificacion()->agregar('Se ha guardado correctamente', 'info');\r\n $this->s__mostrar_s=0;\r\n\t}", "public function atualizarClientes($reg,$nome,$rg,$cpf,$cnpj,$telefone,$dtnascimento,$habilitado){\n //$conexao = $c->conexao();\n\n $usuid = $_SESSION['usuid'];\n $_SESSION['nomeAnterior'] = $nome;\n\n $sql = \"SELECT reg,rg FROM tbclientes c WHERE reg = '$reg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if($rg != $row['rg']){\n $sql = \"SELECT count(*) as existe FROM tbclientes c WHERE rg = '$rg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if ($row['existe'] >= 1 ) {\n return 0;\n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj', telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n }\n \n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj',telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n\n }\n\n \n\n }", "function atuOrcreceitaval($codrec,$mes,$valor){\n $msg = \"0|Registro Atualizado !\";\n $clorcreceitaval = new cl_orcreceitaval;\t\t\n $clorcreceita = new cl_orcreceita;\t\t\n if ($mes == 0 || $mes =='0' || $mes === 0){\n // ajusta o saldo previsto\n\t$clorcreceita->o70_valor = $valor;\n\t$clorcreceita->o70_codrec= $codrec;\n\t$clorcreceita->o70_anousu= db_getsession(\"DB_anousu\");\n $rr= $clorcreceita->alterar(db_getsession(\"DB_anousu\"),$codrec);\n\tif ($clorcreceita->erro_status==='0'){\n\t $msg = \"1|\".$clorcreceita->erro_msg;\n\t}else {\n\t $msg = \"0|\".$clorcreceita->erro_msg; \n\t} \n return $msg;\n } \n if ($valor > 0){\n $clorcreceitaval->o71_coddoc = 100; \n }else{\n $clorcreceitaval->o71_coddoc = 101; \n }\n $clorcreceitaval->o71_anousu = db_getsession(\"DB_anousu\"); \n $clorcreceitaval->o71_mes = $mes; \n $clorcreceitaval->o71_codrec = $codrec;\n $clorcreceitaval->o71_valor = $valor; \n\n\n $rr = $clorcreceitaval->sql_record($clorcreceitaval->sql_query_file(db_getsession(\"DB_anousu\"),$codrec,$clorcreceitaval->o71_coddoc,$mes));\n if ($clorcreceitaval->numrows >0){\n $clorcreceitaval->alterar($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n\n } else { \n $clorcreceitaval->incluir($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n }\t \n \n $erro = $clorcreceitaval->erro_msg;\n if ($clorcreceitaval->erro_status===0){\n $msg= \"1|\".$erro;\n\treturn $msg;\n } else {\n $msg = \"0|\".$clorcreceitaval->erro_msg;\n return $msg;\n }\n}", "static public function ctrEliminarReceta($receta){\n\n $idReceta = $receta;\n $tabla = \"Receta\";\n $tablaRecetaDetalle = \"RecetaDetalle\";\n\n //ELIMINAMOS PRIMERO EL DETALLE DE LA VENTA\n\n $eliminoDetalle = ModeloRecetas::mdlEliminarDetalleReceta($tablaRecetaDetalle, $idReceta);\n\n //ELIMINAMOS LA RECETA\n\n $respuesta = ModeloRecetas::mdlEliminarReceta($tabla, $idReceta); \n\n if($respuesta==\"ok\"){\n\n echo 0;\n\n }else{\n\n echo 1;\n\n }\n }", "function Revoke()\n \t{\n \t\t\n \t}", "public function enfocarCamaraPresidencia() {\n\n self::$presidencia->enfocar();\n\n }", "function cl_liccomissao() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"liccomissao\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function evt__1__entrada()\r\n\t{\r\n\t\t$this->pasadas_por_solapa[1]++;\r\n\t}", "function controlPracticasRelacionadas($clavebeneficiario, $fecha_comprobante, $datosnomenclador) {\r\n\r\n $ctrl['debito'] = false;\r\n $query = \"SELECT *\r\n FROM facturacion.cfg_practicas_relac\r\n WHERE modo=1 and\r\n trim(pracorigen)=trim('$datosnomenclador[3]')\";\r\n $res_origen = sql($query, \"Error 1\") or fin_pagina();\r\n\r\n if ($res_origen->RecordCount() > 0) {\r\n $ctrl['msj_error'] = \"\";\r\n $res_origen->MoveFirst();\r\n while (!$res_origen->EOF) {\r\n $anexo = $res_origen->fields['anexopracrel'];\r\n $nomencladordetalles['tipo'] = $datosnomenclador[2];\r\n $nomencladordetalles['codigo'] = $res_origen->fields['pracrel'];\r\n //busca si ese afiliado se realiza la practica relacionada\r\n $comprobantedelarelacionada = traemeLaPractica($clavebeneficiario, $nomencladordetalles, $fecha_comprobante, $anexo);\r\n if ($comprobantedelarelacionada != null) {\r\n $limite_dias = $res_origen->fields['dias'];\r\n $limite_dias_time = dias_time($limite_dias);\r\n $fecha_comprobante_time = strtotime(date($fecha_comprobante));\r\n $comprobantedelarelacionada_time = strtotime(date($comprobantedelarelacionada));\r\n $resta_time = $fecha_comprobante_time - $comprobantedelarelacionada_time;\r\n if ($resta_time <= $limite_dias_time) {\r\n //una vez que esta comprobado que se realizo la practica dentro de los 30 dias,\r\n //comprueba si existe otra condicion, o si no es obligatoria y sale. \r\n //TODO: no existe while para otras practicas obligatorias\r\n if (($res_origen->fields['otras'] == 'N') || ($res_origen->fields['tipo'] == 'OR')) {\r\n $ctrl['debito'] = false;\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . '] dentro del limite de tiempo';\r\n $ctrl['id_error'] = '76';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . ']';\r\n $ctrl['id_error'] = '75';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n $res_origen->MoveNext();\r\n }\r\n }\r\n return $ctrl;\r\n}", "public function modificar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n $id = $datosCampos[\"id\"];\n switch ($datosCampos[\"acceso\"]) //cambio los dato que vienen de la vista\n {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción \n $arrayCabecera = $guardar->meta($tabla);//armo el array con la cabecera de los datos\n $sentencia = $guardar->armarSentenciaModificar($arrayCabecera, $tabla);//genero sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos);//Armo el array con los datos que vienen de la vista y la cabecera de la BD\n array_shift($array);//elimino primer elemento del array que es el id\n array_push($array, $id);//agrego el id al final del array para realizar la consulta\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array);//genero la consulta a la BD \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit \n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id);\n return $respuesta;\n }", "public function desenfocarCamaraPresidencia() {\n\n self::$presidencia->desenfocar();\n\n }", "function cl_rechumanorelacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumanorelacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function imprimeCaracteristicas()\n\t{\n\t\techo \"<br />--------------------------------\\n\";\n\t\techo \"<br />Juego para: \".$this->consola.\"\\n\";\n\t\t//ejecutamos la funciona \"imprimeCaracteristicas()\" de la clase\n\t\t// extendida \"soporte\"\n\t\tparent::imprimeCaracteristicas();\n\t\techo \"<br />\".$this->devolverJugadoresPosibles().\"\\n\";\n\t\techo \"<br />--------------------------------\\n\";\n\t}", "public function cloture()\n {\n // On prépare la modification pour enregistrer la fermeture de la mission\n $sql = 'UPDATE `mission`\n SET `mission_statut` = 0\n WHERE `mission_id` = :mission';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':mission', $this->_data['mission_id'], PDO::PARAM_INT);\n\n // On effectue la modification\n $query->execute();\n }", "function modificarFactura(){\r\n\t\t$this->procedimiento='tesor.ft_factura_ime';\r\n\t\t$this->transaccion='TSR_FAC_MOD';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('nro_factura','nro_factura','int4');\r\n\t\t$this->setParametro('nombre_emisor','nombre_emisor','varchar');\r\n\t\t$this->setParametro('domicilio_emisor','domicilio_emisor','varchar');\r\n\t\t$this->setParametro('nit_emisor','nit_emisor','int4');\r\n\t\t$this->setParametro('nombre_cliente','nombre_cliente','varchar');\r\n\t\t$this->setParametro('domicilio_cliente','domicilio_cliente','varchar');\r\n\t\t$this->setParametro('nit_cliente','nit_cliente','int4');\t\t\r\n\t\t$this->setParametro('fecha_emision','fecha_emision','date');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function TienePermisos($seccion, $accion){\r\n$permitir=false;\r\n$permisos=$_SESSION[\"R0l3sp3rM1s0s\"];\r\n@$consulta=$permisos[$seccion][$accion];\r\nif ($consulta==\"SI\"){\r\n$permitir=true;\r\n}\r\nelse{\r\n$permitir=false;\r\n}\r\nreturn $permitir;\r\n\r\n}", "public function lostPw(){\r\n\t\t\r\n\t\t$required_fields = array('email','telefono');\r\n\t\t//si todos los campos requeridos estan continuamos\r\n\t\tif($this->campos_requeridos($required_fields,true) == true){\r\n\t\t\t$this->validar_email();\t\t\t\t\t \t //validar solo si es correcto\r\n\t\t\t$this->validar_telefono($_POST['telefono']); //en clase registro, llevar a seg_actions\r\n\t\t}else{\r\n\t\t\treturn $this->error;\t\t\t\t\t\t //deben completarse los campos requeridos\r\n\t\t}\r\n\r\n\t\tif(is_null($this->error)){\r\n\t\t\t\r\n\t\t\t//los datos enviados son validos\r\n\t\t\t$email = $_POST['email'];\r\n\t\t\t$telefono = $_POST['telefono'];\r\n\t\t\t$user_browser = $_SERVER['HTTP_USER_AGENT']; //navegador\r\n\t\t\t$ip = $_SERVER['REMOTE_ADDR']; //ip\r\n\t\t\t$macro_sha = hash('sha512', $email.$user_browser.$telefono.$ip);\r\n\t\t\t\r\n\t\t\t$cols = array('email' \t => $email,\t\t'telefono' => $telefono,\r\n\t\t\t\t\t\t 'ip' \t\t => $ip,\t\t\t'navegador' => $user_browser,\r\n\t\t\t\t \t\t 'hora' \t => $this->now,\t'macro_sha' => $macro_sha );\r\n\t\t\t\r\n\t\t\t//se guarda todo en db y se le envia un email\r\n\t\t\t$this->insert('solicitudes_clave',$cols);\r\n\t\t\t\r\n\t\t\t//comprobamos que existe el email\r\n\t\t\t$cols = array('id', 'user_email', 'salt', 'user_telefono');\r\n\t\t\t$this->where('user_email',$email);\r\n\t\t\tif($salida = $this->getOne('usuarios ',$cols)){\r\n\t\t\t\r\n\t\t\t\t$user_id \t = $salida['id'];\r\n\t\t\t\t$email_db \t = $salida['user_email'];\r\n\t\t\t\t$saltador \t = $salida['salt'];\r\n\t\t\t\t$telefono_db = $salida['user_telefono'];\r\n\t\t\t\r\n\t\t\t\tif($telefono == $telefono_db){\r\n\t\t\t\t\t//guardamos salt del user en solicitudes_clave\r\n\t\t\t\t\t$campos = array('salt' => $saltador);\r\n\t\t\t\t\t$this->where('email',$email_db);\r\n\t\t\t\t\t$this->update('solicitudes_clave',$campos);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//Actualizando movimientos en stats_user_conections\r\n\t\t\t\t\t$this->movimientoStats('Solicitado nuevo password',$user_id);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//generar link y se enviara email\r\n\t\t\t\t\treturn '<a href=\"index.php?accion=los&validation='.$macro_sha.'\">Sigua este enlace para continuar \r\n\t\t\t\t\t\t\t con el reestablecimiento e su contraseña</a>';\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//los datos no son correctos\r\n\t\t\t\t\treturn $this->errores[10];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//no existe este email\r\n\t\t\t\treturn $this->errores[10];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t//los datos (telefono y/o email) no son correctos\r\n\t\t\treturn $this->errores[10];\r\n\t\t}\r\n\t}", "public function recalculer_honoraire($facture_id)\n {\n $facture = Facture::where('id',Crypt::decrypt($facture_id))->first();\n\n// dd(Crypt::decrypt($facture_id));\n $compromis = $facture->compromis;\n \n $mandataire = $facture->user;\n $mandataire->nb_mois_pub_restant += $facture->nb_mois_deduis;\n $mandataire->update();\n \n \n \n // Pour recalculer il faut faire une remise à zéro dans le compromis, puis supprimer la facture et la recalculer\n // $mandataire->nb_mois_pub_restant -= $facture->nb_mois_deduis ; \n // $mandataire->update();\n\n /* --- remise à zéro en fonction du type de facture\n honoraire \n - facture_honoraire_cree\n partage \n - facture_honoraire_partage_cree \n - facture_honoraire_partage_porteur_cree\n\n parrainage \n - facture_honoraire_parrainage_cree\n\n parrainage_partage\n - facture_honoraire_parrainage_partage_cree\n */\n \n $proprietaire = $facture->user->nom.\" \".$facture->user->prenom ;\n $action = Auth::user()->nom.\" \".Auth::user()->prenom.\" a récalculé la facture $facture->type du mandat $compromis->numero_mandat appartenant à $proprietaire \";\n $user_id = Auth::user()->id;\n\n Historique::createHistorique( $user_id,$facture->id,\"facture\",$action );\n\n if($facture->type == \"honoraire\"){\n \n \n // On vérifie qu'il ne sagit pas de la première déduiction de jetons après encaissement de la facture styl si le mandataire est soumis aux jetons\n if( ($mandataire->contrat->deduis_jeton == true && $facture->nb_mois_deduis !== null) || $mandataire->contrat->deduis_jeton == false ){\n $compromis->facture_honoraire_cree = 0 ;\n $compromis->update();\n // dd($facture);\n $facture->delete();\n // dd('ici');\n \n }\n \n \n \n return redirect()->route('facture.preparer_facture_honoraire', [ Crypt::encrypt( $compromis->id)]);\n }elseif($facture->type == \"partage\"){\n // le mandataire qui porte l'affaire\n if($mandataire->id == $compromis->user_id){\n $compromis->facture_honoraire_partage_porteur_cree = 0 ;\n // dd('partage 1 ');\n \n\n }\n // le mandataire qui ne porte pas l'affaire\n else{\n $compromis->facture_honoraire_partage_cree = 0 ;\n // dd('partage 2');\n \n }\n \n \n \n // On vérifie qu'il ne sagit pas de la première déduiction de jetons après encaissement de la facture styl\n if( ($mandataire->contrat->deduis_jeton == true && $facture->nb_mois_deduis !== null) || $mandataire->contrat->deduis_jeton == false){\n $compromis->update();\n $facture->delete();\n }\n \n return redirect()->route('facture.preparer_facture_honoraire_partage', [ Crypt::encrypt( $compromis->id),$mandataire->id]);\n\n }\n elseif($facture->type == \"partage_externe\"){\n \n $compromis->facture_honoraire_partage_externe_cree = 0 ;\n $compromis->update();\n // dd($facture);\n $facture->delete();\n\n return redirect()->route('facture.preparer_facture_honoraire_partage_externe', [ Crypt::encrypt( $compromis->id)]);\n }\n \n \n \n elseif($facture->type == \"parrainage\"){\n $compromis->facture_honoraire_parrainage_cree = 0 ;\n\n $compromis->update();\n $facture->delete();\n \n if($facture->filleul_id !=null){\n return redirect()->route('facture.preparer_facture_honoraire_parrainage', [ Crypt::encrypt( $compromis->id),$facture->filleul_id]);\n\n }else{\n return redirect()->back()->with(\"ok\", \"la propriété filleul_id dans facture est vide\");\n\n }\n\n\n\n\n }elseif($facture->type == \"parrainage_partage\"){\n $compromis->facture_honoraire_parrainage_partage_cree = 0 ;\n\n $compromis->update();\n $facture->delete();\n \n if($facture->filleul_id !=null){\n return redirect()->route('facture.preparer_facture_honoraire_parrainage', [ Crypt::encrypt( $compromis->id),$facture->filleul_id]);\n\n }else{\n return redirect()->back()->with(\"ok\", \"la propriété filleul_id dans facture est vide\");\n\n }\n\n\n }else{\n return redirect()->back()->with(\"ok\", \"La note d'honoraire n'a pas été recalculée\");\n }\n \n\n \n \n $compromis->update();\n $facture->delete();\n\n\n return redirect()->back()->with(\"ok\", \"La note d'honoraire a été recalculée\");\n }", "public function reescalarActi(){\n }", "function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}", "public function inactivarCodigoContable($conn, $conexion)\r\n {\r\n $idCodigo = $_SESSION['idCodigo'];\r\n\r\n \r\n $tableName = 'codigos_contables';\r\n \r\n $arregloCondition = ['id_codigo' => $idCodigo];\r\n \r\n $arregloDatos['inactivo'] = 1;\r\n\r\n\r\n \r\n\r\n $conexion = new ConexionController();\r\n\r\n $conn = $conexion->initConectar('db');\r\n \r\n $conn->open();\r\n\r\n \r\n\r\n if ($conexion->modificarRegistro($conn, $tableName, $arregloDatos, $arregloCondition)){\r\n\r\n \r\n\r\n return true;\r\n \r\n }\r\n\r\n }", "function modificarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t$bd_nombre_tabla = $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'];\n\t\t$this->setParametro('id_'.$bd_nombre_tabla,'id_'.$bd_nombre_tabla,'integer');\n\t\t//Define los parametros para la funcion\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t$this->setParametro($value['bd_nombre_columna'],$value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\t\n\t\t}\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function getAllNumClases(){\n\t\t$clase=$this->nmclass;\n\t\t$u=$this->cant_clases;\n\t\treturn $u;\n\t}", "function cl_escolabase() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escolabase\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"].\"?ed77_i_escola=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_escola\"].\"&ed18_c_nome=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed18_c_nome\"].\"&ed31_c_descr=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed31_c_descr\"].\"&ed77_i_base=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_base\"]);\n }", "function control_access($sKey, $id){ \r\n\t$permiso=false;\r\n\t$permisosAdmin=$_SESSION[\"R0l3sp3rM1s0s\"];\r\n\tif($permisosAdmin[$sKey][$id]==\"SI\"){\r\n\t\t$permiso=true;\r\n\t}\r\n\treturn $permiso;\r\n}", "function _reconfirm_cheat_code()\n\t{\n\t\t//If discount is applied, do a conditional-check again\n\t\tif($this->cart->is_discount_applied())\n\t\t{\n\t\t\t$coupon = $this->cart->discount_info();\n\t\t\tif($this->_can_apply_code($coupon) == false)\n\t\t\t{\n\t\t\t\t$this->cart->remove_discount();\n\t\t\t}\n\t\t}\n\t}", "function scheckAusdruck()\r\n {\r\n foreach ($this->belegschaft as $schluessel=>$wert)\r\n $this->belegschaft[$schluessel]->scheckAusdruck();\r\n }", "function modificarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function claseLocal( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_CLASE_LOCAL);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n usleep(500000);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"media\"]);\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPantallas->pipEnPantallaPresi();//control_pantallas.pipEnPantallaPresi()\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n//AccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderPizarra();\n //ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n //ConexionServidorCliente::$ctrlGuiProyectores->activarPizarra();\n //usleep(3000000);\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnCentral();\n //usleep(3000000);\n AccesoControladoresDispositivos::$ctrlProyectores->forzarEstadoOnCentral();\n AccesoControladoresDispositivos::$ctrlProyectores->forzarEstadoOnPizarra();\n\tAccesoGui::$guiSistema->esperarInicioSistema();\n AccesoControladoresDispositivos::$ctrlPlasma->verVideoSalaEnPlasma();\n AccesoGui::$guiEscenarios->escenarioClaseLocal();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\t#AccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\t#AccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n }", "function modificarConceptoCta(){\n\t\t$this->procedimiento='pre.f_concepto_cta_ime';\n\t\t$this->transaccion='PRE_CCTA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_concepto_cta','id_concepto_cta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_auxiliar','id_auxiliar','int4');\n\t\t$this->setParametro('id_cuenta','id_cuenta','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('id_partida','id_partida','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function testUpdateChallenge()\n {\n }", "function formulaires_deleguer_verifier_dist() {\n include_spip('inc/saisies');\n // on récupère les saisies\n $mes_saisies = mes_saisies_deleguer();\n // saisies_verifier retourne un tableau des erreurs s'il y en a, sinon traiter() prend le relais\n return saisies_verifier($mes_saisies);\n}", "function modificarPartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_ime';\n\t\t$this->transaccion='PRE_PAREJE_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_partida_ejecucion','id_partida_ejecucion','int4');\n\t\t$this->setParametro('id_int_comprobante','id_int_comprobante','int4');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\t\t$this->setParametro('id_partida','id_partida','int4');\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t$this->setParametro('tipo_cambio','tipo_cambio','numeric');\n\t\t$this->setParametro('columna_origen','columna_origen','varchar');\n\t\t$this->setParametro('tipo_movimiento','tipo_movimiento','varchar');\n\t\t$this->setParametro('id_partida_ejecucion_fk','id_partida_ejecucion_fk','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('monto_mb','monto_mb','numeric');\n\t\t$this->setParametro('monto','monto','numeric');\n\t\t$this->setParametro('valor_id_origen','valor_id_origen','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "static public function ctrEditarClase(){\r\n\r\n\r\n if(isset($_POST[\"editarDescripClase\"])){\r\n\r\n\r\n if(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarDescripClase\"])){\r\n\r\n $tabla = \"tbl_clases\";\r\n\r\n $datos = array(\"Id_Clase\" => $_POST[\"editarIdClase\"],\r\n \"DescripClase\" => strtoupper($_POST[\"editarDescripClase\"]),\r\n \"Duracion\" => $_POST[\"editarDuracion\"]);\r\n\r\n $respuesta = ModeloClases::mdlEditarClase($tabla, $datos);\r\n\r\n if($respuesta == \"ok\"){\r\n\r\n echo'<script>\r\n\r\n swal({\r\n type: \"success\",\r\n title: \"La Clase ha sido editada correctamente\",\r\n showConfirmButton: true,\r\n confirmButtonText: \"Cerrar\",\r\n closeOnConfirm: false\r\n }).then((result) => {\r\n if (result.value) {\r\n\r\n window.location = \"modalidades\";\r\n\r\n }\r\n })\r\n\r\n </script>';\r\n\r\n }\r\n\r\n }else{\r\n\r\n echo'<script>\r\n\r\n swal({\r\n type: \"error\",\r\n title: \"¡El nombre de la Clase no puede ir vacío o llevar caracteres especiales!\",\r\n showConfirmButton: true,\r\n confirmButtonText: \"Cerrar\",\r\n closeOnConfirm: false\r\n }).then((result) => {\r\n if (result.value) {\r\n\r\n window.location = \"modalidades\";\r\n\r\n }\r\n })\r\n\r\n </script>';\r\n\r\n }\r\n\r\n }\r\n\r\n }", "function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }", "function modificarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t\r\n\t\t$parametros = $this->aParam->getArregloParametros('asignacion');\r\n\t\t//si esdel tipo matriz verifica en la primera posicion el tipo de vista\r\n\t\tif($this->esMatriz){\r\n\t\t $tipo_operacion =$parametros[0]['tipo_operacion'];\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t$tipo_operacion =$parametros['tipo_operacion'];\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipo_operacion=='asignacion'){\r\n\t\t $this->transaccion='tgv_SERVIC_MOD';\r\n } \r\n elseif($tipo_operacion=='cambiar_estado'){ \r\n\t\t $this->transaccion='tgv_SERCAMEST_MOD';\r\n\t\t $this->setParametro('operacion','operacion','varchar');// cuando finaliza los requerimientos, su valor es fin_requerimiento\r\n\t\t //$this->setParametro('id_abogado','id_abogado','int4');\r\n\t\t}\r\n\t\telseif ($tipo_operacion=='def_fechas'){ \r\n\t\t $this->transaccion='tgv_DEFFECHA_MOD';\r\n\t\t // $this->setParametro('operacion','operacion','varchar');// cuando finaliza los requerimientos, su valor es fin_requerimiento\r\n\t\t //$this->setParametro('id_abogado','id_abogado','int4');\r\n\t\t}\r\n\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('id_lugar_destino','id_lugar_destino','int4');\r\n\t\t$this->setParametro('id_ep','id_ep','int4');\r\n\t\t$this->setParametro('fecha_asig_fin','fecha_asig_fin','date');\r\n\t\t$this->setParametro('fecha_sol_ini','fecha_sol_ini','date');\r\n\t\t$this->setParametro('descripcion','descripcion','varchar');\r\n\t\t$this->setParametro('id_lugar_origen','id_lugar_origen','int4');\r\n\t\t$this->setParametro('cant_personas','cant_personas','int4');\r\n\t\t$this->setParametro('fecha_sol_fin','fecha_sol_fin','date');\r\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\r\n\t\t$this->setParametro('fecha_asig_ini','fecha_asig_ini','date');\r\n\t\t$this->setParametro('id_funcionario_autoriz','id_funcionario_autoriz','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function desactivar(){\n\t\t// $rs = $this->ejecuta($sql);\n\t\t// if($this->como_va()){\n\t\t// \treturn false;\n\t\t// }else{\n\t\t \t$sql = \"UPDATE proveedor SET status='0' WHERE id_prov='$this->cod_prov'\";\n\t\t\t$this->ejecuta($sql);\n\t}", "protected function antes() {\n\t // $accion = str_replace(\"accion_\", '', $this->accion);\n\t\t\t// \n\t // $this->permiso = \\FMT\\Usuarios::getPermiso($_SESSION['iu'])['permiso'];\n // $this->id_puerto = \\FMT\\Usuarios::getMetadata($_SESSION['iu'])['metadata'];\n\t // $permisos_sistema = json_decode(PERMISOS);\n\t // if(isset($permisos_sistema->$control->$accion) && in_array($this->permiso, $permisos_sistema->$control->$accion)) {\n\t // return true;\n\t // } else {\n\t // $control = new \\App\\Controlador\\Error('na');\n\t // $control->procesar();\n\t // $datos = [];\n\t // $datos['session_data'] = $_SESSION['datos_usuario_logueado'];\n\t // \\FMT\\Logger::event('no_autorizado',$datos);\n\t // exit;\n\t\t\t// \n\t // }\n\t return true; \n\t}", "public function publicacaoConcluir()\r\n {\r\n try\r\n {\r\n $resposta = $this->conexao->Conectar()->prepare(\"UPDATE tbmissao SET id_usuario_concluir = ?, data_conclusao = NOW(), status = 1, conclusao = ? \"\r\n . \" WHERE id_missao = ?\");\r\n $resposta->bindValue(1, $this->getIdUsuarioConcluir(), PDO::PARAM_STR);\r\n $resposta->bindValue(2, $this->getSolucao(), PDO::PARAM_STR);\r\n $resposta->bindValue(3, $this->getIdMissao(), PDO::PARAM_STR);\r\n //$resposta->bindValue(3, $this->getData(), PDO::PARAM_STR);\r\n if($resposta->execute())\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch (PDOException $e)\r\n {\r\n return $e->getMenssage();\r\n }\r\n }", "function modificar($Id_Pedido = 0, $tipo = '')\r\n\t{\r\n\t\t$Permitido = array('Gerencia' => '', 'Plani' => '', 'Sistemas' => '', 'Ventas' => '');\r\n\t\t$this->ver_sesion_m->acceso($Permitido);\r\n\t\t\r\n\t\t$Id_Pedido += 0;\r\n\t\tif(0 == $Id_Pedido)\r\n\t\t{\r\n\t\t\tshow_404();\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t//Extraemos toda la informacion del proceso\r\n\t\t$this->load->model('procesos/buscar_proceso_m', 'buscar_proc');\r\n\t\t$Info_Proceso = $this->buscar_proc->busqueda_pedido($Id_Pedido);\r\n\t\t\r\n\t\tif(0 == $Info_Proceso)\r\n\t\t{\r\n\t\t\tshow_404();\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Si es un cliente, no debe ver cosas prohibidas\r\n\t\t$this->ver_sesion_m->solo_un_cliente(\r\n\t\t\t$Info_Proceso['id_cliente']\r\n\t\t);\r\n\t\t\r\n\t\t//Validacion: Solo los pedidos que estan en proceso pueden ser modificados\r\n\t\t//en sus especificaciones\r\n\t\t//Modelo que verifica si tiene ruta sin finalizar este proceso\r\n\t\t$this->load->model('pedidos/procesando_m', 'procesando');\r\n\t\t//Se realiza la verificacion\r\n\t\t$Estado = $this->procesando->pedido($Id_Pedido);\r\n\t\t\r\n\t\t\r\n\t\t//Especificaciones del pedido a modificar\r\n\t\t$this->load->model('pedidos/especificacion_informacion_m', 'esp_inf');\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Listado de los materiales recibidos y solicitados\r\n\t\t$this->load->model('pedidos/materiales_m', 'materiales');\r\n\t\t$Materiales['recibido'] = $this->materiales->recibidos_id('s');\r\n\t\t$Materiales['solicitado'] = $this->materiales->solicitados_id('s');\r\n\t\t\r\n\t\t/*\r\n\t\t$this->load->model('pedidos/enlaces_m', 'enlace');\r\n\t\t$Es_Hijo = $this->enlace->es_hijo($Id_Pedido);\r\n\t\t\r\n\t\t\r\n\t\t//Es este pedido hijo de otro?\r\n\t\t\r\n\t\tif(0 == $Es_Hijo)\r\n\t\t{\r\n\t\t\t*/\r\n\t\t\t$Especs = $this->esp_inf->pedido($Id_Pedido);\r\n\t\t\t/*\r\n\t\t\t//Listado de los tipos de acabados\r\n\t\t\t$this->load->model('pedidos/impresion_digital_m', 'matdigi');\r\n\t\t\t$Tipo_Acabado = $this->matdigi->tipo_impd_acabado();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$Especs = $this->esp_inf->pedido(\r\n\t\t\t\t$Id_Pedido,\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'matrecgru' => array(),\r\n\t\t\t\t\t'matsolgru' => array()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t//print_r($Especs);\r\n\t\t\t$Tipo_Acabado = array();\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(isset($Es_Hijo['id_pedido_pedido']))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$Especs = $this->esp_inf->pedido(\r\n\t\t\t\t$Es_Hijo['id_ped_primario'],\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'general' => array(),\r\n\t\t\t\t\t'colores' => array(),\r\n\t\t\t\t\t'distorsion' => array()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t//Modificacion de las especificaciones\r\n\t\t\t$this->load->model('pedidos/especificacion_modificar_m', 'esp_modi');\r\n\t\t\t$this->esp_modi->modificar(\r\n\t\t\t\t$Es_Hijo['id_ped_primario'],\r\n\t\t\t\t$Especs,\r\n\t\t\t\tarray('recibido' => array(), 'solicitado' => array()),\r\n\t\t\t\tarray()\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$Especs = $this->esp_inf->pedido(\r\n\t\t\t\t$Id_Pedido,\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'matrecgru' => array(),\r\n\t\t\t\t\t'matsolgru' => array()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\t//Modificacion de las especificaciones\r\n\t\t$this->load->model('pedidos/especificacion_modificar_m', 'esp_modi');\r\n\t\t$this->esp_modi->modificar(\r\n\t\t\t$Id_Pedido,\r\n\t\t\t$Especs,\r\n\t\t\t$Materiales\r\n\t\t);\r\n\r\n\r\n\r\n\t\t\r\n\r\n\t\t\r\n\t\tif('Ventas' != $this->session->userdata('codigo'))\r\n\t\t{\r\n\t\t\tif($tipo == 'm')\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/administrar/info/'.$Info_Proceso['id_proceso']);\r\n\t\t\t}\r\n\t\t\telseif($tipo == 'l')\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/preingreso/estado/Pendientes');\r\n\t\t\t}\r\n\t\t\telseif($tipo == 'i')\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/modificar/index/'.$Id_Pedido.'/i');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/modificar/index/'.$Id_Pedido);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif('' != $this->session->userdata('id_cliente'))\r\n\t\t\t{\r\n\t\t\t\theader('location: /ventas/v_preingreso/pendientes');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/preingreso/estado/Pendientes');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function actualizar_Datos_Usuario2(){\n\t\t$sql = \"UPDATE usuarios SET Documento=\".$this->usuario->get_Nid().\",\n\t\t\t\t\t\t\t\t\tNombres='\".$this->usuario->get_Nombres().\"',\n\t\t\t\t\t\t\t\t\tApellidos = '\".$this->usuario->get_Apellidos().\"',\n\t\t\t\t\t\t\t\t\tUsuario = '\".$this->usuario->get_Usuario().\"',\n\t\t\t\t\t\t\t\t\tPregunta = '\".$this->usuario->get_Pregunta().\"',\n\t\t\t\t\t\t\t\t\tRespuesta = '\".$this->usuario->get_Respuesta().\"',\n\t\t\t\t\t\t\t\t\tTipo_Documento = '\".$this->usuario->get_TipoId().\"',\n\t\t\t\t\t\t\t\t\tCiudad = '\".$this->usuario->get_Ciudad().\"',\n\t\t\t\t\t\t\t\t\tDireccion = '\".$this->usuario->get_Direccion().\"',\n\t\t\t\t\t\t\t\t\tEdad = '\".$this->usuario->get_Edad().\"',\n\t\t\t\t\t\t\t\t\tFoto = '\".$this->usuario->get_Foto().\"',\n\t\t\t\t\t\t\t\t\tTelefono = '\".$this->usuario->get_Celular().\"',\n\t\t\t\t\t\t\t\t\tCorreo_Electronico = '\".$this->usuario->get_Email().\"',\n\t\t\t\t\t\t\t\t\tGenero = '\".$this->usuario->get_Genero().\"',\n\t\t\t\t\t\t\t\t\tperfiles_Nombre = '\".$this->usuario->get_Perfil().\"'\n\t\t\t WHERE Documento=\".$this->usuario->get_Nid().\"\";\n\n\n\n\t\t//echo $sql;\n\t\t$salida = 0;\n\t\t$valida = new Validacion_Datos(); // <- Para validar los tipos de datos\n\t\t// Validacion de los minimos\n\t\tif(!(strlen($this->usuario->get_Nid()) > 7))\t\t\t$salida = 2;\n\t\telseif(!(strlen($this->usuario->get_Nombres()) > 1))\t$salida = 3;\n\t\telseif(!(strlen($this->usuario->get_Apellidos()) > 1))\t$salida = 4;\n\t\telseif(!(strlen($this->usuario->get_Usuario()) > 4))\t$salida = 5;\n\t\telseif(!(strlen($this->usuario->get_Pregunta()) > 9))\t$salida = 7;\n\t\telseif(!(strlen($this->usuario->get_Respuesta()) > 1))\t$salida = 8;\n\t\telseif(!(strlen($this->usuario->get_Ciudad()) > 1))\t\t$salida = 10;\n\t\telseif(!(strlen($this->usuario->get_Direccion()) > 2))\t$salida = 11;\n\t\telseif(!(strlen($this->usuario->get_Edad()) > 0))\t\t$salida = 12;\n\t\telseif(!(strlen($this->usuario->get_Foto()) > 2))\t\t$salida = 13;\n\t\telseif(!(strlen($this->usuario->get_Celular()) > 7))\t$salida = 14;\n\t\telseif(!(strlen($this->usuario->get_Email()) > 6))\t\t$salida = 15;\n\t\t// Validacion de los tipos de datos (Numérico,Alfabético,Alfanumérico)\n\t\telseif(!($valida->is_Number($this->usuario->get_Nid())))\t\t\t\t$salida = 18;\n\t\telseif(!($valida->is_Alphanumeric($this->usuario->get_Usuario())))\t\t$salida = 19;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Nombres())))\t\t$salida = 20;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Apellidos())))\t\t$salida = 21;\n\t\telseif(!($valida->is_Alphanumeric($this->usuario->get_Respuesta())))\t$salida = 24;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Ciudad())))\t\t\t$salida = 25;\n\t\telseif(!($valida->is_Number($this->usuario->get_Edad())))\t\t\t\t$salida = 26;\n\t\telseif(!($valida->is_Number($this->usuario->get_Celular())))\t\t\t$salida = 28;\n\n\n\t\t///////////////////////////////////////////////////////////////////////////\n\n\t\t\n\t\telseif($this->bd->insertar($sql))\n\t\t\t$salida = true;\n\t\telse $salida = 31;\n\t\t\n\n\t\treturn $salida;\n\t}", "public function modificar()\n {\n $resp = false;\n $base = new BaseDatos();\n $sql = \"UPDATE archivocargado SET acnombre='\" . $this->getAcNombre() . \"', acdescripcion='\" . $this->getAcDescripcion() . \"', acicono='\" . $this->getAcIcono() . \"', idusuario=\" . $this->getObjUsuario()->getIdUsuario() . \", aclinkacceso='\" . $this->getAcLinkAcceso() . \"', accantidaddescarga=\" . $this->getAcCantidadDescarga() . \", accantidadusada=\" . $this->getAcCantidadUsada() . \", acfechainiciocompartir='\" . $this->getAcFechaInicioCompartir() . \"', acefechafincompartir='\" . $this->getAceFechaFinCompartir() . \"', acprotegidoclave='\" . $this->getAcProtegidoClave() . \"' WHERE idarchivocargado=\" . $this->getIdArchivoCargado() ;\n if ($base->Iniciar()) {\n if ($base->Ejecutar($sql)>=0) {\n $resp = true;\n } else {\n $this->setmensajeoperacion(\"ArchivoCargado->modificar: \" . $base->getError());\n }\n } else {\n $this->setmensajeoperacion(\"ArchivoCargado->modificar: \" . $base->getError());\n }\n return $resp;\n }", "function MkClass($class){\n\t\t$nodepal=$this->getMainNode();\n\t\t$cant_clases=$this->cant_clases;\n\n\t\tif($this->xmldir!=''){\n\t\t\t$this->clases[$nodepal][$cant_clases]=$class;\n\t\t\t$this->cant_clases++;\n\t\t\treturn 0;\n\t\t}\n\t\telse{\n\t\t\treturn -1;\n\t\t}\n\t}", "static public function ctrVerificarProducto($datos){\n\t\t\n\n\t\t$tabla = \"citas\";\n\n\t\t$respuesta = ModeloCarrito::mdlVerificarProducto($tabla, $datos);\n\t \n\t return $respuesta;\n\t\t\t\t\n\t}", "private function checkExpirated() {\n\n }", "function cl_condicionante() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"condicionante\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhempenhofolharubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolharubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function CantonAccesoDatos() {\n //Se establece la coneccion a la base de datos\n parent::ConexionAccesoDatos();\n }", "public function actualizar_Datos_Usuario($documento){\n\t\t/*echo \"<br>->docu->\".$documento;\n\t\techo \"<br>->\".$this->usuario->get_Nid();*/\n\t\t$sql = \"UPDATE perfiles, usuarios SET Documento='\".$this->usuario->get_Nid().\"',\n\t\t\t\t\t\t\t\t\tNombres='\".$this->usuario->get_Nombres().\"',\n\t\t\t\t\t\t\t\t\tApellidos = '\".$this->usuario->get_Apellidos().\"',\n\t\t\t\t\t\t\t\t\tUsuario = '\".$this->usuario->get_Usuario().\"',\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tPregunta = '\".$this->usuario->get_Pregunta().\"',\n\t\t\t\t\t\t\t\t\tRespuesta = '\".$this->usuario->get_Respuesta().\"',\n\t\t\t\t\t\t\t\t\tTipo_Documento = '\".$this->usuario->get_TipoId().\"',\n\t\t\t\t\t\t\t\t\tCiudad = '\".$this->usuario->get_Ciudad().\"',\n\t\t\t\t\t\t\t\t\tDireccion = '\".$this->usuario->get_Direccion().\"',\n\t\t\t\t\t\t\t\t\tEdad = '\".$this->usuario->get_Edad().\"',\n\t\t\t\t\t\t\t\t\tFoto = '\".$this->usuario->get_Foto().\"',\n\t\t\t\t\t\t\t\t\tTelefono = '\".$this->usuario->get_Celular().\"',\n\t\t\t\t\t\t\t\t\tCorreo_Electronico = '\".$this->usuario->get_Email().\"',\n\t\t\t\t\t\t\t\t\tGenero = '\".$this->usuario->get_Genero().\"',\n\t\t\t\t\t\t\t\t\tusuarios.perfiles_Nombre = perfiles.Nombre\t\t\t\t\t\t\t\t\t\n\t\t\t WHERE Documento='\".$documento.\"' AND perfiles.Nombre ='\".$this->usuario->get_Perfil().\"';\";\n\n\n\t\t$salida = 0;\n\t\t$valida = new Validacion_Datos(); // <- Para validar los tipos de datos\n\t\t// Validacion de los minimos\n\t\tif(!(strlen($this->usuario->get_Nid()) > 7))\t\t\t$salida = 2;\n\t\telseif(!(strlen($this->usuario->get_Nombres()) > 1))\t$salida = 3;\n\t\telseif(!(strlen($this->usuario->get_Apellidos()) > 1))\t$salida = 4;\n\t\telseif(!(strlen($this->usuario->get_Usuario()) > 4))\t$salida = 5;\n\t\telseif(!(strlen($this->usuario->get_Password()) > 4))\t$salida = 6;\n\t\telseif(!(strlen($this->usuario->get_Pregunta()) > 9))\t$salida = 7;\n\t\telseif(!(strlen($this->usuario->get_Respuesta()) > 1))\t$salida = 8;\n\t\telseif(!(strlen($this->usuario->get_TipoId()) > 1))\t\t$salida = 9;\n\t\telseif(!(strlen($this->usuario->get_Ciudad()) > 1))\t\t$salida = 10;\n\t\telseif(!(strlen($this->usuario->get_Direccion()) > 2))\t$salida = 11;\n\t\telseif(!(strlen($this->usuario->get_Edad()) > 0))\t\t$salida = 12;\n\t\telseif(!(strlen($this->usuario->get_Foto()) > 2))\t\t$salida = 13;\n\t\telseif(!(strlen($this->usuario->get_Celular()) > 7))\t$salida = 14;\n\t\telseif(!(strlen($this->usuario->get_Email()) > 6))\t\t$salida = 15;\n\t\telseif(!(strlen($this->usuario->get_Genero()) > 0))\t\t$salida = 16;\n\t\telseif(!(strlen($this->usuario->get_Perfil()) > 0))\t\t$salida = 17;\n\t\t// Validacion de los tipos de datos (Numérico,Alfabético,Alfanumérico)\n\t\telseif(!($valida->is_Number($this->usuario->get_Nid())))\t\t\t\t$salida = 18;\n\t\telseif(!($valida->is_Alphanumeric($this->usuario->get_Usuario())))\t\t$salida = 19;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Nombres())))\t\t$salida = 20;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Apellidos())))\t\t$salida = 21;\n\t\telseif(!($valida->is_Alphanumeric($this->usuario->get_Password())))\t\t$salida = 22;\n\t\telseif(!($valida->is_Alphanumeric($this->usuario->get_Respuesta())))\t$salida = 24;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Ciudad())))\t\t\t$salida = 25;\n\t\telseif(!($valida->is_Number($this->usuario->get_Edad())))\t\t\t\t$salida = 26;\n\t\telseif(!($valida->is_Number($this->usuario->get_Celular())))\t\t\t$salida = 28;\n\n\n\t\t///////////////////////////////////////////////////////////////////////////\n\n\t\t\n\t\telseif($this->bd->insertar($sql))\n\t\t\t$salida = true;\n\t\telse $salida = 31;\n\t\t\n\n\t\treturn $salida;\n\t}" ]
[ "0.61036503", "0.5941243", "0.578904", "0.57739884", "0.5718966", "0.56419575", "0.5616466", "0.5569387", "0.5550532", "0.5548562", "0.55224234", "0.5512492", "0.54801077", "0.5467915", "0.54603106", "0.54596364", "0.54573405", "0.5454974", "0.54436475", "0.54434925", "0.5438051", "0.54362756", "0.5430233", "0.5427835", "0.5426118", "0.54230314", "0.54186887", "0.54186183", "0.54088897", "0.5407865", "0.5391931", "0.5373347", "0.5363919", "0.5361018", "0.5354933", "0.53400826", "0.5322511", "0.5322328", "0.5319771", "0.5319545", "0.5319236", "0.5296731", "0.52925247", "0.5292506", "0.5292436", "0.52857697", "0.5276629", "0.5238462", "0.5234946", "0.5233124", "0.52225643", "0.52102476", "0.52090424", "0.5206054", "0.52052724", "0.52001905", "0.5199967", "0.51930666", "0.51907384", "0.5180192", "0.51691", "0.5155102", "0.51504517", "0.5144956", "0.5141485", "0.51354116", "0.51294434", "0.5114467", "0.5109236", "0.51036054", "0.50965476", "0.50881654", "0.5085443", "0.508382", "0.508046", "0.5067005", "0.50649726", "0.50617415", "0.5059547", "0.50584996", "0.50555605", "0.5053823", "0.5050307", "0.50416774", "0.5035887", "0.5033192", "0.50285476", "0.50275093", "0.50209415", "0.5020616", "0.50200886", "0.50164527", "0.50121605", "0.50057113", "0.4999616", "0.4994486", "0.49905056", "0.49860206", "0.49848393", "0.498428", "0.4983248" ]
0.0
-1
end bh products category mod query
function bh_products_category_loop(){ //post sorting ?> <?php //display content ?> <div class="inner"> <div class="sidebar grid col-220 product-categories"> <?php //get_sidebar(); //should only be child category, so display parent. if (is_category()) { $this_category = get_category( get_query_var( 'cat' ) ); } //if child category if($this_category->category_parent) { $parent_cat = get_category($this_category->category_parent); //check for third-level cat if($parent_cat->category_parent){ $parent_parent = get_category($parent_cat->category_parent); echo '<h2><a href="'. get_category_link($parent_parent->cat_ID) .'">'. $parent_parent->name .'</a></h2>'; echo '<ul>'; $categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$parent_cat->category_parent."&orderby=slug&hide_empty=0&exclude=1649"); echo '</ul>'; if ($parent_parent->name == "Apps"){ echo '<p>&nbsp;</p>'; echo '<h2>Platforms</h2>'; echo '<ul>'; $platforms = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649'); echo '</ul>'; } }else{ echo '<h2><a href="'. get_category_link($parent_cat->cat_ID) .'">'. $parent_cat->name .'</a></h2>'; echo '<ul>'; $categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->category_parent."&orderby=slug&hide_empty=0&exclude=1649"); echo '</ul>'; if ($parent_cat->name == "Apps"){ echo '<p>&nbsp;</p>'; echo '<h2>Platforms</h2>'; echo '<ul>'; $platforms = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649'); echo '</ul>'; } } }else{ //if top-level category echo '<h2>'. $this_category->name .'</h2>'; echo '<ul>'; $categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->cat_ID."&orderby=slug&hide_empty=0&exclude=1649"); echo '</ul>'; if ($this_category->name == "Apps"){ echo '<p>&nbsp;</p>'; echo '<h2>Platforms</h2>'; echo '<ul>'; $platforms = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649'); echo '</ul>'; } } echo '<p>&nbsp;</p>'; ?> </div> <div id="content" class="grid col-700 fit"> <!-- <div class="select-post-sorting"></div> --> <?php $cat = get_query_var('cat'); $category_info = get_category($cat); //echo 'Is first level? = '. $category_info->parent; $parent_info = get_category($category_info->parent); //echo 'Is second level? = '. $parent_info->parent; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; //pagination //$ext_query = '&meta_key=wpcf-pubdate&orderby=meta_value_num&posts_per_page=25&paged='.$paged.''; $sort_meta_key = 0; //init //get sort information from query vars or defaults $sort_orderby = (get_query_var('orderby')) ? get_query_var('orderby') : 'pubdate'; $sort_order = (get_query_var('order')) ? get_query_var('order') : 'DESC'; $sort_posts_per_page = (get_query_var('ppp')) ? get_query_var('ppp') : '25'; if($sort_orderby =='pubdate'){ $sort_orderby = 'meta_value_num'; $sort_meta_key = 'wpcf-pubdate'; } $ext_query = array( 'post_type'=>'products', 'category_name'=>$category_info->slug, 'meta_key'=>'wpcf-pubdate', 'orderby'=>'meta_value_num', 'order'=>'DESC', 'posts_per_page'=>'25', 'tag'=>'listed', 'paged'=>$paged ); if($sort_meta_key){ $ext_query['meta_key'] = $sort_meta_key; } $title_qual = ""; //query_posts($query_string . $ext_query ); global $wp_query; //show only main product of groups, if product-group-parent field is populated, hide the post //edit: needs refinement - only for Bibles, and needs to compare non-existent OR blank // modified 3/18/14 to use custom SQL searching indexed taxonomy instead of custom field $newQuery = $ext_query; //$newQuery = array_replace($wp_query->query_vars, $ext_query);// + $p_groups; //changed for WP 4.0 something in WP_Query changed, found 0 posts //var_dump($newQuery); $books_in_cat = new WP_Query($newQuery); //echo '<br/>#posts: '.$books_in_cat->found_posts; //troubleshooting if ($books_in_cat->have_posts()) : ?> <div> <div class="product-category product-list"> <h2><?php echo $title_qual; ?><?php single_cat_title(); ?> </h2> <ul> <?php while ($books_in_cat->have_posts()) : $books_in_cat->the_post(); ?> <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php bh_thumbnail(get_the_ID(),'medium',true); $product_title = get_the_title(); //init $pg_names = array(); //init if (has_term('listed','post_tag')){ $pg_names = wp_get_post_terms(get_the_ID(),'product-group',array('fields'=>'names')); if (!empty($pg_names)){ $product_title = reset($pg_names);//change to product group title } $pg_names = array(); //re-initalize array } $short_title = wp_trim_words($product_title,8); ?> <a href="<?php the_permalink(); ?>"><?php echo $short_title; ?></a> <?php $pubdate = get_post_meta(get_the_ID(),'wpcf-pubdate',true); //turn pubdate into Month Year //modify product list display //if title is too long, don't show subtitle/authors if(strlen(get_the_title())<32){ //get current category or parent category //get category if($parent_info){ //if child category $current_cat = $parent_info->slug; }else{ $current_cat = $category_info->slug; } //ge t subtitle $p_subtitle = types_render_field('subtitle', array("raw"=>"true")); //if Bibles or Reference, show subtitle //echo $current_cat; if($current_cat =='bibles' || $current_cat == 'reference' || $category_info->slug == 'commentaries' ): ?> <span class="author-names"><?php echo $p_subtitle ?></span> <?php else: //else show author(s) //get author name(s) $a_list=false; $a_terms = wp_get_post_terms(get_the_ID(), 'a', array("fields" => "names")); if($a_terms){ $a_list = implode(', ', $a_terms); } if($a_list){ ?> <span class="author-names"><?php echo $a_list; ?></span> <?php }elseif ($p_subtitle){ //no authors (?) - show subtitle if exists ?> <span class="author-names"><?php echo $p_subtitle; ?></span> <?php } endif; }else{ //title too long, no room for other text } ?> </li><!-- end of #post-<?php the_ID(); ?> --> <?php endwhile; if(!$hide_navi){ if(function_exists('wp_pagenavi')) { wp_pagenavi( array( 'query' =>$books_in_cat ) ); } } ?> </ul> </div> <?php else : ?> <!-- <h1 class="title-404"><?php _e('404 &#8212; Fancy meeting you here!', 'minimum'); ?></h1> --> <p><?php _e('No products found in '. $parent_info->name.' > '. single_cat_title('',false) .'.', 'minimum'); ?></p> <!-- <h6><?php printf( __('You can return %s or search for the page you were looking for.', 'minimum'), sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', esc_url( get_home_url() ), esc_attr__('Home', 'minimum'), esc_attr__('&larr; Home', 'minimum') )); ?></h6> <?php get_search_form(); ?> --> <?php endif; ?> </div><!-- end of #content --> </div> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function action_cat()\n {\n $cat = $this->request->param('cat');\n $cat = mysql_real_escape_string ($cat);\n \n // Получаем список продукций\n // $category = ORM::factory('category')->where('cat_id', '=', $cat)->find();\n $category = ORM::factory('category')->where('path', '=', $cat)->find();\n\n if(!$category->loaded()){\n $this->redirect();\n }\n \n $count = $category->products->where('status', '<>', 0)->count_all();\n $pagination = Pagination::factory(array('total_items'=>$count,'items_per_page'=>2));\n $prods = array();\n $products = $category->products\n ->where('status', '<>', 0)\n ->limit($pagination->items_per_page)\n ->offset($pagination->offset)\n ->find_all();\n $prs = $category->products\n ->select('prod_cats.prod_id')\n ->where('status', '<>', 0)\n ->find_all();\n foreach ($prs as $p)\n {\n $prods[] = $p->prod_id;\n }\n if(count($prods))\n $brands = ORM::factory('brand')\n ->join('products')\n ->on('brand.brand_id', '=', 'products.brand_id')\n ->where('products.prod_id','in',$prods)\n ->group_by('brand.title')\n ->order_by('brand.title', 'ASC')\n ->find_all();\n \n \n \n //$products = $category->products->where('status', '!=', 0)->find_all();\n // $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/c' . $category->cat_id);\n $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/' . $category->path);\n $this->template->breadcrumbs = Breadcrumb::generate($this->breadcrumbs);\n \n $content = View::factory('/' . $this->theme . 'index/catalog/v_catalog_cat', array(\n 'products' => $products,\n 'cat' => $cat,\n 'pagination' =>$pagination,\n 'brands' =>$brands,\n \n ));\n \n // Выводим в шаблон\n \n $this->template->title = $category->title;\n $this->template->page_title = $category->title;\n $this->template->page_caption = $category->title;\n $this->template->center_block = array($content);\n $this->template->block_right = null; \n $filter = Filter::factory();\n $filter->loadFiltersOptions($category->cat_id);\n $this->template->filter = $filter->render();\n }", "public function prepareQueryForCategory()\n {\n $sql = new SqlStatement();\n $sql->select(array('p.*'))\n ->from(array('p' => self::RESULTS_TABLE))\n ->innerJoin(array('pp' => 'product'), 'p.product_id = pp.product_id')\n ->innerJoin(array('pd' => 'product_description'), 'p.product_id = pd.product_id')\n ->where('pd.language_id = ?', (int)$this->config->get('config_language_id'))\n ->order($this->sortOrder)\n ->limit($this->productsLimit, $this->productsStart);\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n } \n \n return $sql;\n }", "function getProductCategories () {\r\n $sql = \"SELECT * FROM stockgroups\";\r\n return runQuery($sql);\r\n}", "function getProductsByCategory($categoryId){ \n $db = acmeConnect(); \n $sql = 'SELECT * FROM inventory WHERE categoryId = :categoryId'; \n $stmt = $db->prepare($sql); \n $stmt->bindValue(':categoryId', $categoryId, PDO::PARAM_INT); \n $stmt->execute(); \n $products = $stmt->fetchAll(PDO::FETCH_ASSOC); \n $stmt->closeCursor(); \n return $products; \n }", "function filter($_search, $_category, $_sort){\n\t\tinclude('mysql_r_db_connect.php');\n\t\t\n\t\t//Create dynamically OREDER BY\n\t\tswitch ($_sort){\n\t\t\tcase 1:\n\t\t\t\t$_sort = 'ORDER BY fldIdProduct DESC';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$_sort = 'ORDER BY fldPrice ASC';\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$_sort = 'ORDER BY fldPrice DESC';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$_search = '%' . $_search . '%';\n\t\t\n\t\t//Check if such product exists \n\t\t$sql = \"SELECT COUNT(fldIdProduct) FROM tblProducts WHERE fldProduct LIKE '$_search'\";\n\t\t$quantity = $handle -> prepare($sql);\n\t\t$quantity->execute();\n\t\t$row = $quantity->fetchColumn();\n\t\t\n\t\tif ($row != 0){\n\t\t\t\n\t\t\t//Check if to search in specific category or in all\n\t\t\t$sql = \"SELECT COUNT(fldIdCategory) FROM tblCategorys WHERE fldCategoryShort LIKE '$_category'\";\n\t\t\t$quantity = $handle -> prepare($sql);\n\t\t\t$quantity->execute();\n\t\t\t$row = $quantity->fetchColumn();\n\t\t\t\n\t\t\tif ($row == 0){\n\t\t\t\n\t\t\t\t//SQL query to show the wanted Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldPrice, fldImage FROM tblProducts WHERE fldProduct LIKE '$_search' AND fldEnabled <> false $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<!-- Begin of product content-->\n\t\t\t\t\t\t<div class=\"col m6\">\n\t\t\t\t\t\t\t<!-- Beginn of product-->\n\t\t\t\t\t\t\t<div class=\"card\">\n\t\t\t\t\t\t\t\t<div class=\"card-image\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<a class=\"btn-floating halfway-fab waves-effect waves-light red modal-trigger\" href=\"#' . $row->fldIdProduct . '\"><i class=\"material-icons\">add</i></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"card-content center\">\n\t\t\t\t\t\t\t\t\t<p>' . $row->fldProduct . '</p>\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldPrice . ' CHF</h4>\n\t\t\t\t\t\t\t\t\t<br/>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//SQL query to get FK of Tag\n\t\t\t\t\t\t\t\t\t$sql_fk_tag = \"SELECT fldFkTag FROM tblProductsToTags WHERE fldFkProduct LIKE '$row->fldIdProduct'\";\n\t\t\t\t\t\t\t\t\t$stmt_fk_tag = $handle->query($sql_fk_tag);\n\t\t\t\t\t\t\t\t\twhile($row_fk_tag = $stmt_fk_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//SQL query to get Tag\n\t\t\t\t\t\t\t\t\t\t$sql_tag = \"SELECT fldTag FROM tblTags WHERE fldIdTag LIKE '$row_fk_tag->fldFkTag'\";\n\t\t\t\t\t\t\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t\t\t\t\t\t\twhile($row_tag = $stmt_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"chip\"><a href=\"filter.php?search='.$row_tag->fldTag.'&category=All&sort=1&start_search=Suchen\">' . $row_tag->fldTag . '</a></div>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of product-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of product content-->\n\t\t\t\t\t';\n\t\t\t\t}\t\n\t\t\t\techo '\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\t';\n\t\t\t\t\n\t\t\t//SQL query to create modal for shown Products\n\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldDescription, fldPrice, fldImage, fldFkSoldBy FROM tblProducts WHERE fldProduct LIKE '$_search' AND fldEnabled <> false $_sort\";\n\t\t\t$stmt = $handle->query($sql);\n\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t//SQL query to get seller\n\t\t\t\t$sql_seller = \"SELECT fldUsername FROM tblUsers WHERE fldIdUser LIKE '$row->fldFkSoldBy'\";\n\t\t\t\t$stmt_seller = $handle->query($sql_seller);\n\t\t\t\twhile($row_seller = $stmt_seller->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<div id=\"' . $row->fldIdProduct . '\" class=\"modal\">\n\t\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t\t<h4>' . $row->fldProduct . '</h4>\n\t\t\t\t\t\t\t\t<div class=\"clearfix float-my-children\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\" class=\"imagepadding\">\n\t\t\t\t\t\t\t\t\t<!-- Modal details container-->\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<p class=\"DescTitle\">Produkt Beschreibung:</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"Description\">' . $row->fldDescription . '</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"DescPrice\">\n\t\t\t\t\t\t\t\t\t\tPreis: ' . $row->fldPrice . ' CHF\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<!-- Buy informations button/link-->\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"buy.php?product=' . $row->fldIdProduct . '\" class=\"waves-effect waves-light btn\">Jetzt Kaufen</a>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescVerkaufer\">Verkaufer: <a href=\"userprof.php?user=' . $row->fldFkSoldBy . '\">' . $row_seller->fldUsername . '</a></p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- End of buy informations-->\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- End of details container-->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<!-- Modal bottom button-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t\t\t<a class=\"modal-action modal-close waves-effect waves-teal lighten-2 btn-flat\">Schliessen</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of bottom button-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of modal-->\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Search for entries in specific category\n\t\t\t\t$sql_cat = \"SELECT fldIdCategory FROM tblCategorys WHERE fldCategoryShort LIKE '$_category'\";\n\t\t\t\t$stmt_cat = $handle->query($sql_cat);\n\t\t\t\t$row_cat = $stmt_cat->fetchObject();\n\t\t\t\t\n\t\t\t\t//SQL query to show wanted Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldPrice, fldImage FROM tblProducts WHERE fldProduct LIKE '$_search' AND fldFkCategory LIKE '$row_cat->fldIdCategory' AND fldEnabled <> false $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<!-- Begin of product content-->\n\t\t\t\t\t\t<div class=\"col m6\">\n\t\t\t\t\t\t\t<!-- Beginn of product-->\n\t\t\t\t\t\t\t<div class=\"card\">\n\t\t\t\t\t\t\t\t<div class=\"card-image\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<a class=\"btn-floating halfway-fab waves-effect waves-light red modal-trigger\" href=\"#' . $row->fldIdProduct . '\"><i class=\"material-icons\">add</i></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"card-content center\">\n\t\t\t\t\t\t\t\t\t<p>' . $row->fldProduct . '</p>\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldPrice . ' CHF</h4>\n\t\t\t\t\t\t\t\t\t<br/>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//SQL query to get FK of Tag\n\t\t\t\t\t\t\t\t\t$sql_fk_tag = \"SELECT fldFkTag FROM tblProductsToTags WHERE fldFkProduct LIKE '$row->fldIdProduct'\";\n\t\t\t\t\t\t\t\t\t$stmt_fk_tag = $handle->query($sql_fk_tag);\n\t\t\t\t\t\t\t\t\twhile($row_fk_tag = $stmt_fk_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//SQL query to get Tag\n\t\t\t\t\t\t\t\t\t\t$sql_tag = \"SELECT fldTag FROM tblTags WHERE fldIdTag LIKE '$row_fk_tag->fldFkTag'\";\n\t\t\t\t\t\t\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t\t\t\t\t\t\twhile($row_tag = $stmt_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"chip\"><a href=\"filter.php?search='.$row_tag->fldTag.'&category=All&sort=1&start_search=Suchen\">' . $row_tag->fldTag . '</a></div>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of product-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of product content-->\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t\techo '\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t';\t\n\t\t\t\t//SQL query to create modal for shown Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldDescription, fldPrice, fldImage, fldFkSoldBy FROM tblProducts WHERE fldProduct LIKE '$_search' $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//SQL query to get seller\n\t\t\t\t\t$sql_seller = \"SELECT fldUsername FROM tblUsers WHERE fldIdUser LIKE '$row->fldFkSoldBy'\";\n\t\t\t\t\t$stmt_seller = $handle->query($sql_seller);\n\t\t\t\t\twhile($row_seller = $stmt_seller->fetchObject()){\n\t\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<div id=\"' . $row->fldIdProduct . '\" class=\"modal\">\n\t\t\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldProduct . '</h4>\n\t\t\t\t\t\t\t\t\t<div class=\"clearfix float-my-children\">\n\t\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\" class=\"imagepadding\">\n\t\t\t\t\t\t\t\t\t\t<!-- Modal details container-->\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescTitle\">Produkt Beschreibung:</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"Description\">' . $row->fldDescription . '</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescPrice\">\n\t\t\t\t\t\t\t\t\t\t\tPreis: ' . $row->fldPrice . ' CHF\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<!-- Buy informations button/link-->\n\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"buy.php?product=' . $row->fldIdProduct . '\" class=\"waves-effect waves-light btn\">Jetzt Kaufen</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescVerkaufer\">Verkaufer: <a href=\"userprof.php?user=' . $row->fldFkSoldBy . '\">' . $row_seller->fldUsername . '</a></p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<!-- End of buy informations-->\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- End of details container-->\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Modal bottom button-->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t\t\t\t<a class=\"modal-action modal-close waves-effect waves-teal lighten-2 btn-flat\">Schliessen</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<!-- End of bottom button-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of modal-->\n\t\t\t\t\t\t';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//Search for tags with the same words like the user input\n\t\t\t$sql = \"SELECT COUNT(fldIdTag) FROM tblTags WHERE fldTag LIKE '$_search'\";\n\t\t\t$quantity = $handle -> prepare($sql);\n\t\t\t$quantity->execute();\n\t\t\t$row = $quantity->fetchColumn();\n\t\t\t\n\t\t\tif ($row != 0){\n\t\t\t\t//Get ID of Tag\n\t\t\t\t$sql_tag = \"SELECT fldIdTag FROM tblTags WHERE fldTag LIKE '$_search'\";\n\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t$row_tag = $stmt_tag->fetchObject();\t\n\t\t\t\t\n\t\t\t\t//Get FK of Tag from in between table\n\t\t\t\t$sql_pro = \"SELECT fldFkProduct FROM tblProductsToTags WHERE fldFkTag LIKE '$row_tag->fldIdTag'\";\n\t\t\t\t$stmt_pro = $handle->query($sql_pro);\n\t\t\t\t$row_pro = $stmt_pro->fetchObject();\n\t\t\t\t\n\t\t\t\t//SQL query to show the wanted Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldPrice, fldImage FROM tblProducts WHERE fldIdProduct LIKE '$row_pro->fldFkProduct' $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\techo '\n\t\t\t\t\t\t<!-- Begin of product content-->\n\t\t\t\t\t\t<div class=\"col m6\">\n\t\t\t\t\t\t\t<!-- Beginn of product-->\n\t\t\t\t\t\t\t<div class=\"card\">\n\t\t\t\t\t\t\t\t<div class=\"card-image\">\n\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<a class=\"btn-floating halfway-fab waves-effect waves-light red modal-trigger\" href=\"#' . $row->fldIdProduct . '\"><i class=\"material-icons\">add</i></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"card-content center\">\n\t\t\t\t\t\t\t\t\t<p>' . $row->fldProduct . '</p>\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldPrice . ' CHF</h4>\n\t\t\t\t\t\t\t\t\t<br/>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//SQL query to get FK of Tag\n\t\t\t\t\t\t\t\t\t$sql_fk_tag = \"SELECT fldFkTag FROM tblProductsToTags WHERE fldFkProduct LIKE '$row->fldIdProduct'\";\n\t\t\t\t\t\t\t\t\t$stmt_fk_tag = $handle->query($sql_fk_tag);\n\t\t\t\t\t\t\t\t\twhile($row_fk_tag = $stmt_fk_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//SQL query to get Tag\n\t\t\t\t\t\t\t\t\t\t$sql_tag = \"SELECT fldTag FROM tblTags WHERE fldIdTag LIKE '$row_fk_tag->fldFkTag'\";\n\t\t\t\t\t\t\t\t\t\t$stmt_tag = $handle->query($sql_tag);\n\t\t\t\t\t\t\t\t\t\twhile($row_tag = $stmt_tag->fetchObject()){\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"chip\"><a href=\"filter.php?search='.$row_tag->fldTag.'&category=All&sort=1&start_search=Suchen\">' . $row_tag->fldTag . '</a></div>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of product-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- End of product content-->\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SQL query to create modal for shown Products\n\t\t\t\t$sql = \"SELECT fldIdProduct, fldProduct, fldDescription, fldPrice, fldImage, fldFkSoldBy FROM tblProducts WHERE fldIdProduct LIKE '$row_pro->fldFkProduct' $_sort\";\n\t\t\t\t$stmt = $handle->query($sql);\n\t\t\t\twhile($row = $stmt->fetchObject()){\n\t\t\t\t\t//SQL query to get seller\n\t\t\t\t\t$sql_seller = \"SELECT fldUsername FROM tblUsers WHERE fldIdUser LIKE '$row->fldFkSoldBy'\";\n\t\t\t\t\t$stmt_seller = $handle->query($sql_seller);\n\t\t\t\t\twhile($row_seller = $stmt_seller->fetchObject()){\n\t\t\t\t\t\t//Auto generated HTML for display Products\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<div id=\"' . $row->fldIdProduct . '\" class=\"modal\">\n\t\t\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t\t\t<h4>' . $row->fldProduct . '</h4>\n\t\t\t\t\t\t\t\t\t<div class=\"clearfix float-my-children\">\n\t\t\t\t\t\t\t\t\t\t<img src=\"img/products/' . $row->fldImage . '\" class=\"imagepadding\">\n\t\t\t\t\t\t\t\t\t\t<!-- Modal details container-->\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescTitle\">Produkt Beschreibung:</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"Description\">' . $row->fldDescription . '</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescPrice\">\n\t\t\t\t\t\t\t\t\t\t\tPreis: ' . $row->fldPrice . ' CHF\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<!-- Buy informations button/link-->\n\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"buy.php?product=' . $row->fldIdProduct . '\" class=\"waves-effect waves-light btn\">Jetzt Kaufen</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DescVerkaufer\">Verkaufer: <a href=\"userprof.php?user=' . $row->fldFkSoldBy . '\">' . $row_seller->fldUsername . '</a></p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<!-- End of buy informations-->\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- End of details container-->\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Modal bottom button-->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t\t\t\t<a class=\"modal-action modal-close waves-effect waves-teal lighten-2 btn-flat\">Schliessen</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<!-- End of bottom button-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- End of modal-->\n\t\t\t\t\t\t';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '</div></div>';\n\t\t\t\t}\n\t\t\telse{\n\t\t\t\techo 'Es tut uns leid, aber es konnten keine Produkte mit diesen Suchkriterien gefunden werden</div></div>';\n\t\t\t}\n\t\t}\n\t}", "function getProductByCategorySearch($category_id, $keyword){\r\n\t\t$unix_product = array();\r\n\t\t//$has_printed = false;\r\n\t\t$total_product_1 = 0;\r\n\t\t$total_product_2 = 0;\r\n\t\t$keyword=strtolower($keyword);\r\n\t\t\r\n\t\tif($category_id!=0){\r\n\t\t\t$q_category = getResultSet(\"SELECT DISTINCT(category_id) FROM \".DB_PREFIX.\"category WHERE parent_id=\".$category_id);\t\r\n\t\t}\r\n\t\telseif($category_id==0){\r\n\t\t\t$q_category = getResultSet(\"SELECT DISTINCT(category_id) FROM \".DB_PREFIX.\"category\");\t\r\n\t\t}\r\n\t\twhile($rc=mysql_fetch_array($q_category)){\r\n\t\t\t$cat_id = $rc['category_id'];\r\n\t\t\t//if($category_id!=0){\r\n\t\t\t$q_product_id=getResultSet(\"SELECT DISTINCT(C.product_id) FROM \".DB_PREFIX.\"product_to_category AS C\r\n\t\t\t\t\t\t\t\t\tINNER JOIN \".DB_PREFIX.\"product_description AS D ON C.product_id = D.product_id \r\n\t\t\t\t\t\t\t\t\tWHERE C.category_id=\".$cat_id.\" AND lower(D.name) LIKE '%$keyword%'\");\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t$total_product_1 = mysql_num_rows($q_product_id);\t\t\t\t\t\t\t\t\t\r\n\t\t\twhile($rp=mysql_fetch_array($q_product_id)){\r\n\t\t\t\t$product_id = $rp['product_id'];\r\n\t\t\t\t$product = new product($product_id);\r\n\t\t\t\tif(!in_array($product_id, $unix_product)){\r\n\t\t\t\techo '<div class=\"item\">';\r\n\t\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\t\techo '<div class=\"item_name\" >'.$product->getProductName().'_'.$total_product_1.'</div>';\r\n\t\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'store/image/icon/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$product->getShopName().'</span></div>';\r\n\t\t\t\t\t\techo '<div class=\"price\" >$'.$product->getProductPrice().'</div>';\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\t\techo '<a href=\"?page=productdetail&product='.$product_id.'\">';\r\n\t\t\t\t\techo '<img src=\"'.$product->getProductImage().'\">';\r\n\t\t\t\t\techo '</a>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\t}\r\n\t\t\t\t$unix_product[] = $rp['product_id'];\r\n\t\t\t\t$unix_product = array_unique($unix_product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Search Child Category\r\n\t\t$q_child_product_id=getResultSet(\"SELECT DISTINCT(C.product_id) FROM \".DB_PREFIX.\"product_to_category AS C\r\n\t\t\t\t\t\t\t\t\t\tINNER JOIN \".DB_PREFIX.\"product_description AS D ON C.product_id = D.product_id \r\n\t\t\t\t\t\t\t\t\t\tWHERE C.category_id=\".$category_id.\" AND lower(D.name) LIKE '%$keyword%'\");\r\n\t\t$total_product_2 = mysql_num_rows($q_child_product_id);\r\n\t\twhile($rp=mysql_fetch_array($q_child_product_id)){\r\n\t\t\t$product_id = $rp['product_id'];\r\n\t\t\t$product = new product($product_id);\r\n\t\t\tif(!in_array($product_id, $unix_product)){\r\n\t\t\techo '<div class=\"item\">';\r\n\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\techo '<div class=\"item_name\" >'.$product->getProductName().$total_product_2.'</div>';\r\n\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'store/image/icon/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$product->getShopName().'</span></div>';\r\n\t\t\t\t\techo '<div class=\"price\" >$'.$product->getProductPrice().'</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\techo '<a href=\"?page=productdetail&product='.$product_id.'\">';\r\n\t\t\t\techo '<img src=\"'.$product->getProductImage().'\">';\r\n\t\t\t\techo '</a>';\r\n\t\t\techo '</div>';\r\n\t\t\t}\r\n\t\t\t$unix_product[] = $rp['product_id'];\r\n\t\t\t$unix_product = array_unique($unix_product);\r\n\t\t}\r\n\t\t//Info if Search No Result \r\n\t\t/*\r\n\t\tif($total_product_1==0 && $total_product_2==0){\r\n\t\t\techo '<div class=\"no_item\" style=\"height:200px;padding: 10px 10px 10px 20px; color: #CCC; font-size: 20px;\">';\r\n\t\t\t\techo 'No Result! RUn'.$total_product_1.'_'.$total_product_2;\r\n\t\t\t\t//echo ':)'.$rLanguage->text(\"Logout\");\t\r\n\t\t\techo '</div>';\r\n\t\t}\r\n\t\t*/\r\n\t}", "public function prod_list_by_category() {\n $url_cate = get_raw_app_uri();\n if (!empty($url_cate)) {\n $Product = new Product();\n $info = $Product->getProductByCategory($url_cate);\n $data['content'] = 'list_product'; \n $data['product'] = $info['product'];\n $data['paging'] = $info['paging'];\n $data['selected'] = $url_cate;\n \n //seo\n \n $Category = new ProductCategory();\n $list_cate = $Category->getCategoryByLink($url_cate);\n if ($list_cate->countRows() > 0){\n $list_cate->fetchNext();\n $data['title_page'] = $list_cate->get_prod_cate_name();\n $data['description'] = $list_cate->get_prod_cate_meta_description();\n $data['keywords'] = $list_cate->get_prod_cate_keywords();\n }else{\n $data['title_page'] = '';\n $data['description'] = '';\n $data['keywords'] = '';\n }\n \n $array_menus = array();\n $filter = array();\n $filter['parent_id'] = 0;\n Menu::getMenuTree($array_menus, $filter);\n $data['array_menus'] = $array_menus;\n \n $this->load->view('temp', $data);\n } else {\n redirect(Variable::getDefaultPageString());\n }\n }", "function productByCategory($id)\n {\n \t\n }", "public function GetCategories() {\n // Setup the Query\n $this->sql = \"SELECT *\n FROM categories\";\n \n // Run the query \n $this->RunBasicQuery();\n }", "function Show_Search_Category($search_sql,$tot_cnt)\n\t\t{\n\t\t \tglobal $ecom_siteid,$db,$ecom_hostname,$Settings_arr,$ecom_themeid,$default_layout,$Captions_arr,$search_prodperpage,$quick_search,$head_keywords,$row_desc,$inlineSiteComponents;\n\t\t\tif(in_array('mod_catimage',$inlineSiteComponents))\n\t\t\t{\n\t\t\t\t$img_support = true;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$img_support = false;\n\t\t\t\n\t\t\t$Captions_arr['SEARCH'] \t= getCaptions('SEARCH');\n\t\t\t//Default settings for the search\n\t\t\t$catsort_by\t\t\t\t\t= ($_REQUEST['searchcat_sortby'])?$_REQUEST['searchcat_sortby']:'category_name';\n\t\t \t$catperpage\t\t\t\t\t= ($_REQUEST['searchcat_perpage'])?$_REQUEST['searchcat_perpage']:$Settings_arr['product_maxcntperpage_search'];// product per page\n\t\t\t$catsort_order\t\t\t\t= ($_REQUEST['searchcat_sortorder'])?$_REQUEST['searchcat_sortorder']:$Settings_arr['product_orderby_search'];\n\t\t\t\n\t\t\t $query_string = \"&\";\n\t\t $search_fields = array('quick_search');\n\t\t\t\tforeach($search_fields as $v) {\n\t\t\t\t\t$query_string .= \"$v=\".$_REQUEST[$v].\"&\";#For passing searh terms to javascript for passing to different pages.\n\t\t\t\t}\n\t\t\t$first_querystring=$query_string; //Assigning the initial string to the variable.\n\t\t\t\t\t\t$pg_variable\t= 'search_pg';\n\t\t\t\t\t\tif($_REQUEST['top_submit_Page'] || $_REQUEST['bottom_submit_Page'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t $_REQUEST[$pg_variable] = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t if ($_REQUEST['req']!='')// LIMIT for products is applied only if not displayed in home page\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start_var \t\t= prepare_paging($_REQUEST[$pg_variable],$catperpage,$tot_cnt);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$Limit = '';\n\t\t\t\t\t\t\t$querystring = \"\"; // if any additional query string required specify it over here\n\t\t\t\t\t\t\t$Limit\t\t\t= \" ORDER BY $catsort_by $catsort_order LIMIT \".$start_var['startrec'].\", \".$catperpage;\n\t\t\t\t\t\t\t//echo $search_sql.$Limit;\n\t\t\t\t\t\t\t$ret_search = $db->query($search_sql.$Limit);\n\t\t\t\t\t\t\tif ($db->num_rows($ret_search))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"shelfBtable\">\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\" class=\"treemenu\" align=\"left\"><a href=\"<? url_link('');?>\"><?=$Captions_arr['COMMON']['TREE_MENU_HOME_LINK'];?></a><? if($_REQUEST['quick_search']!=\"\"){?> >> <? echo $_REQUEST['quick_search']; } ?> </td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\" align=\"left\" valign=\"top\" class=\"shelfAheader_A\">\n\t\t\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"productpagenavtable\">\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"63%\" height=\"30\" align=\"right\" valign=\"middle\" class=\"productpagenavtext\" colspan=\"2\"><?php echo $Captions_arr['SEARCH']['SEARCH_SORT']?>\n\t\t\t\t\t\t\t\t\t\t\t\t <select name=\"searchcat_sortbytop\" id=\"searchcat_sortbytop\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"category_name\" <?php echo ($catsort_by=='category_name')?'selected=\"selected\"':''?>><?php echo $Captions_arr['SEARCH']['SEARCH_CAT_NAME']?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t </select>\n\t\t\t\t\t\t\t\t\t\t\t\t <select name=\"searchcat_sortordertop\" id=\"searchcat_sortordertop\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"ASC\" <?php echo ($catsort_order=='ASC')?'selected=\"selected\"':''?>><?php echo $Captions_arr['SEARCH']['SEARCH_LOW2HIGH']?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"DESC\" <?php echo ($catsort_order=='DESC')?'selected=\"selected\"':''?>><?php echo $Captions_arr['SEARCH']['SEARCH_HIGH2LOW']?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t </select></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"37%\" align=\"right\" valign=\"middle\" class=\"productpagenavtext\"><?php echo $Captions_arr['SEARCH']['SEARCH_ITEMS'] ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"searchcat_prodperpagetop\" id=\"searchcat_prodperpagetop\">\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($ii=$Settings_arr[\"productlist_interval\"];$ii<=$Settings_arr[\"productlist_maxval\"];$ii+=$Settings_arr[\"productlist_interval\"])\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $ii?>\" <?php echo ($catperpage==$ii)?'selected=\"selected\"':''?>><?php echo $ii?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"top_submit_Page\" value=\"<?php echo $Captions_arr['SEARCH']['SEARCH_GO'];?>\" class=\"buttonred\" onclick=\"handle_searchcatdropdownval_sel('<?php echo $ecom_hostname?>','searchcat_sortbytop','searchcat_sortordertop','searchcat_prodperpagetop')\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\tif($cur_title)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\" class=\"shelfAheader\" align=\"left\"><?php echo $cur_title?></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif ($tot_cnt>0 and ($_REQUEST['req']!=''))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif($_REQUEST['search_prodperpage']!=9999)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\" class=\"pagingcontainertd\" align=\"center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t$query_string =$first_querystring;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$path = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$query_string .= \"searchcat_sortby=\".$catsort_by.\"&searchcat_sortorder=\".$catsort_order.\"&searchcat_perpage=\".$catperpage.\"&pos=top&rdo_mainoption=cat&cbo_keyword_look_option=\".$_REQUEST['cbo_keyword_look_option'].'&rdo_suboption='.$_REQUEST['rdo_suboption'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaging_footer($path,$query_string,$tot_cnt,$start_var['pg'],$start_var['pages'],'',$pg_variable,'Categories',$pageclass_arr); \t\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$pass_type = 'image_iconpath';\n\t\t\t\t\t\t\t\t\t\t\twhile ($row_search = $db->fetch_array($ret_search))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr onmouseover=\"this.className='normalshelf_hover'\" onmouseout=\"this.className='shelfBtabletd'\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"left\" valign=\"middle\" class=\"shelfBtabletd\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_search['category_showimagetype']!='None' && ($img_support)) // ** Show sub category image only if catimage module is there for the site subcategoreynamelink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php url_category($row_search['category_id'],$row_search['category_name'],-1)?>\" title=\"<?php echo stripslashes($row_search['category_name'])?>\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($row_search['category_showimageofproduct']==0) // Case to check for images directly assigned to category\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('prodcat',$row_search['category_id'],$pass_type,0,0,1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshow_image(url_root_image($img_arr[0][$pass_type],1),$row_search['category_name'],$row_search['category_name']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$show_noimage = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$show_noimage = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse // Case of check for the first available image of any of the products under this category\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the id of products under current category with image assigned to it\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cur_prodid = find_AnyProductWithImageUnderCategory($row_search['category_id']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($cur_prodid)// case if any product with image assigned to it under current category exists\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('prod',$cur_prodid,$pass_type,0,0,1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshow_image(url_root_image($img_arr[0][$pass_type],1),$row_search['category_name'],$row_search['category_name']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$show_noimage = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$show_noimage = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse// case if no products exists under current category with image assigned to it\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$show_noimage = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ** Following section makes the decision whether the no image is to be displayed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($show_noimage)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calling the function to get the default no image \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$no_img = get_noimage('prodcat',$pass_type); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($no_img)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshow_image($no_img,$row_search['category_name'],$row_search['category_name']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"shelfBprodname\"><a href=\"<?php url_category($row_search['category_id'],$row_search['category_name'],-1)?>\" title=\"<?php echo stripslashes($row_search['category_name'])?>\"><?php echo stripslashes($row_search['category_name'])?></a></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t <td colspan=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t <h6 class=\"shelfBproddes\"><?php echo stripslashes($row_search['category_shortdescription'])?></h6>\n\t\t\t\t\t\t\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif ($tot_cnt>0 and ($_REQUEST['req']!=''))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\" class=\"pagingcontainertd\" align=\"center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$path = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $query_string =$first_querystring;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$query_string .= \"searchcat_sortby=\".$catsort_by.\"&searchcat_sortorder=\".$catsort_order.\"&searchcat_perpage=\".$catperpage.\"&pos=top&rdo_mainoption=cat&cbo_keyword_look_option=\".$_REQUEST['cbo_keyword_look_option'].'&rdo_suboption='.$_REQUEST['rdo_suboption'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaging_footer($path,$query_string,$tot_cnt,$start_var['pg'],$start_var['pages'],'',$pg_variable,'Categories',$pageclass_arr); \t\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\" align=\"left\" valign=\"top\" class=\"shelfAheader_A\">\n\t\t\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"productpagenavtable\">\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"63%\" height=\"30\" align=\"right\" valign=\"middle\" class=\"productpagenavtext\" colspan=\"2\"><?php echo $Captions_arr['SEARCH']['SEARCH_SORT']?>\n\t\t\t\t\t\t\t\t\t\t\t\t <select name=\"searchcat_sortbybottom\" id=\"searchcat_sortbybottom\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"category_name\" <?php echo ($catsort_by=='category_name')?'selected=\"selected\"':''?>><?php echo $Captions_arr['SEARCH']['SEARCH_CAT_NAME']?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t </select>\n\t\t\t\t\t\t\t\t\t\t\t\t <select name=\"searchcat_sortorderbottom\" id=\"searchcat_sortorderbottom\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"ASC\" <?php echo ($catsort_order=='ASC')?'selected=\"selected\"':''?>><?php echo $Captions_arr['SEARCH']['SEARCH_LOW2HIGH']?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"DESC\" <?php echo ($catsort_order=='DESC')?'selected=\"selected\"':''?>><?php echo $Captions_arr['SEARCH']['SEARCH_HIGH2LOW']?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t </select></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"37%\" align=\"right\" valign=\"middle\" class=\"productpagenavtext\"><?php echo $Captions_arr['SEARCH']['SEARCH_ITEMS'] ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"searchcat_prodperpagebottom\" id=\"searchcat_prodperpagebottom\">\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($ii=$Settings_arr[\"productlist_interval\"];$ii<=$Settings_arr[\"productlist_maxval\"];$ii+=$Settings_arr[\"productlist_interval\"])\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $ii?>\" <?php echo ($catperpage==$ii)?'selected=\"selected\"':''?>><?php echo $ii?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"bottom_submit_Page\" value=\"<?php echo $Captions_arr['SEARCH']['SEARCH_GO']?>\" class=\"buttonred\" onclick=\"handle_searchcatdropdownval_sel('<?php echo $ecom_hostname?>','searchcat_sortbybottom','searchcat_sortorderbottom','searchcat_prodperpagebottom')\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t}\n\t\t}", "public function getProductCollectionFromCategoryBottom() {\n $categoryId = $this->getCurrentcat();\n $not_in_array_left = $this->getProductCollectionFromFourRow();\n $not_in_array_right = $this->getProductCollectionFromThreeRow();\n $not_in_array_parent = $this->getProductId();\n $custom_array = array(2202,2354,2161);\n $not_in_array = array_merge($not_in_array_left, $not_in_array_right,$not_in_array_parent,$custom_array);\n $category = $this->categoryFactory->create()->load($categoryId);\n\t $collection = $category->getProductCollection()->addAttributeToSelect('*')\n\t ->addAttributeToFilter('type_id', array('eq' => 'grouped'))\n ->addAttributeToFilter('status',\\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_ENABLED)->setPageSize(20)\n ->addAttributeToFilter('entity_id', array('nin' => $not_in_array));\n return $collection;\n \n \t}", "function product_category_list(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\t$product_category_list = mysql_q(\"SELECT *\n\t\t\tFROM product_category\n\t\t\tORDER BY id\");\n\t\t$tpl->assign(\"product_category_list\", $product_category_list);\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_list.tpl\");\n\t\tdisplay($main);\n\t}", "public function getCategoryCloud()\n {\n $sql = \"\n SELECT\n PC.id as cat_id,\n PC.category,\n P2C.id,\n P2C.cat_id,\n COUNT(P2C.id) AS amount\n FROM Prod2Cat AS P2C\n LEFT OUTER JOIN ProdCategory AS PC\n ON PC.id = P2C.cat_id\n GROUP BY P2C.cat_id\n -- ORDER BY amount DESC\n \";\n\n $this->db->execute($sql);\n $res = $this->db->fetchAll();\n return $res;\n }", "function shophead_index()\n {\n $this->layout = 'admin_layout'; \n $this->set('title','Product Items Management');\n App::Import(\"Model\",\"ProductCategory\");\n $this->ProductCategory=new ProductCategory();\n $categories_list = $this->ProductCategory->find('list', array('conditions' => array('ProductCategory.is_deleted' => 0), 'fields' => array('ProductCategory.id', 'ProductCategory.name')));\n $this->set('categories_list', $categories_list);\n\t\t$Category_join = array('table' => 'product_sub_categories', 'alias' => 'ProductSubCategory', 'type' => 'inner', 'conditions' => array('ProductItem.product_sub_category_id =ProductSubCategory.id'));\t\t\n $conditions = array('ProductItem.is_deleted' => 0);\n if (!empty($this->request->data)) {\n \n if ($this->request->data['ProductItem']['product_sub_category_id'] != \"\") {\n $conditions['ProductItem.product_sub_category_id'] = $this->request->data['ProductItem']['product_sub_category_id'];\n $this->request->params['named']['ProductItem.product_sub_category_id'] = $this->request->data['ProductItem']['product_sub_category_id'];\n }\n if ($this->request->data['ProductItem']['product_category_id'] != \"\") {\n $conditions['ProductItem.product_category_id'] = $this->request->data['ProductItem']['product_category_id'];\n $this->request->params['named']['ProductItem.product_category_id'] = $this->request->data['ProductItem']['product_category_id'];\n }\n } else {\n if (isset($this->request->params['named']['ProductItem.product_category_id']) && $this->request->params['named']['ProductItem.product_category_id'] != \"\") {\n $conditions['ProductItem.product_category_id'] = $this->request->params['named']['ProductItem.product_category_id'];\n $this->request->data['ProductItem']['product_category_id'] = $this->request->params['named']['ProductItem.product_category_id'];\n }\n if (isset($this->request->params['named']['ProductItem.product_sub_category_id']) && $this->request->params['named']['ProductItem.product_sub_category_id'] != \"\") {\n $conditions['ProductItem.product_sub_category_id'] = $this->request->params['named']['ProductItem.product_sub_category_id'];\n $this->request->data['ProductItem']['product_sub_category_id'] = $this->request->params['named']['ProductItem.product_sub_category_id'];\n }\n }\n \n $this->paginate = array(\n 'recursive' => 0,\n 'limit' => LIMIT,\n 'fields'=> array('ProductSubCategory.name as catname,ProductItem.id,ProductItem.name,ProductItem.sort_order,ProductItem.created,ProductItem.status,ProductItem.updated,ProductItem.product_sub_category_id'),\n 'conditions' => $conditions,\n 'order' => array(\n 'ProductItem.sort_order' => 'Asc'\n ),\n 'joins'=>array($Category_join)\n );\n\t\t\n\t\t\n $result = $this->paginate('ProductItem');\n\t\t//pr($result);\n $this->set('result', $result);\n }", "function getcategorys_list(){\n \n global $wpdb;\n\n$post_per_page = (isset($_REQUEST['post_per_page'])) ? $_REQUEST['post_per_page'] : 1; \n\n$offset = $post_per_page * ($_REQUEST['page'] - 1);\n// Setup the arguments to pass in\n$args = array(\n'offset' => $offset,\n'number' => $post_per_page,\n'order' => 'DESC',\n'hide_empty'=>0\n);\n// Gather the series\n$mycategory = get_terms( 'products', $args );\n\n\n\n if(!empty($mycategory)){\n foreach($mycategory as $post)\n {\n\n \n $im = $post->taxonomy.'_'. $post->term_id; \n $collection_image = get_field('category_image',$im); \n\n $title = $collection_image['title'];\n $url = get_term_link($post);\n $medium= get_image_url($collection_image['id'],'medium');\n\n if(empty($medium)){\n $medium = (get_template_directory_uri().\"/images/no-image.png\"); \n }\n \n\n printf('<div class=\"col-lg-3 col-md-4 col-sm-4 col-xs-6\">\n <div class=\"product_info\"><a href=\"'.$url.'\" title=\"\" class=\"overly\"><span><img src=\"'.$medium.'\" alt=\"\" title=\"\"></span></a>\n <h4>'.$post->name.'</h4>\n <a href=\"'.$url.'\" title=\"View More\" class=\"link\">View More</a> </div>\n </div>');\n\n\n }\n }\n die();\n}", "function category($title, $id, $page)\n {\n $sort = Input::get('sort');\n\n $aliexpressApi = new AliexpressAPI();\n\n $options = [\n \"sort\" => $sort,\n \"pageNo\" => $page\n ];\n if (Cache::get('aliCategory' . $id . '-' . $page . '-' . $sort) == null) {\n Cache::put('aliCategory' . $id . '-' . $page . '-' . $sort, json_decode($aliexpressApi->getCategoryProducts($id,\n 39, \"USD\", App::getLocale(), $options)), Config::get('cache.storeAliHotProducts'));\n }\n $aliData = Cache::get('aliCategory' . $id . '-' . $page . '-' . $sort);\n\n $similarCategories = $this->model->getSimilarCategory($id);\n $breadCramb = $this->model->getBreadCramb($id);\n $resultsAmount = isset($aliData->result->totalResults) ? $aliData->result->totalResults : 100;\n\n // pagination ( not the perfect of implementations, but it works )\n $totalPages = 100;\n $pagesAvailable = Util::getPaginationList($page, $totalPages);\n\n $categoryData = $this->makeCategoryData($page, $id, $title, $sort, $resultsAmount);\n\n // product forms action route base\n $productBaseRoute = \"/{$this->siteslug}/product\";\n $categoryBaseRoute = \"/{$this->siteslug}/category/$title/$id\";\n\n $paginationResult = Util::getLinksForPagination($pagesAvailable, \"category\", $title, $page, $this->siteslug, null, $id);\n\n $pages = $paginationResult['pages'];\n $pageNext = $paginationResult['pageNext'];\n\n if ($page == 1) {\n $pageForTitle = '';\n } else {\n $pageForTitle = ' ' . 'עמוד' . ' ' . $page;\n }\n /*if (is_null($categoryData['sort'])){\n $sortForTitle='';\n }else{\n $sortForTitle='-' . $categoryData['sort'];\n }*/\n // dd($categoryData);\n if (Lang::getLocale() == 'he') {\n $this->shopName = Lang::get('general.aliexpress');\n } elseif (Lang::getLocale() == 'en') {\n $this->shopName = 'aliexpress';\n };\n $this->title =$categoryData['title']. ' - ' . $breadCramb['category']. ' - ' . $this->shopName . ' - ' . $categoryData['page'] . ' - ' .'עליאקספרס' ;\n// $this->title = $categoryData['title'];\n $this->description = $categoryData['title'] . $pageForTitle . '- ' . \"עליאקספרס בעברית\" . ' - ' . \"שירות לקוחות בעברית,תשלום ללא כ.א בינלאומי,למעלה ממיליארד מוצרים בעברית\";\n return view(\"aliexpress.category\", [\n 'timerTime' => $this->timerTime,\n 'nextPageLink' => $pageNext,\n 'pageLinks' => $pages,\n 'pagination' => $pagesAvailable,\n 'categoryData' => $categoryData,\n 'productBase' => $productBaseRoute,\n 'categoryBase' => $categoryBaseRoute,\n 'aliData' => $this->model->parseCategoryData($aliData),\n 'categories' => $this->categories,\n 'siteslug' => $this->siteslug,\n 'breadCramb' => $breadCramb,\n 'title' => $this->title,\n 'description' => $this->description,\n 'page' => $page,\n 'similarCategories' => $similarCategories,\n ]);\n }", "function getProductsByCategory()\n\t{\n\t\tglobal $con;\n\t\tif (isset($_GET['cat'])){\n\t\t\t$cat_id = $_GET['cat'];\n\t\t\t$get_products = \"select * from products where prod_cat='$cat_id'\";\n\t\t\t$run_products = mysqli_query($con, $get_products);\n\t\t\t$count = mysqli_num_rows($run_products);\n\t\t\t\n\t\t\tif ($count == 0)\n\t\t\t\techo \"<h2>No Products in this category</h2>\";\n\t\t\t\n\t\t\twhile($row = mysqli_fetch_array($run_products)) {\n\t\t\t\t$prod_id = $row['prod_id'];\n\t\t\t\t$prod_cat = $row['prod_cat'];\n\t\t\t\t$prod_brand = $row['prod_brand'];\n\t\t\t\t$prod_price = $row['prod_price'];\n\t\t\t\t$prod_image = $row['prod_img'];\n\n\t\t\techo \"\n\t\t\t\t<div class='single_product'>\n\t\t\t\t\t<h3>$prod_title</h3>\n\t\t\t\t\t<img src='admin_area/product_images/$prod_image'>\t\n\t\t\t\t\t<h2>$prod_price</h2>\n\t\t\t\t\t<a href='details.php?pro_id=$prod_id' style='float:left;'>Details</a>\n\t\t\t\t\t<a href='index.php?add_cart=$prod_id'><button>Add to Cart</button></a>\n\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t}\n\t}", "public static function getTotalproductsCount($cat_id) {\n//First get the products ids from the selected category\n\n $category_dress_type_id = isset($_POST['product_type']) ? $_POST['product_type'] : '';\n $designer_type = isset($_POST['designer_type']) && !empty($_POST['designer_type']) ? $_POST['designer_type'] : \"\";\n if (isset($_POST['model_type'])) {\n $model_type = $_POST['model_type'];\n switch ($model_type) {\n case \"girl\":\n if (!empty($category_dress_type_id)) {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260 AND category_dress_type_id='$category_dress_type_id'\");\n }\n else if (!empty($designer_type)) {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260 AND brand_type='$designer_type'\");\n }\n else {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260\");\n }\n break;\n case \"boy\":\n if (!empty($category_dress_type_id)) {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=261 AND category_dress_type_id='$category_dress_type_id'\");\n }\n else if (!empty($designer_type)) {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=261 AND brand_type='$designer_type'\");\n }\n else {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=261\");\n }\n\n break;\n default:\n if (!empty($category_dress_type_id)) {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260 AND category_dress_type_id='$category_dress_type_id'\");\n }\n else if (!empty($designer_type)) {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260 AND brand_type='$designer_type'\");\n }\n else {\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260\");\n }\n break;\n }\n }\n $products_count = Db_Actions::DbGetResults();\n if (!isset($products_count->empty_result)) {\n foreach ($products_count as $count) {\n echo ceil($count->totalprds / 9);\n }\n }\n else {\n echo 0;\n }\n }", "function get_ProductsBy_CatID($data) {\r\n $params[0] = array(\"name\" => \":category_id\", \"value\" => &$data['category_id']);\r\n $params[1] = array(\"name\" => \":prodType\", \"value\" => &$data['prodType']);\r\n return $this->DBObject->readCursor(\"product_actions.get_ProductsBy_CatID(:category_id,:prodType)\", $params);\r\n }", "public function actionCategories()\n {\n // $model ->select('category')\n // ->from('product')\n // ->distinct()\n // ->all();\n \n // if ($model) {\n // foreach ($model as $row) {\n // print_r($row['category']);\n // }\n // }\n $query = product::find()->select('category')->distinct();\n foreach($query as $row)\n {\n print_r($row->category);\n }\n \n exit();\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return $model;\n\n }", "private function filterCategory()\n {\n if(empty($this->category) || $this->category === static::FILTER_CATEGORY_NONE) {\n return;\n }\n\n if($this->category === static::FILTER_CATEGORY_OTHER) {\n $this->query->andWhere(['LIKE', 'category', 'yii\\\\']);\n return;\n }\n\n $this->query->andWhere(['category' => $this->category]);\n }", "function get_lowcat($product_id)\n {\n \t\t $database =& JFactory::getDBO();\n \t\t //najde kategoriu druhej alebo mensej urovne viac menej nahodne\n \t\t $sql = \"SELECT #__vm_category.category_id FROM #__vm_product_category_xref, #__vm_category, #__vm_category_xref WHERE #__vm_category_xref.category_child_id=#__vm_product_category_xref.category_id AND #__vm_category.category_publish='Y' AND #__vm_category.category_id=#__vm_category_xref.category_child_id and #__vm_category_xref.category_parent_id <> 0 AND #__vm_product_category_xref.product_id = '\".$product_id.\"' \";\n \t \n\t\t\t$database->setQuery($sql);\n\t\t\t\n\t\t\t//$res = $database->loadResult();\n\t\t\t$resA = $database->loadAssocList();\n\t\t\tif (!empty($resA))\n\t\t\t{\n\t\t\tforeach ($resA as $res)\n\t\t\t{\n\t\t\t \n\t\t\t {\n\t\t\t $arr = array();\n\t\t\t $cats = $this->build_cats($res['category_id'], $arr);\n\t\t\t //$x = end($cats);\n\t\t\t //var_dump($x);\n\t\t\t if (!empty($cats))\n\t\t\t // if (end($cats)!='262') IF YOU USE A CATEGORY SUCH AS LATEST PRODUCTS\n\t\t\t {\n\t\t\t //var_dump($res['category_id']); die();\n\t\t\t return $res['category_id'];\n\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t\t//echo $product_id.'...cat...'.$res['category_id']; die();\n\t\t\t// nechame novinky ak inde nie je\n\t\t\treturn $res['category_id'];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif (!isset($res) || ($res==false))\n\t\t\t{\n\t\t\t // ak podkategoria neexistuje, najde top kategoriu\n\t\t\t \t$sql = \"SELECT #__vm_category.category_id FROM #__vm_product_category_xref, #__vm_category, #__vm_category_xref WHERE #__vm_category_xref.category_child_id=#__vm_product_category_xref.category_id AND #__vm_category.category_publish='Y' AND #__vm_category.category_id=#__vm_category_xref.category_child_id AND #__vm_product_category_xref.product_id = '$product_id' LIMIT 0,1\";\n\t\t\t \t$database->setQuery($sql);\n\t\t\t\t$res = $database->loadResult();\n\t\t\t\treturn $res;\n\t\t\t}\n\n\t\t\treturn 0;\n\n }", "public function wProduct($cat,$subCat){\n $sql =\"SELECT * from subcategory inner join category on subcategory.categoryID=category.categoryID WHERE subcategory.subCategoryID='$subCat'\";\n $result = $this->db->query($sql);\n if($result->num_rows > 0){\n $gtbl = $result->fetch_assoc();\n $table_product=$gtbl['table_product'];\n\n $sqlP =\"SELECT * from \".$table_product.\" order by productID desc \";\n $resultP = $this->db->query($sqlP);\n if($resultP->num_rows > 0){\n while($rowP = $resultP->fetch_assoc()){\n $data[] = $rowP;\n }\n \n }\n \n }\n return !empty($data)?$data:false;\n }", "function getcategory_list(){\n \n global $wpdb;\n\n $post_per_page = (isset($_REQUEST['post_per_page'])) ? $_REQUEST['post_per_page'] : 1;\n $args = array('posts_per_page'=>$post_per_page,'order' => 'asc','paged'=>$_REQUEST['page'],'post_type'=>'product','tax_query' => array(\n array(\n 'taxonomy' => 'products',\n 'field' => 'term_id',\n 'terms' => $_REQUEST['tours']\n )\n ) ,'orderby' => 'ID');\n $posts = get_posts( $args );\n\n if(!empty($posts)){\n foreach($posts as $post)\n {\n\t\t\n\t\t\t\n $imgs_id = post_id_get_fetured_image($post->ID,'medium');\n\n $title = get_post(get_post_thumbnail_id($post->ID))->post_title;\n\n\nif(empty($imgs_id)){\n$imgs_id = (get_template_directory_uri().\"/images/no-image.png\"); \n}\n\n\n printf('<div class=\"col-lg-3 col-md-4 col-sm-4 col-xs-6\">\n <div class=\"product_info\"><a href=\"'.get_permalink($post).'\" title=\"\" class=\"overly\"><span><img src=\"'.$imgs_id.'\" alt=\"\" title=\"'.$post->post_title.'\"></span></a>\n <h4>'.$post->post_title.'</h4>\n <a href=\"'.get_permalink($post).'\" title=\"View More\" class=\"link\">View More</a> </div>\n </div>');\n\n\n\n }\n }\n die();\n}", "public static function getCategoryListing() {\n global $lC_Database, $lC_Language, $lC_Products, $lC_CategoryTree, $lC_Vqmod, $cPath, $cPath_array, $current_category_id;\n \n include_once($lC_Vqmod->modCheck('includes/classes/products.php'));\n \n if (isset($cPath) && strpos($cPath, '_')) {\n // check to see if there are deeper categories within the current category\n $category_links = array_reverse($cPath_array);\n for($i=0, $n=sizeof($category_links); $i<$n; $i++) {\n $Qcategories = $lC_Database->query('select count(*) as total from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n\n if ($Qcategories->valueInt('total') < 1) {\n // do nothing, go through the loop\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n break; // we've found the deepest category the customer is in\n }\n }\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $current_category_id);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n }\n $number_of_categories = $Qcategories->numberOfRows();\n $rows = 0;\n $output = '';\n while ($Qcategories->next()) {\n $rows++;\n $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';\n $exists = ($Qcategories->value('categories_image') != null) ? true : false;\n $output .= ' <td style=\"text-align:center;\" class=\"categoryListing\" width=\"' . $width . '\" valign=\"top\">';\n if ($Qcategories->value('categories_custom_url') != '') {\n $output .= lc_link_object(lc_href_link($Qcategories->value('categories_custom_url'), ''), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no-image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n } else {\n $output .= lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $lC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'))), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no_image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n }\n $output .= '</td>' . \"\\n\";\n if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {\n $output .= ' </tr>' . \"\\n\";\n $output .= ' <tr>' . \"\\n\";\n } \n } \n \n return $output;\n }", "function showProducts()\n\t{\n\t\tif($_GET['id']!='')\n\t\t{\n\t\t\t$sql = \"SELECT \t* FROM products_table where category_id=\".(int)$_GET['id'] ;\n\t\n\t\t\t$query = new Bin_Query();\n\t\n\t\t\tif($query->executeQuery($sql))\n\t\t\t{\n\t\t\t\t$totrows = $query->totrows;\n\t\t\t}\n\t\t\tif($totrows > 0)\n\t\t\t\treturn Display_DManageProducts::productList($query->records);\n\t\t\telse\n\t\t\t\treturn Display_DManageProducts::displayNoProductFound();\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\techo 'Select SubCategory';\n\t\t}\t\n\t}", "public static function select_product_count_by_category_id($category_id=null)\n {\n try {\n $query = new Query;\n if($category_id != null)\n {\n $count = $query->select('COUNT(*) as count')->from('core_products')->where(\"category_id = $category_id\")->andWhere(\"product_status = 1\")->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])->All();\n return $count[0]['count'];\n \n }else\n {\n $query = new Query;\n $pending_products_count = $query->select('COUNT(*) as count')->from('core_products')\n ->where(\"product_status = 0\")\n //->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->All();//pending products count \n $total_count['pending_products_count'] = $pending_products_count[0]['count'];\n\n $query = new Query;\n $count = $query->select('COUNT(*) as count')->from('core_products')\n //->where(\"product_status = 1\")\n //->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->All();\n $total_count['total_products_count'] = $count[0]['count'];\n return $total_count;\n }\n \n \n \n } catch (ErrorException $e) {\n Yii::warning($e->getMessage());\n }\n \n \n }", "function getProductListWithFilter($results6, $category_id)\n{\n if (!empty($category_id)) {\n foreach ($results6 as $key => $value) {\n echo '<div id = \"product\"><a href =\"index.php?action=product&id=' . $value['product_id'] . '\">' . $value['name'] . ' ' .\n $value['model'] . '<br><img src=' . $value['picture'] . '><br><br>' . $value['price'] . '</a><br><br></div>';\n }\n }\n}", "public function actionIndex()\n { $this->layout='inner';\n $searchModel = new ProductSearch();\n $dataProvider = $searchModel->frontendsearch(Yii::$app->request->queryParams);\n $model=$dataProvider->getModels();\n return $this->render('index', [\n 'searchModel'=>$model,\n 'model' => $searchModel,\n ]);\n /*$searchModel = new ProductCatSearch();\n $cat =Yii::$app->request->queryParams;\n if(!empty($cat['ProductCatSearch']['category_id'])){\n $sub_cat_list=$cat['ProductCatSearch']['category_id'];\n $searchModel->category_id=end($cat['ProductCatSearch']['category_id']);\n }\n else{\n $sub_cat_list=array();\n }\n $dataProvider = $searchModel->frontendsearch(Yii::$app->request->queryParams);\n $model=$dataProvider->getModels();\n $cat_list = ArrayHelper::map(ProductCategory::find()->where(['parent_id'=>'0'])->all(), 'id', 'cat_name');\n return $this->render('index', [\n 'model' => $searchModel,\n 'searchModel'=>$model,\n ]);*/\n \n }", "function getallcateogories($cat) {\n\t\t$obj = new clsdbaccess();\n\t\t$mysqli = $obj->db_connect();\t\t\t\t\t\t\t\t\n\t\tif(!($stmt = $mysqli->prepare(\"SELECT DISTINCT v.category FROM videoinventory v\"))){\n\t\t\techo \"Prepare failed: \" . $stmt->errno . \" \" . $stmt->error;\n\t\t}\t\n\t\tif(!$stmt->execute()){\n\t\t\techo \"Execute failed: \" . $mysqli->connect_errno . \" \" . $mysqli->connect_error;\n\t\t}\n\t\tif(!$stmt->bind_result($category)){\n\t\t\techo \"Bind failed: \" . $mysqli->connect_errno . \" \" . $mysqli->connect_error;\n\t\t}\t\n\t\t$stmt->store_result();\n\t\t$numrows = $stmt->num_rows;\n\t\techo \"<form action='videoinventory.php' method='get'>\";\n\t\techo '<select name=\"categories\">';\n\t\tif($numrows > 0)\n\t\t{\n\t\t\t\n\t\t\twhile($stmt->fetch()) {\n\t\t\t\tif(!empty($category)) {\n\t\t\t\t\tif ($cat == $category) {\n\t\t\t\t\t\techo \"<option value='\".$category.\"' selected='selected'>\".$category.\"</option>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<option value='\".$category.\"'>\".$category.\"</option>\";\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tif (is_null($cat)) {\n\t\t\t\techo \"<option value='ALL' selected='selected'>ALL</option>\";\n\t\t\t} else {\n\t\t\t\techo \"<option value='ALL'>ALL</option>\";\n\t\t\t}\t\t\t\n\t\t}\t\n\t\techo '</select>';\n\t\techo '&nbsp;&nbsp;<input type = \"submit\" name = \"btnfilter\" value=\"Filter\">';\n\t\techo '</form><br>';\t\n\t\t$stmt->close();\t\t\t\t\n\t}", "public function cat_select() {\n //formulate select query\n $sql = \"SELECT * FROM categories\"; \n //execute query \n return $this->db_query($sql);\n }", "function printProductCategories () {\r\n $stmt = getProductCategories();\r\n print(\"<div class='p-2 productgroup'> <a href='#' value='all' onclick=searchCategory('all') class='px-3'>All</a></div>\");\r\n while ($row = $stmt->fetch()) {\r\n print(\"<div class='p-2 productgroup'> <a href='#' value='\" . $row['StockGroupID'] . \"' onclick=searchCategory(\" . $row['StockGroupID'] . \") class='px-3'>\" . $row['StockGroupName'] . \"</a></div>\");\r\n }\r\n}", "public function productByCategoryAction()\n {\n $category = $this->route['category'];\n $vars['products'] = $this->model->getProductsByCategory($category);\n $this->view->render('Riding Gear', $vars);\n }", "protected static function _category_query_filters_condition($query, $parameters=array())\n {\n $price_category_code=Service_Product_Price::get_price_category_code(Service_User::instance()->get_user()->price_category);\n \n //die($price_category_code);\n \n $hodnota_procentni_slevy_pro_skupinu=(Service_Product_Price::get_price_category_percentual_value(Service_User::instance()->get_user()->price_category))/100;\n \n $query\n ->group_by(\"products.id\")\n //->join(\"price_categories_products\")->on(\"products.id\",\"=\",\"price_categories_products.product_id\")\n ->join(\"manufacturers\",\"LEFT\")->on(\"products.manufacturer_id\",\"=\",\"manufacturers.id\");\n// ->join(array(\"product_parameters_products\",\"ppp2\"),\"LEFT\")->on(\"products.id\",\"=\",\"ppp2.product_id\")\n// ->join(array(\"product_parameter_values\",\"ppv2\"))->on(\"ppp2.product_parameter_value_id\",\"=\",\"ppv2.id\")->on(\"ppv2.product_parameter_id\",\"=\",DB::expr(1))\n// ->join(array(\"product_parameters_products\",\"ppp1\"),\"LEFT\")->on(\"products.id\",\"=\",\"ppp1.product_id\")\n// ->join(array(\"product_parameter_values\",\"ppv1\"))->on(\"ppp1.product_parameter_value_id\",\"=\",\"ppv1.id\")->on(\"ppv1.product_parameter_id\",\"=\",DB::expr(2));\n \n $case_string=\"\n (\n CASE\n WHEN pc2.price_type_id =1\n THEN\n (\n CASE\n WHEN products.percentage_discount >0\n THEN pcp2.cena * ( 1 - ( products.percentage_discount /100 ) ) \n ELSE pcp2.cena\n END\n )\n WHEN $hodnota_procentni_slevy_pro_skupinu > (products.percentage_discount/100)\n THEN (`price_categories_products`.`cena` * ( 1 - ( $hodnota_procentni_slevy_pro_skupinu ) ) ) \n ELSE (`price_categories_products`.`cena` * ( 1 - ( products.percentage_discount/100) ) )\n END\n ) \n \";\n \n //$query->select(array(db::expr(\" (select hodnota from price_categories where kod = \\\"\".$price_category_code.\"\\\")\"),\"price_sleva\"));\n $query->select(array(db::expr($case_string),\"price\"));\n \n $query->join(\"price_categories_products\")->on(\"products.id\",\"=\",\"price_categories_products.product_id\");\n $query->join(\"price_categories\")->on(\"price_categories_products.price_category_id\",\"=\",\"price_categories.id\")->on(\"price_categories.kod\",\"=\",db::expr(\"\\\"D0\\\"\"));\n $query->join(array(\"price_categories_products\",\"pcp2\"),\"LEFT\")->on(\"products.id\",\"=\",\"pcp2.product_id\");\n $query->join(array(\"price_categories\",\"pc2\"),\"LEFT\")->on(\"pcp2.price_category_id\",\"=\",\"pc2.id\")->on(\"price_categories.kod\",\"=\",db::expr(\"\\\"\".$price_category_code.\"\\\"\"));\n \n \n if(isset($parameters[\"price_selected_max\"])) $query->having(\"price\",\"<=\",$parameters[\"price_selected_max\"]);\n if(isset($parameters[\"price_selected_min\"])) $query->having(\"price\",\">=\",$parameters[\"price_selected_min\"]);\n //if(isset($parameters[\"products_filter_manufacturer\"])) $query->where(\"products.manufacturer_id\",\"=\",$parameters[\"products_filter_manufacturer\"]);\n if(isset($parameters[\"products_filter_manufacturers\"])) $query->where(\"products.manufacturer_id\",\"IN\",db::expr(\"(\".implode(\",\", $parameters[\"products_filter_manufacturers\"]).\")\"));\n// if(isset($parameters[\"products_filter_colors\"]) && is_array($parameters[\"products_filter_colors\"])) $query->where(\"ppv2.id\",\"IN\",db::expr(\"(\".implode(\",\", $parameters[\"products_filter_colors\"]).\")\"));\n// if(isset($parameters[\"products_filter_sizes\"]) && is_array($parameters[\"products_filter_sizes\"])) $query->where(\"ppv1.id\",\"IN\",db::expr(\"(\".implode(\",\", $parameters[\"products_filter_sizes\"]).\")\"));\n// \n// if(isset($parameters[\"products_filter_size\"])) $query->where(\"ppv1.id\",\"IN\",db::expr(\"(\".implode(\",\", $parameters[\"products_filter_size\"]).\")\"));\n// if(isset($parameters[\"products_filter_color\"])) $query->where(\"ppv2.id\",\"IN\",db::expr(\"(\".implode(\",\", $parameters[\"products_filter_color\"]).\")\"));\n// \n return $query;\n }", "public function getProductsByCategory ($category_id) {\n\t\t\n $errorCode = 0;\n\t\t$errorMessage = \"\";\n \n \n\t\ttry {\n \n\t\t\t/*\n $query = \"SELECT ea_product.id, ea_product.upc, ea_product.brand, ea_product.product_name, ea_product.product_description, ea_product.avg_price, ea_image.file\n\t\t\tFROM ea_product LEFT JOIN ea_image\n ON ea_product.upc = ea_image.upc\n WHERE ea_product.category_id = '$category_id'\n\t\t\tORDER BY ea_product.avg_price\";\n */\n \n $query = \"SELECT ea_product.id, upc, brand, product_name, \n product_description, avg_price, ea_category.name\n\t\t\tFROM ea_product, ea_category\n WHERE ea_product.category_id = ea_category.id\n AND category_id = '$category_id'\n\t\t\tORDER BY avg_price\";\n //print(\"$query\");\n\t\t\tforeach($this->dbo->query($query) as $row) {\n\t\t\t\t$id = stripslashes($row[0]);\n\t\t\t\t$upc = strval(stripslashes($row[1]));\n\t\t\t\t$brand = $this->convertFancyQuotes(stripslashes($row[2]));\n\t\t\t\t$product_name = $this->convertFancyQuotes(stripslashes($row[3]));\n\t\t\t\t$product_description = $this->convertFancyQuotes(stripslashes($row[4]));\n\t\t\t\t$avg_price = stripslashes($row[5]);\n\t\t\t\t$category_name = $this->convertFancyQuotes(stripslashes($row[6]));\n \n $product[\"id\"] = $id;\n $product[\"upc\"] = $upc;\n $product[\"brand\"] = $brand;\n $product[\"product_name\"] = $product_name;\n $product[\"product_description\"] = $product_description;\n $product[\"avg_price\"] = $avg_price;\n $product[\"category_name\"] = $category_name;\n \n $product[\"image_path\"] = $this->getImagePath($upc);\n \n $products[] = $product;\n\t\t\t}\n\t\n\t\t} catch (PDOException $e) {\n\t\t\t$this->errorCode = 1;\n\t\t\t$errorCode = -1;\n\t\t\t$errorMessage = \"PDOException for getProductsByCategory.\";\n\t\t}\t\n \n\t\t$error[\"id\"] = $errorCode;\n\t\t$error[\"message\"] = $errorMessage;\n\t\t\n\t\t$data[\"error\"] = $error;\n\t\t\n\t\t$data[\"search\"] = $category_name;\n $data[\"query\"] = $query;\n \n $data[\"products\"] = $products;\n\n $data = json_encode($data);\n \n\t\treturn $data;\n\t}", "function category($categoryName, $categoryId, $page)\n {\n $sort = Input::get('sortOrder') == null ? \"BestMatch\" : Input::get('sortOrder');\n $checkedInput = $this->checkedChecked(Input::get());\n $breadCramb = $this->model->getBreadCramb($categoryId);\n\n $filterUrl = $this->generateFilterUrl(Input::get());\n $ebayData = $this->model->getProductsByCategory(\n $categoryId, 42, $page, Input::get(), $sort\n );\n $similarCategories = $this->model->getSimilarCategory($categoryId);\n $filterData = $this->model->getFiltersForCategory($categoryId);\n\n $resultsAmount = $ebayData->totalEntries;\n if ($ebayData->totalPages > 100) {\n $totalPages = 100;\n } else {\n $totalPages = $ebayData->totalPages;\n }\n $pagesAvailable = Util::getPaginationList($page, $totalPages);\n $paginationResult = Util::getLinksForPagination($pagesAvailable, \"category\", $categoryName, $page, $this->siteslug, $filterUrl, $categoryId);\n $filtersForTitle = $this->model->getFiltersForTitle($checkedInput);\n $pages = $paginationResult['pages'];\n $pageNext = $paginationResult['pageNext'];\n\n $categoryData['page'] = $page;\n $categoryData['id'] = $categoryId;\n $categoryData['title'] = $categoryName;\n $categoryData['totalResults'] = $resultsAmount;\n\n if ($page == 1) {\n $pageForTitle = '';\n } else {\n $pageForTitle = ' ' . 'עמוד' . ' ' . $page;\n }\n// $this->title = $categoryData['title'] . ' ' . $filtersForTitle . $pageForTitle . '- ' . \"אמזון בעברית\" . ' - ' . 'צי\\'פי קניות ברשת';\n /*if (is_null($sort)) {\n $sortForTitle = '';\n } else {\n $sortForTitle = '-' . $sort;\n }*/\n if (Lang::getLocale() == 'he') {\n $this->shopName = Lang::get('general.amazon');\n } elseif (Lang::getLocale() == 'en') {\n $this->shopName = 'amazon';\n };\n //dd($filtersForTitle);\n $this->title = $categoryData['title'] . ' - ' . $breadCramb['category'] . $filtersForTitle . ' - ' . $categoryData['page'] . ' - ' . $this->shopName;\n $this->description = $categoryData['title'] . ' ' . $filtersForTitle . $pageForTitle . '- ' . \"אמזון בעברית\" . ' - ' . \"שירות לקוחות בעברית,תשלום ללא כ.א בינלאומי,למעלה ממיליארד מוצרים בעברית\";\n //dd($categoryData);\n $productBaseRoute = \"/{$this->siteslug}/product\";\n return view(\"ebay.category\", [\n 'pagination' => $pages,\n 'pageNext' => $pageNext,\n 'categoryData' => $categoryData,\n 'categories' => $this->categories,\n 'productBase' => $productBaseRoute,\n 'siteslug' => $this->siteslug,\n 'ebayData' => $ebayData->products,\n 'filterData' => $filterData,\n 'checkedInput' => $checkedInput,\n 'breadCramb' => $breadCramb,\n 'title' => $this->title,\n 'description' => $this->description,\n 'page' => $page,\n 'similarCategories' => $similarCategories,\n ]);\n }", "function oos_total_products_in_category($category_id)\n{\n\n $products_count = 0;\n\n $dbconn =& oosDBGetConn();\n $oostable =& oosDBGetTables();\n\n $productstable = $oostable['products'];\n $products_to_categoriestable = $oostable['products_to_categories'];\n $products = $dbconn->Execute(\"SELECT COUNT(*) AS total FROM $productstable p, $products_to_categoriestable p2c WHERE p.products_id = p2c.products_id AND p.products_status >= '1' AND p2c.categories_id = '\" . intval($category_id) . \"'\");\n\n $products_count += $products->fields['total'];\n\n return $products_count;\n}", "protected function export_categoryless_products()\n {\n $table = $this->getTableName(\"catalog_product_entity\");\n $categoryProductsTable = $this->getTableName(\"catalog_category_product\");\n $catalogProductWebsite = $this->getTableName(\"catalog_product_website\");\n $rootCategoryId = $this->_fStore->getRootCategoryId();\n $sql = \"SELECT DISTINCT(entity_id), type_id, sku FROM {$table}\n LEFT JOIN (`{$categoryProductsTable}`) ON ({$table}.`entity_id` = `{$categoryProductsTable}`.`product_id`)\n LEFT JOIN (`{$catalogProductWebsite}`) ON ({$table}.`entity_id` = `{$catalogProductWebsite}`.`product_id`)\n WHERE (`{$categoryProductsTable}`.`product_id` IS NULL OR `{$categoryProductsTable}`.`category_id` NOT IN ({$this->_getCategoriesForStore()}))\n AND {$table}.entity_type_id = {$this->_product_entity_type_id}\n AND `{$catalogProductWebsite}`.`website_id` = \" . $this->getWebsiteId($this->_fStore_id); \n \n return $this->export_products($sql, 'categoryless_products');\n }", "function commodityAction() {\n\t $this->_helper->layout->disableLayout();\n\t $this->_helper->viewRenderer->setNoRender(TRUE);\n\t $conn = Doctrine_Manager::connection(); \n \t$session = SessionWrapper::getInstance();\n \t$formvalues = $this->_getAllParams();\n \t// debugMessage($formvalues);\n \t// debugMessage($this->_getAllParams());\n \t\n \t$feed = '';\n \t$hasall = true;\n \t$issearch = false;\n \t$iscount = false;\n \t$ispaged = false;\n \t$where_query = \" \";\n \t$type_query = \" AND cp.pricecategoryid = '2' \";\n \t$group_query = \" GROUP BY c.id \";\n \t$limit_query = \"\";\n \t$select_query = \" c.id, c.name as `Commodity`, cat.name as Category, c.description as Description, \n \t\tu.`name` as `Unit`\";\n \t\n \tif(isArrayKeyAnEmptyString('filter', $formvalues)){\n \t\techo \"NO_FILTER_SPECIFIED\";\n \t\texit();\n \t}\n \t\n \t$iscategory = false;\n \t# fetch commodities filtered by categoryid\n \tif($formvalues['filter'] == 'categoryid'){\n \t\t$catid = '';\n \t\tif(isEmptyString($this->_getParam('catid'))){\n \t\t\techo \"CATEGORY_NULL\";\n\t \t\texit();\n \t\t}\n \t\tif(!is_numeric($this->_getParam('catid'))){\n \t\t\techo \"CATEGORY_INVALID\";\n\t \t\texit();\n \t\t} \n \t\tif(!isEmptyString($this->_getParam('catid'))){\n \t\t\t$category = new CommodityCategory();\n\t \t\t$category->populate($formvalues['catid']);\n\t \t\t// debugMessage($category->toArray());\n\t \t\tif(isEmptyString($category->getID())){\n\t \t\t\techo \"CATEGORY_INVALID\";\n\t \t\t\texit();\n\t \t\t}\n\t \t\t$catid = $formvalues['catid'];\n\t \t\t$iscategory = true;\n \t\t\t$hasall = false;\n \t\t\t$where_query .= \" AND c.categoryid = '\".$catid.\"' \";\n \t\t\t}\n \t\tif(isEmptyString($catid)){\n\t \t\techo \"CATEGORY_NULL\";\n\t\t \texit();\n\t \t}\n \t}\n \t# fetch commodities filtered by category name\n \t\tif($formvalues['filter'] == 'category'){\n \t\t$catid = '';\n \t\tif(isEmptyString($this->_getParam('catname'))){\n \t\t\techo \"CATEGORY_NULL\";\n\t \t\texit();\n \t\t}\n \t\tif(is_numeric($this->_getParam('catname'))){\n \t\t\techo \"CATEGORY_INVALID\";\n\t \t\texit();\n \t\t} \n \t\tif(!isEmptyString($this->_getParam('catname'))){\n \t\t\t$category = new CommodityCategory();\n\t \t\t$catid = $category->findByName($formvalues['catname']);\n\t \t\tif(isEmptyString($catid)){\n\t \t\t\techo \"CATEGORY_INVALID\";\n\t \t\t\texit();\n\t \t\t}\n\t \t\t$iscategory = true;\n \t\t\t$hasall = false;\n \t\t\t$where_query .= \" AND c.categoryid = '\".$catid.\"' \";\n \t\t\t}\n\t \t\tif(isEmptyString($catid)){\n\t \t\techo \"CATEGORY_NULL\";\n\t\t \texit();\n\t \t}\n \t}\n \t\t\n \t# searching for particular commodity\n \tif($formvalues['filter'] == 'search'){\n \t\t// check that search parameters have been specified\n \t\tif(isEmptyString($this->_getParam('comid')) && isEmptyString($this->_getParam('comname'))){\n \t\t\techo \"NULL_SEARCH_PARAMETER\";\n\t \t\texit();\n \t\t}\n \t\t$com = new Commodity();\n \t\t// commodityid specified\n \t\tif(!isEmptyString($this->_getParam('comid'))){\n\t \t\t$com->populate($formvalues['comid']);\n\t \t\t// debugMessage($com->toArray());\n\t \t\tif(isEmptyString($com->getID()) || !is_numeric($formvalues['comid'])){\n\t \t\t\techo \"COMMODITY_INVALID\";\n\t \t\t\texit();\n\t \t\t}\n\t \t\t$comid = $com->getID();\n\t \t\t$where_query .= \" AND c.id = '\".$comid.\"' \";\n \t\t}\n \t\t/*if(!isEmptyString($this->_getParam('comname')) ){\n\t \t\t// debugMessage($com->toArray());\n\t \t\tif(isEmptyString($this->_getParam('comname'))){\n\t \t\t\techo \"CATEGORY_NULL\";\n\t\t \t\texit();\n\t \t\t}\n\t \t\t$where_query .= \" AND c.name LIKE '%\".$this->_getParam('comname').\"%' \";\n \t\t}*/\n \t\t// commodty name specified\n \t\tif(!isEmptyString($this->_getParam('comname'))){\n \t\t\t$searchstring = $formvalues['comname'];\n \t\t\t$islist = false;\n\t \t\tif(strpos($searchstring, ',') !== false) {\n\t\t\t\t\t$islist = true;\n\t\t\t\t}\n\t\t\t\tif(!$islist){\n\t \t\t\t$comid = $com->findByName($searchstring);\n\t \t\t\t$comid_count = count($comid);\n\t \t\t\tif($comid_count == 0){\n\t\t \t\t\techo \"COMMODITY_INVALID\";\n\t\t \t\t\texit();\n\t\t \t\t}\n\t\t \t\tif($comid_count == 1){\n\t\t \t\t\t$where_query .= \" AND c.id = '\".$comid[0]['id'].\"' \";\n\t\t \t\t}\n\t \t\t\tif($comid_count > 1){\n\t \t\t\t\t$ids_array = array();\n\t \t\t\t\tforeach ($comid as $value){\n\t \t\t\t\t\t$ids_array[] = $value['id'];\n\t \t\t\t\t}\n\t \t\t\t\t$ids_list = implode($ids_array, \"','\");\n\t \t\t\t\t// debugMessage($ids_list);\n\t\t \t\t\t$where_query .= \" AND c.id IN('\".$ids_list.\"') \";\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t\tif($islist){\n\t\t\t\t\t$bundled = false;\n\t\t\t\t\t$searchstring = trim($searchstring);\n\t\t\t\t\t$seach_array = explode(',', $searchstring);\n\t\t\t\t\t// debugMessage($seach_array);\n\t\t\t\t\tif(is_array($seach_array)){\n\t\t\t\t\t\t$ids_array = array();\n\t\t\t\t\t\tforeach ($seach_array as $string){\n\t\t\t\t\t\t\t$com = new Commodity();\n\t\t\t\t\t\t\t$comid = $com->findByName($string);\n\t \t\t\t\t\t$comid_count = count($comid);\n\t\t\t\t\t\t\tif($comid_count > 0){\n\t\t\t \t\t\t\tforeach ($comid as $value){\n\t\t\t \t\t\t\t\t$ids_array[] = $value['id'];\n\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(count($ids_array) > 0){\n\t\t\t\t\t\t\t$ids_list = implode($ids_array, \"','\");\n\t\t\t \t\t\t// debugMessage($ids_list);\n\t\t\t\t \t\t$where_query .= \" AND c.id IN('\".$ids_list.\"') \";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"COMMODITY_LIST_INVALID\";\n\t\t \t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"COMMODITY_LIST_INVALID\";\n\t\t \t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t}\n \t}\n \t\n \t// when fetching total results\n \tif(!isEmptyString($this->_getParam('fetch')) && $this->_getParam('fetch') == 'total'){\n \t\t$select_query = \" count(c.id) as records \";\n \t\t$group_query = \"\";\n \t\t$iscount = true;\n \t}\n \t// debugMessage($select_query);\n \t// exit();\n \t// when fetching limited results via pagination \n \tif(!isEmptyString($this->_getParam('paged')) && $this->_getParam('paged') == 'Y'){\n \t\t$ispaged = true;\n \t\t$hasall = false;\n \t\t$start = $this->_getParam('start');\n \t\t$limit = $this->_getParam('limit');\n \t\tif(isEmptyString($start)){\n \t\t\techo \"RANGE_START_NULL\";\n\t \t\texit();\n \t\t}\n \t\tif(!is_numeric($limit)){\n \t\t\techo \"INVALID_RANGE_START\";\n\t \t\texit();\n \t\t}\n \t\tif(isEmptyString($start)){\n \t\t\techo \"RANGE_LIMIT_NULL\";\n\t \t\texit();\n \t\t}\n \t\tif(!is_numeric($limit)){\n \t\t\techo \"INVALID_RANGE_LIMIT\";\n\t \t\texit();\n \t\t}\n \t\t$limit_query = \" limit \".$start.\",\".$limit.\" \";\n \t}\n \t\n \t// if searching fuel\n \tif(!isEmptyString($this->_getParam('pricetype')) && $this->_getParam('pricetype') == 'fuel'){\n \t\t$type_query = \" AND cp.pricecategoryid = '4' \";\n \t}\n \t// action query\n \t\n \t$com_query = \"SELECT \".$select_query.\" FROM commodity c \n \tINNER JOIN commoditycategory cat ON c.categoryid = cat.id \n \tLEFT JOIN commodity p ON c.parentid = p.id LEFT JOIN \n \tcommoditypricecategory as cp ON (c.id = cp.commodityid) \n \tLEFT JOIN commodityunit as u ON(c.unitid = u.id) \n \tWHERE c.name <> '' \".$type_query.$where_query.\" \n \t\".$group_query.\" ORDER BY c.name ASC \".$limit_query;\n \t// debugMessage($com_query);\n \t\n \t$result = $conn->fetchAll($com_query);\n \t$comcount = count($result);\n \t// debugMessage($result); // exit();\n \t\n \tif($comcount == 0){\n \t\techo \"RESULT_NULL\";\n \t\texit();\n \t} else {\n \t\tif($iscount){\n \t\t\t$feed .= '<item>';\n\t \t\t$feed .= '<total>'.$result[0]['records'].'</total>';\n\t\t\t $feed .= '</item>';\n \t\t}\n \t\tif(!$iscount){\n\t \t\tforeach ($result as $line){\n\t \t\t\t$com = new Commodity();\n\t \t\t\t$com->populate($line['id']);\n\t \t\t\t$prices = $com->getCurrentAveragePrice();\n\t \t\t\t// debugMessage($prices);\n\t\t\t \t$feed .= '<item>';\n\t\t \t\t$feed .= '<id>'.$line['id'].'</id>';\n\t\t \t\t$feed .= '<name>'.$line['Commodity'].'</name>';\n\t\t\t \t$feed .= '<cat>'.$line['Category'].'</cat>';\n\t\t\t \t$feed .= '<unit>'.$line['Unit'].'</unit>';\n\t\t\t \t$feed .= '<avg_wholesaleprice>'.$prices['wp'].'</avg_wholesaleprice>';\n\t\t\t \t$feed .= '<avg_retailprice>'.$prices['rp'].'</avg_retailprice>';\n\t\t\t \t$feed .= '<pricedate>'.$prices['datecollected'].'</pricedate>';\n\t\t\t\t $feed .= '</item>';\n\t\t \t}\n \t\t}\n \t}\n \t\n \t# output the xml returned\n \tif(isEmptyString($feed)){\n \t\techo \"EXCEPTION_ERROR\";\n \t\texit();\n \t} else {\n \t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\"?><items>'.$feed.'</items>';\n \t}\n }", "public function loadcatproduct($subdomain,$slug,$page)\n {\n\t\t$companyid = get_company_id();\n $themename = get_theme_name();\n $language = SiteLanguage::where('company_id', $companyid)->first();\n $settings = Settings::where('company_id', $companyid)->first();\n $res = \"\";\n $min = \"0\";\n $max = \"500\";\n $mins = \"0\";\n $maxs = \"500\";\n $skip = ($page-1)*9;\n\n $sort = \"\";\n if (Input::get('sort') != \"\") {\n $sort = Input::get('sort');\n }\n\n if (Input::get('min') != \"\") {\n $min = Product::Filter(Input::get('min'));\n $mins = Input::get('min');\n $sort = \"price\";\n }\n if (Input::get('max') != \"\") {\n $max = Product::Filter(Input::get('max'));\n $maxs = Input::get('max');\n $sort = \"price\";\n }\n $category = Category::where('slug',$slug)->first();\n if ($category === null) {\n $category['name'] = \"Nothing Found\";\n $products = new \\stdClass();\n }else{\n\n if ($sort==\"old\") {\n \n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('created_at','asc')\n ->skip($skip)\n ->take(9)\n ->get();\n \n }elseif ($sort==\"new\") {\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('created_at','desc')\n ->skip($skip)\n ->take(9)\n ->get();\n\n }elseif ($sort==\"low\") {\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('price','asc')\n ->skip($skip)\n ->take(9)\n ->get();\n\n }elseif ($sort==\"high\") {\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('price','desc')\n ->skip($skip)\n ->take(9)\n ->get();\n\n }elseif ($sort==\"price\") {\n\n $products = Product::where('status','1')\n\t\t\t\t ->where('company_id',$companyid)\n ->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->whereBetween('price', [$min, $max])\n ->orderBy('price','asc')\n ->take(9)\n ->get();\n\n }else{\n\n $products = Product::where('status','1')->where('company_id',$companyid)->whereRaw('FIND_IN_SET(?,category)', [$category->id])\n ->orderBy('created_at','desc')\n ->skip($skip)\n ->take(9)\n ->get();\n }\n\n\n foreach($products as $product) {\n $res .= '<div class=\"col-lg-4 col-md-4 col-sm-4 col-xs-12\">\n <div class=\"single-product-carousel-item text-center\">\n <a href=\"' . url('/product') . '/' . $product->id . '/' . str_replace(' ', '-', strtolower($product->title)) . '\"> <img src=\"' . url('/assets/images/products') . '/' . $product->feature_image . '\" alt=\"Product Image\" /> </a>\n <div class=\"product-carousel-text\">\n <a href=\"' . url('/product') . '/' . $product->id . '/' . str_replace(' ', '-', strtolower($product->title)) . '\">\n <h4 class=\"product-title\">' . $product->title . '</h4>\n </a>\n <div class=\"ratings\">\n <div class=\"empty-stars\"></div>\n <div class=\"full-stars\" style=\"width:'.Review::ratings($product->id).'%\"></div>\n </div>\n <div class=\"product-price\">';\n if ($product->offer_price != \"\" && $product->offer_price != 0) {\n $res .= '<span class=\"original-price\">' .$settings->currency_sign. $product->offer_price . '</span>';\n }\n $res .= '\n \n <del class=\"offer-price\">' .$settings->currency_sign. Product::Cost($product->id) . '</del>\n </div>\n <div class=\"product-meta-area\">\n <form class=\"addtocart-form\">';\n if (Session::has('uniqueid')) {\n $res .= '<input type=\"hidden\" name=\"uniqueid\" value=\"' . Session::get('uniqueid') . '\">';\n } else {\n $res .= '<input type=\"hidden\" name=\"uniqueid\" value=\"' . str_random(7) . '\">';\n }\n\n $res .= '\n <input name=\"title\" value=\"' . $product->title . '\" type=\"hidden\">\n <input name=\"product\" value=\"' . $product->id . '\" type=\"hidden\">\n <input type=\"hidden\" name=\"shipping_cost\" value=\"'.$product->shipping_cost.'\">\n <input type=\"hidden\" name=\"tax\" value=\"'.$product->tax.'\">\n <input id=\"cost\" name=\"cost\" value=\"' . Product::Cost($product->id) . '\" type=\"hidden\">\n <input id=\"quantity\" name=\"quantity\" value=\"1\" type=\"hidden\">';\n if ($product->stock != 0){\n $res .='<button type=\"button\" onclick=\"toCart(this)\" class=\"addTo-cart to-cart\"><i class=\"fa fa-cart-plus\"></i><span>'.trans(\"app.AddCart\").'</span></button>';\n }else{\n $res .='<button type=\"button\" class=\"addTo-cart to-cart\" disabled><i class=\"fa fa-cart-plus\"></i>'.trans(\"app.OutStock\").'</button>';\n }\n $res .=' \n \n </form>\n <a href=\"javascript:;\" class=\"wish-list\" onclick=\"getQuickView('.$product->id.')\" data-toggle=\"modal\" data-target=\"#myModal\">\n <i class=\"fa fa-eye\"></i>\n </a>\n </div>\n </div>\n </div>\n </div>';\n }\n\n }\n return $res;\n }", "public function getTotalProducts($data = array()) {\n$sql = \"SELECT COUNT(DISTINCT p.product_id) AS total FROM \" . DB_PREFIX . \"product p LEFT JOIN \" . DB_PREFIX . \"product_description pd ON (p.product_id = pd.product_id) LEFT JOIN \" . DB_PREFIX . \"product_to_category ptc ON ( p.product_id = ptc.product_id)\";\n\t\t$sql .= \" WHERE pd.language_id = '\" . (int)$this->config->get('config_language_id') . \"' AND p.product_tp ='TE'\";\n//echo $sql;exit;\n\t\tif (!empty($data['filter_name'])) {\n\t\t\t$sql .= \" AND pd.name LIKE '\" . $this->db->escape($data['filter_name']) . \"%'\";\n\t\t}\n\n\t\tif (!empty($data['filter_model'])) {\n\t\t\t$sql .= \" AND p.model LIKE '\" . $this->db->escape($data['filter_model']) . \"%'\";\n\t\t}\n\n\t\tif (isset($data['filter_price']) && !is_null($data['filter_price'])) {\n\t\t\t$sql .= \" AND p.price LIKE '\" . $this->db->escape($data['filter_price']) . \"%'\";\n\t\t}\n\n\t\tif (isset($data['filter_quantity']) && !is_null($data['filter_quantity'])) {\n\t\t\t$sql .= \" AND p.quantity = '\" . (int)$data['filter_quantity'] . \"'\";\n\t\t}\n \n \n \n /*Custom add */ \n if (isset($data['filter_category']) && !is_null($data['filter_category'])) {\n\t\t\t$sql .= \" AND ptc.category_id = '\" . (int)$data['filter_category'] . \"'\";\n\t\t}\n \n\n\n\n\t\tif (isset($data['filter_status']) && !is_null($data['filter_status'])) {\n\t\t\t$sql .= \" AND p.status = '\" . (int)$data['filter_status'] . \"'\";\n\t\t}\n \n if (isset($data['filter_family']) && !is_null($data['filter_family'])) {\n\t\t\t$sql .= \" AND p.family = '\" . (int)$data['filter_family'] . \"'\";\n\t\t}\n\n\t\tif (isset($data['filter_image']) && !is_null($data['filter_image'])) {\n\t\t\tif ($data['filter_image'] == 1) {\n\t\t\t\t$sql .= \" AND (p.image IS NOT NULL AND p.image <> '' AND p.image <> 'no_image.png')\";\n\t\t\t} else {\n\t\t\t\t$sql .= \" AND (p.image IS NULL OR p.image = '' OR p.image = 'no_image.png')\";\n\t\t\t}\n\t\t}\n//echo $sql;exit;\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query->row['total'];\n\t}", "public function run()\n\t{\n\t\tDB::table('product_category')->where('id', '!=', 1)->delete();\n\n\t\t$now = date('Y-m-d H:i:s');\n\n\t\t$category['main'] = 'Art';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Art Zines';\n\t\t\t$sub_category[] = 'Collage & Mixed Media';\n\t\t\t$sub_category[] = 'Custom Portraits';\n\t\t\t$sub_category[] = 'Decorative Arts';\n\t\t\t$sub_category[] = 'Drawing & Illustration';\n\t\t\t$sub_category[] = 'Figurines & Art Objects';\n\t\t\t$sub_category[] = 'Painting';\n\t\t\t$sub_category[] = 'Photography';\n\t\t\t$sub_category[] = 'Printmaking';\n\t\t\t$sub_category[] = 'Prints & Posters';\n\t\t\t$sub_category[] = 'Sculpture';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Home & Living';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Bath & Beauty';\n\t\t\t$sub_category[] = 'Books, Music & Media';\n\t\t\t$sub_category[] = 'Collectables';\n\t\t\t$sub_category[] = 'Decor & Housewares';\n\t\t\t$sub_category[] = 'Dining & Entertaining';\n\t\t\t$sub_category[] = 'Electronics & Gadgets';\n\t\t\t$sub_category[] = 'Food Market';\n\t\t\t$sub_category[] = 'Furniture';\n\t\t\t$sub_category[] = 'Kitchen';\n\t\t\t$sub_category[] = 'Lighting';\n\t\t\t$sub_category[] = 'Musical Instruments';\n\t\t\t$sub_category[] = 'Outdoors & Garden';\n\t\t\t$sub_category[] = 'Pets';\n\t\t\t$sub_category[] = 'Stationery & Party';\n\t\t\t$sub_category[] = 'Storage & Organisation';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Mobile Accessories';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Decals';\n\t\t\t$sub_category[] = 'Docking Stations & Chargers';\n\t\t\t$sub_category[] = 'Flash Drives';\n\t\t\t$sub_category[] = 'Gear for Android';\n\t\t\t$sub_category[] = 'Gear for Kindle';\n\t\t\t$sub_category[] = 'Gear for iPad Mini';\n\t\t\t$sub_category[] = 'Gear for iPad';\n\t\t\t$sub_category[] = 'Gear for iPhone';\n\t\t\t$sub_category[] = 'Headphones';\n\t\t\t$sub_category[] = 'Keyboard Accessories';\n\t\t\t$sub_category[] = 'Laptop Bags';\n\t\t\t$sub_category[] = 'Laptop Cases';\n\t\t\t$sub_category[] = 'Phone Cases & Wallets';\n\t\t\t$sub_category[] = 'Phone Covers';\n\t\t\t$sub_category[] = 'Phone Plugs & Charms';\n\t\t\t$sub_category[] = 'Speakers';\n\t\t\t$sub_category[] = 'Stands';\n\t\t\t$sub_category[] = 'Styluses';\n\t\t\t$sub_category[] = 'Tablet Accessories';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Jewellery';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Body';\n\t\t\t$sub_category[] = 'Bracelets';\n\t\t\t$sub_category[] = 'Brooches';\n\t\t\t$sub_category[] = 'Earrings';\n\t\t\t$sub_category[] = 'Eco-Friendly';\n\t\t\t$sub_category[] = 'Fine Jewellery';\n\t\t\t$sub_category[] = 'Kids';\n\t\t\t$sub_category[] = 'Men';\n\t\t\t$sub_category[] = 'Necklaces';\n\t\t\t$sub_category[] = 'Personalised';\n\t\t\t$sub_category[] = 'Rings';\n\t\t\t$sub_category[] = 'Storage & Organisation';\n\t\t\t$sub_category[] = 'Watches';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Women';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Accessories';\n\t\t\t$sub_category[] = 'Bags & Purses';\n\t\t\t$sub_category[] = 'Bottoms';\n\t\t\t$sub_category[] = 'Costumes';\n\t\t\t$sub_category[] = 'Dresses';\n\t\t\t$sub_category[] = 'Outerwear';\n\t\t\t$sub_category[] = 'Shoes';\n\t\t\t$sub_category[] = 'Nightwear & Intimates';\n\t\t\t$sub_category[] = 'Specialty';\n\t\t\t$sub_category[] = 'Sizes';\n\t\t\t$sub_category[] = 'Swimwear & Coverups';\n\t\t\t$sub_category[] = 'Tops';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Men';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Tanks';\n\t\t\t$sub_category[] = 'Bags & Wallets';\n\t\t\t$sub_category[] = 'Belts & Buckles';\n\t\t\t$sub_category[] = 'Bottoms';\n\t\t\t$sub_category[] = 'Coats & Jackets';\n\t\t\t$sub_category[] = 'Costumes';\n\t\t\t$sub_category[] = 'Cufflinks';\n\t\t\t$sub_category[] = 'Hats';\n\t\t\t$sub_category[] = 'Hoodies & Sweatshirts';\n\t\t\t$sub_category[] = 'Shirts';\n\t\t\t$sub_category[] = 'Shoes';\n\t\t\t$sub_category[] = 'Suits';\n\t\t\t$sub_category[] = 'Jumpers';\n\t\t\t$sub_category[] = 'T-Shirts';\n\t\t\t$sub_category[] = 'Ties, Clips & Bow Ties';\n\t\t\t$sub_category[] = 'Other Clothing';\n\t\t\t$sub_category[] = 'Other Accessories';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Kids';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Baby & Toddler';\n\t\t\t$sub_category[] = 'Bath';\n\t\t\t$sub_category[] = 'Boys';\n\t\t\t$sub_category[] = 'Costumes';\n\t\t\t$sub_category[] = 'Eco-Friendly';\n\t\t\t$sub_category[] = 'Furniture & Decor';\n\t\t\t$sub_category[] = 'Girls';\n\t\t\t$sub_category[] = 'Personalised';\n\t\t\t$sub_category[] = 'School & Learning';\n\t\t\t$sub_category[] = 'Special Occasions';\n\t\t\t$sub_category[] = 'Toys';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Vintage';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Accessories';\n\t\t\t$sub_category[] = 'Antiques';\n\t\t\t$sub_category[] = 'Art';\n\t\t\t$sub_category[] = 'Bags & Purses';\n\t\t\t$sub_category[] = 'Books';\n\t\t\t$sub_category[] = 'Clothing';\n\t\t\t$sub_category[] = 'Collectables';\n\t\t\t$sub_category[] = 'Electronics';\n\t\t\t$sub_category[] = 'Furniture';\n\t\t\t$sub_category[] = 'Home Decor';\n\t\t\t$sub_category[] = 'Housewares';\n\t\t\t$sub_category[] = 'Jewellery';\n\t\t\t$sub_category[] = 'Paper Ephemera';\n\t\t\t$sub_category[] = 'Serving';\n\t\t\t$sub_category[] = 'Toys';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Weddings';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'Bridal Accessories';\n\t\t\t$sub_category[] = 'Decor';\n\t\t\t$sub_category[] = 'Dresses';\n\t\t\t$sub_category[] = 'Groom\\'s Corner';\n\t\t\t$sub_category[] = 'Paper Goods';\n\t\t\t$sub_category[] = 'Rings';\n\t\t\t$sub_category[] = 'Wedding Party';\n\t\t\t$sub_category[] = 'Real Weddings';\n\t\t\t$sub_category[] = 'Registry';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Craft Supplies';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'DIY Weddings';\n\t\t\t$sub_category[] = 'Fine Arts';\n\t\t\t$sub_category[] = 'Floral & Gardening';\n\t\t\t$sub_category[] = 'Food Crafting';\n\t\t\t$sub_category[] = 'Framing';\n\t\t\t$sub_category[] = 'Gift Wrapping';\n\t\t\t$sub_category[] = 'Jewellery Making';\n\t\t\t$sub_category[] = 'Knitting & Crochet';\n\t\t\t$sub_category[] = 'Paper Crafts';\n\t\t\t$sub_category[] = 'Scrapbooking';\n\t\t\t$sub_category[] = 'Sewing, Quilting & Needle Crafts';\n\t\t\t$sub_category[] = 'Woodworking';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$category['main'] = 'Gift Ideas';\n\t\t\t$sub_category = array();\n\t\t\t$sub_category[] = 'For Couples';\n\t\t\t$sub_category[] = 'For Her';\n\t\t\t$sub_category[] = 'For Him';\n\t\t\t$sub_category[] = 'Teens';\n\t\t\t$sub_category[] = 'Kids & Baby';\n\t\t\t$sub_category[] = 'DIYer';\n\t\t\t$sub_category[] = 'Friends & Coworkers';\n\t\t\t$sub_category[] = 'Gardener & Naturalist';\n\t\t\t$sub_category[] = 'Hostess & Gourmet';\n\t\t\t$sub_category[] = 'Outdoor & Sportsman';\n\t\t\t$sub_category[] = 'Pets & Pet Lovers';\n\t\t\t$sub_category[] = 'Tech Lover';\n\t\t\t$sub_category[] = 'Novelty & Gag Gifts';\n\t\t\t$sub_category[] = 'Stocking Stuffers';\n\t\t\t$sub_category[] = 'Cards & Wrap';\n\t\t$category['sub'] = $sub_category;\n\t\t$categories[] = $category;\n\n\t\t$template_id = $addresses_id = 1;\n\t\t$id = 2;\n\t\t$category_left = 2;\n\t\tforeach($categories as $main_category){\n\t\t\t//main category details\n\t\t\t$main = array();\n\t\t\t$main['id'] = $id;\n\t\t\t$main['seo_category_name'] = $this->slugify($main_category['main']);\n\t\t\t$main['category_name'] = $main_category['main'];\n\t\t\t$main['category_level'] = 1;\n\t\t\t$main['parent_category_id'] = 1;\n\t\t\t$main['category_left'] = $category_left;\n\t\t\t$main['category_right'] = $category_left + (count($main_category['sub']) * 2) + 1;\n\t\t\t$main['date_added'] = $now;\n\t\t\t$category_left++;\n\t\t\t$id++;\n\n\t\t\tDB::table('product_category')->insert($main);\n\t\t\t//echo '$main_category:'. $main_category['main']; echo \"\\n\";\n\t\t\tforeach($main_category['sub'] as $sub_category) {\n\t\t\t\t//sub category details\n\t\t\t\t$sub = array();\n\t\t\t\t$sub['id'] = $id;\n\t\t\t\t$sub['seo_category_name'] = $this->slugify($sub_category);\n\t\t\t\t$sub['category_name'] = $sub_category;\n\t\t\t\t$sub['category_level'] = 2;\n\t\t\t\t$sub['parent_category_id'] = $main['id'];\n\t\t\t\t$sub['category_left'] = $category_left;\n\t\t\t\t$sub['category_right'] = $category_left + 1;\n\t\t\t\t$sub['date_added'] = $now;\n\t\t\t\t$category_left++;\n\t\t\t\t$category_left++;\n\t\t\t\t$id++;\n\t\t\t\t//echo ' ****************************** $sub_category:'. $sub_category; echo \"\\n\";\n\t\t\t\tDB::table('product_category')->insert($sub);\n\t\t\t}\n\t\t\t$category_left++;\n\t\t}\n\t\tDB::table('product_category')->where('id', 1)->update(array('category_right' => $category_left));\n\t}", "function relatedProducts($people_cat_id, $product_type_id, $product_id)\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t$sql= 'SELECT product. *\n\t\t\t\tFROM product\n\t\t\t\tJOIN product_people ON product_people.product_id = product.product_id\n\t\t\t\tWHERE product.product_type_id = '.$people_cat_id.'\n\t\t\t\tAND product_people.people_cat_id = '.$product_type_id.'\n\t\t\t\tAND product.product_id != '.$product_id.'\n\t\t\t\tORDER BY product.product_id DESC';\n\t\t\t\t\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tforeach ($Q-> result_array() as $row){\n\t\t\t\t}\n\t\t\t\treturn $Q;\n\t\t\t\t\n\t\t\t\t}", "function get_product_id_from_cat_query($category) {\n global $wpdb;\n\n $product_results = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT DISTINCT post_id\n FROM wp_postmeta\n JOIN randys_categoryproduct cp ON cp.ProductID = wp_postmeta.meta_value\n JOIN randys_category c ON c.CategoryID = cp.CategoryID\n WHERE wp_postmeta.meta_key = %s\n AND (c.CategoryID = %d OR c.ParentID = %d)\",\n array('_randy_productid', $category, $category)\n )\n );\n\n return $product_results;\n}", "public function productBySubCategoryAction()\n {\n $category = $this->route['category'];\n $vars['products'] = $this->model->getProductsBySubCategory($category);\n $this->view->render('Riding Gear', $vars);\n }", "function productList() {\n\t$categoryIds = array_merge ( [ \n\t\t\t$this->id \n\t], $this->subcategoryIds () );\n\tprint_r ( $categoryIds );\n\t// Find all products that match the retrieved category IDs\n\treturn Product::whereIn ( 'cate_id', $categoryIds )->get ();\n}", "function getpCatPro(){\n global $conn;\n if(isset($_GET['p_cat'])){\n $p_cat_id = $_GET['p_cat'];\n \n $get_p_cat = \"SELECT * FROM product_category WHERE p_cat_id = $p_cat_id\";\n $run_p_cat = mysqli_query($conn, $get_p_cat) or die(\"pCatPro query failed\");\n $row_p_cat = mysqli_fetch_assoc($run_p_cat);\n\n $p_cat_title = $row_p_cat['p_cat_title'];\n $p_cat_desc = $row_p_cat['p_cat_desc'];\n\n $get_products = \"SELECT * FROM products WHERE p_cat_id = $p_cat_id\";\n $run_get_products = mysqli_query($conn, $get_products) or die(\"get_products query failed.\");\n $count = mysqli_num_rows($run_get_products);\n \n if($count == 0){\n echo \"<div class='box'>\n <h1>No Products Found In This Category.</h1>\n </div>\";\n }else{\n echo \"<div class='box'>\n <h1 align='center'>$p_cat_title</h1>\n <p>$p_cat_desc</p>\n </div>\";\n }\n\n while($row = mysqli_fetch_assoc($run_get_products)){\n \n $product_id = $row['product_id'];\n\t\t\t$product_title = $row['product_title'];\n\t\t\t$product_price = $row['product_price'];\n $product_img1 = $row['product_img1'];\n \n echo \"<div class='col-md-4 col-sm-6 center-responsive'>\n <div class='product'>\n <a href='details.php?pro_id=$product_id'>\n <img src='admin/product_images/insert_images/$product_img1' class='img-responsive'>\n </a>\n <div class='text'>\n <h3><a href='details.php?pro_id=$product_id'>$product_title</a></h3>\n <p class='price'>INR $product_price</p>\n <p class='buttons'>\n <a href='details.php?pro_id=$product_id' class='btn btn-default'> View Details</a>\n <a href='details.php?pro_id=$product_id' class='btn btn-primary'><i class='fa fa-shopping-cart'></i> Add To Cart</a>\n </p>\n </div>\n </div>\n </div>\";\n }\n } \n}", "public function viewAction()\n {\n $alias = $this->route['alias'];\n $category = R::findOne('category', 'alias = ?', [$alias]);\n\n $curr = \\ishop\\App::$app->getProperty('currency');\n\n if(!$category){\n throw new \\Exception('Страница не найдена', 404);\n }\n\n // 2. breadcrumbs & ids for all children categories\n $breadcrumbs = Breadcrumbs::getBreadcrumbs($category->id);\n $cat_model = new Category();\n $ids = $cat_model->getIds($category->id);\n $ids = $ids ? ($ids . $category->id) : $category->id;\n $filterData['categoryIds'] = $ids;\n\n // 3. get product sort parameters\n $productsSort = App::$app->getProperty('productsSort');\n $sort = self::productSort();\n $productSortDB = self::productSortDB();\n $productsPerPage = App::$app->getProperty('productsPerPage');\n $perpage = self::getProductPerpage();\n $productsMode = self::getProductMode();\n\n // 4. filters for products\n $filter = null; $sql_part = '';\n if(!empty($_GET['filter']))\n {\n new \\app\\widgets\\filter\\Filter($filterData);\n $filter = Filter::getFilter();\n\n if($filter){\n $countGroups = Filter::countGroups($filter);\n $sql_part = \"AND product.id IN (\n SELECT attribute_product.product_id\n FROM attribute_product \n LEFT JOIN attribute_value ON attribute_value.id = attribute_product.attr_id\n LEFT JOIN attribute_group ON attribute_group.id = attribute_value.attr_group_id\n WHERE attribute_product.attr_id IN ({$filter})\n GROUP BY attribute_product.product_id\n HAVING COUNT(DISTINCT attribute_value.attr_group_id) = {$countGroups}\n )\";\n }\n\n $filter = explode(',', $filter);\n }\n\n $filterPrice = null;\n if(!empty($_GET['minPrice']) && $_GET['maxPrice'])\n {\n $minPrice = round($_GET['minPrice'] / $curr['value']);\n $maxPrice = round($_GET['maxPrice'] / $curr['value']);\n $sql_part .= \" AND product.price >= {$minPrice} AND product.price <= {$maxPrice} \";\n }\n\n // 5. find total (with filters) & get pagination\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $total = R::count('product', \"category_id IN ($ids) AND status = 'visible' $sql_part\");\n $pagination = new Pagination($page, $perpage, $total);\n $start = $pagination->getStart();\n\n $products = R::getAll(\"SELECT product.*, GROUP_CONCAT(product_base_img.img SEPARATOR ',') AS base_img FROM product \n LEFT JOIN product_base_img ON product_base_img.product_id = product.id\n WHERE product.category_id IN ($ids) AND product.status = 'visible' $sql_part\n GROUP BY product.id ORDER BY $productSortDB LIMIT $start, $perpage\");\n\n if($products){\n for ($z=0; $z<count($products); $z++){\n $getProductSizes = R::getAll(\"SELECT GROUP_CONCAT(attribute_value.value) AS value\n FROM attribute_value\n LEFT JOIN attribute_product ON attribute_value.id = attribute_product.attr_id\n WHERE attribute_product.product_id = {$products[$z]['id']} AND attribute_value.attr_group_id = 6\");\n $products[$z]['sizes'] = $getProductSizes[0]['value'];\n }\n }\n\n $sizes = R::findAll(\"attribute_value\", 'attr_group_id = ? ', [6]);\n\n $productRangeCount = ($perpage*($pagination->currentPage-1)+1) .\" - \". ($perpage*($pagination->currentPage-1) + count($products));\n\n\n $filterPrice = R::getRow(\"SELECT MIN(price) AS minPrice, MAX(price) AS maxPrice\n FROM `product` \n WHERE category_id IN($ids) AND status = 'visible'\");\n\n $filterData['minPrice'] = round($filterPrice['minPrice'] * $curr['value']);\n $filterData['maxPrice'] = round($filterPrice['maxPrice'] * $curr['value']);\n\n if($this->isAjax())\n {\n $categoryViews['products'] = $this->loadViews('products', compact('products'));\n $categoryViews['productPagination'] = $this->loadViews('product_pagination', compact( 'pagination', 'total', 'productRangeCount'));\n $filterObj = new \\app\\widgets\\filter\\Filter($filterData);\n $categoryViews['productFilter'] = $filterObj->run();\n\n echo json_encode($categoryViews, true);\n die;\n }\n\n $title = $category->meta_title ? $category->meta_title : $category->title;\n $this->setMeta( $title.' - интернет магазин MegaShop Demo', $category->description, $category->keywords);\n $this->set(compact('breadcrumbs', 'category', 'products',\n 'pagination', 'total', 'perpage', 'productsPerPage', 'sizes',\n 'productsSort', 'sort', 'productRangeCount', 'productsMode', 'filterData'));\n\n }", "function ierg4210_prod_fetch() {\n // DB manipulation\n global $db;\n $db = ierg4210_DB();\n $catid = (int)$_REQUEST['catid'];\n $q = $db->prepare(\"SELECT * FROM products WHERE catid = $catid;\");\n if ($q->execute())\n return $q->fetchAll();\n}", "function category(){\n\n\t\t\t$header['title']=\"Find Page\";//title\n\t\t\t$data=[];//dataa\n\t\t\t$sidebar['getUpdate'] = $this->_actionModel->getAllDataByUpdate_time();\n\t\t\t$keyword = $_GET['cat'] ?? '';//get key\n\t\t\t$keyword = trim($keyword);//cat bo khaong trong 2 dau\n\t\t\t$data['keyword'] = $keyword;// key-> value\n\n\t\t\t$page = $_GET['page'] ?? '';//tim $_page\n\t\t\t$page = (is_numeric($page) && $page >0) ? $page : 1;//kiem tra xem co phai so khong\n\t\t\t//Chu thich lau qa =.=\n\t\t\t\n\t\t\t$dataLink =[\n\t\t\t\t'c' => 'action',\n\t\t\t\t'm' => 'category',\n\t\t\t\t'page'=> '{page}',\n\t\t\t\t'cat' => $keyword\n\t\t\t];//giong o tren r`\n\t\t\t$links = $this->_actionModel->create_link_manga($dataLink);//tao links\n\t\t\t//die($links);//die ra coi thu DL thoi \n\n\t\t\t$manga=$this->_actionModel->getAllDataMangaByKeywordCategory($keyword);//cai ten noi len tat ca\n\n\t\t\t$panigate = panigation(count($manga), $page, 4,$keyword,$links);//panigate la phan trang r`\n\t\t\t$data['mangas'] = $this->_actionModel->getDataMangaByCategory($panigate['keyword'],$panigate['start'],$panigate['limit']);//lay manga theo category con gif\n\t\t\t//echo\"<pre/>\";print_r($data['mangas']);die();//die ra coi DL thoi xoa di lay j coi du lieu ?? !\n\t\t\t$data['panigation'] = $panigate['panigationHtml']; //nhu o tren r` chu thich j` nua.\n\t\t\t$this->loadHeader($header); //nhu o tren r` chu thich j` nua.\n\t\t\t$this->loadActionPage($data); //nhu o tren r` chu thich j` nua.\n\t\t\t$this->loadSidebarPage($sidebar); //nhu o tren r` chu thich j` nua.\n\t\t\t$this->loadFooter(); //nhu o tren r` chu thich j` nua.\n\t\t}", "public function show_product_by_category_eng($id){\n $idCategorie = Crypt::decrypt($id);\n $product_by_category=DB::table('products')\n ->join('categories', 'products.categorie_id','=', 'categories.id')\n ->select('products.*','categories.name')\n ->where('categories.id',$idCategorie)\n ->where('products.status','1')\n ->limit(100)\n ->get();\n\n $mens_product_by_category=DB::table('products')\n ->join('categories', 'products.categorie_id','=', 'categories.id')\n ->select('products.*','categories.name')\n ->where('categories.id',$idCategorie)\n ->where('products.style',\"hommes\")\n ->limit(100)\n ->get();\n\n $womens_product_by_category=DB::table('products')\n ->join('categories', 'products.categorie_id','=', 'categories.id')\n ->select('products.*','categories.name')\n ->where('categories.id',$idCategorie)\n ->where('products.style','dames')\n ->limit(100)\n ->get();\n\n $children_product_by_category=DB::table('products')\n ->join('categories', 'products.categorie_id','=', 'categories.id')\n ->select('products.*','categories.name')\n ->where('categories.id',$idCategorie)\n ->where('products.style','enfants')\n ->limit(100)\n ->get();\n\n $categorie = DB::table('categories')\n ->where('id',$idCategorie)->first();\n\n $product_footer_by_category = DB::table('products')\n ->join('categories', 'products.categorie_id','=', 'categories.id')\n ->select('products.*','categories.name')\n ->where('categories.id',$idCategorie)\n ->where('products.status','6')\n ->limit(4)\n ->get();\n\n $manage_product_by_category=view('produits.produits_par_categorie')\n ->with('product_by_category',$product_by_category);\n\nreturn view('eng.produits_par_categorie')->with(compact('product_by_category','categorie','product_footer_by_category','mens_product_by_category','womens_product_by_category','children_product_by_category'));\n // return view('layout')\n // ->with('pages.produits_par_categorie',$manage_product_by_category,$categorie);\n}", "function selectByCategory($cat) {\r\n global $conn;\r\n $select = \"SELECT * FROM product WHERE category='\" . $cat . \"';\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}", "public static function GET_ALL_PRODUCTS_BY_TYPE($prd_type, $curr_page = 1) {\n $model_type = $_POST['model_type'];\n $designer_type = isset($_POST['designer_type']) && !empty($_POST['designer_type']) ? $_POST['designer_type'] : \"\";\n $parent_cat = (isset($_POST['parent_cat']) && $_POST['parent_cat'] == 1) ? true : false;\n\n //Parent cat\n if ($parent_cat == true) {\n switch ($model_type) {\n case \"girl\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=260 AND category_dress_type_id='\" . $prd_type . \"'\");\n break;\n case \"boy\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=261 AND category_dress_type_id='\" . $prd_type . \"'\");\n break;\n default:\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=260 AND category_dress_type_id='\" . $prd_type . \"'\");\n break;\n }\n $products_ids = Db_Actions::DbGetResults();\n }\n else if ($prd_type == 'no-type' && $designer_type == \"\") {\n switch ($model_type) {\n case \"girl\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=260\");\n break;\n case \"boy\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=261\");\n break;\n default:\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE category_id=260\");\n break;\n }\n $products_ids = Db_Actions::DbGetResults();\n }\n else if (is_numeric($prd_type)) {\n switch ($model_type) {\n case \"girl\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE subcategory_dress_type_id='\" . $prd_type . \"' AND category_id=260\");\n break;\n case \"boy\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE subcategory_dress_type_id='\" . $prd_type . \"' AND category_id=261\");\n break;\n default:\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE subcategory_dress_type_id='\" . $prd_type . \"' AND category_id=260\");\n break;\n }\n $products_ids = Db_Actions::DbGetResults();\n }\n else if ($prd_type == 'no-type' && $designer_type != \"\") {\n switch ($model_type) {\n case \"girl\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE brand_type='\" . $designer_type . \"' AND category_id=260\");\n break;\n case \"boy\":\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE brand_type='\" . $designer_type . \"' AND category_id=261\");\n break;\n default:\n Db_Actions::DbSelect(\"SELECT * FROM cscart_products_categories WHERE brand_type='\" . $designer_type . \"' AND category_id=260\");\n break;\n }\n $products_ids = Db_Actions::DbGetResults();\n }\n\n\n\n if (!isset($products_ids->empty_result)) {\n $product_data = array();\n foreach ($products_ids as $product) {\n $product_data[] = array('product_id' => $product->product_id,\n 'product_name' => self::getProductName($product->product_id),\n 'product_image_url' => $root_url . self::getProductImage($product->product_id),\n 'product_price' => self::getProductPrice($product->product_id),\n 'category_dress_type_id' => $product->category_dress_type_id,\n 'subcategory_dress_type_id' => $product->subcategory_dress_type_id);\n }\n\n $max_products_per_page = 9;\n $offset = $curr_page * $max_products_per_page - $max_products_per_page;\n $slice = array_slice($product_data, $offset, $max_products_per_page);\n $counter = 0;\n foreach ($slice as $product_item) {\n $counter++;\n if ($counter == 1) {\n ?><div class=\"cs-product-row\"><?php\n }\n ?>\n <div class=\"cs-product <?php if ($counter == 2) echo 'cs-prd-middle'; ?>\" product_id=\"<?php echo $product_item['product_id'] ?>\" product_title=\"<?php echo $product_item['product_name'] ?>\" product_price=\"<?php echo $product_item['product_price'] ?>\" category_ids=\"<?php echo $product_item['category_id'] ?>\" category_dress_type_id=\"<?php echo $product_item['category_dress_type_id'] ?>\" subcategory_dress_type_id=\"<?php echo $product_item['subcategory_dress_type_id'] ?>\">\n <img src=\"<?php echo $product_item['product_image_url'] ?>\" width=\"97\" height=\"126\" alt=\"dress\" product_title=\"<?php echo $product_item['product_name'] ?>\" class=\"cs-main-product-image\" draggable=\"false\" category_dress_type_id=\"<?php echo $product_item['category_dress_type_id'] ?>\" subcategory_dress_type_id=\"<?php echo $product_item['subcategory_dress_type_id'] ?>\" />\n <h3 class=\"cs-product-title\"><?php echo substr($product_item['product_name'], 0, 14) ?></h3>\n <h4 class=\"cs-price\">$<?php echo number_format($product_item['product_price'], 2) ?></h4>\n <div class=\"cs-variations\">\n <?php //self::getProductColorVariations($product_item['product_id']); ?>\n </div>\n </div>\n <?php\n if ($counter == 3) {\n ?></div><?php\n $counter = 0;\n }\n }\n }\n else {\n return new stdClass();\n }\n }", "public function getProducts_old($data = array()) {\n //echo \"<pre>\";print_r($data);exit;\n $sql = \"SELECT * FROM \" . DB_PREFIX . \"product p LEFT JOIN \" . DB_PREFIX . \"product_description pd ON (p.product_id = pd.product_id) LEFT JOIN \" . DB_PREFIX . \"product_to_category ptc ON ( p.product_id = ptc.product_id) WHERE p.product_tp ='TE' AND pd.language_id = '\" . (int)$this->config->get('config_language_id') . \"'\";\n \n \n//echo $sql;exit;\n\t\tif (!empty($data['filter_name'])) {\n\t\t\t$sql .= \" AND pd.name LIKE '\" . $this->db->escape($data['filter_name']) . \"%'\";\n\t\t}\n\n\t\tif (!empty($data['filter_model'])) {\n\t\t\t$sql .= \" AND p.model LIKE '\" . $this->db->escape($data['filter_model']) . \"%'\";\n\t\t}\n\n\t\tif (isset($data['filter_price']) && !is_null($data['filter_price'])) {\n\t\t\t$sql .= \" AND p.price LIKE '\" . $this->db->escape($data['filter_price']) . \"%'\";\n\t\t}\n\n\t\tif (isset($data['filter_quantity']) && !is_null($data['filter_quantity'])) {\n\t\t\t$sql .= \" AND p.quantity = '\" . (int)$data['filter_quantity'] . \"'\";\n\t\t}\n \n \n /*custom add for filter in autocomplayte category*/\n /*Custom add */ \n if (isset($data['filter_category_id']) && !is_null($data['filter_category_id'])) {\n\t\t\t$sql .= \" AND ptc.category_id = '\" . (int)$data['filter_category_id'] . \"'\";\n\t\t}\n \n \n\n\t\tif (isset($data['filter_status']) && !is_null($data['filter_status'])) {\n\t\t\t$sql .= \" AND p.status = '\" . (int)$data['filter_status'] . \"'\";\n\t\t}\n \n if (isset($data['filter_family']) && !is_null($data['filter_family'])) {\n\t\t\t$sql .= \" AND p.family = '\" . (int)$data['filter_family'] . \"'\";\n\t\t}\n\n \n\t\tif (isset($data['filter_image']) && !is_null($data['filter_image'])) {\n\t\t\tif ($data['filter_image'] == 1) {\n\t\t\t\t$sql .= \" AND (p.image IS NOT NULL AND p.image <> '' AND p.image <> 'no_image.png')\";\n\t\t\t} else {\n\t\t\t\t$sql .= \" AND (p.image IS NULL OR p.image = '' OR p.image = 'no_image.png')\";\n\t\t\t}\n\t\t}\n\n\t\t$sql .= \" GROUP BY p.product_id\";\n\n\t\t$sort_data = array(\n\t\t\t'pd.name',\n\t\t\t'p.model',\n\t\t\t'p.price',\n\t\t\t'p.quantity',\n\t\t\t'p.status',\n 'p.family',\n\t\t\t'p.sort_order'\n\t\t);\n\n\t\tif (isset($data['sort']) && in_array($data['sort'], $sort_data)) {\n\t\t\t$sql .= \" ORDER BY \" . $data['sort'];\n\t\t} else {\n\t\t\t$sql .= \" ORDER BY pd.name\";\n\t\t}\n\n\t\tif (isset($data['order']) && ($data['order'] == 'DESC')) {\n\t\t\t$sql .= \" DESC\";\n\t\t} else {\n\t\t\t$sql .= \" ASC\";\n\t\t}\n\n\t\tif (isset($data['start']) || isset($data['limit'])) {\n\t\t\tif ($data['start'] < 0) {\n\t\t\t\t$data['start'] = 0;\n\t\t\t}\n\n\t\t\tif ($data['limit'] < 1) {\n\t\t\t\t$data['limit'] = 20;\n\t\t\t}\n\n\t\t\t$sql .= \" LIMIT \" . (int)$data['start'] . \",\" . (int)$data['limit'];\n\t\t}\n \n\t\t$query_tp = $this->db->query($sql);\n \n\t\treturn $query_tp->rows;\n\t}", "public function listProductsRelated($params)\n{\n $type = $this->db->real_escape_string($params['type']);\n $prdId = $this->db->real_escape_string($params['prdId']);\n\n if ($type == 'K'){\n $qry = \"SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_products AS pr\n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE prd_id = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1\n UNION\n SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_products_packages AS pk\n INNER JOIN ctt_products AS pr ON pr.prd_id = pk.prd_id\n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE pk.prd_parent = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1;\";\n return $this->db->query($qry);\n // cambio ac.prd_id por prd_parent\n } else if($type == 'P') {\n $qry = \"SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_products AS pr\n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE prd_id = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1\n UNION\n SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_accesories AS ac\n INNER JOIN ctt_products AS pr ON pr.prd_id = ac.prd_parent \n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE ac.prd_parent = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1;\";\n return $this->db->query($qry);\n\n } else {\n $qry = \"SELECT * FROM ctt_products WHERE prd_id = $prdId\";\n return $this->db->query($qry);\n }\n}", "public function action_catalog_products_cout()\n {\n echo '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">';\n echo '<tr><td width=\"120px\">Catalog Name</td><td width=\"100px\">在架产品数量</td><td width=\"100px\">下架产品数量</td></tr>';\n $catalogs = DB::select('id')->from('products_category')->where('visibility', '=', 1)->where('on_menu', '=', 1)->execute('slave');\n foreach($catalogs as $cata)\n {\n $catalog = Catalog::instance($cata['id']);\n $posterity_ids = $catalog->posterity();\n $posterity_ids[] = $cata['id'];\n $posterity_sql = implode(',', $posterity_ids);\n\n $sql = 'SELECT count(distinct products.id) as num FROM products LEFT JOIN catalog_products ON catalog_products.product_id=products.id \n WHERE catalog_products.catalog_id IN (' . $posterity_sql . ') AND products.site_id =1 AND products.visibility = 1';\n\n $onsale_count = DB::query(Database::SELECT, $sql . ' AND status = 1')->execute('slave')->get('num');\n $offsale_count = DB::query(Database::SELECT, $sql . ' AND status = 0')->execute('slave')->get('num');\n\n echo '<tr><td>' . $catalog->get('name') . '</td><td>' . $onsale_count . '</td><td>' . $offsale_count . '</td></tr>';\n }\n echo '</table>';\n }", "public function searchByCategory($main = '', $sub = '')\n{\n $a = \"1\";\n $b = \"2\";\n $c = \"0\";\n $f = \"0\";\n\n date_default_timezone_set(\"Asia/Karachi\");\n $date = date('Y-m-d');\n $result = [];\n $d = [];\n\n $result = DB::select(DB::raw(\"SELECT * FROM product WHERE product.main_category = :value and product.status = :value2 \") , array(\n 'value2' => $a,\n \n 'value' => $main,\n ));\n\n \n $d = DB::select(DB::raw(\"SELECT product.pk_id,product.sku,product.name,product.price,product.thumbnail,product.thumbnail2,discount_table.percentage ,discount_table.start_date,discount_table.end_date FROM product,discount_table WHERE product.main_category = :value and product.SKU=discount_table.sku and product.status = :value2 and (discount_table.start_date < '$date' or discount_table.start_date = '$date') and (discount_table.end_date > '$date' or discount_table.end_date = '$date')\") , array(\n\n 'value' => $main,\n 'value2' => $a,\n \n ));\n // $d = DB::select(\"select product.pk_id,product.thumbnail,product.thumbnail2,product.name, product.product_type,product.price,product.description,product.sku, discount_table.sku,discount_table.start_date,discount_table.end_date,discount_table.percentage from product,discount_table where product.sku = discount_table.sku and product.sub_category = 'Polo' and product.discount_status = '1' and (discount_table.start_date < '$date' or discount_table.start_date = '$date') and (discount_table.end_date > '$date' or discount_table.end_date = '$date') and product.status = '1' and (product.v_product_status = '2' or product.v_product_status = '0')\");\n\n $main_category = DB::select(\"select * from main_category\");\n return view('client.shop', compact('result', 'd', 'main_category', 'main', 'sub', 'type'));\n}", "public function getProductsToCategory($id_category=0,$user_tab=array(),$page_start=0)\n\t{\n\t\t// $last_time = $this->microtime_float();\n\n\t\tif($this->session->userdata('per_page'))\n\t\t\t\t$per_page = $this->session->userdata('per_page');\n\t\t\telse\n\t\t\t\t$per_page = 12;\n\t\t$access_data=$this->getUserAccess($user_tab);\n\t\t\n\t\t$where_in_id=\"\";\n\n\t\tif($id_category != 0)\n\t\t{\t\n\t\t\tif(count($access_data['categories']) > 0)\n\t\t\t\t{\n\t\t\t\t\tif(isset($access_data['categories'][$id_category]))\n\t\t\t\t\t\t\t$where_in_id=$id_category;\n\t\t\t\t}\t\n\t\t\telse\n\t\t\t\t$where_in_id=$id_category;\n\t\t\t\t\n\t\t\t$cats=$this->getCategoriesList($id_category);\n\t\t\tforeach($cats as $id=>$value)\n\t\t\t{\n\t\t\t\tif(count($access_data['categories']) > 0)\n\t\t\t\t{\n\t\t\t\t\tif(isset($access_data['categories'][$id]))\n\t\t\t\t\t\t\t$where_in_id.=\",\".$id;\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse\n\t\t\t\t\t$where_in_id.=\",\".$id;\n\t\t\t\t\n\t\t\t}\n\t\t\t$where_in_id_cat = \"\";\n\t\t\t$array_diff = array();\n\t\t\tif($access_data['categories'] && $access_data['category_with_products'])\n\t\t\t\t$array_diff = array_diff($access_data['categories'],$access_data['category_with_products']);\n\t\t\t$it=0;\n\t\t\tforeach($array_diff as $id=>$value)\n\t\t\t{ \n\t\t\t\tif(isset($cats[$id]))\n\t\t\t\t{\n\t\t\t\t\tIF($it==0)\n\t\t\t\t\t{\n\t\t\t\t\t$where_in_id_cat.=$id;\n\t\t\t\t\t$it=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$where_in_id_cat.=\",\".$id;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(count($cats) == 0)\n\t\t\t\t{\n\t\t\t\t\t$where_in_id_cat = $id_category;\n\t\t\t\t}\n\t\t}\n\t\t// echo \"<br/><br/>2step - \".($this->microtime_float() - $last_time);\t\n\t\t// $last_time = $this->microtime_float();\n\t\tif($this->session->userdata('sort') == 1)\n\t\t\t$order_by = \" ORDER BY p.name asc\";\n\t\telseif($this->session->userdata('sort') == 2)\n\t\t\t$order_by = \" ORDER BY p.name desc\";\n\t\telseif($this->session->userdata('sort') == 3)\n\t\t\t$order_by = \" ORDER BY CASE WHEN fixed_price1 IS NOT null THEN fixed_price1 \n\t\t\t\tWHEN price_promotion IS NOT NULL then price_promotion \n\t\t\t\tWHEN price_discount IS NOT NULL then price_discount \n\t\t\t\tWHEN price_group_discount IS NOT NULL then price_group_discount \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ELSE p.price END asc\";\n\t\telseif($this->session->userdata('sort') == 4)\n\t\t\t$order_by = \" ORDER BY CASE WHEN fixed_price1 IS NOT null THEN fixed_price1 \n\t\t\t\tWHEN price_promotion IS NOT NULL then price_promotion \n\t\t\t\tWHEN price_discount IS NOT NULL then price_discount \n\t\t\t\tWHEN price_group_discount IS NOT NULL then price_group_discount \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ELSE p.price END desc\";\n\t\telseif($this->session->userdata('sort') == 5)\n\t\t\t$order_by = \"ORDER BY p.code asc\";\n\t\telse\n\t\t\t$order_by = \"ORDER BY p.name asc\";\n\t\t\t\n\t\tif($id_category != 0)\n\t\t{\n\t\t\t\t\n\t\t\t\n\t\t\t\tif(count($access_data['products']) > 0)\n\t\t\t\t{\n\t\t\t\t\t$where_in_idp=\"\";\n\t\t\t\t\tforeach($access_data['products'] as $k=>$v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($where_in_idp!=\"\") $where_in_idp .=\",\";\n\t\t\t\t\t\t$where_in_idp .= $v;\n\t\t\t\t\t}\n\t\t\t\t\t$where=\"\";\n\t\t\t\t\tif($where_in_id_cat!=\"\")\n\t\t\t\t\t\t$where.=\"(\";\n\t\t\t\t\t$where.=\"(p.id_category IN (\".$where_in_id.\")\n\t\t\t\t\tAND p.id_product IN (\".$where_in_idp.\")\n\t\t\t\t\t)\";\n\t\t\t\t\t\n\t\t\t\t\tif($where_in_id_cat!=\"\")\n\t\t\t\t\t\t$where.=\"OR p.id_category IN (\".$where_in_id_cat.\"))\";\n\t\t\t\t\t$where .=\" AND p.id_status = 1\";\n\t\t\t\t}\n\t\t\t\telse\t\t\t\t\t\t\t\t\n\t\t\t\t\t$where =\"p.id_category IN (\".$where_in_id.\") AND p.id_status = 1 \";\n\t\t\t\t\t\t\t\n\t\t}\t\n\t\t//echo \"<br/><br/>3step - \".($this->microtime_float() - $last_time);\t\n\t\t//$last_time = $this->microtime_float();\n\t\t\t\t\n\t\t\t\t\n\t\treturn $this->getProductsSql($where,$order_by,$page_start,$per_page);\n\t}", "public function category($slug)\n {\n $catId = Product::where('product_name',$slug)->first();\n\n if($catId !=null){\n return $this->findCat($catId,$slug);\n }else{\n $count = WishList::select('id')->where('user_id',auth()->user()->id ?? '')->count();\n $count1 = Cart::select('id')->where('user_id',auth()->user()->id ?? '')->count();\n $cart = Cart::where('user_id',auth()->user()->id ?? '')->get();\n $categories = Category::with('get_child_category')->where('status',1)->get();\n $ads = AdManager::all();\n $orders = Orders::where('user_id',auth()->user()->id ?? '')->get();\n $setting = Settings::first();\n\n $cat = Category::where('slug',$slug)->first();\n $category = ChildCategory::where('slug',$slug)->with('get_category:id,cover')->first();\n $sub_category = SubChildCategory::where('slug',$slug)->with('get_category:id,cover')->first();\n\n if($cat != null){\n $products = Product::where('category_id',$cat->id)->with(['get_product_avatars','get_attribute' => function ($query) {\n $query->whereNotNull('product_id')->get();\n }])->get();\n $product = $cat->get_product()->with('get_brand')->selectRaw('distinct(brand_id)')->get();\n $productSize = Product::where('category_id',$cat->id)->with('get_product_avatars','get_attribute')->get();\n $attributes = Attribute::all();\n }elseif($category != null) {\n $products = Product::where('child_category_id',$category->id)->with(['get_product_avatars','get_attribute' => function ($query) {\n $query->whereNotNull('product_id')->get();\n }])->get();\n $attributes = Attribute::all();\n $product = $category->get_product()->with('get_brand')->selectRaw('distinct(brand_id)')->get();\n $productSize = Product::where('child_category_id',$category->id)->with(['get_product_avatars','get_attribute' => function ($query) {\n $query->whereNotNull('size')->get();\n }])->get();\n }elseif($sub_category !=null){\n $products = Product::where('sub_child_category_id',$sub_category->id)->with(['get_product_avatars','get_attribute' => function ($query) {\n $query->whereNotNull('product_id')->get();\n }])->get();\n $product = $sub_category->get_product()->with('get_brand')->selectRaw('distinct(brand_id)')->get();\n $productSize = Product::where('sub_child_category_id',$sub_category->id)->with(['get_product_avatars','get_attribute' => function ($query) {\n $query->whereNotNull('size')->get();\n }])->get();\n $attributes = Attribute::all();\n }\n\n return view('layouts.frontend.category_list',[\n 'ads'=>$ads,\n 'categories'=>$categories,\n 'count'=>$count,\n 'count1'=>$count1,\n 'cart'=>$cart,\n 'orders'=>$orders,\n 'setting'=>$setting,\n 'cat'=>$cat,\n 'category'=>$category,\n 'sub_category'=>$sub_category,\n 'products'=>$products ?? null,\n 'product'=>$product ?? null,\n 'productSize'=>$productSize ?? null,\n 'attributes'=>$attributes ?? null\n ]);\n }\n }", "public function HM_CategoCuentas()\n {\n }", "function getCatPro() {\n\n if(isset($_GET['cat'])){\n\n\n\n $cat_id = $_GET['cat'];\n\n\n global $con;\n\n $run_cat_pro = mysqli_query($con,\"SELECT * FROM products WHERE product_cat = '$cat_id'\");\n\n\n\n $count_cats = mysqli_num_rows($run_cat_pro);\n\n if($count_cats == 0) {\n\n echo \"<div class='no-cat'>\n\n <h1> We're sorry! There are currently no products with that category. :(</h1>\n\n </div>\";\n } else {\n\n while($row_cat_pro = mysqli_fetch_array($run_cat_pro)) {\n\n $pro_id = $row_cat_pro['product_id'];\n $pro_cat = $row_cat_pro['product_cat'];\n $pro_brand = $row_cat_pro['product_brand'];\n $pro_title = $row_cat_pro['product_title'];\n $pro_price = $row_cat_pro['product_price'];\n $pro_image = $row_cat_pro['product_image'];\n\n echo \"\n <div class='single-product cf'>\n\n <h4><a href='#'>$pro_title</a></h4>\n <a href='details.php?pro_id=$pro_id'><img src='admin/product_images/$pro_image' /></a>\n <p>\n Price: $ $pro_price\n </p>\n\n <a href='index.php?add_cart=$pro_id'><button>Add To Cart</button></a>\n </div>\n\n \";\n\n }\n }\n }\n }", "public function brandcategories()\n\t\t{\n\t\t\t$logger = Logger::getLogger(__CLASS__);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$taskCode = \"brandcategories\";\n\t\t\t\t$this->LogAccess($taskCode);\n\t\t\t\t$authResult = $this->Authorize($taskCode);\n\t\t\t\tif ($authResult == \"LOGIN\")\n\t\t\t\t{\n\t\t\t\t\treturn $this->view->outputRedirect(Constants::$ADMINLOGIN);\n\t\t\t\t}\n\t\t\t\t$commandObject = new CommandObject();\n\t\t\t\t$commandObject->SetParameter(\"PageSize\", 20);\n\t\t\t\t$commandObject->SetParameter(\"PageIndex\", 0);\n\t\t\t\t$commandObject->SetParameter(\"SortExpression\", \"CategoryName\");\n\t\t\t\t$commandObject->SetParameter(\"SortDirection\", \"ASC\");\n\t\t\t\t$brandCategoryBO = new BrandCategoryBO($this->_UserInfo);\n\t\t\t\t$paginatedlist = $brandCategoryBO->SearchBrandCategory(\"\",\"CategoryName\", \"ASC\", 20, 0);\n\t\t\t\t$paginatedlist->SetRequestState(\"ContextName\", \"brandcategories\");\n\t\t\t\t$paginatedlist->SetRequestState(\"ModalIndex\", \"3\");\n\t\t\t\t$paginatedlist->setRequestStateDictionary(RequestStateHelper::SetRequestState(\"CommandObject\", $commandObject->Serialize(), $paginatedlist->getRequestStateDictionary()));\n\t\t\t\t$paginatedlist->SetRequestState(\"UpdateTarget\", \"brandcategory/updatebrandcategoryget\");\n\t\t\t\treturn $this->view->output($paginatedlist, \"admin\");\n\t\t\t}\n\t\t\tcatch (Exception $ex)\n\t\t\t{\n\t\t\t\t$logger->error($ex->getMessage());\n\t\t\t}\n\t\t}", "public function render_products_category()\r\n {\r\n if ($_REQUEST['product_cat'] !== '') {\r\n wc_product_dropdown_categories(\r\n array(\r\n 'option_select_text' => __('Filter by category', 'woocommerce'),\r\n 'hide_empty' => 0,\r\n 'selected' => $_REQUEST['product_cat']\r\n )\r\n );\r\n } else {\r\n wc_product_dropdown_categories(\r\n array(\r\n 'option_select_text' => __('Filter by category', 'woocommerce'),\r\n 'hide_empty' => 0,\r\n )\r\n );\r\n }\r\n }", "function listProductsByCategory($category) {\r\n\t\t$query = \"SELECT * FROM \".TBL_PRODUCTS.\" WHERE category = :category AND available = '1' AND stock > 0\";\r\n\t\t$stmt = $this->connection->prepare($query);\r\n\t\t$stmt->execute(array(':category' => $category));\r\n\t\t$dbarray = $stmt->fetchAll();\r\n\t\t$count = $stmt->rowCount();\r\n\t\tif(!$dbarray || $count < 1){\r\n\t\t\treturn false; // failure\r\n\t\t} else {\r\n\t\t\treturn $dbarray; // success\r\n\t\t}\r\n\t}", "function product_category_delete(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\tmysql_q(\"DELETE FROM product_category WHERE id='\".add_slash($_r['id']).\"'\");\n\n\t\tredirect(\"product_category.htm\", \"\");\n\t}", "public function search() {\n\n if ($this->request->is('post')) {\n\n // Lay du lieu tu form\n\n $listCat = $_REQUEST['listCat'];\n\n $this->Session->write('catId', $listCat);\n\n\n\n // Get keyword\n\n $keyword = $_REQUEST['keyword'];\n\n $this->Session->write('keyword', $keyword);\n\n } else {\n\n $listCat = $this->Session->read('catId');\n\n $keyword = $this->Session->read('keyword');\n\n }\n\n\n\n // setup condition to search\n\n $condition = array();\n\n if (!empty($keyword)) {\n\n $condition[] = array(\n\n 'Product.name LIKE' => '%' . $keyword . '%'\n\n );\n\n }\n\n\n\n if ($listCat > 0) {\n\n $condition[] = array(\n\n 'Product.cat_id' => $listCat\n\n );\n\n }\n\n\n\n // Lưu đường dẫn để quay lại nếu update, edit, dellete\n\n $urlTmp = DOMAINAD . $this->request->url;\n\n $this->Session->write('pageproduct', $urlTmp);\n\n\n\n // Sau khi lay het dieu kien sap xep vao 1 array\n\n $conditions = array();\n\n foreach ($condition as $values) {\n\n foreach ($values as $key => $cond) {\n\n $conditions[$key] = $cond;\n\n }\n\n }\n\n\n\n // Tang so thu tu * limit (example : 10)\n\n $urlTmp = DOMAINAD . $this->request->url;\n\n $urlTmp = explode(\":\", $urlTmp);\n\n if (isset($urlTmp[2])) {\n\n $startPage = ($urlTmp[2] - 1) * 10 + 1;\n\n } else {\n\n $startPage = 1;\n\n }\n\n $this->set('startPage', $startPage);\n\n\n\n // Simple to call data\n\n $this->paginate = array(\n\n 'conditions' => $condition,\n\n 'order' => 'Product.id DESC',\n\n 'limit' => '10'\n\n );\n\n $product = $this->paginate('Product');\n\n $this->set('product', $product);\n\n\n\n // Load model\n\n $this->loadModel(\"Catproduct\");\n\n $list_cat = $this->Catproduct->generateTreeList(null, null, null, '-- ');\n\n $this->set(compact('list_cat'));\n\n }", "function getKidsGirlCategoryProducts($cat_id,$limit,$start)\n\t\t\t\t{\n\t\t\t\t$otherconditions='';\n\t\t\t\tif(!isset($_SESSION['orderby'])) $_SESSION['orderby']='product_id';\n\t\t\t\tif(isset($_SESSION['filter'])) $otherconditions=$_SESSION['filter'];\t\t\t\t\n\t\t\t\t$sql=\"SELECT product. * , product_people.people_cat_id,brand.brand_name, color.color_name, product_type.type_name FROM product\n\n\t\t\t\tINNER JOIN product_type ON product.product_type_id = product_type.product_type_id\n\t\t\t\tINNER JOIN product_color ON product.product_id = product_color.product_id \n\t\t\t\tINNER JOIN color ON product_color.color_id = color.color_id\n\t\t\t\tINNER JOIN brand ON product.brand_id = brand.brand_id\n\t\t\t\tJOIN product_people ON product_people.product_id = product.product_id\n\t\t\t\tWHERE product_people.people_cat_id = '4'\n\t\t\t\tAND product.product_type_id= \".$cat_id.\" \".$otherconditions.\" ORDER BY \".$_SESSION['orderby'].\" DESC LIMIT \".$start.\",\".$limit;\n\t\t\t\t$result = $this->db->query($sql);\n\t\t\t\tif($result->num_rows()>0){\n\t\t\t\t$_SESSION['product_count']=$result->num_rows();\n\t\t\t\treturn $result->result();\n\t\t\t\t}else{\n\t\t\t\treturn 'empty';\n\t\t\t\t}\n\t\t\t\t}", "function displayCategory()\r\n\t {\r\n\t \t$productId = JRequest::getVar('product_id');\r\n\t \t\r\n\t \t$model = $this->getModel('qrcode');\r\n\t \t$productList = $model->getProductByCategory();//Store product details based on category.\r\n\t \tob_clean();\r\n\t \t\r\n\t \techo \"<b>\".JText::_('COM_QRCODE_VIEW_DEFAULT_PRODUCT_LIST').\"</b>\";\r\n \r\n\t \t\t\t$options = array();\r\n $default = \"\";\r\n if($productId)\r\n {\r\n \t$default = $productId;\r\n }\r\n $options[] = JHTML::_('select.option', \"0\", JText::_('COM_QRCODE_VIEW_DEFAULT_DISPLAY_ALL'));\r\n foreach ($productList as $key=>$val) {\r\n $options[] = JHTML::_('select.option', $val['product_id'], $val['product_name']);\r\n }\r\n echo JHTML::_('select.genericlist', $options, 'qrcode', 'onchange=getProductId(this.value)','value', 'text', $default); \r\n exit();\r\n\t }", "function select_product_capacity_by_category_id($data)\n {\n $category_id = $data['category_id'];\n $sub_category_id = $data['sub_category_id'];\n $query = new Query;\n $capacity = $query->select('capacity')->from('core_products')->where(\"category_id = $category_id\");\n if($sub_category_id != '')\n {\n $capacity = $capacity->where(\"sub_category_id = $sub_category_id\");\n }\n \n return $capacity = $capacity->groupBy(['core_products.capacity'])->orderBy(['core_products.capacity' => SORT_ASC])->All();\n }", "public function productsBasedOnCategory($category_id){\n $now=Carbon::now();\n $date=$now->toDateString();\n $products=Product::where([['status',1],['sell_by_date','>',$date],['category_id',$category_id]])->get();\n\n /*to be populated in dashboard*/\n $categories=Category::all();\n\n $category=Category::find($category_id);\n return view('products.filter.byCategory',compact('products','categories','category'));\n }", "function search_end()\n\t{\n\t\tglobal $db, $class_tpl, $Categories;\n\t\t\n\t\tif(isset($_GET['type']))\n\t\t{\n\t\t\t$id = (int)$_GET['type'];\n\t\t\t$sSQL = 'SELECT ccTemplate,ccnoprice FROM '.PREFIX.'categories WHERE id='.(int)$id;\n\t\t\t$result=$db->query($sSQL);\n\t\t\t$rs=$result->fetch();\n\t\t\tif($rs['ccnoprice'] == 'Y')\n\t\t\t{\n\t\t\t\t$class_tpl->assign('sDisPrice','N');\n\t\t\t}\n\t\t\tif($rs['ccTemplate'] <> '')\n\t\t\t{\n\t\t\t\t$class_tpl->assign('body', FILESYSTEM_PATH.'modules/customcats/templates/cattemplates/'.$rs['ccTemplate']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "private function loadProductCategoryOptions($productCategory)\n {\n $selectCategoryQueries = $this->DBH->query(\"SELECT pcat_name, pcat_id FROM product_category ORDER BY pcat_name\");\n\n while($r = mysql_fetch_assoc($selectCategoryQueries))\n {\n\n echo \"<option disabled='disabled' value='$r[pcat_id]'>$r[pcat_name]</option>\";\n\n $selectSubcategories = $this->DBH->query(\"SELECT psub_name, psub_id FROM product_subcategory WHERE psub_category = '\".$r[\"pcat_id\"].\"'\");\n while($sc = mysql_fetch_assoc($selectSubcategories))\n {\n\n if($productCategory == $sc[\"psub_id\"])\n {\n $selectedAdd = \" selected='selected' \";\n }\n else\n {\n $selectedAdd = \"\";\n }\n\n echo \"<option $selectedAdd value='$sc[psub_id]'>&nbsp;&nbsp;$sc[psub_name]</option>\";\n }\n }\n }", "function getProductsbyCategory($CatId){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn->prepare(\"\tSELECT id, name, description, price, stock, img_src \n\t\t\t\t\t\t\t\t\tFROM `product` \n\t\t\t\t\t\t\t\t\tWHERE `stock`>0 AND `category_id`=?\");\n\t\t$sth \t-> execute(array($CatId));\n\t\t\n\t\treturn \t$sth;\n\t}", "function filter_categories ( $page) {\n global $db;\n return find_by_sql(\"SELECT * FROM categorias where idpagina =\".$db->escape($page).\" ORDER BY name\");\n \n}", "function afficherCategories2(){\n\t\t$sql=\"SElECT nom From categorie\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function show_category_home($category_id) {\n $cate_product = DB::table('tbl_category_product')->where('category_status','0')->orderby('category_id','desc')->get(); // sắp xếp category_id\n \n $category_by_id = DB::table('tbl_product')->join('tbl_category_product','tbl_product.category_id','=','tbl_category_product.category_id')->where('tbl_product.category_id',$category_id)->get();\n $filter = DB::table('tbl_product')->where('product_status','0')->orderby('product_id','desc')->limit(2)->get();\n return view('pages.shop_c')->with('category',$cate_product)->with('category_by_id',$category_by_id)->with('filter',$filter);\n \n }", "public function getProducts(){\n $query = \"SELECT \n products.id,\n products.name,\n products.description,\n products.price,\n images.image_file_name\n FROM products\n INNER JOIN products_images\n ON products.id = products_images.product_id\n INNER JOIN images\n ON products_images.image_id = images.image_id\";\n\n //-----construct query according to parameters supplied\n \n //create an array to pass string eg \"iii\" to bind_param\n $query_param_string = array();\n \n //create an array to pass values to the bind_param\n $query_param_values = array();\n \n //--TOTAL COUNT OF PRODUCTS\n //create an array to pass string eg \"iii\" to count total result\n $query_param_string_count = array();\n //create an array to pass values to to count total result\n $query_param_values_count = array();\n \n //--CATEGORIES\n //if there are categories selected, create a join with products_categories table\n //so we can find products in category or categories\n if( count( $this -> categories ) > 0 ){\n //store the name of the table in variable\n $tbl_products_categories = \"products_categories\";\n \n //string to add to query to join with products_categories table\n $category_join = \" INNER JOIN $tbl_products_categories ON products.id = $tbl_products_categories.product_id \";\n \n $category_query = array();\n foreach( $this -> categories as $cat ){\n //ignore if category = 0\n if( $cat !== 0 ){\n array_push( $category_query, \"$tbl_products_categories.category_id=?\");\n array_push( $query_param_string, \"i\" );\n array_push( $query_param_string_count, \"i\" );\n \n //we need each query param value as a reference\n array_push( $query_param_values, $cat );\n array_push( $query_param_values_count, $cat );\n }\n }\n //implode the categories into a string so we have\n //products_categories.category_id=? OR products_categories.category_id=?\n $cat_query_string = implode( \" OR \", $category_query );\n }\n \n //--PAGE\n //process page variables\n //to use pagination, we need to calculate offset\n //if we have 8 results per page, then offset is calculated using pagenumber $page -1 * perpage\n $offset = ($this -> page-1) * $this -> perpage;\n \n //add offset and limit to query_param_string array and query_param_values\n array_push( $query_param_string , \"i\" );\n array_push( $query_param_values , $this -> perpage );\n array_push( $query_param_string , \"i\" );\n array_push( $query_param_values , $offset );\n \n //add the query_param_string to the beginning of query_param_values\n //so we get the \"iii\" at the beginning of array\n array_unshift( $query_param_values, implode( \"\", $query_param_string ));\n //do the same for the count arrays\n array_unshift( $query_param_values_count, implode(\"\",$query_param_string_count) );\n \n //build the query with category parameters\n $limit = \" LIMIT ? OFFSET ?\";\n \n //add category join\n if( count( $this -> categories) > 0){\n $query = $query . \" \" . $category_join;\n //add category query string\n $query = $query . \" WHERE \" . $cat_query_string . \" AND products.active=1\";\n }\n \n //add grouping and sorting\n $query = $query . \" GROUP BY products.id\";\n //add sorting\n $query = $query . \" ORDER BY products.id ASC\";\n \n //create second query without the limit so we can get total number of products\n //without the pagination and limit (offset creates pages of result, \n //while limit limits the number of products per page)\n $count_query = $query;\n //add limit\n $query = $query . \" \" . $limit;\n \n //send the query to database using prepare\n $statement = $this -> connection -> prepare( $query );\n \n //create references to the array values using &$query_param_values\n //while adding to parameters array\n $parameters_array = array();\n foreach( $query_param_values as $key => $value ){\n $parameters_array[$key] = &$query_param_values[$key];\n }\n //do the same for count \n $parameters_array_count = array();\n foreach( $query_param_values_count as $key => $value ){\n $parameters_array_count[$key] = &$query_param_values_count[$key];\n }\n //use call_user_func_array to pass the array as a parameter to query\n //equivalent of calling bind_param(\"iii\",$var1,$var2,$var3)\n call_user_func_array( array($statement,'bind_param'), $parameters_array );\n \n //execute the query with the parameters\n if( $statement -> execute() ){\n $result = $statement -> get_result();\n //check number of rows in result\n if( $result -> num_rows > 0){\n $products = array();\n while( $row = $result -> fetch_assoc() ){\n $id = $row[\"id\"];\n $name = $row[\"name\"];\n $price = $row[\"price\"];\n $image_file_name = $row[\"image_file_name\"];\n $desc = new \\utilities\\TruncateWords( $row[\"description\"],15 );\n $description = $desc -> words;\n //$description = $row[\"description\"];\n array_push( $products, array( \n \"id\" => $id, \n \"name\" => $name, \n \"price\" => $price,\n \"description\" => $description, \n \"image_file_name\" => $image_file_name \n ) );\n }\n $statement -> close();\n //run the second query $count_query to get total number of products\n $statement = $this -> connection -> prepare($count_query);\n call_user_func_array( array($statement,'bind_param'), $parameters_array_count );\n $statement -> execute();\n $result = $statement -> get_result();\n $total = $result -> num_rows;\n \n $result_array = array();\n $result_array[\"total\"] = $total;\n $result_array[\"categories\"] = $this -> categories;\n $result_array[\"data\"] = $products;\n \n return $result_array;\n }\n else{\n return false;\n }\n }\n else {\n return false;\n }\n $statement -> close();\n }", "function getcatpro(){\n\n global $db;\n\n if(isset($_GET['cat'])){\n\n $cat_id = $_GET['cat'];\n\n $get_cat = \"select * from categories where cat_id = '$cat_id' \";\n\n $run_cat = mysqli_query($db, $get_cat);\n\n $row_cat = mysqli_fetch_array($run_cat);\n\n $cat_title = $row_cat['cat_title'];\n\n $cat_desc = $row_cat['cat_desc'];\n\n $get_products = \"select * from products where cat_id= '$cat_id' LIMIT 0,6 \" ;\n\n $run_products = mysqli_query($db, $get_products);\n\n $count = mysqli_num_rows($run_products);\n\n if($count==0){\n\n echo \"\n\n <div class='box'>\n <h3> No Products Found in this Categories </h3>\n </div>\n \n \";\n\n }else{\n\n echo \"\n\n <div class='box'>\n\n <h1> $cat_title </h3>\n\n <p> $cat_desc </p>\n\n </div>\n \n \";\n }\n\n\nwhile($row_products= mysqli_fetch_array($run_products)){\n \n $pro_id = $row_products['product_id'];\n\n $pro_title = $row_products['product_title'];\n\n $pro_price = $row_products['product_price'];\n\n $pro_img1 = $row_products['product_img1'];\n\n echo \"\n <div class='col-sm-4 mobile-responsive'>\n\n <div class='card shadow-nohover'>\n\n <a href='details.php?pro_id=$pro_id'>\n\n <img class='card-img-top img-fluid' src='admin_area/product_images/$pro_img1'>\n\n </a>\n\n <div class='card-body'>\n\n <h5 class='card-title'>\n\n <a href='details.php?pro_id=$pro_id'>\n\n $pro_title\n\n </a>\n\n </h5>\n\n <p class='price'>\n\n &#8358; $pro_price\n\n </p>\n\n <p class='button'>\n\n <a href='details.php?pro_id=$pro_id' class='btn btn-info btn-sm'> View Details </a>\n\n <a href='details.php?pro_id=$pro_id' class='btn btn-success btn-sm'>\n\n <i class='fa fa-shopping-cart'>\n\n Add To Cart\n\n </i>\n\n </a>\n </p>\n\n </a>\n </div>\n </div>\n </div>\n \n \";\n\n }\n\n}\n}", "function selectAllCategories() {\r\n global $conn;\r\n $select = \"SELECT * FROM product GROUP BY category ORDER BY COUNT(category);\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}", "public function index()\n {\n $cate_product = DB::table('tbl_category_product')->where('category_status','0')->orderby('category_id','desc')->get(); \n\n $danhmuc=CategoryModel::has('children')->get();\n\n $product= DB::table('tbl_products')->where('product_status','0')->orderby('product_id','desc')->get();\n $product1= DB::table('tbl_products')->where('product_status','0')->orderby('product_id','desc')->limit(25)->get();\n\n return view('pages.home')->with('category',$cate_product)->with('product',$product)->with('product1',$product1)->with('cate',$danhmuc);\n\n\n }", "function getSideBarCategory(){\n // this function for get all categories exist in sidebar components\n try{\n global $con;\n // query select for get all categories\n $query = $con->prepare(\"SELECT * FROM categories\");\n $query->execute();\n // if we have cat_id then go inside condition\n if(isset($_GET['cat_id'])){\n if($_GET['cat_id'] == 'all'){\n echo \"\n <li class='active'><a href='ads.php?cat_id=all&page=1'>كل الأقسام</a></li>\n \";\n }\n else{\n echo \"\n <li class=''><a href='ads.php?cat_id=all&page=1'>كل الأقسام</a></li>\n \";\n }\n while($result = $query->fetch(PDO::FETCH_ASSOC)){\n // Initialize Variables\n $cat_id = $result[\"cat_id\"];\n $cat_title = $result[\"cat_title\"];\n if($_GET['cat_id'] == $cat_id){\n echo \"\n <li class='active'><a href='ads.php?cat_id=$cat_id&page=1'>$cat_title</a></li>\n \";\n }\n else{\n echo \"\n <li class=''><a href='ads.php?cat_id=$cat_id&page=1'>$cat_title</a></li>\n \";\n }\n }\n }\n else{\n echo \"\n <li class=''><a href='ads.php?cat_id=all&page=1'>كل الأقسام</a></li>\n \";\n while($result = $query->fetch(PDO::FETCH_ASSOC)){\n $cat_id = $result[\"cat_id\"];\n $cat_title = $result[\"cat_title\"];\n echo \"\n <li class=''><a href='ads.php?cat_id=$cat_id&page=1'>$cat_title</a></li>\n \";\n }\n }\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n}", "function getAllKidsGirlCategories()\n\t\t\t\t{\t\n\t\t\t\t$sql = 'SELECT product_type. * , product_type_people.people_cat_id\n\t\t\t\tFROM product_type\n\t\t\t\tJOIN product_type_people ON product_type_people.product_type_id = product_type.product_type_id\n\t\t\t\tWHERE product_type_people.people_cat_id =\"4\"';\n\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tif($Q->num_rows()>0)\n\t\t\t\treturn $Q->result();\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\treturn \"empty\";\n\t\t\t\t}", "function getproduct($catid,$tag){\t\n\t\t$sql = 'SELECT `a`.`id`,`a`.`name`,`a`.`tag` FROM `'.DB_TABLE_PREFIX.'product` as `a` INNER JOIN `'.DB_TABLE_PREFIX.'catproductproduct` as `b` ON `a`.`id`=`b`.`productid` WHERE `b`.`catproductid`='.$catid;\t\t\n\t\tif($tag!=NULL){\n\t\t\t$sql.=' AND `a`.`tag` LIKE \"%'.$tag.'%\"';\t\t\t\n\t\t}\n\t\t_trace($sql);\n\t\treturn mysql_query($sql);\t\t\n\t}", "function getCatPro(){\n global $conn;\n if(isset($_GET['cat_id'])){\n $cat_id = $_GET['cat_id'];\n\n $get_cat_pro = \"SELECT * FROM categories WHERE cat_id = $cat_id\";\n $run_get_cat_pro = mysqli_query($conn, $get_cat_pro) or die(\"getCatPro query failed\");\n $row_get_cat_pro = mysqli_fetch_assoc($run_get_cat_pro);\n\n $cat_title = $row_get_cat_pro['cat_title'];\n $cat_desc = $row_get_cat_pro['cat_desc'];\n\n $cat_products = \"SELECT * FROM products WHERE cat_id = $cat_id\";\n $run_cat_products = mysqli_query($conn, $cat_products) or die(\"cat_products query failed\");\n $count = mysqli_num_rows($run_cat_products);\n\n if($count == 0){\n echo \"<div class='box'>\n <h3>No Products Found In This Category.</h3>\n </div>\";\n }else{\n echo \"<div class='box'>\n <h1 align='center' style='color:#286090;'>$cat_title</h1>\n <p>$cat_desc</p>\n </div>\";\n }\n\n while($row_get_product = mysqli_fetch_assoc($run_cat_products)){\n \n $pro_id = $row_get_product['product_id'];\n\t\t\t$pro_title = $row_get_product['product_title'];\n\t\t\t$pro_price = $row_get_product['product_price'];\n $pro_img1 = $row_get_product['product_img1'];\n\n echo \"<div class='col-md-4 col-sm-6 center-responsive'>\n <div class='product'>\n <a href='details.php?pro_id=$pro_id'>\n <img src='admin/product_images/insert_images/$pro_img1' class='img-responsive'>\n </a>\n <div class='text'>\n <h3><a href='details.php?pro_id=$pro_id'>$pro_title</a></h3>\n <p class='price'>INR $pro_price</p>\n <p class='buttons'>\n <a href='details.php?pro_id=$pro_id' class='btn btn-default'> View Details</a>\n <a href='details.php?pro_id=$pro_id' class='btn btn-primary'><i class='fa fa-shopping-cart'></i> Add To Cart</a>\n </p>\n </div>\n </div>\n </div>\";\n }\n\n }\n}", "public function readProductosCategoria(){\n $sql='SELECT nomCategoria, idProducto, producto.foto, nombre, producto.descripcion,precio FROM producto INNER JOIN categoria USING (idCategoria) WHERE idCategoria = ? AND producto.estado=1 AND producto.estadoEliminacion=1';\n $params=array($this->categoria);\n return Database::getRows($sql, $params);\n }", "function getCatProd(){\n\tif(isset($_GET['category'])){ //category wise product show korbe\n\n\t\t$cat_id=$_GET['category']; //getting the category selected from the user\n\t\tglobal $con;\n\t$get_cat_pro = \"select * from products where product_category='$cat_id'\"; //matching the selected category with the database\n\n\t$run_cat_pro = mysqli_query($con, $get_cat_pro);\n\n\t$count_cat=mysqli_num_rows($run_cat_pro); // it will count whether there are products associated with the category or not...\n\tif($count_cat==0){\n\t\techo\"<h2>Sorry, there is no product in this category. </h2>\";\n\t\texit(); \n\t}\n\n\twhile($row_cat_pro = mysqli_fetch_array($run_cat_pro)){\n\t\t$pro_id=$row_cat_pro['product_id'];\n\t\t$pro_title=$row_cat_pro['product_title'];\n\t\t$pro_category=$row_cat_pro['product_category'];\n\t\t$pro_price=$row_cat_pro['product_price'];\n\t\t$pro_image=$row_cat_pro['product_image'];\n \t\t//'?pro_id=$pro_id' =this is used for passing the id of the product to the next page\n\t\techo\"\n\t\t<div id='single_product'>\n\t\t<h3>$pro_title</h3>\n\t\t<img src='admin_area/product_images/$pro_image' width='200' height='200'/>\n\t\t<br>\n\t\t<p><i>TK: $pro_price</i></p>\n\t\t<br>\n\t\t<a href='details.php?pro_id=$pro_id'> <button style='background-color: #f44336; /* Green */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t border: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t color: white;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t padding: 5px 3px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t float:left;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t text-align: center;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t text-decoration: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t display: inline-block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t margin: 5px 2px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t cursor: pointer;\n\t\t\t\t\t\t\t\t\t\t\t\t'>Details</button></a> \n\n\t\t<a href='home.php?pro_id=$pro_id'><button style='background-color: #4CAF50; /* Green */\n border: none;\n color: white;\n padding: 5px 3px;\n float:right;\n text-align: center;\n text-decoration: none;\n display: inline-block;\n margin: 5px 2px;\n cursor: pointer;'>Add to Cart</button></a>\n\t\t</div>\n\t\t\";\n\n}}}", "public function EliminarCategorias()\n\t{\n\n\t\t$sql = \" select codcategoria from productos where codcategoria = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcategoria\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from categorias where codcategoria = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codcategoria);\n\t\t\t$codcategoria = base64_decode($_GET[\"codcategoria\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: categorias?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: categorias?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t}", "function shopay_pfc_sec( $section_cat_slugs ) {\n $i = 0;\n foreach( $section_cat_slugs as $section_cat_slug => $cat_value ) :\n $cat_slugs[$i] = $section_cat_slug;\n $i++;\n endforeach;\n $pfc_cat_args = array(\n 'post_status' => 'publish',\n 'post_type' => 'product',\n 'posts_per_page' => -1,\n 'tax_query' => array(\n array(\n 'taxonomy' => 'product_cat',\n 'field' => 'slug',\n 'terms' => $cat_slugs,\n ),\n ),\n );\n $pfc_cat_query = new WP_Query( $pfc_cat_args );\n if ( $pfc_cat_query -> have_posts() ) :\n while ( $pfc_cat_query -> have_posts() ) : $pfc_cat_query -> the_post();\n wc_get_template_part( 'content', 'product' );\n endwhile;\n endif;\n wp_reset_postdata();\n }", "public function getProducts($category) {\n $sql = \"SELECT * FROM products INNER JOIN categories on products.product_CategoryID = categories.category_ID WHERE category_Name = '\".$category.\"'\";\n //Commit the query\n $result = $this->connection->query($sql);\n //Parse result to JSON list\n $answer = '{\"products\": [';\n if ($result->num_rows > 0) {\n // output data of each row\n while($row = $result->fetch_assoc()) {\n $answer = $answer . '{\"ID\":\"' . $row[\"product_ID\"] . '\",' .\n '\"Name\": \"' . $row[\"product_Name\"] . '\",' .\n '\"Category\": \"' . $row[\"category_Name\"] . '\",' .\n '\"Price\": \"' . $row[\"product_Price\"] . '\",' .\n '\"Brand\": \"' . $row[\"product_Brand\"] . '\",' .\n '\"Description\": \"' . $row[\"product_Description\"] . '\",' .\n '\"ImagePath\": \"' . $row[\"product_ImagePath\"] .'\"},' ;\n }\n //Trim the last comma\n $answer=rtrim($answer,\", \");\n //Finish parsing\n $answer=$answer . \"]}\";\n //Return the list as a string\n return $answer;\n } else {\n echo \"0 results\";\n }\n }", "public function listadoProductos(){\n\n$sql = \"select idProducto,desc_Prod,presentacion,tipoProd,stock,m.nomMarca,c.nomCategoria,estadoProd from producto as p inner join Categoria as c ON c.idCategoria=p.idCategoria inner join Marca as m ON m.idMarca=p.idMarca where estadoProd=1 order by desc_Prod asc\";\n\t\n\n\n\t\treturn Yii::app()->db->createCommand($sql)->queryAll();\n\t}", "function affichercategories(){\r\n\t\t$sql=\"SElECT * From categorie\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "function getallproducts1($warehouseid){\n \n\n $products = $this->db->query(\"SELECT a.*, \n b.id AS productid, \n b.`name` AS productname, \n b.`main_image` AS productimage, \n b.`price` AS product_price, \n b.`tax` AS product_tax, \n b.`description` AS product_description, \n b.`move_product_id` AS productuniqueid_forimages,\n c.`name` AS cat_name, \n c.`image` AS cat_image, \n c.`category_id` AS category_id,\n d.`category_id` AS subcategory_id,\n d.`name` AS subcat_name, \n d.`image` AS subcat_image,\n d.`parent_id` AS parent_id,\n d.`shared_category` AS shared_category \n FROM warehouse_products a \n LEFT JOIN products b ON a.product=b.`id` \n LEFT JOIN category c ON b.`category_id` = c.`category_id` \n LEFT JOIN category d \n ON b.`sub_category_id` = d.`category_id` \n WHERE a.`warehouse` = \".$warehouseid.\" \n ORDER BY c.`name`, d.`name`\")->result();\n \n $sharedproducts=array();\n foreach($products as $product){\n if($product->shared_category !=null)\n array_push($sharedproducts, $product);\n }\n \n \n if(sizeof($products)>0){\n \n $this->db->query(\"TRUNCATE TABLE `tb_filteredproducts`\");\n \n foreach($products as $row) {\n $categoryimage=$row->cat_image;\n $imageheight=\"\";\n $imagewidth=\"\";\n if(strlen($categoryimage)>0){\n list($width, $height, $type, $attr) = getimagesize(\"https://mcflydelivery.com/public/uploads/category/thumbnail/\".$categoryimage);\n $imageheight=$height;\n $imagewidth=$width;\n }\n \n $query = \"INSERT INTO `tb_filteredproducts` set \n `id` = '\".$row->id.\"',\n `warehouse` = '\".$row->warehouse.\"',\n `product` = '\".$row->product.\"',\n `quantity` = '\".$row->quantity.\"',\n `min_capacity` = '\".$row->min_capacity.\"',\n `max_capacity` = '\".$row->max_capacity.\"',\n `avail_qty` = '\".$row->avail_qty.\"',\n `created_at` = '\".$row->created_at.\"',\n `updated_at` = '\".$row->updated_at.\"',\n `productid` = '\".$row->productid.\"',\n `productname` = '\".str_replace(\"'\",\"\",$row->productname).\"',\n `productimage` = '\".$row->productimage.\"',\n `product_price` = '\".$row->product_price.\"',\n `product_tax` = '\".$row->product_tax.\"',\n `product_description` = '\".$row->product_description.\"',\n `productuniqueid_forimages` = '\".$row->productuniqueid_forimages.\"',\n `cat_name` = '\".$row->cat_name.\"',\n `cat_image` = '\".$row->cat_image.\"',\n `cat_imageheight` = '\".$imageheight.\"',\n `cat_imagewidth` = '\".$imagewidth.\"',\n `category_id` = '\".$row->category_id.\"',\n `subcat_name` = '\".$row->subcat_name.\"',\n `subcategory_id` = '\".$row->subcategory_id.\"',\n `subcat_image` = '\".$row->subcat_image.\"',\n `parent_id` = '\".$row->parent_id.\"',\n `shared_category` = '\".$row->shared_category.\"';\";\n \n $this->db->query($query);\n \n }\n \n foreach($sharedproducts as $shared_product){ // for one shared product\n $sharedcategory_array= array();\n $sharedcategory_array=explode(\",\",$shared_product->shared_category);\n // print_r($shared_product);\n foreach($sharedcategory_array as $oneshared_category){\n if($oneshared_category !=$shared_product->category_id){ // if the shared category id item is not same with table id(current setted category id)\n // echo $oneshared_category;\n \n $selected_category_objectarray_from_categorytable = $this->db->where('category_id', $oneshared_category)->get('category')->result();\n \n if(sizeof($selected_category_objectarray_from_categorytable)>0){ // if the shared category is not deleted from category table\n $selected_category_object_from_categorytable=$selected_category_objectarray_from_categorytable[0];\n \n $categoryimage=$selected_category_object_from_categorytable->image;\n $imageheight=\"\";\n $imagewidth=\"\";\n if(strlen($categoryimage)>0){\n list($width, $height, $type, $attr) = getimagesize(\"https://mcflydelivery.com/public/uploads/category/thumbnail/\".$categoryimage);\n $imageheight=$height;\n $imagewidth=$width;\n }\n \n $query = \"INSERT INTO `tb_filteredproducts` set \n `id` = '\".$shared_product->id.\"',\n `warehouse` = '\".$shared_product->warehouse.\"',\n `product` = '\".$shared_product->product.\"',\n `quantity` = '\".$shared_product->quantity.\"',\n `min_capacity` = '\".$shared_product->min_capacity.\"',\n `max_capacity` = '\".$shared_product->max_capacity.\"',\n `avail_qty` = '\".$shared_product->avail_qty.\"',\n `created_at` = '\".$shared_product->created_at.\"',\n `updated_at` = '\".$shared_product->updated_at.\"',\n `productid` = '\".$shared_product->productid.\"',\n `productname` = '\".str_replace(\"'\",\"\",$shared_product->productname).\"',\n `productimage` = '\".$shared_product->productimage.\"',\n `product_price` = '\".$shared_product->product_price.\"',\n `product_tax` = '\".$shared_product->product_tax.\"',\n `product_description` = '\".$shared_product->product_description.\"',\n `productuniqueid_forimages` = '\".$shared_product->productuniqueid_forimages.\"',\n `cat_name` = '\".$selected_category_object_from_categorytable->name.\"',\n `cat_image` = '\".$selected_category_object_from_categorytable->image.\"',\n `cat_imageheight` = '\".$imageheight.\"',\n `cat_imagewidth` = '\".$imagewidth.\"',\n `category_id` = '\".$selected_category_object_from_categorytable->category_id.\"',\n `subcat_name` = '\".$shared_product->subcat_name.\"',\n `subcategory_id` = '\".$shared_product->subcategory_id.\"',\n `subcat_image` = '\".$shared_product->subcat_image.\"',\n `parent_id` = '\".$shared_product->parent_id.\"',\n `shared_category` = '\".$shared_product->shared_category.\"';\";\n \n $this->db->query($query);\n \n \n }\n }\n }\n } \n \n } \n \n \n $result = $this->db->query(\"SELECT * FROM `tb_filteredproducts` ORDER BY cat_name, subcat_name\")->result();\n return $result;\n }", "function getProducts(){\n\n/// getProducts function Code Starts ///\n\nglobal $db;\n\n$aWhere = array();\n\n/// Manufacturers Code Starts ///\n\nif(isset($_REQUEST['man'])&&is_array($_REQUEST['man'])){\n\nforeach($_REQUEST['man'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'manufacturer_id='.(int)$sVal;\n\n}\n\n}\n\n}\n\n/// Manufacturers Code Ends ///\n\n/// Products Categories Code Starts ///\n\nif(isset($_REQUEST['p_cat'])&&is_array($_REQUEST['p_cat'])){\n\nforeach($_REQUEST['p_cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'p_cat_id='.(int)$sVal;\n\n}\n\n}\n\n}\n\n/// Products Categories Code Ends ///\n\n/// Categories Code Starts ///\n\nif(isset($_REQUEST['cat'])&&is_array($_REQUEST['cat'])){\n\nforeach($_REQUEST['cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'cat_id='.(int)$sVal;\n\n}\n\n}\n\n}\n\n/// Categories Code Ends ///\n\n$per_page=12;\n\nif(isset($_GET['page'])){\n\n$page = $_GET['page'];\n\n}else {\n\n$page=1;\n\n}\n\n$start_from = ($page-1) * $per_page ;\n\n$sLimit = \" order by 1 DESC LIMIT $start_from,$per_page\";\n\n$sWhere = (count($aWhere)>0?' WHERE '.implode(' or ',$aWhere):'').$sLimit;\n\n$get_products = \"select * from products \".$sWhere;\n\n$run_products = mysqli_query($db,$get_products);\n\nwhile($row_products=mysqli_fetch_array($run_products)){\n\n$pro_id = $row_products['product_id'];\n\n$pro_title = $row_products['product_title'];\n\n$pro_price = $row_products['product_price'];\n\n$pro_img1 = $row_products['product_img1'];\n\n$pro_label = $row_products['product_label'];\n\n$manufacturer_id = $row_products['manufacturer_id'];\n\n$get_manufacturer = \"select * from manufacturers where manufacturer_id='$manufacturer_id'\";\n\n$run_manufacturer = mysqli_query($db,$get_manufacturer);\n\n$row_manufacturer = mysqli_fetch_array($run_manufacturer);\n\n$pro_psp_price = $row_products['product_psp_price'];\n\n$pro_url = $row_products['product_url'];\n\n\nif($pro_label == \"Sale\" or $pro_label == \"Gift\"){\n\n$product_price = \"<del> PHP$pro_price </del>\";\n\n$product_psp_price = \"| PHP$pro_psp_price\";\n\n}\nelse{\n\n$product_psp_price = \"\";\n\n$product_price = \"PHP$pro_price\";\n\n}\n\n\nif($pro_label == \"\"){\n\n\n}\nelse{\n\n$product_label = \"\n\n<a class='label sale' href='#' style='color:black;'>\n\n<div class='thelabel'>$pro_label</div>\n\n<div class='label-background'> </div>\n\n</a>\n\n\";\n\n}\n\nif(empty($product_label)){\necho \"\n<div class='col-md-3 col-sm-4 center-responsive' >\n\n<div class='product product-shop' >\n\n<a href='$pro_url' >\n\n<img src='admin_area/product_images/$pro_img1' class='img-responsive-product-single' >\n\n</a>\n\n<div class='text' >\n\n<h3><a href='$pro_url' ><p class='shop-title-text'>$pro_title</a></p></h3>\n\n<p class='price-text' > $product_price $product_psp_price </p>\n\n</div>\n\n\n</div>\n\n</div>\n\";\n}\n\nelse{\n\n echo \"\n<div class='col-md-3 col-sm-4 center-responsive' >\n\n<div class='product product-shop' >\n\n<a href='$pro_url' >\n\n<img src='admin_area/product_images/$pro_img1' class='img-responsive-product-single' >\n\n</a>\n\n<div class='text' >\n\n<h3><a href='$pro_url' ><p class='shop-title-text'>$pro_title</a></p></h3>\n\n<p class='price-text' > $product_price $product_psp_price </p>\n\n</div>\n\n$product_label\n\n\n</div>\n\n</div>\n\";\n\n\n\n}\n}\n/// getProducts function Code Ends ///\n\n}", "function category($slug = FALSE)\n\t {\n\t\t\tif ($this->input->post('price_range'))\n\t\t\t{\n\t\t\t\t$url = current_url().'?'.($this->input->get('price') ? preg_replace('/(^|&)price=[^&]*/', '&price='.$this->input->post('price'), $_SERVER['QUERY_STRING']) : $_SERVER['QUERY_STRING'].'&price='.$this->input->post('price'));\n\t\t\t\t// redirect to back here.\n\t\t\t\tredirect($url, 'refresh');\n\t\t\t}\n\n\t\t\t$this->data['category'] = $this->category_model->get_categories($slug);\n\n\t\t\tif (! $this->data['category'])\n\t\t\t{\n\n\t\t\t\t// Get any status message that may have been set.\n\t\t\t\t$this->data['message'] = $this->session->flashdata('message');\n\t\t\t\t$this->load->view('public/errors_view', $this->data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$product_options = array(\n\t\t\t\t\t'attribute' => $this->input->get('ATB')\n\t\t\t\t);\n\t\t\t\tif ($slug) $product_options['category_id'] = $this->data['category']->id;\n\t\t\t\t\n\t\t\t\t// Get products.\n\t\t\t\t$products = $this->store->products($product_options);\n\t\t\t\t\n\t\t\t\t$this->data['products'] = $products['rows'];\t\n\t\t\t\t$this->data['total'] = $products['total'];\t\n\t\t\t\t$this->data['pagination'] = $products['pagination'];\n\n\t\t\t\t$this->data['min_price'] = $this->product_model->min_price($this->data['category']->id);\n\t\t\t\t$this->data['max_price'] = $this->product_model->max_price($this->data['category']->id);\n\t\t\t\t$this->data['price_range'] = ($this->input->get('price')) ? $this->input->get('price') : $this->data['max_price'];\n\n\t\t\t\t// Get any status message that may have been set.\n\t\t\t\t$this->data['message'] = $this->session->flashdata('message');\n\n\t\t\t\t$this->load->view('public/products/category_view', $this->data);\n\t\t\t}\n\t\t}", "public function catDisplay(){\n $query = \"SELECT * FROM shop_category\";\n $result = $this->db->select($query);\n\n return $result;\n }", "public function Products_cate_home() {\n $this->db->select('product.id as pro_id,product.alias as pro_alias,product_category.alias,\n product.price,product.price_sale,product.name,product.image,product.category_id,product_category.id,\n product_category.home, product_category.name as cate_name');\n $this->db->join('product_category', 'product.category_id=product_category.id');\n $this->db->where('product.home', '1');\n $this->db->limit(12);\n $this->db->order_by('id', 'random');\n $q = $this->db->get('product');\n return $q->result();\n }", "private function getPopularCategories()\n {\n $query = Queries::$getPopularCategories;\n\n try {\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n $this->successResponse($result);\n } catch (\\PDOException$e) {\n $this->errorResponse($e->getMessage());\n }\n }", "public function getAllProduct(){\n $this->db->select('p.id,p.title,p.image,c.category');\n $this->db->from('product p, category c');\n $this->db->where('p.status','t');\n $this->db->where('p.category_id=c.id');\n $this->db->order_by(\"id\", \"desc\");\n $query = $this->db->get();\n return $query->result(); \n }", "function displayCategory($catid)\n\t{\n\t\t$sql = \"SELECT category_id,category_name FROM category_table where category_parent_id=0\";\n\t\t\n\t\t$query = new Bin_Query();\n\t\t\n\t\t$query->executeQuery($sql);\n\n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql1='select * from products_table where product_id='.$id;\t\t\n\t\t\t$obj1=new Bin_Query();\t\t\t\n\t\t\t$obj1->executeQuery($sql1);\t\t\t\t\t\t\n\t\t\t$category=$obj1->records[0]['category_id'];\n\t\t\t\n\t\t\n\t \t}\n\t\t\n\t\treturn Display_DManageProducts::displayCategory($query->records,$category);\t\n\t}", "function Index($category_id=\"all_categories\",$current_city=\"all_cities\")\n\t{\n\t\t$this->set(\"current_category_id\",$category_id);\n\t\t$this->set(\"current_city\",$current_city);\n\t\t\n\t\t//DEFINE BACK URL\n\t\t$this->Session->write('back_url',$this->settings['site_url'].$this->params[\"url\"][\"url\"]);\n\t\t\n\t\t//GET DATA\n\t\t$this->loadModel(\"Product\");\n\t\t$filtering\t\t\t=\t$this->Product->GetData($category_id,$current_city,\"MotorGede\");\n\t\t$this->paginate\t\t=\tarray(\n\t\t\t'Product'\t=>\tarray(\n\t\t\t\t'limit'\t\t\t=>\t20,\n\t\t\t\t'order'\t\t\t=>\t$filtering['order'],\n\t\t\t\t'group'\t\t\t=>\tarray('Product.id'),\n\t\t\t\t'fields'\t\t=>\t$filtering['fields'],\n\t\t\t\t'conditions'\t=>\t$filtering['conditions'],\n\t\t\t)\n\t\t);\n\t\t\n\t\t$data\t\t\t\t=\t$this->paginate('Product');\n\t\t$title_for_layout\t=\t$filtering['title'];\n\t\t$site_description\t=\t\"Jual motor, cari motor bekas atau baru. \" . $filtering['title'] . \" Ratusan iklan jual beli motor baru dan bekas terbaru diiklankan setiap harinya.\";\n\t\t$site_keywords\t\t=\t$filtering['keywords'].\",\".implode(\", \",explode(\" \",$title_for_layout));\n\t\t$this->set(compact(\"data\",\"title_for_layout\",\"site_keywords\",\"site_description\"));\n\n\t\t\n\t\tif(empty($data))\n\t\t{\n\t\t\t$error_msg\t\t\t=\t$this->Product->NotFoundMsg($category_id,$current_city);\n\t\t\t$this->set(compact(\"error_msg\"));\n\t\t\t\n\t\t\t$category_others\t=\t$this->Product->GetCategoryOthers($category_id,$current_city,$type=\"MotorGede\");\n\t\t\t$this->set(compact(\"category_others\"));\n\t\t\t\n\t\t\t$province_others\t=\t$this->Product->GetProvinceOthers($category_id,$current_city,$type=\"MotorGede\");\n\t\t\t$this->set(compact(\"province_others\"));\n\t\t\t\n\t\t\t//DEFINE CATEGORY\n\t\t\t$this->loadModel(\"Category\");\n\t\t\t$cat\t\t\t=\t$this->Category->findById($category_id);\n\t\t\t$category_name\t=\t($cat['Category']['parent_id'] == $this->Category->GetTop()) ? $cat['Category']['name'] : $cat['Parent']['name'].\" \".$cat['Category']['name'];\n\t\t\t$this->set(compact(\"category_name\"));\n\t\t\t\n\t\t\t//PROVINCE NAME\n\t\t\t$this->loadModel(\"ProvinceGroup\");\n\t\t\t$province\t\t\t=\t$this->ProvinceGroup->findById($current_city);\n\t\t\t$province_name\t\t=\t$province['ProvinceGroup']['name'];\n\t\t\t$this->set(compact(\"province_name\"));\n\t\t}\n\t}", "function getCatPro(){\n global $db;\n if (isset($_GET['cat'])) {\n $cat_id= $_GET['cat'];\n $get_cat_pro = \"SELECT * FROM products where cat_id='$cat_id'\";\n $run_cat_pro = mysqli_query($db, $get_cat_pro);\n $count = mysqli_num_rows($run_cat_pro);\n if ($count==0) {\n echo \"<h2>No Products found in this category!</h2>\";\n }\n while ($row_cat_pro=mysqli_fetch_array($run_cat_pro)) {\n $pro_id = $row_cat_pro['product_id'];\n $pro_title = $row_cat_pro['product_title'];\n $pro_cat = $row_cat_pro['cat_id'];\n $pro_brand = $row_cat_pro['brand_id'];\n $pro_desc = $row_cat_pro['product_desc'];\n $pro_price = $row_cat_pro['product_price'];\n $pro_image = $row_cat_pro['product_img1'];\n\n echo \"\n <div id='single_product'>\n <h3 style='padding-bottom:3px;' >$pro_title</h3>\n <img src='admin_area/product_images/$pro_image' width='180' height='180' /><br/>\n <p><b>Price: $pro_price</b></p>\n <a href='details.php?pro_id=$pro_id' style='float:left;'>Details</a>\n <a href='index.php?add_cart=$pro_id'><button style='float:right;'>Add to Cart</button></a>\n </div>\n \";\n }\n }\n }" ]
[ "0.7170336", "0.6707931", "0.64022624", "0.6401307", "0.6354842", "0.63363266", "0.63232625", "0.6307129", "0.6306867", "0.6305609", "0.6293592", "0.62883866", "0.6254771", "0.62331843", "0.6231656", "0.62043464", "0.6187993", "0.61683255", "0.61442244", "0.6136844", "0.61225146", "0.611417", "0.61101407", "0.61067575", "0.6103777", "0.6089899", "0.6075734", "0.60693306", "0.60568625", "0.6028689", "0.60255617", "0.60236496", "0.6022206", "0.60205984", "0.60182595", "0.60176456", "0.6014166", "0.5995406", "0.5984273", "0.5982234", "0.59817463", "0.5977153", "0.5976984", "0.5974223", "0.5973484", "0.59696555", "0.5949168", "0.59396756", "0.5926955", "0.59260255", "0.59245586", "0.59152013", "0.59126794", "0.5909391", "0.59057564", "0.5902794", "0.59002393", "0.58947504", "0.58831686", "0.5882707", "0.58722734", "0.5870899", "0.5868823", "0.58663684", "0.58587384", "0.5858366", "0.5856554", "0.58477056", "0.58389115", "0.58355397", "0.5835523", "0.58321863", "0.58308125", "0.58304083", "0.5829794", "0.5825584", "0.5820457", "0.5815579", "0.5813737", "0.58090353", "0.5805506", "0.5804935", "0.5800125", "0.5798847", "0.5792097", "0.5773322", "0.577019", "0.57697463", "0.5769243", "0.5765739", "0.57652307", "0.5762155", "0.5761669", "0.5760173", "0.5759149", "0.57586676", "0.57555526", "0.5752807", "0.57499254", "0.5742056", "0.5740532" ]
0.0
-1
end bh products category loop add sorting scripts to footer add_action('genesis_after_footer','bh_ajax_sort_posts');
function bh_ajax_sort_posts(){ ?> <script> //add drop-downs to js pages $jq('.select-post-sorting').html( '<form action="#">Sort by:<select name="posts_sort" class="posts_sort"><option value="newest">Release Date, Newest First</option><option value="oldest">Release Date, OIdest First</option><option value="az">Product Title, A-Z</option><option value="za">Product Title, Z-A</option></select> Quantity: <select name="posts_number" class="posts_number"><option value="10">10</option><option value="15">15</option><option value="20">20</option><option value="25" selected>25</option><option value="50">50</option></select></form>' ); //collect dropdown data $jq('.select-post-sorting select').on('change',function(){ //get value from each box $sortby = $jq('.posts_sort').val(); $number = $jq('.posts_number').val(); var loc = String(window.location); $link = loc.substring(0,(loc.lastIndexOf('/')+1)); switch($sortby){ case 'oldest': o = '?orderby=pubdate&order=ASC'; break; case 'az': o = '?orderby=title&order=ASC'; break; case 'za': o = '?orderby=title&order=DESC'; break; default: //newest o = '?orderby=pubdate&order=DESC'; } if($number){ n='&ppp='+$number; }else{ n='&ppp=25'; //default 25 } $link = $link + o + n; //v1 - load new page in div $plist = $jq('.product-category.product-list'); $plist.fadeOut(300,function(){ $jq(this).load($link + ' .product-category.product-list',function(){ $plist.fadeIn(500); // update page url/hash if($link!=window.location){ //window.history.pushState({path:$link},'',$link); } // if new url doesn't match current location }); //end load }); //end fade }); //end jq </script> <?php //v2 - use admin-ajax }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jigoshop_categories_scripts () {\n\t\n\tif( !isset($_GET['taxonomy']) || $_GET['taxonomy'] !== 'product_cat') return;\n\t\n\twp_register_script('jigoshop-categories-ordering', jigoshop::plugin_url() . '/assets/js/categories-ordering.js', array('jquery-ui-sortable'));\n\twp_print_scripts('jigoshop-categories-ordering');\n\t\n}", "function _asc_footer_scripts() {\n\tprint_late_styles();\n\tprint_footer_scripts();\n}", "function script_enqueue() {\n\t$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );\n\tisset($term->term_id) ? $is_detailed_category = get_woocommerce_term_meta( $term->term_id, '_woocommerce_detailed_category', true ) : $is_detailed_category = 0;\n\tif ($is_detailed_category) {\n\t\t// only load ad-gallery if is post : prevent from loading on other pages\n\t\twp_register_script('wc_dc_sortable', plugins_url('/assets/js/sortable.min.js', __FILE__));\n\t\twp_enqueue_script('wc_dc_sortable');\n\t\twp_register_script('wc_dc_loading_cart', plugins_url('/assets/js/loading-cart.min.js', __FILE__));\n\t\twp_enqueue_script('wc_dc_loading_cart');\n\t\twp_register_style( 'wc_dc_sortable_style', plugins_url('/assets/css/style.css', __FILE__) );\n\t\twp_enqueue_style( 'wc_dc_sortable_style' );\n\t}\n}", "function bh_products_category_loop(){\n//post sorting\n\n\n?>\n\n<?php\n//display content\n?>\t\n\n<div class=\"inner\">\n<div class=\"sidebar grid col-220 product-categories\">\n<?php //get_sidebar(); \n//should only be child category, so display parent.\n\nif (is_category()) {\n$this_category = get_category( get_query_var( 'cat' ) );\n}\n\n\n\n//if child category\nif($this_category->category_parent) {\n$parent_cat = get_category($this_category->category_parent);\n//check for third-level cat\n\tif($parent_cat->category_parent){\n\t\t$parent_parent = get_category($parent_cat->category_parent);\n\t\techo '<h2><a href=\"'. get_category_link($parent_parent->cat_ID) .'\">'. $parent_parent->name .'</a></h2>';\n\t\techo '<ul>';\n\t\t$categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$parent_cat->category_parent.\"&orderby=slug&hide_empty=0&exclude=1649\"); \t\n\t\techo '</ul>';\n\t\t\n\tif ($parent_parent->name == \"Apps\"){\n\techo '<p>&nbsp;</p>';\n\techo '<h2>Platforms</h2>';\n\techo '<ul>';\n\t$platforms = \twp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649');\n\techo '</ul>';\n\t\n}\n\t\t\n\t}else{\n\t\techo '<h2><a href=\"'. get_category_link($parent_cat->cat_ID) .'\">'. $parent_cat->name .'</a></h2>';\n\t\techo '<ul>';\n\t\t$categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->category_parent.\"&orderby=slug&hide_empty=0&exclude=1649\"); \n\t\techo '</ul>';\n\t\t\n\t\tif ($parent_cat->name == \"Apps\"){\n\techo '<p>&nbsp;</p>';\n\techo '<h2>Platforms</h2>';\n\techo '<ul>';\n\t$platforms = \twp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649');\n\techo '</ul>';\n\t\n}\n\t}\n}else{\n\n//if top-level category\necho '<h2>'. $this_category->name .'</h2>';\necho '<ul>';\n$categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->cat_ID.\"&orderby=slug&hide_empty=0&exclude=1649\");\necho '</ul>';\n\nif ($this_category->name == \"Apps\"){\n\techo '<p>&nbsp;</p>';\n\techo '<h2>Platforms</h2>';\n\techo '<ul>';\n\t$platforms = \twp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649');\n\techo '</ul>';\n\t\n}\n}\necho '<p>&nbsp;</p>';\n\n\n\n ?>\n\t\n\n</div>\n\n <div id=\"content\" class=\"grid col-700 fit\">\n <!-- <div class=\"select-post-sorting\"></div> -->\n\t\t<?php \n\t\t$cat = get_query_var('cat');\n\t\t$category_info = get_category($cat);\n\t\t//echo 'Is first level? = '. $category_info->parent;\n\t\t\n\t\t$parent_info = get_category($category_info->parent);\n\t\t//echo 'Is second level? = '. $parent_info->parent;\n\t\t\n\t\t$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; //pagination\t\t\n\t\t//$ext_query = '&meta_key=wpcf-pubdate&orderby=meta_value_num&posts_per_page=25&paged='.$paged.'';\n\t\t$sort_meta_key = 0; //init\n\t\t//get sort information from query vars or defaults\n\t\t$sort_orderby = (get_query_var('orderby')) ? get_query_var('orderby') : 'pubdate';\n\t\t$sort_order = (get_query_var('order')) ? get_query_var('order') : 'DESC';\n\t\t$sort_posts_per_page = (get_query_var('ppp')) ? get_query_var('ppp') : '25';\n\t\t\n\t\tif($sort_orderby =='pubdate'){\n\t\t\t$sort_orderby = 'meta_value_num';\n\t\t\t$sort_meta_key = 'wpcf-pubdate';\n\t\t}\n\t\n\t\t$ext_query = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'post_type'=>'products',\n\t\t\t\t\t\t\t\t\t\t\t\t'category_name'=>$category_info->slug,\n\t\t\t\t\t\t\t\t\t\t\t\t'meta_key'=>'wpcf-pubdate',\n\t\t\t\t\t\t\t\t\t\t\t\t'orderby'=>'meta_value_num',\n\t\t\t\t\t\t\t\t\t\t\t\t'order'=>'DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t'posts_per_page'=>'25',\n\t\t\t\t\t\t\t\t\t\t\t\t'tag'=>'listed',\n\t\t\t\t\t\t\t\t\t\t\t\t'paged'=>$paged\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tif($sort_meta_key){\n\t\t\t$ext_query['meta_key'] = $sort_meta_key;\t\n\t\t}\n\t\t\n\t\t$title_qual = \"\";\n\t\t//query_posts($query_string . $ext_query );\n\t\tglobal $wp_query;\n\t\t//show only main product of groups, if product-group-parent field is populated, hide the post\n\t\t//edit: needs refinement - only for Bibles, and needs to compare non-existent OR blank\n\t\t// modified 3/18/14 to use custom SQL searching indexed taxonomy instead of custom field\n\t\t\n\t\t\n\t\t$newQuery = $ext_query;\n\t\t//$newQuery = array_replace($wp_query->query_vars, $ext_query);// + $p_groups; //changed for WP 4.0 something in WP_Query changed, found 0 posts\n\t\t//var_dump($newQuery);\n\t\n\t\t\t$books_in_cat = new WP_Query($newQuery);\n\t\t\n\t\t//echo '<br/>#posts: '.$books_in_cat->found_posts; //troubleshooting\n\t\t\t\nif ($books_in_cat->have_posts()) : ?>\n<div>\n<div class=\"product-category product-list\">\n<h2><?php echo $title_qual; ?><?php single_cat_title(); ?> </h2>\n<ul>\n\t\t<?php while ($books_in_cat->have_posts()) : $books_in_cat->the_post(); ?>\n \n <li id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\n\t\t<?php\n\t\t\t bh_thumbnail(get_the_ID(),'medium',true);\n\t\t\t \n\t\t\t $product_title = get_the_title(); //init\n\t\t\t $pg_names = array(); //init\n\t\t\t \n\t\t\t if (has_term('listed','post_tag')){\n\t\t\t\t $pg_names = wp_get_post_terms(get_the_ID(),'product-group',array('fields'=>'names'));\n\t\t\t\t if (!empty($pg_names)){\n\t\t\t\t\t$product_title = reset($pg_names);//change to product group title\n\t\t\t\t }\n\t\t\t\t $pg_names = array(); //re-initalize array\n\t\t\t }\n\t\t\t \n\t\t\t $short_title = wp_trim_words($product_title,8);\n?>\n <a href=\"<?php the_permalink(); ?>\"><?php echo $short_title; ?></a>\n \t\t\t\t<?php $pubdate = get_post_meta(get_the_ID(),'wpcf-pubdate',true); \n\t\t\t\t\t\t\t//turn pubdate into Month Year\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t//modify product list display\n\t\t\t\t\t\t\t//if title is too long, don't show subtitle/authors\n\t\t\t\t\t\t\tif(strlen(get_the_title())<32){\n\t\t\t\t\t\t\t\t//get current category or parent category\n\t\t\t\t\t\t\t\t//get category\n\t\t\t\t\t\t\t\tif($parent_info){\n\t\t\t\t\t\t\t\t\t//if child category\n\t\t\t\t\t\t\t\t\t$current_cat = $parent_info->slug;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$current_cat = $category_info->slug;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//ge\tt subtitle\n\t\t\t\t\t\t\t$p_subtitle = types_render_field('subtitle', array(\"raw\"=>\"true\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//if Bibles or Reference, show subtitle\n\t\t\t\t\t\t\t//echo $current_cat;\n\t\t\t\t\t\t\tif($current_cat =='bibles' || $current_cat == 'reference' || $category_info->slug == 'commentaries' ):\n\t\t\t\t\t\t\t?>\n <span class=\"author-names\"><?php echo $p_subtitle ?></span>\n <?php\t\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t//else show author(s)\t\n\t\t\t\t\t\t\t//get author name(s)\n\t\t\t\t\t\t\t$a_list=false;\n\t\t\t\t\t\t\t$a_terms = wp_get_post_terms(get_the_ID(), 'a', array(\"fields\" => \"names\"));\n\t\t\t\t\t\t\tif($a_terms){\n\t\t\t\t\t\t\t\t$a_list = implode(', ', $a_terms);\t\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif($a_list){\n\t\t\t\t\t\t\t?>\n <span class=\"author-names\"><?php echo $a_list; ?></span>\n <?php\n\t\t\t\t\t\t\t}elseif ($p_subtitle){\n\t\t\t\t\t\t\t//no authors (?) - show subtitle if exists\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t <span class=\"author-names\"><?php echo $p_subtitle; ?></span>\n <?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//title too long, no room for other text\n\t\t\t\t\t\t\t}\n ?>\n </li><!-- end of #post-<?php the_ID(); ?> -->\n \n\n \n <?php endwhile; \n\t\t if(!$hide_navi){\n\t\t if(function_exists('wp_pagenavi')) { \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twp_pagenavi( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'query' =>$books_in_cat \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t }\n\t\t\n\t\t?> \n \n\t\t</ul>\n </div>\n\t <?php else : ?>\n\n <!-- <h1 class=\"title-404\"><?php _e('404 &#8212; Fancy meeting you here!', 'minimum'); ?></h1> -->\n \n <p><?php _e('No products found in '. $parent_info->name.' > '. single_cat_title('',false) .'.', 'minimum'); ?></p>\n \n <!-- <h6><?php printf( __('You can return %s or search for the page you were looking for.', 'minimum'),\n\t sprintf( '<a href=\"%1$s\" title=\"%2$s\">%3$s</a>',\n\t\t esc_url( get_home_url() ),\n\t\t esc_attr__('Home', 'minimum'),\n\t\t esc_attr__('&larr; Home', 'minimum')\n\t )); \n\t\t\t ?></h6>\n \n <?php get_search_form(); ?> -->\n\n<?php endif; ?> \n \n </div><!-- end of #content -->\n</div>\n</div>\n<?php\n}", "function codepress_footer_js()\n {\n }", "function asc_print_footer_scripts() {\n\t/**\n\t * Fires when footer scripts are printed.\n\t *\n\t * @since 2.8.0\n\t */\n\tdo_action( 'asc_print_footer_scripts' );\n}", "function _wp_footer_scripts()\n {\n }", "function wp_footer() {\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "function ct_js_to_footer() {\n remove_action( 'wp_head', 'wp_print_scripts' );\n remove_action( 'wp_head', 'wp_print_head_scripts', 9 );\n remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );\n}", "public function after_footer_scripts_code () {\n // Sets initial JS variables value\n ?>\n <script type=\"text/javascript\">\n ct_current_role = '<?php echo $this->role; ?>';\n ct_current_orderby = '<?php echo $this->orderby; ?>';\n ct_current_order = '<?php echo $this->order; ?>';\n ct_current_page = <?php echo $this->page; ?>;\n ct_total_pages = <?php echo $this->total_pages; ?>;\n </script>\n <?php\n }", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "protected function after_filter()\n {\n $this->render('footer.php');\n }", "function woocommerce_rrp_add_bulk_admin_footer() {\n\t\t\tglobal $post_type;\n\t\t\t\n\t\t\tif($post_type == 'product') {\n\t\t\t\t?>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\t\tjQuery('<option>').val('set_price_to_rrp').text('<?php _e('Set price to RRP')?>').appendTo(\"select[name='action']\");\n\t\t\t\t\t\t\tjQuery('<option>').val('set_price_to_rrp').text('<?php _e('Set price to RRP')?>').appendTo(\"select[name='action2']\");\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>\n\t\t\t\t<?php\n\t \t}\n\t\t}", "protected function add_footer_scripts() {\n\t\t\tdo_action( 'admin_print_footer_scripts' );\n\t\t}", "public function custom_bulk_admin_footer() {\n\t\tglobal $post_type;\n\t\t\n\t\tif($post_type == 'post') {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\tjQuery('<option>').val('build').text('<?php _e('Build flat file')?>').appendTo(\"select[name='action']\");\n\t\t\t\t\t\tjQuery('<option>').val('build').text('<?php _e('Build flat file')?>').appendTo(\"select[name='action2']\");\n\t\t\t\t\t\tjQuery('#doaction').on('click', function(e) {\n\t\t\t\t\t\t\t// e.preventDefault();\n\t\t\t\t\t\t\tif(jQuery('#bulk-action-selector-top')[0].value == 'build') {\n\t\t\t\t\t\t\t\tif (jQuery('.updated')[0]) {\n\t\t\t\t\t\t\t\t\tjQuery('.updated').html('<p style=\"display:inline-block;\">Currently building...<span style=\"margin-top:0;\" class=\"spinner is-active\"></span></p>');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tjQuery('.wrap h1').after('<div class=\"updated\"><p style=\"display:inline-block;\">Currently building...<span style=\"margin-top:0;\" class=\"spinner is-active\"></span></p></div>');\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</script>\n\t\t\t<?php\n \t}\n\t}", "function wpstocks_action_javascript_footer()\n{\n}", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}", "function add_late_scripts()\n\t{\n\t\t// only procceed if we have finished printing footer scripts\n\t\tif (did_action('bwp_minify_after_footer_scripts'))\n\t\t\t$this->todo_late_scripts = 'footer' . $this->late_script_order;\n\t}", "function addWPActions ()\n\t{\n\t\t//Add Front End Jquery and CSS\n\t\t//add_action( 'wp_footer', array( $this, 'frontendEnqueues' ) );\n\t\t\n\t}", "function ajax_footer_js(){\n ?>\n <script type=\"text/javascript\">\n jQuery(document).ready(function($){\n // Ajax Chosen Product Selectors\n jQuery(\"select.ajax_chosen_select_tabs\").select2({});\n });\n </script>\n <?php\n }", "function ajax_filter_posts_scripts() {\n // Enqueue script\n //wp_register_script('afp_script', 'get_template_directory_uri() . '/js-folder/'ajax-filter-posts.js', false, null, false);\n wp_register_script('afp_script', get_template_directory_uri().'/assets/ajax-filter-posts.js', false, null, false);\n wp_enqueue_script('afp_script');\n\n wp_localize_script( 'afp_script', 'afp_vars', array(\n 'afp_nonce' => wp_create_nonce( 'afp_nonce' ), // Create nonce which we later will use to verify AJAX request\n 'afp_ajax_url' => admin_url( 'admin-ajax.php' ),\n )\n );\n}", "function wp_print_footer_scripts()\n {\n }", "public function bulk_action_scripts() {\n\t\t \tglobal $post_type;\n\t\t\tif( $post_type == 'shop_order' ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-export',\n\t\t\t\t\tplugins_url( 'js/dropbox-export.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-export' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\n\t\t}", "public function print_scripts() {\n\t\tglobal $pagenow, $hook_suffix;\n\t\t$pages = array( 'edit.php' );\n\n\t\tif ( in_array( $pagenow, $pages ) ) {\n\t\t\twp_register_script( 'reorder_nested', AERIA_RESOURCE_URL . 'js/jquery.mjs.nestedSortable.js', array( 'jquery-ui-sortable' ), '1.3.5', true );\n\t\t\twp_enqueue_script( 'reorder_posts', AERIA_RESOURCE_URL . 'js/reorder-sort.js', array( 'reorder_nested' ) );\n\t\t\twp_localize_script( 'reorder_posts', 'reorder_posts', array(\n\t\t\t\t'expand' => esc_js( __( 'Expand', 'reorder' ) ),\n\t\t\t\t'collapse' => esc_js( __( 'Collapse', 'reorder' ) ),\n\t\t\t\t'sortnonce' => wp_create_nonce( 'sortnonce' ),\n\t\t\t\t'hierarchical' => is_post_type_hierarchical( $this->post_type ) ? 'true' : 'false',\n\t\t\t) );\n\t\t}\n\t}", "public function hookFooter()\n {\n $ga_scripts = '';\n $this->js_state = 0;\n\n if (isset($this->context->cookie->ga_cart)) {\n $this->filterable = 0;\n\n $gacarts = unserialize($this->context->cookie->ga_cart);\n foreach ($gacarts as $gacart) {\n if ($gacart['quantity'] > 0) {\n } elseif ($gacart['quantity'] < 0) {\n $gacart['quantity'] = abs($gacart['quantity']);\n }\n }\n unset($this->context->cookie->ga_cart);\n }\n\n $controller_name = Tools::getValue('controller');\n $products = $this->wrapProducts($this->context->smarty->getTemplateVars('products'), [], true);\n\n if ($controller_name == 'order' || $controller_name == 'orderopc') {\n $this->eligible = 1;\n $step = Tools::getValue('step');\n if (empty($step)) {\n $step = 0;\n }\n }\n\n if (version_compare(_PS_VERSION_, '1.5', '<')) {\n if ($controller_name == 'orderconfirmation') {\n $this->eligible = 1;\n }\n } else {\n $confirmation_hook_id = (int) Hook::getIdByName('orderConfirmation');\n if (isset(Hook::$executed_hooks[$confirmation_hook_id])) {\n $this->eligible = 1;\n }\n }\n\n if (isset($products) && count($products) && $controller_name != 'index') {\n if ($this->eligible == 0) {\n $ga_scripts .= $this->addProductImpression($products);\n }\n $ga_scripts .= $this->addProductClick($products);\n }\n\n return $this->_runJs($ga_scripts);\n }", "function my_footer_shh() {\n remove_filter( 'update_footer', 'core_update_footer' );\n}", "function tmpl_archives_sorting_opt(){\r\n\tglobal $wp_query,$sort_post_type;\r\n\t\r\n\tif(!is_search()){\r\n\t\t$post_type = (get_post_type()!='')? get_post_type() : get_query_var('post_type');\r\n\t\t$sort_post_type = apply_filters('tmpl_tev_sorting_for_'.$post_type,$post_type);\r\n\t\t\r\n\t}else{\r\n\t\t/* on search page what happens if user search with multiple post types */\r\n\t\tif(isset($_REQUEST['post_type'])){\r\n\t\t\tif(is_array($_REQUEST['post_type']) && count($_REQUEST['post_type'])==1){\r\n\t\t\t\t$sort_post_type= $_REQUEST['post_type'][0];\r\n\t\t\t}else{\r\n\t\t\t\t$sort_post_type= $_REQUEST['post_type'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\tif(!$sort_post_type){\r\n\t\t\t\t$sort_post_type='directory';\r\n\t\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t$templatic_settings=get_option('templatic_settings');\r\n\t$googlemap_setting=get_option('city_googlemap_setting');\r\n\t\r\n\t/*custom post type link */\r\n\t$current_posttype = get_post_type();\r\n\t\r\n\tif(empty($current_posttype)){\r\n\t\t$current_posttype = $wp_query->query['post_type'];\r\n\t}\r\n\t\t\r\n\tif(!is_tax() && is_archive() && !is_search())\r\n\t{\r\n\t\t$current_term = $wp_query->get_queried_object();\t\t\r\n\t\t$permalink = get_post_type_archive_link($current_posttype);\r\n\t\t$permalink=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.$_REQUEST['sortby'],'',$permalink);\r\n\t}elseif(is_search()){\r\n\t\t$search_query_str=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.@$_REQUEST['sortby'],'',$_SERVER['QUERY_STRING']);\r\n\t\t$permalink= site_url().\"?\".$search_query_str;\r\n\t}else{\r\n\t\t$current_term = $wp_query->get_queried_object();\r\n\t\t$permalink=($current_term->slug) ? get_term_link($current_term->slug, $current_term->taxonomy):'';\r\n\t\tif(isset($_REQUEST['sortby']) && $_REQUEST['sortby']!='')\r\n\t\t\t$permalink=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.$_REQUEST['sortby'],'',$permalink);\r\n\t\t\r\n\t}\r\n\t\r\n\t$post_type= get_post_type_object( get_post_type());\r\n\t\r\n\t/* get all the request url and con-cat with permalink to get the exact results */\r\n $req_uri = '';\r\n\tforeach($_GET as $key=>$val){\r\n\t\tif($key !='' && !strstr($key,'_sortby')){\r\n\t\t\t$req_uri .= $key.\"=\".$val.\"&\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t/* permalink */\r\n\tif(false===strpos($permalink,'?')){\r\n\t $url_glue = '?'.$req_uri;\r\n\t}else{\r\n\t\t$url_glue = '&amp;'.$req_uri;\t\r\n\t}\r\n\t\r\n\t/* no grid view list view if no results found */\r\n\t\r\n\tif($wp_query->found_posts!=0){\r\n\t?>\r\n\t<div class='directory_manager_tab clearfix'>\r\n\t<div class=\"sort_options\">\r\n\t<?php if(have_posts()!='' && current_theme_supports('tmpl_show_pageviews')): ?>\r\n\t\t<ul class='view_mode viewsbox'>\r\n\t\t\t<?php if(function_exists('tmpl_wp_is_mobile') && tmpl_wp_is_mobile()){ \r\n\t\t\t\tif(isset($templatic_settings['category_googlemap_widget']) && $templatic_settings['category_googlemap_widget']=='yes'){\r\n\t\t\t\t?>\r\n\t\t\t\t<li><a class='switcher last listview <?php if($templatic_settings['default_page_view']==\"listview\"){echo 'active';}?>' id='listview' href='#'><?php _e('LIST VIEW','templatic');?></a></li>\r\n\t\t\t\t<li><a class='map_icon <?php if($templatic_settings['default_page_view']==\"mapview\"){echo 'active';}?>' id='locations_map' href='#'><?php _e('MAP','templatic');?></a></li>\r\n\t\t\t<?php }\t\r\n\t\t\t}else{ ?>\r\n\t\t\t\t<li><a class='switcher first gridview <?php if($templatic_settings['default_page_view']==\"gridview\"){echo 'active';}?>' id='gridview' href='#'><?php _e('GRID VIEW','templatic');?></a></li>\r\n\t\t\t\t<li><a class='switcher last listview <?php if($templatic_settings['default_page_view']==\"listview\"){echo 'active';}?>' id='listview' href='#'><?php _e('LIST VIEW','templatic');?></a></li>\r\n\t\t\t\t<?php if(isset($templatic_settings['category_googlemap_widget']) && $templatic_settings['category_googlemap_widget']=='yes'):?> \r\n\t\t\t\t<li><a class='map_icon <?php if($templatic_settings['default_page_view']==\"mapview\"){echo 'active';}?>' id='locations_map' href='#'><?php _e('MAP','templatic');?></a></li>\r\n\t\t\t\t<?php endif;\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t</ul>\t\r\n\t<?php endif;\r\n\r\n\tif(isset($_GET[$sort_post_type.'_sortby']) && $_GET[$sort_post_type.'_sortby']=='alphabetical'){\r\n\t\t$_SESSION['alphabetical']='1';\t\r\n\t}else{\r\n\t\tunset($_SESSION['alphabetical']);\r\n\t}\r\n\t\r\n\tif(!empty($templatic_settings['sorting_option'])){\r\n\r\n\t\t/* take \"directory\" as a post type if additional post type is detected */\r\n\t\t$exclude_arr = apply_filters('exclude_sorting_posttypes',array('event','property','classified'));\r\n\t\tif(!in_array(get_post_type(),$exclude_arr)){\r\n\t\t\t$sort_post_type_name = 'tevolution';\r\n\t\t}\t\r\n\t\telse{\t\r\n\t\t\t$sort_post_type_name = get_post_type();\r\n\t\t}\r\n\t\t\r\n\t\t$sel_sort_by = isset($_REQUEST[$sort_post_type_name.'_sortby']) ? $_REQUEST[$sort_post_type_name.'_sortby'] : '';\r\n\t\t$sel_class = 'selected=selected';\r\n\t\t\r\n\t?>\r\n\t\t<div class=\"tev_sorting_option\">\r\n\t\t\t<form action=\"<?php if(function_exists('tmpl_directory_full_url')){ echo tmpl_directory_full_url('directory'); } ?>\" method=\"get\" id=\"<?php echo $sort_post_type.'_sortby_frm'; ?>\" name=\"<?php echo $sort_post_type.'_sortby_frm'; ?>\">\r\n <select name=\"<?php echo $sort_post_type_name.'_sortby'; ?>\" id=\"<?php echo $sort_post_type_name.'_sortby'; ?>\" onchange=\"sort_as_set(this.value)\" class=\"tev_options_sel\">\r\n\t\t\t\t<option <?php if(!$sel_sort_by){ echo $sel_class; } ?>><?php _e('Sort By','templatic'); ?></option>\r\n\t\t\t\t<?php\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_alphabetical');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_alphabetical',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"alphabetical\" <?php if($sel_sort_by =='alphabetical'){ echo $sel_class; } ?>><?php _e('Alphabetical','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_alphabetical');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_asc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_asc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"title_asc\" <?php if($sel_sort_by =='title_asc'){ echo $sel_class; } ?>><?php _e('Title Ascending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_asc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_desc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_desc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"title_desc\" <?php if($sel_sort_by =='title_desc'){ echo $sel_class; } ?>><?php _e('Title Descending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_desc');\r\n\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_date_asc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('date_asc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"date_asc\" <?php if($sel_sort_by =='date_asc'){ echo $sel_class; } ?>><?php _e('Publish Date Ascending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_date_asc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_date_desc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('date_desc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"date_desc\" <?php if($sel_sort_by =='date_desc'){ echo $sel_class; } ?>><?php _e('Publish Date Descending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_date_desc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_reviews');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('reviews',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"reviews\" <?php if($sel_sort_by =='reviews'){ echo $sel_class; } ?>><?php _e('Reviews','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_reviews');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_rating');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('rating',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"rating\" <?php if($sel_sort_by =='rating'){ echo $sel_class; } ?>><?php _e('Rating','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_rating');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_random');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('random',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"random\" <?php if($sel_sort_by =='random'){ echo $sel_class; } ?>><?php _e('Random','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_random');\r\n\t\t\t\t\t?> \r\n\t\t\t </select>\r\n\t\t\t </form>\r\n <?php add_action('wp_footer','sorting_option_of_listing'); ?>\r\n\t\t</div>\r\n <?php\r\n\t}\r\n\r\n\t?>\r\n \t</div><!--END sort_options div -->\r\n </div><!-- END directory_manager_tab Div -->\r\n\t<?php\r\n\t}\r\n\t\r\n\t\r\n\t/* On archive and category pages - alphabets order should display even there is no post type pass in argument */\r\n\t$exclude_arr = array('event','property','classified');\r\n\tif(isset($_REQUEST['alpha_sort_post_type']) && $_REQUEST['alpha_sort_post_type'] != '')\r\n\t\t$sort_post_type = $_REQUEST['alpha_sort_post_type'];\r\n\tif(!in_array($sort_post_type,$exclude_arr))\r\n\t\t$sort_post_type = 'tevolution';\r\n\telse\t\r\n\t\t$sort_post_type = $sort_post_type;\r\n\tif(!$sort_post_type){ $sort_post_type=\"tevolution\"; }\r\n\tif((isset($_REQUEST[$sort_post_type.'_sortby']) && $_REQUEST[$sort_post_type.'_sortby']=='alphabetical') || (isset($_SESSION['alphabetical']) && $_SESSION['alphabetical']==1)):\r\n\t\r\n\t$alphabets = array(__('A','templatic'),__('B','templatic'),__('C','templatic'),__('D','templatic'),__('E','templatic'),__('F','templatic'),__('G','templatic'),__('H','templatic'),__('I','templatic'),__('J','templatic'),__('K','templatic'),__('L','templatic'),__('M','templatic'),__('N','templatic'),__('O','templatic'),__('P','templatic'),__('Q','templatic'),__('R','templatic'),__('S','templatic'),__('T','templatic'),__('U','templatic'),__('V','templatic'),__('W','templatic'),__('X','templatic'),__('Y','templatic'),__('Z','templatic'));\r\n\t/*show all result when we click on all in alphabetical sort order*/\r\n\t$all = str_replace('?sortby='.$_REQUEST['sortby'].'&','/?',$url_glue);\r\n\t?>\r\n <div id=\"directory_sort_order_alphabetical\" class=\"sort_order_alphabetical\">\r\n\t\t<input type=\"hidden\" name=\"alpha_sort\" id=\"alpha_sort\" /> <!-- for listfilter -->\r\n\t <ul>\r\n\t\t\t<li class=\"<?php echo (!isset($_REQUEST['sortby']))?'active':''?>\"><a href=\"<?php echo remove_query_arg('sortby',$permalink.$all.$sort_post_type.'_sortby=alphabetical');?>\"><?php _e('All','templatic');?></a></li>\r\n\t\t\t<?php\r\n\t\t\tforeach($alphabets as &$value){ \r\n\t\t\t\t$key = $value;\r\n\t\t\t\t$val = strtolower($key);\r\n\t\t\t\t?>\r\n\t\t\t\t<li class=\"<?php echo (isset($_REQUEST['sortby']) && $_REQUEST['sortby'] == $val)? 'active':''?>\"><a href=\"<?php echo $permalink.$url_glue .$sort_post_type.'_sortby=alphabetical&sortby='.$val.'&alpha_sort_post_type='.$sort_post_type;?>\"><?php echo $key; ?></a></li>\r\n\t\t\t\t<?php \r\n\t\t\t} ?>\r\n\t </ul>\r\n </div>\r\n <?php endif;\r\n}", "function wp_ajax_widgets_order()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "public function sort_posts() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t#icon-reorder-posts {\n\t\t\tdisplay: none;\n\t\t\tbackground:url(<?php echo $this->icon; ?>) no-repeat;\n\t\t}\n\t\t</style>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon( 'reorder-posts' ); ?>\n\t\t\t<h2>\n\t\t\t\t<?php echo $this->heading; ?><br>\n\t\t\t\t<span style=\"font-size:13px\">Trascina per determinare l'ordine manuale di visualizzazione degli elementi.</span>\n\t\t\t\t<img src=\"<?php echo admin_url( 'images/loading.gif' ); ?>\" id=\"loading-animation\" />\n\t\t\t</h2>\n\t\t\t<div id=\"reorder-error\"></div>\n\t\t\t<?php echo $this->initial; ?>\n\t\t\t<div id=\"list\">\n\t\t\t<input class=\"search\" placeholder=\"Search\" />\n\t\t\t<div id=\"message-order\" class=\"updated\" style=\"display:none;\">\n\t <p><h3>ATTENZIONE</h3>Il sistema di <b>ordinamento</b> è disabilitato nella lista filtrata. Rimuovere i criteri di ricerca per riabilitare il sistema.</p>\n\t </div>\n\t\t\t<ul id=\"post-list\" class=\"list\">\n\t\t<?php\n\t\tif ( is_post_type_hierarchical( $this->post_type ) ) {\n\t\t\t$pages = get_pages( array(\n\t\t\t\t'sort_column' => 'menu_order',\n\t\t\t\t'post_type' => $this->post_type,\n\t\t\t ) );\n\t\t\t //Get hiearchy of children/parents\n\t\t\t $top_level_pages = array();\n\t\t\t $children_pages = array();\n\t\t\t foreach( $pages as $page ) {\n\t\t\t\tif ( $page->post_parent == 0 ) {\n\t\t\t\t\t//Parent page\n\t\t\t\t\t$top_level_pages[] = $page;\n\t\t\t\t} else {\n\t\t\t\t\t$children_pages[ $page->post_parent ][] = $page;\n\t\t\t\t}\n\t\t\t } //end foreach\n\n\t\t\t foreach( $top_level_pages as $page ) {\n\t\t\t\t$page_id = $page->ID;\n\t\t\t\tif ( isset( $children_pages[ $page_id ] ) && !empty( $children_pages[ $page_id ] ) ) {\n\t\t\t\t\t//If page has children, output page and its children\n\t\t\t\t\t$this->output_row_hierarchical( $page, $children_pages[ $page_id ], $children_pages );\n\t\t\t\t} else {\n\t\t\t\t\t$this->output_row( $page );\n\t\t\t\t}\n\t\t\t }\n\t\t} else {\n\t\t\t//Output non hierarchical posts\n\t\t\t$post_query = new WP_Query(\n\t\t\t\tarray(\n\t\t\t\t\t'post_type' => $this->post_type,\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'orderby' => 'menu_order',\n \t\t\t'suppress_filters' => false,\n\t\t\t\t\t'order' => $this->order,\n\t\t\t\t\t'post_status' => $this->post_status,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$posts = $post_query->get_posts();\n\t\t\tif ( !$posts ) return;\n\t\t\tforeach( $posts as $post ) {\n\t\t\t\t$this->output_row( $post );\n\t\t\t} //end foreach\n\t\t}\n\t\t?>\n\t\t</ul>\n\t\t</div>\n\t\t<?php\n\t\techo $this->final;\n\t\t?>\n\t\t</div><!-- .wrap -->\n\t\t<?php\n\t}", "public function wp_footer() {\n\t\t\twp_register_style('sv_core_init_style', $this->get_url_core('frontend/css/style.css'));\n\n\t\t\tforeach ( $this->get_scripts() as $script ) {\n\t\t\t\tif(!$script->get_is_backend() && !$script->get_load_in_header()) {\n\t\t\t\t\t$this->add_script($script);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// inline styles are printed\n\t\t\twp_enqueue_style('sv_core_init_style');\n\n\t\t\tob_start();\n\t\t\t// now remove the attached style\n\t\t\tadd_action('wp_print_footer_scripts', function(){\n\t\t\t\t$this->replace_type_attributes();\n\t\t\t});\n\t\t}", "public function do_footer_items()\n {\n }", "public function do_footer_items()\n {\n }", "function fashe_woocommerce_short_code_shop($atts) {\n\n $atts = shortcode_atts( array(\n 'per_page' => '6',\n 'page' => 1,\n 'paginate' =>true\n ), $atts);\n\n $query_cat_name = isset($_GET['query_cat_name']) ? wc_clean( wp_unslash( $_GET['query_cat_name'])) : '';\n?>\n\n<script type=\"text/javascript\">\n\n$(document).ready(function() {\n\n var paged_default = \"<?php echo $atts['page']?>\";\n var posts_per_page = \"<?php echo $atts['per_page'];?>\";\n var query_cat_name = \"<?php echo $query_cat_name ;?>\"\n var paged = paged_default;\n var orderby ;\n var price;\n var query_keyword;\n var query_product_color;\n var filter_by_cat;\n\n // Load Products Function .\n function load_products_ajax(page_default) {\n\n /** Get data-page */\n var paged_ajax = (page_default === false) ? paged : paged_default;\n var orderby_ajax = (page_default === false) ? orderby : 'popularity';\n var price_ajax = (page_default === false) ? price : '';\n var query_keyword_ajax = (page_default === false) ? query_keyword : '';\n var query_product_color_ajax = (page_default === false) ? query_product_color : '';\n var filter_by_cat_ajax = (page_default === false) ? filter_by_cat : '';\n //get Product if have choose category from home page .\n if( query_cat_name !== '') filter_by_cat_ajax = query_cat_name ;\n\n /** Ajax Call */\n $.ajax({\n cache: false,\n url: svl_array_ajaxp.admin_ajax,\n type: \"POST\",\n data: ({\n action: 'LoadProductPagination',\n paged: paged_ajax,\n posts_per_page: posts_per_page,\n orderby: orderby_ajax,\n price: price_ajax,\n query_keyword: query_keyword_ajax,\n query_product_color: query_product_color_ajax,\n filter_by_cat : filter_by_cat_ajax\n }),\n beforeSend: function () {\n },\n success: function (data, textStatus, jqXHR) {\n $('#load_ajax_shop_product').html(data);\n },\n error: function (jqXHR, textStatus, errorThrown) {\n console.log('The following error occured: ' + textStatus, errorThrown);\n },\n complete: function (jqXHR, textStatus) {\n //Show total results after Loaded ajax product .\n var total_results = $('div.product_results').attr('data-total-results');\n $('span.show_all_results').html(total_results);\n // if no Product loaded .\n if(parseInt(total_results) === 0) {\n var results_html = '<div class =\"row\">';\n results_html +='<span > Product not found ! </span>' ;\n results_html += '</div>' ;\n\n $('#load_ajax_shop_product').html(results_html) ;\n }\n }\n });\n\n }//End function\n\n //Load Page Default .\n load_products_ajax(page_default = true);\n // Load Page Default if Click Reset Button .\n $('button.reset-filter-shoppage-button').click(function(){\n window.location.href = \"<?php echo get_bloginfo('url').'/shop' ;?>\" ;\n });\n\n //Load Product filters by orderby box\n $('#orderby_filters').change(function () {\n\n orderby = $('#orderby_filters option:selected').attr('value');\n load_products_ajax(page_default = false);\n });\n\n //Load Product filters by Price box\n $('#orderby_price').change(function () {\n\n //Set Price filter Bar .\n var price_filter_box = $('#orderby_price option:selected').attr('value');\n price_filter_box = (typeof price_filter_box !== 'undefined') ? $.parseJSON(price_filter_box) : '';\n price = price_filter_box;\n\n load_products_ajax(page_default = false);\n\n // Reset noUI Slide\n jQuery('#filter-bar')[0].noUiSlider.reset();\n\n });\n\n //Load page with Pagination\n $('#load_ajax_shop_product').on('click', '#paginative_product_ajax a', function () {\n paged = $(this).attr('data-page');\n console.log('Jquery',paged);\n load_products_ajax(page_default = false);\n });\n\n //Load page with Search Product\n $('#left-bar-search-product').on('keyup', function () {\n query_keyword = $('#left-bar-search-product').val() ;\n load_products_ajax(page_default = false);\n });\n\n //Load page with Filter by color\n $(\"#filter-product-color\").on(\"click\", 'input.checkbox-color-filter', function () {\n\n var box = $(this);\n box.attr('name', 'notCheck');\n\n if (box.is(\":checked\")) {\n var group = \"input:checkbox[name='\" + box.attr(\"name\") + \"']\";\n $(group).prop(\"checked\", false);\n box.prop(\"checked\", true);\n }\n\n query_product_color = $( \"input.checkbox-color-filter:checked\" ).val();\n load_products_ajax(page_default = false);\n });\n\n //Load page with Filter by Price (noUI Style)\n $('#price-noui-filter-button').on('click', function () {\n\n var price_lower = $('#value-lower').text();\n var price_upper = $('#value-upper').text();\n price = [price_lower, price_upper];\n\n load_products_ajax(page_default = false);\n\n //Reset Filter Price by Price box\n $('#orderby_price option:first').prop('selected', true);\n $('span.select2-selection__rendered').text('Price');\n });\n\n //Load page with Fillter by Category .\n $('#get_product_cat_ajax li.p-t-4').each(function () {\n $(this).click(function () {\n //If isset category query by $_GET ..then Clear it .\n if(typeof query_cat_name !== \"undefined\" && query_cat_name !== '' ){\n var uri = window.location.toString();\n if (uri.indexOf(\"?\") > 0) {\n var clean_uri = uri.substring(0, uri.indexOf(\"?\"));\n window.history.replaceState({}, document.title, clean_uri);\n }\n query_cat_name = '' ;\n }\n //Filter and Load Product .\n filter_by_cat = $(this).attr('value');\n load_products_ajax(page_default = false);\n // Set Current Style for Product .\n $('#get_product_cat_ajax li.p-t-4 a').removeClass('active1');\n $(this).children().addClass('active1');\n });\n });\n\n // Set Style for Category if call by $_GET .\n if(typeof query_cat_name !== \"undefined\" && query_cat_name !== '' ){\n $('#get_product_cat_ajax li.p-t-4 a').removeClass('active1');\n $('#get_product_cat_ajax li[value=\"'+query_cat_name+'\"]').children().addClass('active1');\n }\n\n })//End Jquery .\n\n </script>\n\n\n<?php\n}", "function print_footer_scripts() {\n\tglobal $asc_scripts, $concatenate_scripts;\n\n\tif ( !is_a($asc_scripts, 'ASC_Scripts') )\n\t\treturn array(); // No need to run if not instantiated.\n\n\tscript_concat_settings();\n\t$asc_scripts->do_concat = $concatenate_scripts;\n\t$asc_scripts->do_footer_items();\n\n\t/**\n\t * Filter whether to print the footer scripts.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param bool $print Whether to print the footer scripts. Default true.\n\t */\n\tif ( apply_filters( 'print_footer_scripts', true ) ) {\n\t\t_print_scripts();\n\t}\n\n\t$asc_scripts->reset();\n\treturn $asc_scripts->done;\n}", "public function move_js_to_footer() {\n\t\t$this->remove_action( 'wp_head', 'wp_print_scripts' );\n\t\t$this->remove_action( 'wp_head', 'wp_print_head_scripts', 9 );\n\t\t$this->remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );\n\t}", "function bethel_add_frontend_javascript() {\n global $post;\n if (is_front_page()) {\n wp_enqueue_script('bethel-frontend', get_stylesheet_directory_uri().'/js/frontend.js', array('jquery'), '0.1', true);\n wp_localize_script('bethel-frontend', 'bethel', array('siteurl'=>site_url()));\n }\n if ((is_page() || is_single()) && (strpos ($post->post_content, '[gallery ') !== FALSE)) {\n wp_enqueue_script('bethel_gallery', get_stylesheet_directory_uri().'/js/colorbox/jquery.colorbox'.(WP_DEBUG ? '.js' : '-min.js'), 'jquery', '1.6.0', true);\n wp_enqueue_style('bethel_gallery', get_stylesheet_directory_uri().'/js/colorbox/colorbox.css');\n }\n //add_action ('wp_print_footer_scripts', 'bethel_viewport_js_to_footer');\n}", "function enqueue_scripts() {\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 21 );\n\t\tadd_action( 'admin_init', array( $this, 'add_pagination' ) );\n\t\tadd_action( \"bc_plugin_browser_content_{$this->page_slug}\", array( $this, 'display_plugins_browser' ), 10, 2 );\n\t}", "function truethemes_hook_footer_scripts(){\n\n\t//get option values\n global $ttso;\n\t$jcycle_timeout = $ttso->ka_jcycle_timeout; // jQuery banner cycle time\n\t$jcycle_pause_hover = $ttso->ka_jcycle_pause_hover; //whether pause on hover.\n\n\tif ($jcycle_pause_hover == \"true\"){\n\t\t$jcycle_pause_hover_results = '1';\n\t}else{\n\t\t$jcycle_pause_hover_results = '';\n\t}\n\n\n//init slider if is Template Homepage :: jQuery 2\nif(is_page_template('template-homepage-jquery-2.php')){\n\necho \"<!-- jQuery Banner Init Script for Template Homepage :: jQuery 2 -->\\n\";\t\necho \"<script type='text/javascript'>\\n\";\necho \"//<![CDATA[\njQuery(window).load(function(){\n\tjQuery('.home-banner-wrap ul').css('background-image','none');\n\tjQuery('.jqslider').css('display','block');\n\tjQuery('.big-banner #main .main-area').css('padding-top','16px');\n \tjQuery('.home-banner-wrap ul').after('<div class=\\\"jquery-pager\\\">&nbsp;</div>').cycle({\n\t\tfx: 'fade',\n\t\ttimeout: '{$jcycle_timeout}',\n\t\theight: 'auto',\n\t\tpause: '{$jcycle_pause_hover_results}',\n\t\tpager: '.jquery-pager',\n\t\tcleartypeNoBg: true\n\n\t});\n});\n//]]>\\n\";\necho \"</script>\\n\";\n}\n\n//init slider if is Template Homepage :: jQuery\nif(is_page_template('template-homepage-jquery.php')){\n\necho \"<!-- jQuery Banner Init Script for Template Homepage :: jQuery -->\\n\";\t\necho \"<script type='text/javascript'>\\n\";\necho \"//<![CDATA[\njQuery(window).load(function(){\n\tjQuery('.home-bnr-jquery ul').css('background-image','none');\n\tjQuery('.jqslider').css('display','block');\n jQuery('.home-bnr-jquery ul').after('<div class=\\\"jquery-pager\\\">&nbsp;</div>').cycle({\n\t\tfx: 'fade',\n\t\ttimeout: '{$jcycle_timeout}',\n\t\theight: 'auto',\n\t\tpause: '{$jcycle_pause_hover_results}',\n\t\tpager: '.jquery-pager',\n\t\tcleartypeNoBg: true\n\t\t});\n});\n//]]>\n</script>\\n\";\t\n}\n\n//Testimonial init script\nglobal $ttso;\n$testimonial_enable = $ttso->ka_testimonial_enable;\n\nif($testimonial_enable == \"true\"){\n$testimonial_timeout = $ttso->ka_testimonial_timeout;\n$testimonial_pause_hover = $ttso->ka_testimonial_pause_hover;\n\tif ($testimonial_pause_hover == \"true\"){\n\t\t$testimonial_pause_hover_results = '1';\n\t}else{\n\t$testimonial_pause_hover_results = '0';\n\t}\n\necho \"<!-- Testimonial init script -->\\n\";\necho \"<script type='text/javascript'>\n//<![CDATA[\njQuery(document).ready(function(){\n\tfunction adjust_container_height(){\n\t\t//get the height of the current testimonial slide\n\t\tvar hegt = jQuery(this).height();\n\t\t//set the container's height to that of the current slide\n\t\tjQuery(this).parent().animate({height:hegt});\n\t}\n jQuery('.testimonials').after('<div class=\\\"testimonial-pager\\\">&nbsp;</div>').cycle({\n\t\tfx: 'fade',\n\t\ttimeout: '{$testimonial_timeout}',\n\t\theight: 'auto',\n\t\tpause: '{$testimonial_pause_hover_results}',\n\t\tpager: '.testimonial-pager',\n\t\tbefore: adjust_container_height,\n\t\tcleartypeNoBg: true\n\n\t});\n});\n\n//]]>\n</script>\\n\";\n}\t\t\t\t\t\n}", "function santo_flickr_gallery_shortcode_exist() {\r\n\t\tadd_action( 'wp_footer', 'santo_flickr_js',100 );\r\n\t\tadd_action( 'wp_enqueue_scripts', 'santo_flickr_scripting' );\r\n}", "function tdl_custom_latest_products($atts, $content = null) {\n\t$sliderrandomid = rand();\n\textract(shortcode_atts(array(\n\t\t\"title\" => '',\n\t\t'per_page' => '8',\n\t\t'orderby' => 'date',\n\t\t'order' => 'desc',\n\t\t'category' => '',\n\t), $atts));\n\tob_start();\n\n\t?>\n\t\n\t<?php \n\t/**\n\t* Check if WooCommerce is active\n\t**/\n\tif ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {\n\t?>\n\t\n\t<script>\n\t(function($){\n\t\t$(window).load(function(){\n\t\t/* items_slider */\n\t\t$('.items_slider_id_<?php echo $sliderrandomid ?> .items_slider').iosSlider({\n\t\t\tsnapToChildren: true,\n\t\t\tdesktopClickDrag: true,\n\t\t\tnavNextSelector: $('.items_slider_id_<?php echo $sliderrandomid ?> .items_sliders_nav .big_arrow_right'),\n\t\t\tnavPrevSelector: $('.items_slider_id_<?php echo $sliderrandomid ?> .items_sliders_nav .big_arrow_left'),\n\t\t\tonSliderLoaded: custom_latest_products_UpdateSliderHeight,\n\t\t\tonSlideChange: custom_latest_products_UpdateSliderHeight,\n\t\t\tonSliderResize: custom_latest_products_UpdateSliderHeight\n\t\t});\n\t\t\n\t\tfunction custom_latest_products_UpdateSliderHeight(args) {\n\t\t\t\t\t\t\t\t\n\t\t\tcurrentSlide = args.currentSlideNumber;\n\t\t\t\n\t\t\t/* update height of the first slider */\n\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t<?php global $sellegance_op; ?>\n\t\t\t\t\t<?php if ($sellegance_op['tdl_product_animation']) { ?>\n\t\t\t\t\t<?php if ($sellegance_op['tdl_productanim_type'] == \"productanim3\") { ?>\n\t\t\t\t\t$('li.productanim3').each(function() {\n\t\t\t\t\t\t\t\tvar productImageHeight = $(this).find('.loop_product > img').height();\n\t\t\t\t\t\t\t\t$(this).find('.image_container').css('padding-bottom', productImageHeight + 'px');\n\t\t\t\t\t});\n\t\t\t\t\t<?php } ?>\n\t\t\t\t\t <?php } ?>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvar setHeight = $('.items_slider_id_<?php echo $sliderrandomid ?> .items_slider .product_item:eq(' + (args.currentSlideNumber-1) + ')').outerHeight(true);\n\t\t\t\t\t$('.items_slider_id_<?php echo $sliderrandomid ?> .items_slider').animate({ height: setHeight+20 }, 300);\n\t\t\t\t},300);\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t})\n\t})(jQuery);\n\t</script>\n\t\n\t<div class=\"woocommerce prod_slider items_slider_id_<?php echo $sliderrandomid ?> four_side\">\n\t\n\t\t<div class=\"items_sliders_header\">\n\t\t\t<div class=\"items_sliders_title\">\n\t\t\t\t<div class=\"featured_section_title\"><span><?php echo $title ?></span></div>\n\t\t\t</div>\n\t\t\t<div class=\"clearfix\"></div>\n\t\t\t<div class=\"items_sliders_nav\"> \n\t\t\t\t<a class='big_arrow_right'></a>\n\t\t\t\t<a class='big_arrow_left'></a>\n\t\t\t\t<div class='clearfix'></div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"items_slider_wrapper\">\n\t\t\t<div class=\"items_slider\">\n\t\t\t\t<ul class=\"slider\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\t'post_type' => 'product',\n\t\t\t\t\t\t'product_cat' => $category,\n\t\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t\t'ignore_sticky_posts' => 1,\n\t\t\t\t\t\t'posts_per_page' => $per_page\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$products = new WP_Query( $args );\n\t\t\t\t\t\n\t\t\t\t\tif ( $products->have_posts() ) : ?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<?php while ( $products->have_posts() ) : $products->the_post(); ?>\n\t\t\t\t\t\n\t\t\t\t\t\t\t<?php woocommerce_get_template_part( 'content', 'product' ); ?>\n\t\t\t\t\n\t\t\t\t\t\t<?php endwhile; // end of the loop. ?>\n\t\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\tendif; \n\t\t\t\t\t//wp_reset_query();\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\t?>\n\t\t\t\t</ul> \n\t\t\t</div>\n\t\t</div>\n\t\n\t</div>\n\t\n\t<?php } ?>\n\n\t<?php\n\t$content = ob_get_contents();\n\tob_end_clean();\n\treturn $content;\n}", "public function customizer_footer_scripts()\n {\n $this->add_activate_switch();\n $this->change_title_html();\n do_action('mo_optin_customizer_footer_scripts', $this);\n }", "function print_footer_scripts()\n {\n }", "function reviews_scripts() {\n if(is_archive('review')){\n wp_enqueue_script( 'isotope-lib', get_stylesheet_directory_uri() . '/js/isotope.min.js', array('jquery'), 11112014, false );\n wp_enqueue_script( 'isotope-settings', get_stylesheet_directory_uri() . '/js/isotope.settings.js', array('isotope-lib'), 11112014, false );\n }\n}", "public function after()\n {\n if($this->auto_render)\n {\n // Define defaults\n $styles = array( \n 'assets/css/style-responsive.css'=>'screen',\n 'assets/css/style.css'=>'screen', \n 'assets/font-awesome/css/font-awesome.css'=>'screen', \n 'assets/css/bootstrap.css'=>'screen',\n );\n $scripts = array( \n 'assets/js/jquery.nicescroll.js', \n 'assets/js/jquery.scrollTo.min.js', \n 'assets/js/jquery.dcjqaccordion.2.7.js', \n 'assets/js/jquery.ui.touch-punch.min.js', \n 'assets/js/jquery-ui-1.9.2.custom.min.js',\n 'assets/js/bootstrap.min.js',\n //'assets/js/jquery.js',\n 'media/js/jquery-1.10.1.min.js',\n );\n\n // Add defaults to template variables.\n $this->template->styles = array_reverse(array_merge($this->template->styles, $styles));\n $this->template->scripts = array_reverse(array_merge($this->template->scripts, $scripts));\n }\n // Run anything that needs to run after this.\n parent::after();\n }", "function ft_hook_add_js_call_footer() {}", "public function print_footer_scripts()\n {\n }", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "public function print_footer_scripts()\n {\n }", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function bs_disable_footer( $args = array() ){\n global $flag_disable_footer, $current_page_base, $cPath_array;\n \n if ( in_array( $current_page_base, $args['page'] ) ) {\n $flag_disable_footer = true;\n }\n\n if ( !$flag_disable_footer && zen_not_null( $args['categories'] ) ){\n foreach ( $cPath_array as $category_id ) {\n if ( in_array( $category_id, $args['categories'] ) ) {\n $flag_disable_footer = true;\n }\n }\n }\n\n if ( !$flag_disable_footer && isset( $_GET['products_id'] ) && zen_not_null( $args['products'] ) ) {\n if ( in_array( (int) $_GET['products_id'], $args['products'] ) ) {\n $flag_disable_footer = true;\n }\n }\n\n}", "public function _post_filter()\n {\n }", "public function adminScripts()\n\t{\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script('wpm-sort_post_types-interface', $this->jsUrl . '/interface-1.2.js', array('jquery'));\n\t\twp_enqueue_script('wpm-sort_post_types-nested', $this->jsUrl . '/inestedsortable.js', array('wpm-sort_post_types-interface'));\n\t\twp_enqueue_script('wpm-sort_post_types', $this->jsUrl . '/sort-post-types.js', array('wpm-sort_post_types-nested'));\n\t}", "private function init_hooks(){ \r\n add_filter('manage_edit-category_columns', array($this, 'bamobile_manage_category_columns'));\r\n add_filter('manage_category_custom_column', array($this, 'bamobile_manage_category_columns_fields'), 10, 3);\r\n $taxonomies = get_taxonomies();\r\n foreach ((array)$taxonomies as $taxonomy) {\r\n $this->bamobile_add_custom_column_fields($taxonomy);\r\n }\r\n add_action('edit_term', array($this, 'bamobile_save_image'));\r\n add_action('create_term', array($this, 'bamobile_save_image'));\r\n add_action( 'admin_enqueue_scripts',array($this,'bamobile_add_styles'));\r\n }", "public static function move_jquery_to_footer() {\n\t\tadd_action('wp_enqueue_scripts', function() {\n\t\t\tif (is_admin()) {\n\t\t return;\n\t\t }\n\n\t\t $wp_scripts = wp_scripts();\n\n\t\t $wp_scripts->add_data('jquery', 'group', 1);\n\t\t $wp_scripts->add_data('jquery-core', 'group', 1);\n\t\t $wp_scripts->add_data('jquery-migrate', 'group', 1);\n\t\t}, 0);\n\t}", "function get_product_list() {\n/**\nif You haven't category object, please use this request\n$catData = current_category_data($post->ID);\n*/\n$catData = current_category_data($post->ID);\n\n?>\n\n\n<script type=\"text/javascript\">\n\n var vallo_ready_cartus = <?php echo json_encode($_COOKIE['vallo_cf7_cartus_3']); ?>;\n var produc_CF7_image = '<?php \n $image = wp_get_attachment_image_src( get_post_thumbnail_id( $loop->post->ID ), 'single-post-thumbnail' );\n echo $image[0]; ?>';\n var produc_CF7_title = '<?php \n wp_title(''); ?>';\n var produc_CF7_category = '<?php \n echo $catData->term_id; ?>';\n</script>\n<script type='text/javascript' src='<?php echo plugins_url('/js/get_product_list.js?ver=1.9',__FILE__ ) ?>'></script>\n<?php\n// add new products to basket\n?><script type='text/javascript' src='<?php echo plugins_url('/js/add_to_product_list.js?ver=2.1',__FILE__ ) ?>'></script>\n<script type='text/javascript' src='<?php echo plugins_url('/js/add_to_product_activation.js?ver=1.2',__FILE__ ) ?>'></script>\n<?php\n\n\n###\n# end of base function\n###\n}", "function woocommerce_isotope_scripts() {\n\twp_enqueue_style( 'wp_woocommerce-isotope', plugins_url().'/wp_woocommerce-isotope/css/style.css');\n\t/*wp_enqueue_script( 'masonry', plugins_url().'/wp_woocommerce-isotope/js/masonry.pkgd.min.js', array('jquery'), '3.1.2', true );*/\n\twp_enqueue_script( 'isotope', plugins_url().'/wp_woocommerce-isotope/js/jquery.isotope.min.js', array('jquery'), '1.5.25', true );\n\twp_enqueue_script( 'wp_woocommerce-isotope', plugins_url().'/wp_woocommerce-isotope/js/main.js', array('isotope'), '1.0', true );\n}", "public function enqueue_scripts() {\n wp_register_script('wp_infinite_categories', plugins_url('js/wp-infinite-categories.js', __FILE__), array('jquery'));\n wp_enqueue_script('wp_infinite_categories');\n \n // Passes admin-ajax url and current_query_vars to the javascipt file.\n wp_localize_script('wp_infinite_categories', 'ajax_data', array(\n 'url' => admin_url('admin-ajax.php'),\n 'query_vars' => $this->current_query_vars,\n ));\n }", "function footer_scripts(){\n\tglobal $post;\n\n\tif( wp_script_is( 'functions', 'done' ) ) :\n\n?>\n\t\t<script type=\"text/javascript\">\n\n\n\t\t\t<?php if( is_home() ) : ?>\n\t\t\t\t/*------------------------------------*\\\n\t\t\t\t\t#HOME\n\t\t\t\t\\*------------------------------------*/\n\n\t\t\t\t//toggleElementOnSscroll( $('header'), '.hero__text');\n\t\t\t\ttoggleElementOnSscroll( $('.image-bg--hero'), '.btn--map--float');\n\n\t\t\t\t$(window).scroll(function(){\n\t\t\t\t\t//toggleElementOnSscroll( $('header'), '.hero__text');\n\t\t\t\t\ttoggleElementOnSscroll( $('.image-bg--hero'), '.btn--map--float');\n\t\t\t\t});\n\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php if( is_archive() ) : ?>\n\t\t\t\t/*------------------------------------*\\\n\t\t\t\t\t#MAP\n\t\t\t\t\\*------------------------------------*/\n\n\t\t\t\taddAllMarkers();\n\n\t\t\t<?php endif; ?>\n\n\n\t\t\t<?php if( is_single() ) : ?>\n\t\t\t\t/*------------------------------------*\\\n\t\t\t\t\t#SINGLE\n\t\t\t\t\\*------------------------------------*/\n\n\t\t\t\twindow.fbAsyncInit = function() {\n\t\t\t\t\tFB.init({\n\t\t\t\t\t\tappId : '1487150328256182',\n\t\t\t\t\t\txfbml : true,\n\t\t\t\t\t\tversion : 'v2.4'\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\t(function(d, s, id){\n\t\t\t\t var js, fjs = d.getElementsByTagName(s)[0];\n\t\t\t\t if (d.getElementById(id)) {return;}\n\t\t\t\t js = d.createElement(s); js.id = id;\n\t\t\t\t js.src = \"//connect.facebook.net/en_US/sdk.js\";\n\t\t\t\t fjs.parentNode.insertBefore(js, fjs);\n\t\t\t\t}(document, 'script', 'facebook-jssdk'));\n\n\n\t\t\t\t/**\n\t\t\t\t * Triggered events\n\t\t\t\t**/\n\n\t\t\t\t// Pasar a función\n\t\t\t\tvar lat = <?php echo get_lat( get_the_ID() ); ?>;\n\t\t\t\tvar lng = <?php echo get_lng( get_the_ID() ); ?>;\n\t\t\t\tvar decada = <?php echo get_decada( get_the_ID() ); ?>;\n\t\t\t\tvar isAerial = <?php echo get_vista_aerea( get_the_ID() ) ?>;\n\t\t\t\tvar heading = <?php echo get_heading( get_the_ID() ) ?>;\n\n\t\t\t\tshowSingleMap( lat, lng, heading, isAerial, decada );\n\n\t\t\t\t$('.js-fb-share').click( function(){\n\t\t\t\t\tFB.ui(\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'share',\n\t\t\t\t\t\tname: '<?php echo get_the_title(); ?>',\n\t\t\t\t\t\thref: '<?php echo the_permalink() ?>'\n\t\t\t\t\t}, function(response){ console.log( response )});\n\t\t\t\t});\n\n\t\t\t<?php endif; ?>\n\t\t</script>\n<?php\n\tendif;\n}", "function sort_admin_categories()\n {\n $this->outer_template = null;\n\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n die;\n\n if(!isset($_POST['SortOrder']))\n die;\n\n $order = explode(',', $_POST['SortOrder']); \n\n $m_categories = instance_model('member_categories');\n\n $m_categories->update_sort($order);\n }", "function feature_filter_order($orderby){\r\n\tglobal $wpdb,$wp_query;\r\n\t\r\n\tif((is_category() || is_tax() || is_archive() || is_search()) && $wp_query->tax_query->queries[0]['taxonomy'] != 'product_cat'){\r\n\t\r\n\t\tif (isset($_REQUEST['tevolution_sortby']) && ($_REQUEST['tevolution_sortby'] == 'title_asc' || $_REQUEST['tevolution_sortby'] == 'alphabetical')){\r\n\t\t\t$orderby= \"$wpdb->posts.post_title ASC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') ASC\";\r\n\t\t}elseif (isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'title_desc' ){\r\n\t\t\t$orderby = \"$wpdb->posts.post_title DESC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif (isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'date_asc' ){\r\n\t\t\t$orderby = \"$wpdb->posts.post_date ASC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif (isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'date_desc' ){\r\n\t\t\t$orderby = \"$wpdb->posts.post_date DESC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif(isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'random' ){\r\n\t\t\t$orderby = \" (select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC,rand()\";\r\n\t\t}elseif(isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'reviews' ){\r\n\t\t\t$orderby = 'DESC';\r\n\t\t\t$orderby = \" comment_count $orderby,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif(isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'rating' ){\r\n\r\n\t\t\t$orderby = \" (select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id = $wpdb->posts.ID and $wpdb->postmeta.meta_key like \\\"average_rating\\\") DESC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}else{\r\n\t\t\t$orderby = \" (SELECT DISTINCT $wpdb->postmeta.meta_value from $wpdb->postmeta where ($wpdb->posts.ID = $wpdb->postmeta.post_id) AND $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC,$wpdb->posts.post_date DESC\";\r\n\t\t}\r\n\t}\r\n\treturn $orderby;\r\n}", "public function onBeforeCompileHead() {\n\t\t$document = JFactory::getDocument();\n\t\t$headData = $document->getHeadData();\n\t\t$scripts = &$headData['scripts'];\n\n\t\t// удалить скрипт из массива в админке\n\t\tunset($scripts['/media/k2/assets/js/k2.frontend.js?v=2.8.0&amp;sitepath=/']);\n\t\t$headData['scripts'] = $scripts;\n\t\t$document->setHeadData($headData);\n\n // Проверить это это страницы админки\n $app = JFactory::getApplication();\n if ($app->isSite()) {\n return;\n }\n\n $document = JFactory::getDocument();\n\n // подключить скрипт для сортировки\n $document->addScript(JUri::root().'plugins/system/newwallet_sort/js/sort.js' );\n\t}", "function modifyThemeFooter() {\n?>\n<!-- W3TC-include-js-head -->\n<?php\n}", "function listposts_scripts()\n{\n wp_enqueue_style('frontend-layout', plugin_dir_url(__FILE__) . 'assets/front/css/style.css');\n // wp_enqueue_style( 'frontend-layout', plugin_dir_url( __FILE__ ).'css/msg-style.css' ); \n wp_enqueue_script('validate-application', plugin_dir_url(__FILE__) . 'js/custom.js', '', '', true);\n \n \n wp_enqueue_style('ibenic-bootstrap-css', \"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css\");\n wp_enqueue_script('ibenic-bootstrap-js', \"https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\", array(\n 'jquery'\n ), '1.0.0');\n wp_enqueue_script('bootstrap-js', \"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js\", array(\n 'jquery'\n ), '1.0.0', true);\n}", "function aqa_gallery_scripts() {\n\twp_enqueue_script( 'aqa-gallery-menu', get_stylesheet_directory_uri() . '/aqa-gallery-menu.js', array('jquery') );\n}", "function footer_js(){\n\t\t$r = array();\n\t\t?>\n\t\t<script type='text/javascript'>\n\t\t\tvar wpfc_loaded = false;\n\t\t\tvar wpfc_counts = {};\n\t\t\tvar wpfc_data = { action : 'WP_FullCalendar'<?php\n\t\t\t\t\t//these arguments were assigned earlier on when displaying the calendar, and remain constant between ajax calls\n\t\t\t\t\tif(!empty(self::$args)){ echo \", \"; }\n\t\t\t\t\t$strings = array(); \n\t\t\t\t\tforeach( self::$args as $key => $arg ){\n\t\t\t\t\t\t$arg = is_numeric($arg) ? (int) $arg : \"'$arg'\"; \n\t\t\t\t\t\t$strings[] = \"'$key'\" .\" : \". $arg ; \n\t\t\t\t\t}\n\t\t\t\t\techo implode(\", \", $strings);\n\t\t\t?> };\n\t\t\tjQuery(document).ready( function($){\t\n\t\t\t\tvar fullcalendar_args = {\n\t\t\t\t\ttimeFormat: '<?php echo get_option('wpfc_timeFormat', 'h(:mm)t'); ?>',\n\t\t\t\t\tdefaultView: '<?php echo get_option('wpfc_defaultView', 'month'); ?>',\n\t\t\t\t\tweekends: <?php echo get_option('wpfc_weekends',true) ? 'true':'false'; ?>,\n\t\t\t\t\theader: {\n\t\t\t\t\t\tleft: 'prev,next today',\n\t\t\t\t\t\tcenter: 'title',\n\t\t\t\t\t\tright: '<?php echo implode(',', get_option('wpfc_available_views', array('month','basicWeek','basicDay'))); ?>'\n\t\t\t\t\t},\n\t\t\t\t\tmonth: <?php echo self::$args['month']; ?>,\n\t\t\t\t\tyear: <?php echo self::$args['year']; ?>,\n\t\t\t\t\ttheme: WPFC.wpfc_theme,\n\t\t\t\t\tfirstDay: WPFC.firstDay,\n\t\t\t\t\teditable: false,\n\t\t\t\t\teventSources: [{\n\t\t\t\t\t\t\turl : WPFC.ajaxurl,\n\t\t\t\t\t\t\tdata : wpfc_data,\n\t\t\t\t\t\t\tignoreTimezone: true,\n\t\t\t\t\t\t\tallDayDefault: false\n\t\t\t\t\t}],\n\t\t\t\t eventRender: function(event, element) {\n\t\t\t\t\t\tif( event.post_id > 0 && WPFC.wpfc_qtips == 1 ){\n\t\t\t\t\t\t\tvar event_data = { action : 'wpfc_qtip_content', post_id : event.post_id, event_id:event.event_id };\n\t\t\t\t\t\t\telement.qtip({\n\t\t\t\t\t\t\t\tcontent:{\n\t\t\t\t\t\t\t\t\ttext : 'Loading...',\n\t\t\t\t\t\t\t\t\tajax : {\n\t\t\t\t\t\t\t\t\t\turl : WPFC.ajaxurl,\n\t\t\t\t\t\t\t\t\t\ttype : \"POST\",\n\t\t\t\t\t\t\t\t\t\tdata : event_data\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tposition : {\n\t\t\t\t\t\t\t\t\tmy: WPFC.wpfc_qtips_my,\n\t\t\t\t\t\t\t\t\tat: WPFC.wpfc_qtips_at\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tstyle : { classes:WPFC.wpfc_qtips_classes }\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t },\n\t\t\t\t\tloading: function(bool) {\n\t\t\t\t\t\tif (bool) {\n\t\t\t\t\t\t\tvar position = $('#wpfc-calendar').position();\n\t\t\t\t\t\t\t$('.wpfc-loading').css('left',position.left).css('top',position.top).css('width',$('#calendar').width()).css('height',$('#calendar').height()).show();\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\twpfc_counts = {};\n\t\t\t\t\t\t\t$('.wpfc-loading').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tviewDisplay: function(view) {\n\t\t\t\t\t\tif( !wpfc_loaded ){\n\t\t\t\t\t\t\t$('.fc-header tbody').append('<tr><td id=\"wpfc-filters\" colspan=\"3\"></td></tr>');\n\t\t\t\t\t\t\tsearch_menu = $('#wpfc-calendar-search').show();\n\t\t\t\t\t\t\t$('#wpfc-filters').append(search_menu);\n\t\t\t\t\t\t\t//catchall selectmenu handle\n\t\t\t\t\t\t\t$('select.wpfc-taxonomy').selectmenu({\n\t\t\t\t\t\t\t\tformat: function(text){\n\t\t\t\t\t\t\t\t\t//replace the color hexes with color boxes\n\t\t\t\t\t\t\t\t\treturn text.replace(/#([a-zA-Z0-9]{3}[a-zA-Z0-9]{3}?) - /g, '<span class=\"wpfc-cat-icon\" style=\"background-color:#$1\"></span>');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\topen: function(){\n\t\t\t\t\t\t\t\t\t$('.ui-selectmenu-menu').css('z-index','1005');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).change(function(event){\n\t\t\t\t\t\t\t\twpfc_data[$(this).attr('name')] = $(this).find(':selected').val();\n\t\t\t\t\t\t\t\t$('#wpfc-calendar').fullCalendar('removeEventSource', WPFC.ajaxurl).fullCalendar('addEventSource', {url : WPFC.ajaxurl, allDayDefault:false, ignoreTimezone: true, data : wpfc_data});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\twpfc_loaded = true;\n\t\t\t\t }\n\t\t\t\t};\n\t\t\t\tif( WPFC.wpfc_locale ){\n\t\t\t\t\t$.extend(fullcalendar_args, WPFC.wpfc_locale);\n\t\t\t\t}\n\t\t\t\t$(document).trigger('wpfc_fullcalendar_args', [fullcalendar_args]);\n\t\t\t\t$('#wpfc-calendar').fullCalendar(fullcalendar_args);\n\t\t\t\tif( WPFC.wpfc_theme_css != '' ){ // add themeroller\n\t\t\t\t\t$('script#jquery-ui-css').remove(); //remove old css if exists\n\t\t\t\t\tvar script = document.createElement(\"link\"); script.id = \"jquery-ui-css\"; script.rel = \"stylesheet\"; script.href = WPFC.wpfc_theme_css;\n\t\t\t\t\tdocument.body.appendChild(script);\n\t\t\t\t}\n\t\t\t});\n\t\t\t//selectmenu @ https://github.com/fnagel/jquery-ui\n\t\t\t(function(e){e.widget(\"ui.selectmenu\",{options:{appendTo:\"body\",typeAhead:1e3,style:\"dropdown\",positionOptions:null,width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null,escapeHtml:false,bgImage:function(){}},_create:function(){var t=this,n=this.options;var r=this.element.uniqueId().attr(\"id\");this.ids=[r,r+\"-button\",r+\"-menu\"];this._safemouseup=true;this.isOpen=false;this.newelement=e(\"<a />\",{\"class\":\"ui-selectmenu ui-widget ui-state-default ui-corner-all\",id:this.ids[1],role:\"button\",href:\"#nogo\",tabindex:this.element.attr(\"disabled\")?1:0,\"aria-haspopup\":true,\"aria-owns\":this.ids[2]});this.newelementWrap=e(\"<span />\").append(this.newelement).insertAfter(this.element);var i=this.element.attr(\"tabindex\");if(i){this.newelement.attr(\"tabindex\",i)}this.newelement.data(\"selectelement\",this.element);this.selectmenuIcon=e('<span class=\"ui-selectmenu-icon ui-icon\"></span>').prependTo(this.newelement);this.newelement.prepend('<span class=\"ui-selectmenu-status\" />');this.element.bind({\"click.selectmenu\":function(e){t.newelement.focus();e.preventDefault()}});this.newelement.bind(\"mousedown.selectmenu\",function(e){t._toggle(e,true);if(n.style==\"popup\"){t._safemouseup=false;setTimeout(function(){t._safemouseup=true},300)}e.preventDefault()}).bind(\"click.selectmenu\",function(e){e.preventDefault()}).bind(\"keydown.selectmenu\",function(n){var r=false;switch(n.keyCode){case e.ui.keyCode.ENTER:r=true;break;case e.ui.keyCode.SPACE:t._toggle(n);break;case e.ui.keyCode.UP:if(n.altKey){t.open(n)}else{t._moveSelection(-1)}break;case e.ui.keyCode.DOWN:if(n.altKey){t.open(n)}else{t._moveSelection(1)}break;case e.ui.keyCode.LEFT:t._moveSelection(-1);break;case e.ui.keyCode.RIGHT:t._moveSelection(1);break;case e.ui.keyCode.TAB:r=true;break;case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.HOME:t.index(0);break;case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.END:t.index(t._optionLis.length);break;default:r=true}return r}).bind(\"keypress.selectmenu\",function(e){if(e.which>0){t._typeAhead(e.which,\"mouseup\")}return true}).bind(\"mouseover.selectmenu\",function(){if(!n.disabled)e(this).addClass(\"ui-state-hover\")}).bind(\"mouseout.selectmenu\",function(){if(!n.disabled)e(this).removeClass(\"ui-state-hover\")}).bind(\"focus.selectmenu\",function(){if(!n.disabled)e(this).addClass(\"ui-state-focus\")}).bind(\"blur.selectmenu\",function(){if(!n.disabled)e(this).removeClass(\"ui-state-focus\")});e(document).bind(\"mousedown.selectmenu-\"+this.ids[0],function(n){if(t.isOpen&&!e(n.target).closest(\"#\"+t.ids[1]).length){t.close(n)}});this.element.bind(\"click.selectmenu\",function(){t._refreshValue()}).bind(\"focus.selectmenu\",function(){if(t.newelement){t.newelement[0].focus()}});if(!n.width){n.width=this.element.outerWidth()}this.newelement.width(n.width);this.element.hide();this.list=e(\"<ul />\",{\"class\":\"ui-widget ui-widget-content\",\"aria-hidden\":true,role:\"listbox\",\"aria-labelledby\":this.ids[1],id:this.ids[2]});this.listWrap=e(\"<div />\",{\"class\":\"ui-selectmenu-menu\"}).append(this.list).appendTo(n.appendTo);this.list.bind(\"keydown.selectmenu\",function(n){var r=false;switch(n.keyCode){case e.ui.keyCode.UP:if(n.altKey){t.close(n,true)}else{t._moveFocus(-1)}break;case e.ui.keyCode.DOWN:if(n.altKey){t.close(n,true)}else{t._moveFocus(1)}break;case e.ui.keyCode.LEFT:t._moveFocus(-1);break;case e.ui.keyCode.RIGHT:t._moveFocus(1);break;case e.ui.keyCode.HOME:t._moveFocus(\":first\");break;case e.ui.keyCode.PAGE_UP:t._scrollPage(\"up\");break;case e.ui.keyCode.PAGE_DOWN:t._scrollPage(\"down\");break;case e.ui.keyCode.END:t._moveFocus(\":last\");break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:t.close(n,true);e(n.target).parents(\"li:eq(0)\").trigger(\"mouseup\");break;case e.ui.keyCode.TAB:r=true;t.close(n,true);e(n.target).parents(\"li:eq(0)\").trigger(\"mouseup\");break;case e.ui.keyCode.ESCAPE:t.close(n,true);break;default:r=true}return r}).bind(\"keypress.selectmenu\",function(e){if(e.which>0){t._typeAhead(e.which,\"focus\")}return true}).bind(\"mousedown.selectmenu mouseup.selectmenu\",function(){return false});e(window).bind(\"resize.selectmenu-\"+this.ids[0],e.proxy(t.close,this))},_init:function(){var t=this,n=this.options;var r=[];this.element.find(\"option\").each(function(){var i=e(this);r.push({value:i.attr(\"value\"),text:t._formatText(i.text(),i),selected:i.attr(\"selected\"),disabled:i.attr(\"disabled\"),classes:i.attr(\"class\"),typeahead:i.attr(\"typeahead\"),parentOptGroup:i.parent(\"optgroup\"),bgImage:n.bgImage.call(i)})});var i=t.options.style==\"popup\"?\" ui-state-active\":\"\";this.list.html(\"\");if(r.length){for(var s=0;s<r.length;s++){var o={role:\"presentation\"};if(r[s].disabled){o[\"class\"]=\"ui-state-disabled\"}var u={html:r[s].text||\" \",href:\"#nogo\",tabindex:-1,role:\"option\",\"aria-selected\":false};if(r[s].disabled){u[\"aria-disabled\"]=r[s].disabled}if(r[s].typeahead){u[\"typeahead\"]=r[s].typeahead}var a=e(\"<a/>\",u).bind(\"focus.selectmenu\",function(){e(this).parent().mouseover()}).bind(\"blur.selectmenu\",function(){e(this).parent().mouseout()});var f=e(\"<li/>\",o).append(a).data(\"index\",s).addClass(r[s].classes).data(\"optionClasses\",r[s].classes||\"\").bind(\"mouseup.selectmenu\",function(n){if(t._safemouseup&&!t._disabled(n.currentTarget)&&!t._disabled(e(n.currentTarget).parents(\"ul > li.ui-selectmenu-group \"))){t.index(e(this).data(\"index\"));t.select(n);t.close(n,true)}return false}).bind(\"click.selectmenu\",function(){return false}).bind(\"mouseover.selectmenu\",function(n){if(!e(this).hasClass(\"ui-state-disabled\")&&!e(this).parent(\"ul\").parent(\"li\").hasClass(\"ui-state-disabled\")){n.optionValue=t.element[0].options[e(this).data(\"index\")].value;t._trigger(\"hover\",n,t._uiHash());t._selectedOptionLi().addClass(i);t._focusedOptionLi().removeClass(\"ui-selectmenu-item-focus ui-state-hover\");e(this).removeClass(\"ui-state-active\").addClass(\"ui-selectmenu-item-focus ui-state-hover\")}}).bind(\"mouseout.selectmenu\",function(n){if(e(this).is(t._selectedOptionLi())){e(this).addClass(i)}n.optionValue=t.element[0].options[e(this).data(\"index\")].value;t._trigger(\"blur\",n,t._uiHash());e(this).removeClass(\"ui-selectmenu-item-focus ui-state-hover\")});if(r[s].parentOptGroup.length){var l=\"ui-selectmenu-group-\"+this.element.find(\"optgroup\").index(r[s].parentOptGroup);if(this.list.find(\"li.\"+l).length){this.list.find(\"li.\"+l+\":last ul\").append(f)}else{e('<li role=\"presentation\" class=\"ui-selectmenu-group '+l+(r[s].parentOptGroup.attr(\"disabled\")?\" \"+'ui-state-disabled\" aria-disabled=\"true\"':'\"')+'><span class=\"ui-selectmenu-group-label\">'+r[s].parentOptGroup.attr(\"label\")+\"</span><ul></ul></li>\").appendTo(this.list).find(\"ul\").append(f)}}else{f.appendTo(this.list)}if(n.icons){for(var c in n.icons){if(f.is(n.icons[c].find)){f.data(\"optionClasses\",r[s].classes+\" ui-selectmenu-hasIcon\").addClass(\"ui-selectmenu-hasIcon\");var h=n.icons[c].icon||\"\";f.find(\"a:eq(0)\").prepend('<span class=\"ui-selectmenu-item-icon ui-icon '+h+'\"></span>');if(r[s].bgImage){f.find(\"span\").css(\"background-image\",r[s].bgImage)}}}}}}else{e(' <li role=\"presentation\"><a href=\"#nogo\" tabindex=\"-1\" role=\"option\"></a></li>').appendTo(this.list)}var p=n.style==\"dropdown\";this.newelement.toggleClass(\"ui-selectmenu-dropdown\",p).toggleClass(\"ui-selectmenu-popup\",!p);this.list.toggleClass(\"ui-selectmenu-menu-dropdown ui-corner-bottom\",p).toggleClass(\"ui-selectmenu-menu-popup ui-corner-all\",!p).find(\"li:first\").toggleClass(\"ui-corner-top\",!p).end().find(\"li:last\").addClass(\"ui-corner-bottom\");this.selectmenuIcon.toggleClass(\"ui-icon-triangle-1-s\",p).toggleClass(\"ui-icon-triangle-2-n-s\",!p);if(n.style==\"dropdown\"){this.list.width(n.menuWidth?n.menuWidth:n.width)}else{this.list.width(n.menuWidth?n.menuWidth:n.width-n.handleWidth)}this.list.css(\"height\",\"auto\");var d=this.listWrap.height();var v=e(window).height();var m=n.maxHeight?Math.min(n.maxHeight,v):v/3;if(d>m)this.list.height(m);this._optionLis=this.list.find(\"li:not(.ui-selectmenu-group)\");if(this.element.attr(\"disabled\")){this.disable()}else{this.enable()}this._refreshValue();this._selectedOptionLi().addClass(\"ui-selectmenu-item-focus\");clearTimeout(this.refreshTimeout);this.refreshTimeout=window.setTimeout(function(){t._refreshPosition()},200)},destroy:function(){this.element.removeData(this.widgetName).removeClass(\"ui-selectmenu-disabled\"+\" \"+\"ui-state-disabled\").removeAttr(\"aria-disabled\").unbind(\".selectmenu\");e(window).unbind(\".selectmenu-\"+this.ids[0]);e(document).unbind(\".selectmenu-\"+this.ids[0]);this.newelementWrap.remove();this.listWrap.remove();this.element.unbind(\".selectmenu\").show();e.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(e,t){var n=this,r=String.fromCharCode(e).toLowerCase(),i=null,s=null;if(n._typeAhead_timer){window.clearTimeout(n._typeAhead_timer);n._typeAhead_timer=undefined}n._typeAhead_chars=(n._typeAhead_chars===undefined?\"\":n._typeAhead_chars).concat(r);if(n._typeAhead_chars.length<2||n._typeAhead_chars.substr(-2,1)===r&&n._typeAhead_cycling){n._typeAhead_cycling=true;i=r}else{n._typeAhead_cycling=false;i=n._typeAhead_chars}var o=(t!==\"focus\"?this._selectedOptionLi().data(\"index\"):this._focusedOptionLi().data(\"index\"))||0;for(var u=0;u<this._optionLis.length;u++){var a=this._optionLis.eq(u).text().substr(0,i.length).toLowerCase();if(a===i){if(n._typeAhead_cycling){if(s===null)s=u;if(u>o){s=u;break}}else{s=u}}}if(s!==null){this._optionLis.eq(s).find(\"a\").trigger(t)}n._typeAhead_timer=window.setTimeout(function(){n._typeAhead_timer=undefined;n._typeAhead_chars=undefined;n._typeAhead_cycling=undefined},n.options.typeAhead)},_uiHash:function(){var t=this.index();return{index:t,option:e(\"option\",this.element).get(t),value:this.element[0].value}},open:function(e){if(this.newelement.attr(\"aria-disabled\")!=\"true\"){var t=this,n=this.options,r=this._selectedOptionLi(),i=r.find(\"a\");t._closeOthers(e);t.newelement.addClass(\"ui-state-active\");t.list.attr(\"aria-hidden\",false);t.listWrap.addClass(\"ui-selectmenu-open\");if(n.style==\"dropdown\"){t.newelement.removeClass(\"ui-corner-all\").addClass(\"ui-corner-top\")}else{this.list.css(\"left\",-5e3).scrollTop(this.list.scrollTop()+r.position().top-this.list.outerHeight()/2+r.outerHeight()/2).css(\"left\",\"auto\")}t._refreshPosition();if(i.length){i[0].focus()}t.isOpen=true;t._trigger(\"open\",e,t._uiHash())}},close:function(e,t){if(this.newelement.is(\".ui-state-active\")){this.newelement.removeClass(\"ui-state-active\");this.listWrap.removeClass(\"ui-selectmenu-open\");this.list.attr(\"aria-hidden\",true);if(this.options.style==\"dropdown\"){this.newelement.removeClass(\"ui-corner-top\").addClass(\"ui-corner-all\")}if(t){this.newelement.focus()}this.isOpen=false;this._trigger(\"close\",e,this._uiHash())}},change:function(e){this.element.trigger(\"change\");this._trigger(\"change\",e,this._uiHash())},select:function(e){if(this._disabled(e.currentTarget)){return false}this._trigger(\"select\",e,this._uiHash())},widget:function(){return this.listWrap.add(this.newelementWrap)},_closeOthers:function(t){e(\".ui-selectmenu.ui-state-active\").not(this.newelement).each(function(){e(this).data(\"selectelement\").selectmenu(\"close\",t)});e(\".ui-selectmenu.ui-state-hover\").trigger(\"mouseout\")},_toggle:function(e,t){if(this.isOpen){this.close(e,t)}else{this.open(e)}},_formatText:function(t,n){if(this.options.format){t=this.options.format(t,n)}else if(this.options.escapeHtml){t=e(\"<div />\").text(t).html()}return t},_selectedIndex:function(){return this.element[0].selectedIndex},_selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())},_focusedOptionLi:function(){return this.list.find(\".ui-selectmenu-item-focus\")},_moveSelection:function(e,t){if(!this.options.disabled){var n=parseInt(this._selectedOptionLi().data(\"index\")||0,10);var r=n+e;if(r<0){r=0}if(r>this._optionLis.size()-1){r=this._optionLis.size()-1}if(r===t){return false}if(this._optionLis.eq(r).hasClass(\"ui-state-disabled\")){e>0?++e:--e;this._moveSelection(e,r)}else{this._optionLis.eq(r).trigger(\"mouseover\").trigger(\"mouseup\")}}},_moveFocus:function(e,t){if(!isNaN(e)){var n=parseInt(this._focusedOptionLi().data(\"index\")||0,10);var r=n+e}else{var r=parseInt(this._optionLis.filter(e).data(\"index\"),10)}if(r<0){r=0}if(r>this._optionLis.size()-1){r=this._optionLis.size()-1}if(r===t){return false}var i=\"ui-selectmenu-item-\"+Math.round(Math.random()*1e3);this._focusedOptionLi().find(\"a:eq(0)\").attr(\"id\",\"\");if(this._optionLis.eq(r).hasClass(\"ui-state-disabled\")){e>0?++e:--e;this._moveFocus(e,r)}else{this._optionLis.eq(r).find(\"a:eq(0)\").attr(\"id\",i).focus()}this.list.attr(\"aria-activedescendant\",i)},_scrollPage:function(e){var t=Math.floor(this.list.outerHeight()/this._optionLis.first().outerHeight());t=e==\"up\"?-t:t;this._moveFocus(t)},_setOption:function(e,t){this.options[e]=t;if(e==\"disabled\"){if(t)this.close();this.element.add(this.newelement).add(this.list)[t?\"addClass\":\"removeClass\"](\"ui-selectmenu-disabled \"+\"ui-state-disabled\").attr(\"aria-disabled\",t)}},disable:function(e,t){if(typeof e==\"undefined\"){this._setOption(\"disabled\",true)}else{if(t==\"optgroup\"){this._toggleOptgroup(e,false)}else{this._toggleOption(e,false)}}},enable:function(e,t){if(typeof e==\"undefined\"){this._setOption(\"disabled\",false)}else{if(t==\"optgroup\"){this._toggleOptgroup(e,true)}else{this._toggleOption(e,true)}}},_disabled:function(t){return e(t).hasClass(\"ui-state-disabled\")},_toggleOption:function(e,t){var n=this._optionLis.eq(e);if(n){n.toggleClass(\"ui-state-disabled\",t).find(\"a\").attr(\"aria-disabled\",!t);if(t){this.element.find(\"option\").eq(e).attr(\"disabled\",\"disabled\")}else{this.element.find(\"option\").eq(e).removeAttr(\"disabled\")}}},_toggleOptgroup:function(e,t){var n=this.list.find(\"li.ui-selectmenu-group-\"+e);if(n){n.toggleClass(\"ui-state-disabled\",t).attr(\"aria-disabled\",!t);if(t){this.element.find(\"optgroup\").eq(e).attr(\"disabled\",\"disabled\")}else{this.element.find(\"optgroup\").eq(e).removeAttr(\"disabled\")}}},index:function(t){if(arguments.length){if(!this._disabled(e(this._optionLis[t]))&&t!=this._selectedIndex()){this.element[0].selectedIndex=t;this._refreshValue();this.change()}else{return false}}else{return this._selectedIndex()}},value:function(e){if(arguments.length&&e!=this.element[0].value){this.element[0].value=e;this._refreshValue();this.change()}else{return this.element[0].value}},_refreshValue:function(){var e=this.options.style==\"popup\"?\" ui-state-active\":\"\";var t=\"ui-selectmenu-item-\"+Math.round(Math.random()*1e3);this.list.find(\".ui-selectmenu-item-selected\").removeClass(\"ui-selectmenu-item-selected\"+e).find(\"a\").attr(\"aria-selected\",\"false\").attr(\"id\",\"\");this._selectedOptionLi().addClass(\"ui-selectmenu-item-selected\"+e).find(\"a\").attr(\"aria-selected\",\"true\").attr(\"id\",t);var n=this.newelement.data(\"optionClasses\")?this.newelement.data(\"optionClasses\"):\"\";var r=this._selectedOptionLi().data(\"optionClasses\")?this._selectedOptionLi().data(\"optionClasses\"):\"\";this.newelement.removeClass(n).data(\"optionClasses\",r).addClass(r).find(\".ui-selectmenu-status\").html(this._selectedOptionLi().find(\"a:eq(0)\").html());this.list.attr(\"aria-activedescendant\",t)},_refreshPosition:function(){var t=this.options,n={of:this.newelement,my:\"left top\",at:\"left bottom\",collision:\"flip\"};if(t.style==\"popup\"){var r=this._selectedOptionLi();n.my=\"left top\"+(this.list.offset().top-r.offset().top-(this.newelement.outerHeight()+r.outerHeight())/2);n.collision=\"fit\"}this.listWrap.removeAttr(\"style\").zIndex(this.element.zIndex()+2).position(e.extend(n,t.positionOptions))}})})(jQuery)\n\t\t</script>\n\t\t<?php\n\t}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function escort_files() {\n wp_enqueue_script('adding-js', get_theme_file_uri('/script.js'), array(), false, true );\n wp_register_style('add-bx-css1', get_stylesheet_directory_uri() . '/css/style.css', array(), '1', 'all');\n wp_register_style('add-bx-css2', get_stylesheet_directory_uri() . '/css/bootstrap.css', array(), '1', 'all');\n wp_register_style('add-bx-css3', get_stylesheet_directory_uri() . '/css/flexslider.css', array(), '1', 'all');\n wp_register_style('add-bx-css4', get_stylesheet_directory_uri() . '/css/popuo-box.css', array(), '1', 'all');\n wp_register_style('font-awesome', get_stylesheet_directory_uri() . '/css///netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '1', 'all');\n\n /* wp_enqueue_script('add-bx-js1');\n wp_enqueue_script('add-bx-js2');\n wp_enqueue_script('add-bx-js3');\n wp_enqueue_script('add-bx-js4');\n wp_enqueue_script('add-bx-js5');\n wp_enqueue_script('add-bx-js6');*/\n wp_enqueue_style('add-bx-css1');\n wp_enqueue_style('add-bx-css2');\n wp_enqueue_style('add-bx-css3');\n wp_enqueue_style('add-bx-css4');\n wp_enqueue_style('font-awesome');\n}", "function ajax_filter_get_posts( $post ) {\n\n\t// Verify nonce\n\tif( !isset( $_POST['afp_nonce'] ) || !wp_verify_nonce( $_POST['afp_nonce'], 'afp_nonce' ) )\n\t\tdie('Permission denied');\n\n\t$category = $_POST['category'];\n\t$tag = $_POST['tag'];\n\t$postType = $_POST['postType'];\n\t\n\t$postTypeArray = explode(',',$postType);\n\t\n\t$categoryArray = explode(',',$category);\n\t$search = $_POST['search'];\n\t$author = $_POST['author'];\n\t//excluded posts\n\t$exclude = $_POST['ids'];\n\t//what type of filter?\n\t$filterType = $_POST['filterType'];\n\t//what is the selection?\n\t$selection = $_POST['selection'];\n\t$selectionArray = explode(',',$selection);\n\t//are we filtering or loading more?\n\t$loadMore = $_POST['loadMore'];\n\t//what type of page are we on?\n\t$pageType = $_POST['pageType'];\n\t//if we are on a category or tag page, what is the term?\n\t$pageCategory = $_POST['pageCategory'];\n\n\t//separate the year and month\n\t$year = $selectionArray[0];\n\t$month = $selectionArray[1];\n\t\n\tif($month) {\n\t\t$month = $month;\n\t} else {\n\t\t$month = '';\n\t}\n\n\n\tif($loadMore == 'true') {\n\t\t//if we are loading more\n\n\t\tif($filterType == 'author') {\n\t\t\t\t//if load more on author archive\n\t\t\t\t$args = array(\n\t\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t\t'author_name'\t\t=> $selection\n\t\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'category') {\n\t\t\t//if filtering by year on a category page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'cat'\t\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'tag') {\n\t\t\t//if filtering by year on a tag page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'tag_id'\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'press') {\n\t\t\t//if filtering by year on press page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'date_query' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'press_tag') {\n\t\t\t//if filtering by press_tag on press page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'tax_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'taxonomy' => 'press_tag',\n\t\t\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t\t\t'terms' => $selection,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'category' && $pageType == 'blog') {\n\t\t\t//if loading more on a category page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'category__in'\t\t=> $selectionArray \n\t\t\t); \n\t\t} else if($pageType == 'blog') {\n\t\t\t//if loading more on blog landing page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t} else if($filterType == 'category') {\n\t\t\t//if loading more on a category page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'category__in'\t\t=> $selectionArray \n\t\t\t); \n\t\t} else if($pageType == 'press') {\n\t\t\t//if loading more on a press page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t} else if($filterType == 'tag') {\n\t\t\t//if loading more on a tag page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'tag__in'\t\t\t=> $selectionArray \n\t\t\t); \n\t\t} else if($filterType == 'type') {\n\t\t\t//if filtering by post type\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> $selectionArray,\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t's'\t\t\t\t\t=> $search,\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t}\t\n\t} else {\n\t\t//if we are filtering\n\n\t\tif($filterType == 'year' && $pageType == 'category') {\n\t\t\t//if filtering by year on a category page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'cat'\t\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'tag') {\n\t\t\t//if filtering by year on a tag page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'tag_id'\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'press') {\n\t\t\t//if filtering by year on a press page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'date_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'press_tag' && $pageType == 'press') {\n\t\t\t//if filtering by press tag on a press page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'tax_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'taxonomy' => 'press_tag',\n\t\t\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t\t\t'terms' => $selection,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'category' && $pageType == 'blog') {\n\t\t\t//if filtering by category on blog landing page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'cat'\t\t\t\t=> $selection,\n\t\t\t); \n\t\t} else if($filterType == 'type') {\n\t\t\t//if filtering by post type\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> $selectionArray,\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t's'\t\t\t\t\t=> $search,\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t}\n \n\n\t}\n\n\t$query = new WP_Query( $args );\n\t$count = $query->post_count;\n\n\tif ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();\n\t\t\t\t\n\t\t\tif($search) {\n\t\t\t\t$search = 'true';\n\t\t\t} else {\n\t\t\t\t$search = 'false';\n\t\t\t}\n\n\t\t\t$postID = get_the_ID();\n\t\t\t$maxPages = $query->max_num_pages;\n\t\t\t$link = get_the_permalink($postID);\n\t\t\t$postType = get_post_type($postID);\n\t\t\t$category = get_the_category($postID);\n\t\t\t$thumbnail = get_the_post_thumbnail_url($postID, 'full');\n\n\t\t\tif($thumbnail) {\n\t\t\t\t $thumbnail = '<div class=\"image-wrapper\"><img width=\"800\" height=\"800\" src=\"'.$thumbnail.'\" class=\"attachment-square size-square wp-post-image\" alt=\"\"></div>';\n\t\t\t\t $thumbnailClass = ' feed-item-image';\n\t\t\t} else {\n\t\t\t\t$thumbnail = '';\n\t\t\t\t$thumbnailClass = '';\n\t\t\t}\n\n\n\n\t\t\t$results = '';\n\n\t\t\tif(($postType == 'post') || ($search == 'true') || ($postType == 'press')) {\n\t\t\t\t$results = '<li class=\"new-elements load-item feed-item background-white'.$thumbnailClass.'\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\">'.$thumbnail.'<a href=\"'.$link.'\" class=\"full-link\"></a><div class=\"feed-item-inner padding-mobile-20\"><time class=\"caption margin-mobile-bottom-20\"><a href=\"/category/'.$category[0]->slug.'\">'.$category[0]->name.'</a></time><h2 class=\"headline3 margin-mobile-bottom-10\"><a href=\"'.$link.'\">'.get_the_title($postID).'</a></h2><p>'.excerpt(15).'</p><a href=\"'.$link.'\" class=\"cta-link cta-link-small cta-link-absolute\">Posted '.get_the_time('F j, Y').' &mdash; Read more</a></div></li>';\n\t\t\t\t\n\t\t\t} else if($postType == 'challenges') {\n\t\t\t\t$results = '<li class=\"new-elements load-item feed-item news-item no-indent background-white\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\"> <a class=\"full-link\" href=\"'.$link.'\"></a><h5 class=\"eyebrow margin-mobile-bottom-10\">'.get_field('challenges_header', $postID).'</h5><h3 class=\"headline2-alt\">'.get_the_title($postID).'</h3></li>';\n\t\t\t} else if($postType == 'campaigns') {\n\t\t\t\t$results = '<div class=\"new-elements load-item small-content-item feed-item column pure-u-lg-12-12 pure-u-md-12-12 pure-u-sm-12-12\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\"><a href=\"'.$link.'\" class=\"full-link\"></a><div class=\"small-content-inner\"><div class=\"small-image\"><img alt=\"'.get_the_title($postID).'\" src=\"'.get_the_post_thumbnail_url($postID, 'full').'\" title=\"'.get_the_title($postID).'\"></div><div class=\"small-content\"><h2 class=\"headline2-alt\"><a href=\"'.$link.'\">'.get_the_title($postID).'</a></h2><p class=\"margin-mobile-bottom-10 margin-tablet-landscape-bottom-20 margin-mobile-top-10 margin-tablet-landscape-top-20\">'.excerpt(30).'</p><a class=\"cta-link cta-link-small\" href=\"'.$link.'\" title=\"Read more\">Read more</a></div></div></div>';\n\t\t\t} else {\n\t\t\t\t$results = '<li class=\"new-elements load-item feed-item background-white'.$thumbnailClass.'\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\">'.$thumbnail.'<a href=\"'.$link.'\" class=\"full-link\"></a><div class=\"feed-item-inner padding-mobile-20\"><time class=\"caption margin-mobile-bottom-20\">'.get_the_time('F j, Y').'</time><h2 class=\"headline3 margin-mobile-bottom-10\"><a href=\"'.$link.'\">'.get_the_title($postID).'</a></h2><p>'.excerpt(15).'</p><a href=\"'.$link.'\" class=\"cta-link cta-link-small cta-link-absolute\">Read more</a></div></li>';\n\t\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\t$result['response'][] = $results;\n\t\t\t$result['status'] = 'done';\n\t\n\tendwhile; else:\n\t\t$result['response'] = '<li class=\"feed-item load-item padding-mobile-20 padding-tablet-landscape-40 padding-tablet-landscape-left-85 component-theme-white padding-tablet-landscape-right-85\" data-max-pages=\"0\" data-results-count=\"0\"><h3 class=\"headline3\">There is no content that matches your filter</h3></li>';\n\t\t$result['status'] = '404';\n\tendif;\n \n\t$result = json_encode($result);\n\techo $result;\n\t\n\n\tdie();\n}", "public static function footer_scripts()\n\t{\n\t\tself::$_configInstance->footer_scripts();\n\t}", "function wck_page_load_scripts() {\t\t\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\t//<![CDATA[\r\n\t\t\tjQuery(document).ready( function($) {\r\n\t\t\t\t$('.if-js-closed').removeClass('if-js-closed').addClass('closed');\r\n\t\t\t\tpostboxes.add_postbox_toggles( '<?php echo $this->hookname; ?>' );\r\n\t\t\t});\r\n\t\t\t//]]>\r\n\t\t</script><?php\r\n\t}", "function jb_dripdeals_load_more_scripts()\n{\n\n global $wp_query;\n\n $args = array(\n 'post_type' => 'product',\n 'posts_per_page' => POST_PER_PAGE,\n);\n$products = new WP_Query($args);\n$variables = $products->query_vars;\n$page = $variables['paged'];\n\n//var_dump($products->max_num_pages);\n // In most cases it is already included on the page and this line can be removed\n wp_enqueue_script('jquery');\n\n wp_register_script('loadmore', get_stylesheet_directory_uri() . '/js/loadmore.js', array('jquery'));\n\n \n wp_localize_script('loadmore', 'jb_dripdeals_loadmore_params', array(\n 'ajaxurl' => site_url() . '/wp-admin/admin-ajax.php', // WordPress AJAX\n 'posts' => json_encode($variables), // everything about our loop is here\n 'current_page' => $page ? $page : 1,\n 'max_page' => $products->max_num_pages,\n ));\n\n wp_enqueue_script('loadmore');\n}", "function rssmi_footer_scripts() {\n\twp_enqueue_style( 'frontend', plugins_url( 'css/frontend.css', dirname( __FILE__ ) ) );\n\twp_enqueue_script( 'showexcerpt', plugins_url( 'scripts/show-excerpt.js', dirname( __FILE__ ) ) );\n}", "public function after() {\n if ($this->auto_render) {\n // Define defaults\n $styles = array('assets/css/main.css' => 'screen');\n $scripts = array('assets/js/jquery-1.10.1.js');\n\n // Add defaults to template variables.\n $this->template->styles = array_reverse(array_merge($this->template->styles, $styles));\n $this->template->scripts = array_reverse(array_merge($this->template->scripts, $scripts));\n }\n\n // Run anything that needs to run after this.\n parent::after();\n }", "public function init()\r\n {\r\n add_action('wp_footer', array($this, 'display'));\r\n }", "function _appthemes_register_theme_scripts() {\n\n\t// Minimize prod or show expanded in dev.\n\t$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\trequire_once APP_THEME_FRAMEWORK_DIR . '/js/localization.php';\n\n\twp_register_script( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/jquery.colorbox{$min}.js\", array( 'jquery' ), '1.6.1' );\n\twp_register_style( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/colorbox{$min}.css\", false, '1.6.1' );\n\twp_register_style( 'font-awesome', APP_THEME_FRAMEWORK_URI . \"/lib/font-awesome/css/font-awesome{$min}.css\", false, '4.7.0' );\n\n\twp_register_script( 'footable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable{$min}.js\", array( 'jquery' ), '2.0.3' );\n\twp_register_script( 'footable-grid', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.grid{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-sort', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.sort{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-filter', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.filter{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-striping', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.striping{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-paginate', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.paginate{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-bookmarkable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.bookmarkable{$min}.js\", array( 'footable' ), '2.0.3' );\n\n\t_appthemes_localize_theme_scripts();\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function cmdeals_meta_scripts() {\n\t?>\n\t<script type=\"text/javascript\">\n\t\tjQuery(function(){\n\t\t\t<?php do_action('cmdeals_deals_write_panel_js'); ?>\n\t\t});\n\t</script>\n\t<?php\n}", "function onAfterRender()\r\n {\r\n $app = JFactory::getApplication();\r\n\t\tif($app->isAdmin()) return;\t\r\n\r\n $input = $output = JResponse::getBody();\r\n $bparts = explode('<body',$input);\r\n \r\n if (count($bparts)>1)\r\n \t{\r\n \t$before = $bparts[0];\r\n \t$input = '<body';\r\n \tfor($c=1; $c < count($bparts); $c++) $input .= $bparts[$c];\r\n \t$output = $input;\r\n \t}\t\r\n \t\r\n if (preg_match_all(\"#{(.*?)}#s\", $input, $matches) > 0) // any plugins?\r\n \t{\r\n\t\tforeach ($matches[0] as $match) // loop through all plugins\r\n\t\t\t{\t\r\n\t\t\t$parts = explode('|',trim($match,'{}'));\r\n \t\t\tif ($parts[0]=='hotelgallery') // found a match!\r\n \t\t\t\t{\r\n\t \t\t\t\t$pluginRoot = JURI::root().\"/plugins/system/hotelgallery\";\r\n \t\t\t\t\t$id = $parts[1];\r\n \t\t\t\t\t\r\n \t\t\t\t\t$db = JFactory::getDBO();\r\n \t\t\t\t\t$db->setQuery(\"SELECT * FROM `#__hotelreservation_hotel_pictures` WHERE hotel_id=$id\");\r\n \t\t\t\t\t$pictures= $db->loadObjectList();\r\n \t\t\t\t\t//dmp($pictures);\r\n \t\t\t\t\t$div = \"<div class=\\\"gamma-container gamma-loading\\\" id=\\\"gamma-container\\\">\r\n \t\t\t\t\t\t\t<ul class=\\\"gamma-gallery\\\">\";\r\n \t\t\t\t\t$script = \" </ul>\r\n \t\t\t\t\t<div class=\\\"gamma-overlay\\\"></div>\r\n\t\t \r\n\t\t</div>\r\n\r\n\t\t<script src=\\\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/modernizr.custom.70736.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/jquery.masonry.min.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/jquery.history.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/js-url.min.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/jquerypp.custom.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/gamma.js\\\"></script>\r\n\t\t<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"{$pluginRoot}/gallery/css/style.css\\\"/>\r\n\t\t<script type=\\\"text/javascript\\\">\r\n\t\t\t\t$ = jQuery.noConflict( true );\r\n\t\t\t\t$(function() {\r\n\r\n\t\t\t\tvar GammaSettings = {\r\n\t\t\t\t\t\t// order is important!\r\n\t\t\t\t\t\tviewport : [ {\r\n\t\t\t\t\t\t\twidth : 1200,\r\n\t\t\t\t\t\t\tcolumns : 5\r\n\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\twidth : 900,\r\n\t\t\t\t\t\t\tcolumns : 4\r\n\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\twidth : 500,\r\n\t\t\t\t\t\t\tcolumns : 3\r\n\t\t\t\t\t\t}, { \r\n\t\t\t\t\t\t\twidth : 320,\r\n\t\t\t\t\t\t\tcolumns : 2\r\n\t\t\t\t\t\t}, { \r\n\t\t\t\t\t\t\twidth : 0,\r\n\t\t\t\t\t\t\tcolumns : 2\r\n\t\t\t\t\t\t} ]\r\n\t\t\t\t};\r\n\r\n\t\t\t\tGamma.init( GammaSettings, fncallback );\r\n\t\t\t\tfunction fncallback() {\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t</script>\t\";\r\n\r\n \t\t\t\t\tforeach( $pictures as $index=>$picture ){\r\n \t\t\t\t\t\t$picture->hotel_picture_path = JURI::root() .PATH_PICTURES.$picture->hotel_picture_path;\r\n$replace .= <<<ASDF\r\n\r\n\t\t\r\n\t\t \r\n\t\t \r\n\t\t <li>\r\n\t\t <div data-alt=\"img01\" data-description=\"<h3>{$pictures[$index]->hotel_picture_info}</h3>\" data-max-width=\"1800\" data-max-height=\"2400\">\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"1300\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"1000\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"700\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"300\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"200\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"140\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\"></div>\r\n\t\t <noscript>\r\n\t\t <img src=\"{$pictures[$index]->hotel_picture_path}\" alt=\"img01\"/>\r\n\t\t </noscript>\r\n\t\t </div>\r\n\t\t </li>\r\n\t\t\t\t\t\t \t\t\t \t\t \t\t \r\n\t\t \r\n\t\t \r\n\t\t \r\nASDF;\r\n$valor = $div.$replace.$script;\r\n\t\t\t\t\t} \r\n\r\n \t\t\t\t// replace\r\n \t\t\t\t$output\t= str_replace($match,$valor,$output);\r\n \t\t\t\t}\r\n \t\t}\r\n \t}\r\n\t\tif ($input != $output) JResponse::setBody($before . $output);\r\n\t\treturn true;\r\n\t\t}", "public static function displayFooter() {\r\n ?>\r\n <br><br><br>\r\n <div id=\"push\"></div>\r\n </div>\r\n <div id=\"footer\"><br>&copy 2016 Power House. All Rights Reserved.</div>\r\n <script type=\"text/javascript\" src=\"<?= BASE_URL ?>/www/js/ajax_autosuggestion.js\"></script>\r\n </body>\r\n </html>\r\n <?php\r\n }", "function boom_enqueue_scripts() {\n\twp_enqueue_style( 'boom-styles', get_stylesheet_uri(), array(), '1.0' );\n\twp_enqueue_script( 'jquery' );\n\twp_enqueue_script( 'main_js', get_template_directory_uri() . '/js/scripts.pack.js', array(), '1.0', true );\n\n\n\t// LOCALIZE SCRIPT (References for Ajax Functions)\n\tglobal $wp_query, $post;\n\n\t\n\t$query = $wp_query;\n\t$section = getBlogSectionName();\n\tif($section == 'home'){\n\t\t$exlude_post_ids = [];\n\n\t\t// Exclude first 3 featured posts\n\t\t$featured_args = array(\n\t\t 'posts_per_page' => 3,\n\t\t 'meta_key' => 'featuredPost-checkbox',\n\t\t 'meta_value' => 'yes'\n\t\t);\n\t\t$featured_posts = new WP_Query($featured_args);\n\t\twhile($featured_posts->have_posts()):\n\t\t\t$featured_posts->the_post();\n\t\t\tarray_push($exlude_post_ids, get_the_ID());\n\t\tendwhile;\n\t\twp_reset_postdata(); \n\n\t\t// Exclude 3 'Latest' Posts\n\t\t$latest_args = array(\n\t\t 'posts_per_page' => 3,\n\t\t 'post__not_in' => $exlude_post_ids\n\t\t);\n\t\t$latest_posts = new WP_Query($latest_args);\n\t\twhile($latest_posts->have_posts()):\n\t\t\t$latest_posts->the_post();\n\t\t\tarray_push($exlude_post_ids, get_the_ID());\n\t\tendwhile;\n\t\twp_reset_postdata(); \n\n\t\t// Get All posts, except selected posts from above\n\t\t$args = array(\n\t\t 'post__not_in' => $exlude_post_ids\n\t\t);\n\t\t$query = new WP_Query($args);\n\n\n\t} else if($section == 'single'){\n\t\t$args = array(\n\t\t\t'cat'\t\t\t\t=> array(get_the_category($query->post->ID)[0]->term_id),\n\t\t\t'posts_per_page'\t=> 1,\n\t\t\t'post__not_in'\t\t=> array($post->ID)\n\t\t);\n\t\t$query = new WP_Query($args);\n\n\n\t} else if($section == 'category'){\n\t\t$args = array(\n\t\t\t'cat'\t\t\t\t=> array(get_category(get_query_var( 'cat' ))->cat_ID),\n\t\t\t'posts_per_page'\t=> 7,\n\t\t\t'offset'\t\t\t=> 10\n\t\t);\n\t\t$query = new WP_Query($args);\n\t}\n\n\t$reference_object = array(\n\t\t'base'\t\t\t\t=> get_template_directory_uri(),\n\t\t'ajaxurl'\t\t\t=> admin_url( 'admin-ajax.php' ),\n\t\t'query_vars' \t\t=> json_encode( $query->query_vars ),\n\t\t'actual_page'\t\t=> get_query_var('paged') > 1 ? get_query_var('paged') : 1,\n\t\t'total_pages'\t\t=> $query->max_num_pages,\n\t\t'section'\t\t\t=> $section,\n\t\t'isMobile'\t\t\t=> wp_is_mobile() ? 'true' : 'false',\n 'category' => get_category($query->query_vars['cat'])->slug\n\n\t);\n\twp_localize_script('main_js', 'base_reference', $reference_object );\n}", "function ineedmyjava() {\n\tif (!is_admin()) {\n \n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', false, '1.11.0', true);\n\t\twp_enqueue_script('jquery');\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'custom',\n\t\t\tget_bloginfo('template_directory') . '/js/custom.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('custom');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'isotope',\n\t\t\tget_bloginfo('template_directory') . '/js/isotope.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('isotope');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'images',\n\t\t\tget_bloginfo('template_directory') . '/js/images-loaded.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('images');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'bootstrap',\n\t\t\tget_bloginfo('template_directory') . '/js/bootstrap.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('bootstrap');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'colorbox',\n\t\t\tget_bloginfo('template_directory') . '/js/colorbox.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('colorbox');\n\t\t\n\t\t\n\t\t\n\t}\n}", "function childtheme_override_postfooter() {}", "function neobeat_include_masonry_scripts() {\n\t\twp_enqueue_script( 'isotope' );\n\t\twp_enqueue_script( 'packery' );\n\t}", "function get_all_product_posts($query ) {\n if (is_post_type_archive( 'product') && !is_admin() && $query->is_main_query()) {\n $query->set('posts_per_page' , '16');\n $query->set('orderby', 'title');\n $query->set('order' , 'ASC');\n } //elseif for categories\n}", "public static function alm_enqueue_filters_admin_scripts(){\n\n \twp_enqueue_style( 'alm-filters-admin', ALM_FILTERS_URL. '/dist/css/admin_styles.css', '');\n \twp_enqueue_script( 'alm-filters-admin', ALM_FILTERS_URL. '/dist/js/admin.js', '', ALM_FILTERS_VERSION, true);\n\n \twp_localize_script(\n \t\t'alm-filters-admin', 'alm_filters_localize', array(\n \t\t\t'root' => esc_url_raw( rest_url() ),\n \t\t\t'nonce' => wp_create_nonce( 'wp_rest' ),\n \t\t\t'base_url' => get_admin_url() .'admin.php?page=ajax-load-more-filters',\n \t\t\t'delete_filter' => __('Are you sure you want to delete', 'ajax-load-more-filters'),\n \t\t\t'ordering_parameters' => __('Ordering Parameters', 'ajax-load-more-filters'),\n \t\t\t'date_parameters' => __('Date Parameters', 'ajax-load-more-filters'),\n \t\t\t'category_parameters' => __('Category Parameters', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_beta' => __('Beta', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_basic' => __('Basic Form Fields', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_adv' => __('Advanced Form Fields', 'ajax-load-more-filters'),\n \t\t\t'tag_parameters' => __('Tag Parameters', 'ajax-load-more-filters'),\n \t\t\t'create_filter' => __('Create Filter', 'ajax-load-more-filters'),\n \t\t\t'update_filter' => __('Save Changes', 'ajax-load-more-filters'),\n \t\t\t'saved_filter' => __('Filter Saved', 'ajax-load-more-filters')\n \t\t)\n \t);\n\n \t}", "public function dld_enqueue_scripts($hook)\n {\n if (array_key_exists('page', $_GET) && $_GET['page'] == 'woocommerce-delivery-schedular') {\n wp_enqueue_script('jquery-ui-datepicker');\n wp_enqueue_script('WOO-QB-bootstrap-javascript', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js');\n }\n global $post;\n if ($hook == 'post-new.php' || $hook == 'post.php' || (array_key_exists('page', $_GET) && $_GET['page'] == 'woocommerce-delivery-schedular')) {\n if ($post && 'product' === $post->post_type || (array_key_exists('page', $_GET) && $_GET['page'] == 'woocommerce-delivery-schedular')) {\n wp_enqueue_script($this->plugin_name . '-admin', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/delivery-date-admin.js', array('jquery'), $this->version, false);\n wp_enqueue_script($this->plugin_name . '-custom-admin', plugin_dir_url(__FILE__) . '/custom-delivery-date-admin.js', array('jquery'), $this->version, false);\n wp_enqueue_script($this->plugin_name . '-multiDatepicker', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/jquery-ui.multidatespicker.js', array('jquery'), $this->version, false);\n\n wp_enqueue_script($this->plugin_name . '-moment', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/moment.min.js', array('jquery'), $this->version, false);\n wp_enqueue_script($this->plugin_name . '-daterangepicker', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/daterangepicker.min.js', array('jquery'), $this->version, false);\n }\n }\n }", "function Helsingborg_scripts() {\n wp_deregister_script( 'jquery' );\n\n // register scripts\n wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr/modernizr.min.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery-ui', get_template_directory_uri() . '/js/jquery/dist/jquery-ui.min.js', array(), '1.0.0', false );\n\n /**\n * EVENT LIST PAGE\n **/\n if ( is_page_template( 'templates/event-list-page.php' )) {\n // Register scripts\n wp_enqueue_script( 'zurb5-multiselect', get_template_directory_uri() . '/js/foundation-multiselect/zmultiselect/zurb5-multiselect.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery-datetimepicker', get_template_directory_uri() . '/js/jquery.datetimepicker.js', array(), '1.0.0', false );\n wp_enqueue_script( 'knockout', get_template_directory_uri() . '/js/knockout/dist/knockout.js', array(), '3.2.0', false );\n wp_enqueue_script( 'event-list-model', get_template_directory_uri() . '/js/helsingborg/event_list_model.js', array(), '1.0.0', false );\n\n // Register styles\n wp_enqueue_style( 'zurb5-multiselect', get_template_directory_uri() . '/css/multiple-select.css', array(), '1.0.0', 'all' );\n wp_enqueue_style( 'jquery-datetimepicker', get_template_directory_uri() . '/js/jquery.datetimepicker.css', array(), '1.0.0', 'all' );\n \n }\n\n wp_enqueue_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true );\n wp_enqueue_script( 'tablesorter', get_template_directory_uri() . '/js/plugins/jquery.tablesorter.min.js', array(), '1.0.0', true );\n\n // TODO: Remove! This should be merged into app.js\n wp_enqueue_script( 'dev', get_template_directory_uri() . '/js/dev/hbg.dev.js', array(), '1.0.0', true );\n\t\t\n\t\n // Readspeaker should be added last\n wp_enqueue_script( 'readspeaker', 'http://f1.eu.readspeaker.com/script/5507/ReadSpeaker.js?pids=embhl', array(), '1.0.0', false);\n \n // Enqueue vergic.js previously in footer.php\n\twp_enqueue_script( 'script-vergic', get_template_directory_uri() . '/js/helsingborg/vergic.js', array(), '1.0.0', true );\n // Enqueue styles previously in header.php\n wp_enqueue_style( 'style-normalize', get_template_directory_uri() . '/css/normalize.css' );\n wp_enqueue_style( 'style-app', get_template_directory_uri() . '/css/app.css' ); \n \n }", "function shutdown() {\n // Safety for themes not using wp_footer\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "public static function _wp_footer()\n\t{\n\t\tforeach (static::$footer_scripts as $params) {\n\t\t\tif (!isset($params['url'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (isset($params['localize']) && isset($params['localize']['name']) && isset($params['localize']['data'])) {\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar <?php $params['localize']['name'] ?> = <?php echo json_encode($params['localize']['data']); ?>;\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\tif (isset($params['version']) && $params['version']) {\n\t\t\t\t$join_char = (stripos($params['url'], '?') !== false) ? '&' : '?';\n\t\t\t\t$params['url'] .= $join_char.'ver='.$params['version'];\n\t\t\t}\n\n\t\t\t$attrs_str = 'type=\"text/javascript\" src=\"'.$params['url'].'\"';\n\n\t\t\tif (isset($params['async']) && $params['async']) {\n\t\t\t\t$attrs_str .= ' async';\n\t\t\t}\n\n\t\t\tif (isset($params['defer']) && $params['defer']) {\n\t\t\t\t$attrs_str .= ' defer';\n\t\t\t}\n\n\t\t\techo \"<script {$attrs_str}></script>\\n\";\n\t\t}\n\t}", "function add_admin_scripts() {\n\t\tglobal $post;\n\t\t$post_type = $post->post_type;\n\t\tif ( 'product' == $post_type ) {\n\t\t\twp_enqueue_script(\n 'heweb17-admin',\n plugins_url( '/js/heweb17-admin.js', __FILE__ ),\n array( 'jquery' ) );\n\t\t}\n\t}", "function add_ordin_widget_scripts() {\n if( ! apply_filters( 'add_ordin_widget_scripts', true, $this->id_base ) )\n return;\n ?>\n <script>\n jQuery(document).ready(function( $ ) {\n\n });\n </script>\n <?php\n }", "public function registerActions() {\n $this->addAction('wp_footer', array('Chayka\\\\LinkedIn\\\\HtmlHelper', 'renderJsInit'));\n \t/* chayka: registerActions */\n }" ]
[ "0.7241142", "0.6526731", "0.6444402", "0.6413683", "0.6400463", "0.63700396", "0.6369376", "0.6338886", "0.630546", "0.6296617", "0.6249045", "0.6207119", "0.61928964", "0.61739033", "0.61543816", "0.61080056", "0.6093143", "0.6033762", "0.6032027", "0.6030236", "0.60086805", "0.6001226", "0.59697604", "0.59487045", "0.594843", "0.5941049", "0.5938484", "0.59146017", "0.5896967", "0.5896967", "0.5896967", "0.5896967", "0.5896967", "0.5890156", "0.5876459", "0.5831385", "0.5811524", "0.5810624", "0.57903826", "0.57903826", "0.5789098", "0.5785293", "0.5777126", "0.5773174", "0.5757678", "0.57439184", "0.5743063", "0.5738771", "0.5737273", "0.5734238", "0.5729473", "0.57263756", "0.5720172", "0.5715475", "0.57134646", "0.57082045", "0.5687526", "0.5685971", "0.5680793", "0.5680456", "0.5672112", "0.56681", "0.56662184", "0.5665719", "0.5656073", "0.56534725", "0.56457865", "0.5635625", "0.5633864", "0.56325173", "0.563149", "0.56310403", "0.56287545", "0.5628627", "0.5628423", "0.56232315", "0.56176054", "0.56105", "0.5595017", "0.55882615", "0.5556301", "0.5544112", "0.55396146", "0.55195075", "0.5511016", "0.55038005", "0.549943", "0.54945177", "0.5492116", "0.5490358", "0.5489363", "0.5485369", "0.5483127", "0.5474342", "0.5471772", "0.54681563", "0.5464937", "0.546027", "0.54596937", "0.5450936" ]
0.71792096
1
handle plugin lifecycle events
function abl_droploader_lifecycle($event, $step) { global $prefs; $msg = ''; $msg1 = ''; switch ($step) { case 'enabled': // setup plugin: prefs, textpacks, load order if (!function_exists('soo_plugin_pref')) { $msg1 = 'Please install <em>soo_plugin_pref</em> to edit preferences (Default preferences apply).'; } $rc = abl_droploader_enable($event, $step); break; case 'installed': // install resources: css, js $rc = abl_droploader_install($event, $step); break; case 'disabled': return ''; break; case 'deleted': // remove prefs, textpacks and other resources $rc = abl_droploader_uninstall($event, $step); break; } if ($rc == E_ERROR) { $msg = '<strong>An error occurred. Please check the servers error-log.</strong>'; } elseif ($rc == E_WARNING || $rc == E_NOTICE) { $msg = '<em>abl_droploader</em> successfully ' . $step . '. Please check the servers error-log.'; } else { $msg = '<em>abl_droploader</em> successfully ' . $step . '.'; } $msg .= ($msg1 != '') ? ' ' . $msg1 : ''; return $msg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initializePlugin();", "protected function init_lifecycle_handler() {\n\n\t\trequire_once( $this->get_plugin_path() . '/includes/Lifecycle.php' );\n\n\t\t$this->lifecycle_handler = new \\SkyVerge\\WooCommerce\\Elavon_Converge\\Lifecycle( $this );\n\t}", "public function onPluginsInitialized()\n {\n if ($this->isAdmin()) {\n // For speed-up when the admin plugin is active\n $this->active = false;\n } else {\n if ($this->config->get('plugins.googlemaps.enabled')) {\n // if the plugin is active globally, subscribe to additional events\n $this->enable([\n 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0],\n 'onPageInitialized' => ['onPageInitialized', 0]\n ]);\n }\n }\n }", "public function init_plugin()\n {\n }", "public function onPluginsInitialized()\n {\n $this->processDeprecatedSettings();\n }", "public function bootPlugin();", "protected function init_lifecycle_handler() {\n\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-pip-lifecycle.php' );\n\n\t\t$this->lifecycle_handler = new \\SkyVerge\\WooCommerce\\PIP\\Lifecycle( $this );\n\t}", "public function init()\n {\n parent::init();\n self::$plugin = $this;\n\n // Register services\n $this->setComponents([\n 'oembed' => oEmbedService::class,\n 'providers' => Providers::class\n ]);\n\n // Caching\n Event::on(\n ClearCaches::class,\n ClearCaches::EVENT_REGISTER_TAG_OPTIONS,\n function(RegisterCacheOptionsEvent $event)\n {\n $event->options[] = [\n 'tag' => 'oembed',\n 'label' => Craft::t('oembed', 'oEmbed caches'),\n ];\n }\n );\n\n // Register our field type.\n Event::on(\n Fields::class,\n Fields::EVENT_REGISTER_FIELD_TYPES,\n function(RegisterComponentTypesEvent $event) {\n $event->types[] = Field::class;\n }\n );\n\n // Register variable\n Event::on(\n CraftVariable::class,\n CraftVariable::EVENT_INIT,\n static function (Event $event) {\n /** @var CraftVariable $variable */\n $variable = $event->sender;\n $variable->set('oembed', oEmbedVariable::class);\n }\n );\n\n /**\n * Logging in Craft involves using one of the following methods:\n *\n * http://www.yiiframework.com/doc-2.0/guide-runtime-logging.html\n */\n Craft::info(\n Craft::t(\n 'oembed',\n '{name} plugin loaded',\n ['name' => $this->name]\n ),\n __METHOD__\n );\n }", "public static function init()\n {\n add_action('plugins_loaded', array(self::instance(), '_setup'));\n }", "public function plugin_construction() {\t\r\n\t\r\n\t}", "function Doku_Event_Handler() {\n\n // load action plugins\n $plugin = NULL;\n $pluginlist = plugin_list('action');\n\n foreach ($pluginlist as $plugin_name) {\n $plugin =& plugin_load('action',$plugin_name);\n\n if ($plugin !== NULL) $plugin->register($this);\n }\n }", "public function onPluginsInitialized()\n {\n if ($this->isAdmin()) {\n $this->active = false;\n return;\n }\n\n /** @var Uri $uri */\n $uri = $this->grav['uri'];\n $route = $this->config->get('plugins.random.route');\n\n if ($route && $route == $uri->path()) {\n $this->enable([\n 'onPageInitialized' => ['onPageInitialized', 0]\n ]);\n }\n }", "public function onPluginsInitialized()\n\t{\n\t\tif ( $this->isAdmin() ) {\n\t\t\t$this->active = false;\n\t\t\treturn;\n\t\t}\n\n\t\t$this->enable([\n//\t\t\t'onTwigSiteVariables' => ['onTwigSiteVariables', 0]\n\t\t\t'onTwigPageVariables' => ['onTwigSiteVariables', 0]\n\t\t]);\n\t}", "function Plugin()\n\t{\n\t\t$this->Plugin_Base();\n\t}", "public function onLoad()\n {\n $plugins = $this->getPluginHandler();\n $plugins->getPlugin('Message');\n }", "public function onPluginsInitialized()\n {\n if (!$this->isAdmin()) {\n return;\n }\n\n $this->enable([\n 'onAdminTwigTemplatePaths' => ['onAdminTwigTemplatePaths', 0]\n ]);\n\n $this->useShortCode();\n }", "function plugins_loaded(){\r\n\r\n\t\t$this->plugin_integration();\r\n\r\n\t\tWP_Job_Manager_Field_Editor_Job_Writepanels::get_instance();\r\n\t\tif( $this->wprm_active() ) WP_Job_Manager_Field_Editor_Resume_Writepanels::get_instance();\r\n\t}", "public function onPluginsInitialized()\n\t{\n\t\tif ($this->isAdmin())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->enable([\n\t\t\t'onTwigExtensions' => ['onTwigExtensions', 0]\n\t\t]);\n\t}", "public function onPluginsInitialized()\n {\n // if this value isset\n if (isset($_GET['return-as']) && in_array($_GET['return-as'], array('json', 'xml', 'yaml'))) {\n $this->enable([\n 'onPageInitialized' => ['deliverFormatAs', 0]\n ]);\n }\n }", "function initPlugin()\n {\n $this->getAdminOptions();\n }", "public function init()\n {\n parent::init();\n self::$plugin = $this;\n\n Event::on(DataTypes::class, DataTypes::EVENT_AFTER_FETCH_FEED, function(FeedDataEvent $event) {\n if ($event->response['success']) {\n $this->_processFeed($event);\n }\n });\n\n Event::on(DataTypes::class, DataTypes::EVENT_AFTER_PARSE_FEED, function(FeedDataEvent $event) {\n if ($event->response['success']) {\n $this->_enhanceFeed($event);\n }\n });\n }", "private function _postInit()\n {\n // Register all the listeners for config items\n $this->_registerConfigListeners();\n\n // Register all the listeners for invalidating GraphQL Cache.\n $this->_registerGraphQlListeners();\n\n // Load the plugins\n $this->getPlugins()->loadPlugins();\n\n $this->_isInitialized = true;\n\n // Fire an 'init' event\n if ($this->hasEventHandlers(WebApplication::EVENT_INIT)) {\n $this->trigger(WebApplication::EVENT_INIT);\n }\n\n if (!$this->getUpdates()->getIsCraftDbMigrationNeeded()) {\n // Possibly run garbage collection\n $this->getGc()->run();\n }\n }", "private function hooks() {\n\t\t\t// check for EDD when plugin is activated\n\t\t\tadd_action( 'admin_init', array( $this, 'activation' ), 1 );\n\t\t\t\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// settings link on plugin page\n\t\t\tadd_filter( 'plugin_action_links_' . $this->basename, array( $this, 'settings_link' ), 10, 2 );\n\t\t\t\n\t\t\t// insert actions\n\t\t\tdo_action( 'edd_sd_setup_actions' );\n\t\t}", "public function init(){\n\t\tadd_action( 'admin_init', array( $this, 'init_plugin' ), 20 );\n\t}", "public function postInit()\n {\n }", "public function postInit()\n {\n }", "public function postInit()\n {\n }", "protected function _initLoadPlugin() {\n\t\t$front = Zend_Controller_Front::getInstance();\n\t\t$front->registerPlugin(new Plugins_Myplugin() );\t\n\t}", "function __construct() {\n\t\t$request = Request::getInstance();\n\t\t$plugin = Plugin::getInstance();\n\t\t$plugin->triggerEvents('load' . $request->getController());\n\t}", "public function initialize_postProc() {}", "public function init()\n {\n parent::init();\n self::$plugin = $this;\n\n // Register our CP routes\n Event::on(\n UrlManager::class,\n UrlManager::EVENT_REGISTER_CP_URL_RULES,\n function(RegisterUrlRulesEvent $event) {\n $event->rules['open-id-login'] = 'open-id-login/default/defaults';\n }\n );\n \n // Do something after we're installed\n Event::on(\n Plugins::class,\n Plugins::EVENT_AFTER_LOAD_PLUGINS,\n function() {\n $this->executeLogic();\n }\n );\n\n/**\n * Logging in Craft involves using one of the following methods:\n *\n * Craft::trace(): record a message to trace how a piece of code runs. This is mainly for development use.\n * Craft::info(): record a message that conveys some useful information.\n * Craft::warning(): record a warning message that indicates something unexpected has happened.\n * Craft::error(): record a fatal error that should be investigated as soon as possible.\n *\n * Unless `devMode` is on, only Craft::warning() & Craft::error() will log to `craft/storage/logs/web.log`\n *\n * It's recommended that you pass in the magic constant `__METHOD__` as the second parameter, which sets\n * the category to the method (prefixed with the fully qualified class name) where the constant appears.\n *\n * To enable the Yii debug toolbar, go to your user account in the AdminCP and check the\n * [] Show the debug toolbar on the front end & [] Show the debug toolbar on the Control Panel\n *\n * http://www.yiiframework.com/doc-2.0/guide-runtime-logging.html\n */\n Craft::info(\n Craft::t(\n 'open-id-login',\n '{name} plugin loaded',\n ['name' => $this->name]\n ),\n __METHOD__\n );\n }", "function qa_initialize_postdb_plugins()\n{\n\tglobal $qa_pluginManager;\n\n\trequire_once QA_INCLUDE_DIR . 'app/options.php';\n\tqa_preload_options();\n\n\t$qa_pluginManager->loadPluginsAfterDbInit();\n\tqa_load_override_files();\n\n\tqa_report_process_stage('plugins_loaded');\n}", "public function run()\n {\n // Attach CSS and JS files of the plugin to chat window.\n $dispatcher = EventDispatcher::getInstance();\n $dispatcher->attachListener(Events::PAGE_ADD_CSS, $this, 'attachCssFiles');\n $dispatcher->attachListener(Events::PAGE_ADD_JS, $this, 'attachJsFiles');\n $dispatcher->attachListener(Events::PAGE_ADD_JS_PLUGIN_OPTIONS, $this, 'attachPluginOptions');\n }", "abstract protected function activate_plugin();", "protected function _setPlugin() {\n\t\tif (!isset($this->plugin)) {\n\t\t\t$this->plugin = str_replace('EventsTest', '', get_class($this));\n\t\t}\n\t}", "public function onPluginsInitialized()\n {\n if ($this->isAdmin()) {\n $this->enable( [\n 'onAdminTwigTemplatePaths' => ['onAdminTwigTemplatePaths', 0]\n ]);\n return;\n }\n\n // Enable events we are interested in\n $this->enable([\n 'onPagesInitialized' => ['onPagesInitialized', 0 ],\n 'onPageInitialized' => ['onPageInitialized', 0],\n 'onTwigTemplatePaths' => ['onTwigTemplatePaths',0]\n ]);\n $path = DATA_DIR . $this->edits_loc . DS . 'editing_for_' . date('Y-m_M_Y') . '.yaml';\n $this->logfile = File::instance($path);\n require_once __DIR__ . '/embedded/php-diff-master/lib/Diff.php';\n switch ( $this->config->get('plugins.content-edit.editReport') ) {\n case 'html_side_side':\n require_once __DIR__ . '/embedded/php-diff-master/lib/Diff/Renderer/Html/SideBySide.php';\n $this->renderer = new \\Diff_Renderer_Html_SideBySide;\n break;\n case 'html_inline':\n require_once __DIR__ . '/embedded/php-diff-master/lib/Diff/Renderer/Html/Inline.php';\n $this->renderer = new \\Diff_Renderer_Html_Inline;\n break;\n case 'txt_unified':\n require_once __DIR__ . '/embedded/php-diff-master/lib/Diff/Renderer/Text/Unified.php';\n $this->renderer = new \\Diff_Renderer_Text_Unified;\n break;\n case 'txt_context':\n default:\n require_once __DIR__ . '/embedded/php-diff-master/lib/Diff/Renderer/Text/Context.php';\n $this->renderer = new \\Diff_Renderer_Text_Context;\n }\n # verify data directory exists with correct permissions\n if (!file_exists(DATA_DIR . $this->edits_loc )) {\n mkdir(DATA_DIR . $this->edits_loc , 0775, true);\n }\n }", "public function onRun()\n {\n try {\n $api = new PluginApi($this->secret, $this->dataFolder);\n $this->setResult($api->basicGet(\"/information\"));\n } catch (\\Exception $e) {\n $this->setResult($e);\n }\n }", "public function admin_init () {\n $data = get_plugin_data(__FILE__);\n $this->plugin_name = $data['Name'];\n $this->plugin_version = $data['Version'];\n $this->plugin_slug = plugin_basename(__FILE__, '.php');\n $this->plugin_name_sanitized = basename(__FILE__, '.php');\n\n // init updater class to plugin updates check\n $this->updater();\n }", "public function init() {\n\n // register plugin controller under /gallery/\n DatawrapperHooks::register(DatawrapperHooks::GET_PLUGIN_CONTROLLER, array($this, 'process'));\n\n DatawrapperHooks::register(DatawrapperHooks::ALTERNATIVE_SIGNIN, array($this, 'showTwitterSignInButton'));\n\n $this->checkLogin();\n }", "function wp_aff_3rd_party_handle_plugins_loaded_hook() {\n wp_aff_pp_ipn_listener();\n wp_aff_check_clickbank_transaction();\n wp_aff_check_gumroad_ping();\n}", "public function init() {\n\t\tadd_filter( 'plugin_action_links_meta-box/meta-box.php', [ $this, 'plugin_links' ], 20 );\n\n\t\t// Add a shared top-level admin menu and Dashboard page. Use priority 5 to show Dashboard at the top.\n\t\tadd_action( 'admin_menu', [ $this, 'add_menu' ], 5 );\n\t\tadd_action( 'admin_menu', [ $this, 'add_submenu' ], 5 );\n\n\t\t// If no admin menu, then hide the About page.\n\t\tadd_action( 'admin_head', [ $this, 'hide_page' ] );\n\n\t\t// Redirect to about page after activation.\n\t\tadd_action( 'activated_plugin', [ $this, 'redirect' ], 10, 2 );\n\t}", "function __construct(){\n //\"Constants\" setup\n $this->plugin_url = plugin_dir_url(__FILE__).'/';\n $this->plugin_path = plugin_dir_path(__FILE__).'/';\n //Initialize the options\n $this->get_options();\n //check requirements\n register_activation_hook(__FILE__, array(&$this,'check_requirements'));\n //get sub-packages\n requireDir(plugin_dir_path(__FILE__).'/lib/inc');\n //here are some examples to get started with\n if(class_exists('PageTemplater')){\n add_action( 'plugins_loaded', array( 'PageTemplater', 'get_instance' ) );\n }\n if(class_exists('MSDSimpleSectionedPage')){\n add_action('admin_print_footer_scripts',array('MSDSimpleSectionedPage','info_footer_hook') ,100); \n add_action('admin_enqueue_scripts',array('MSDSimpleSectionedPage','enqueue_admin')); \n }\n if(class_exists('MSDSectionedPage')){\n add_action('admin_print_footer_scripts',array('MSDSectionedPage','info_footer_hook') ,100); \n add_action('admin_enqueue_scripts',array('MSDSectionedPage','enqueue_admin')); \n add_action( 'init', array( 'MSDSectionedPage', 'add_metaboxes' ) );\n }\n }", "public function __construct() {\r\n add_action( 'plugins_loaded', [ $this, 'update_db_check' ] );\r\n \r\n }", "public function plugins_loaded()\n\t{\n\t\t// Have the login plugin use frontend notifictions plugin\n\t\tif ( apply_filters( \"{$this->prefix}/create_object/use_sewn_notifications\", true ) )\n\t\t{\n\t\t\tif (! class_exists('Sewn_Notifications') ) {\n\t\t\t\tadd_filter( \"{$this->prefix}/create_object/use_sewn_notifications\", '__return_false', 9999 );\n\t\t\t}\n\t\t}\n\t}", "function init_plugin() : void {\n\n\t// CSS/JS.\n\tadd_action( 'enqueue_block_assets', __NAMESPACE__ . '\\load_block_frontend_assets' );\n\tadd_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\load_block_editor_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_full_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_messaging_assets' );\n\n\t// Admin-only CSS/JS.\n\tadd_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\Admin\\load_admin_assets' );\n\tadd_filter( 'admin_body_class', __NAMESPACE__ . '\\Admin\\add_admin_body_class' );\n\n\t// Modify output.\n\tadd_filter( 'body_class', __NAMESPACE__ . '\\add_body_class' );\n\tadd_filter( 'the_content', __NAMESPACE__ . '\\Gating\\maybe_restrict_content' );\n\tadd_filter( 'the_title', __NAMESPACE__ . '\\Gating\\maybe_add_padlock_to_title', 10, 2 );\n\tadd_action( 'wp_head', __NAMESPACE__ . '\\print_meta_tag' );\n\n\t// Admin screens and settings.\n\tadd_filter( 'plugin_action_links_coil-web-monetization/plugin.php', __NAMESPACE__ . '\\Admin\\add_plugin_action_links' );\n\tadd_filter( 'plugin_row_meta', __NAMESPACE__ . '\\Admin\\add_plugin_meta_link', 10, 2 );\n\tadd_action( 'admin_menu', __NAMESPACE__ . '\\Settings\\register_admin_menu' );\n\tadd_action( 'admin_init', __NAMESPACE__ . '\\Settings\\register_admin_content_settings' );\n\tadd_action( 'admin_notices', __NAMESPACE__ . '\\Settings\\admin_welcome_notice' );\n\tadd_action( 'wp_ajax_dismiss_welcome_notice', __NAMESPACE__ . '\\Settings\\dismiss_welcome_notice' );\n\n\t// Term meta.\n\tadd_action( 'edit_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'create_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'delete_term', __NAMESPACE__ . '\\Admin\\delete_term_monetization_meta' );\n\tadd_term_edit_save_form_meta_actions();\n\n\t// Customizer settings.\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_messaging_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_options_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_learn_more_button_settings_panel' );\n\n\t// User profile settings.\n\tadd_action( 'personal_options', __NAMESPACE__ . '\\User\\add_user_profile_payment_pointer_option' );\n\tadd_action( 'personal_options_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_action( 'edit_user_profile_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_filter( 'option_coil_payment_pointer_id', __NAMESPACE__ . '\\User\\maybe_output_user_payment_pointer' );\n\n\t// Metaboxes.\n\tadd_action( 'load-post.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'load-post-new.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'save_post', __NAMESPACE__ . '\\Admin\\maybe_save_post_metabox' );\n\n\t// Modal messaging\n\tadd_action( 'wp_footer', __NAMESPACE__ . '\\load_plugin_templates' );\n\n\t// Load order - important.\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_content_meta' );\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_term_meta' );\n}", "protected function _registerPlugins()\n\t{\n\t\t//$aclPlugin = new AclPlugins($adminAclController);\n\t\t//$logPlugin = new LogPlugins();\n\t\t\n\t\t//Daophp::getInstance() -> registerPlugin('acl', $aclPlugin);\n\t\t//Daophp::getInstance() -> registerPlugin('log', $logPlugin);\n\t}", "abstract public function registerPlugin(Swift_Events_EventListener $plugin);", "protected function _afterInit() {\n\t}", "function __construct() {\n add_action( 'plugins_loaded', array( $this, 'ssSearchPluginsLoadedHandlers' ) );\n }", "public function activatePlugin();", "abstract public function register_plugin();", "function _on_initialize()\n {\n }", "function on_creation() {\n $this->init();\n }", "function init() {\n\t\tevent_declare('EVENT_MANAGE_USER_FORM');\n\t\tplugin_event_hook('EVENT_MANAGE_USER_FORM', 'DefUgroup');\n\t\t// Delete usergroups when user is deleted\n\t\tevent_declare('EVENT_ACCOUNT_DELETED');\n\t\tplugin_event_hook('EVENT_ACCOUNT_DELETED', 'DelUgroup');\n\t}", "public function _on_initialize()\n {\n }", "function _init_plugin() {\n\t\tglobal $db, $apcms;\n\t\t\n\t\treturn true;\n\t}", "public function eXpOnInit()\n {\n $this->addDependency(\n new \\ManiaLive\\PluginHandler\\Dependency(\"\\\\ManiaLivePlugins\\\\eXpansion\\\\Database\\\\Database\")\n );\n }", "public function postConnect()\n {\n $this->Lexer->addExitPattern('</' . self::getElementName() . '>', 'plugin_' . webcomponent::PLUGIN_NAME . '_' . $this->getPluginComponent());\n\n }", "private function init_hooks() {\n\t\t\tadd_action( 'init', array( $this, 'init' ), 0 );\n\t\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\n\t\t\t// Plugin update notifications\n\t\t\tadd_action( 'admin_init', array( $this, 'plugin_update' ) );\n\t\t}", "private function hooks() {\n\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// Add template folder\n\t\t\tadd_filter( 'affwp_template_paths', array( $this, 'template' ) );\n\n\t\t}", "protected function initPluginData()\n\t{\n\t\t// code here\n\t\t$this->slug = plugin_basename($this->pluginFile);\n\t\t$this->pluginData = get_plugin_data($this->pluginFile);\n\t}", "static public function init() {\n\n\t\tadd_action( 'plugins_loaded', __CLASS__ . '::setup_hooks' );\n\t}", "public function onLoad() {\n\t\tglobal $app;\n\n\t\t//* Register for actions\n\t\t$app->plugins->registerAction('backup_download', $this->plugin_name, 'backup_action');\n\t\t$app->plugins->registerAction('backup_restore', $this->plugin_name, 'backup_action');\n\t\t$app->plugins->registerAction('backup_delete', $this->plugin_name, 'backup_action');\n\t\t//$app->plugins->registerAction('backup_download_mail', $this->plugin_name, 'backup_action_mail');\n\t\t$app->plugins->registerAction('backup_restore_mail', $this->plugin_name, 'backup_action_mail');\n\t\t$app->plugins->registerAction('backup_delete_mail', $this->plugin_name, 'backup_action_mail');\n\t}", "protected function init() {\n // Provides info to parent class, so do it early.\n if (is_admin() ) {\n $this->pluginAdmin = new Yfp_Ganalytics_Basic_Admin(__FILE__);\n }\n else {\n $this->pluginCommon = new Yfp_Ganalytics_Basic_Common();\n\n // Don't track if we aren't enabled.\n if ($this->pluginCommon->optIsEnabled()) {\n // The location of the code depends on the inHead option.\n add_action(\n $this->pluginCommon->optInHead() ? self::TOP_HOOK : self::BOTTOM_HOOK,\n array($this, 'insert_js_code')\n );\n }\n else {\n // Add a comment so we can tell the plugin is functioning, but disabled.\n add_action(\n $this->pluginCommon->optInHead() ? self::TOP_HOOK : self::BOTTOM_HOOK,\n array($this, 'disabled_message')\n );\n }\n }\n }", "public function onStart()\n {\n }", "protected function _initPlugins()\n {\n $front = Zend_Controller_Front::getInstance();\n $front->registerPlugin(new Mylib_Controller_Plugin_Auth());\n $front->registerPlugin(new Mylib_Controller_Plugin_Routes());\n }", "public function plugin_activate(){\n\t\t\n\t\t//call our custom content type function\n\t \t$this->register_location_content_type();\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "public function init() { \n // Check if Elementor installed and activated\n if ( ! did_action( 'elementor/loaded' ) ) {\n add_action( 'admin_notices', array( $this, 'admin_notice_missing_main_plugin' ) );\n return;\n }\n \n // Check for required Elementor version\n if ( ! version_compare( ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=' ) ) {\n add_action( 'admin_notices', array( $this, 'admin_notice_minimum_elementor_version' ) );\n return;\n }\n \n // Check for required PHP version\n if ( version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '<' ) ) {\n add_action( 'admin_notices', array( $this, 'admin_notice_minimum_php_version' ) );\n return;\n }\n \n add_action( 'elementor/elements/categories_registered', 'add_elementor_widget_categories' );\n\n // Once we get here, We have passed all validation checks so we can safely include our plugin\n // require_once( __DIR__ . '/handlers/UtterancesHandler.php' );\n // require_once( __DIR__ . '/handlers/ResponsesHandler.php' );\n // require_once( __DIR__ . '/handlers/WidgetHandler.php' );\n\n Init::register_handlers([\n Handlers\\ResponsesHandler,\n ]);\n // $this->register_handlers( __DIR__ . '/handlers/');\n\n require_once( 'plugin.php' );\n }", "public function __construct(){\r\n $this->init_hooks();\r\n }", "protected function after_load(){\n\n\n }", "function postCopyHook()\n {\n foreach ($this->plugins as &$plugin) {\n $plugin->postCopyHook();\n }\n unset($plugin);\n }", "public function onAfterRouting() {\n\t\tforeach ( $this->getInstantiablePlugins() as $pluginContainer ) {\n\t\t\t$pluginContainer->trigger(\"onAfterRouting\");\n\t\t}\n\t}", "public function __construct() {\n require_once __DIR__ . '/vendor/autoload.php';\n $this->define_constants();\n register_activation_hook( __FILE__, array( $this, 'activate' ) ); \n add_action( 'plugins_loaded', array( $this, 'init_plugin' ) ); \n }", "function init_hooks() {\n\tregister_activation_hook( __FILE__, __NAMESPACE__ . '\\activate_plugin' );\n\tregister_deactivation_hook( __FILE__, __NAMESPACE__ . '\\deactivate_plugin' );\n\tregister_uninstall_hook( __FILE__, __NAMESPACE__ . '\\uninstall_plugin' );\n}", "public function onShutDown()\n {\n }", "public function onShutDown()\n {\n }", "public function __construct() {\n\t\t/*Define Autoloader class for plugin*/\n\t\t$autoloader_path = 'includes/class-autoloader.php';\n\t\t/**\n\t\t * Include autoloader class to load all of classes inside this plugin\n\t\t */\n\t\trequire_once trailingslashit( plugin_dir_path( __FILE__ ) ) . $autoloader_path;\n\n\t\t/*Define required constant for plugin*/\n\t\tConstant::define_constant();\n\n\t\t/**\n\t\t * Register activation hook.\n\t\t * Register activation hook for this plugin by invoking activate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is activated.\n\t\t */\n\t\tregister_activation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->activate(\n\t\t\t\t\tnew Activator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register deactivation hook.\n\t\t * Register deactivation hook for this plugin by invoking deactivate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is deactivated.\n\t\t */\n\t\tregister_deactivation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->deactivate(\n\t\t\t\t\tnew Deactivator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register uninstall hook.\n\t\t * Register uninstall hook for this plugin by invoking uninstall\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is uninstalled.\n\t\t */\n\t\tregister_uninstall_hook(\n\t\t\t__FILE__,\n\t\t\tarray( 'Restaurant_Booking_Plugin', 'uninstall' )\n\t\t);\n\t}", "protected function init($plugin_url){\n $this->plugin_url = $plugin_url;\n \treturn;\n }", "private function define_admin_hooks() {\n\t\t$plugin_admin = new Soisy_Pagamento_Rateale_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n $this->loader->add_filter( 'woocommerce_payment_gateways', $plugin_admin, 'payment_methods' );\n\t\t\n $this->loader->add_filter( 'soisy_settings', $plugin_admin, 'soisy_vars' );\n\t\t\n\t\t$this->loader->add_filter('plugin_action_links', $plugin_admin,'add_soisy_action_links', 10, 2);\n\t\t\n\t\t/*\n\t\t * Payments Gateways extend WC_Payment_Gateway\n\t\t * To have them work properly they must be hooked to 'plugins_loaded'\n\t\t */\n add_action( 'plugins_loaded', 'init_Soisy_Pagamento_Rateale_Gateway_Settings');\n\t}", "public function onStart() {\r\n\r\n }", "protected function onInit() {}", "public static function init()\n\t{\n\t\tif ( get_option( 'Activated_Plugin' ) == 'jh-data-tables' ) \n\t\t{\n\t\t\tdelete_option( 'Activated_Plugin' );\n\n\t\t\t// eg. flush the perma-link structure\n\t\t\tglobal $wp_rewrite;\n\t \t\t$wp_rewrite->flush_rules( true );\n\t\t}\n\t\t\n\t\twp_register_style( 'jh-data-tables-admin-css', plugins_url('admin.css', __FILE__) );\n\t\twp_register_script( 'jh-data-tables-ui-util-js', plugins_url('ui-util.js', __FILE__) );\n\t\twp_register_script( 'jh-data-tables-admin-js', plugins_url('admin.js', __FILE__) );\n\t\twp_register_script( 'jh-data-tables-tinymce-js', plugins_url( 'tinymce/tinymce.min.js', __FILE__) );\n\t\tadd_action( 'admin_enqueue_scripts', array('JHDataTablesAdmin', 'admin_scripts') );\n\t\t\n\t\tadd_action( 'add_meta_boxes', array('JHDataTablesAdmin', 'add_table_editor') );\n\t\tadd_action( 'save_post', array('JHDataTablesAdmin', 'save_table') );\n\t\t//add_action('admin_menu', array('JHDataTablesAdmin', 'add_admin_menus'));\n\t}", "function plugins_loaded(){\r\n // $current_time = current_time('timestamp');\r\n // $this->logger->debug( 'plugins_loaded ' . $current_time );\r\n \r\n // perform recover from member mail\r\n add_action( 'wp_loaded', array( &$this->cartController, 'restore_abandon_cart' ) );\r\n }", "function __construct() {\n\n // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.\n register_activation_hook( __FILE__, array( $this, 'activate' ) );\n \n // MOVE uninstall feature to uninstall.php\n //register_uninstall_hook( __FILE__, array( $this, 'uninstall' ) );\n\n // Register hook executes just before WordPress determines which template page to load\n //add_action( 'template_redirect', array( $this, 'increase_counter_when_home_visited' ) );\n \n // Add extra submenu to the admin panel\n add_action( 'admin_menu', array( $this, 'create_menu_admin_panel' ) );\n \n // Handle POST request, admin_action_($action)\n //add_action( 'admin_action_tk_slideshow_action', array( $this, 'tk_slideshow_admin_action' ) );\n\n add_action( 'admin_post_tk_slideshow_new_action', array( $this, 'tk_slideshow_admin_new_action' ) );\n add_action( 'admin_post_tk_slideshow_edit_action', array( $this, 'tk_slideshow_admin_edit_action' ) );\n \n }", "public function onStart();", "function __construct() {\n\t\tPluginUpdateIgnore::__construct();\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_jquery'));\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_css'));\n\t\tadd_action('admin_footer-plugins.php', array(&$this, 'admin_js'));\n\t}", "public function postLoad() { }", "public function initialize() {\n\n // callback to run after theme is loaded\n add_action(\"init\", function() {\n $this->addServiceProvider( FractalProvider::class );\n $this->addServiceProvider( RouterProvider::class );\n });\n\n\n /**\n * This causes the plugin's routes to kick in only if WordPress experiences a 404\n */\n add_action(\"wp\", function() {\n\n if( is_404() )\n $this->dispatch();\n\n });\n\n // code to run when admin is loaded\n add_action(\"admin_init\", function() {\n $this->addServiceProvider( PlatesProvider::class );\n });\n\n //\n add_action(\"admin_menu\", function() {\n\n new SettingsPage($this);\n\n });\n }", "public function postLoad() {}", "public function init() {\n\t\tadd_action( 'admin_bar_menu', array( $this, 'health_check_troubleshoot_menu_bar' ), 999 );\n\n\t\tadd_filter( 'option_active_plugins', array( $this, 'health_check_loopback_test_disable_plugins' ) );\n\t\tadd_filter( 'option_active_sitewide_plugins', array( $this, 'health_check_loopback_test_disable_plugins' ) );\n\n\t\tadd_filter( 'pre_option_template', array( $this, 'health_check_troubleshoot_theme_template' ) );\n\t\tadd_filter( 'pre_option_stylesheet', array( $this, 'health_check_troubleshoot_theme_stylesheet' ) );\n\n\t\tadd_filter( 'wp_fatal_error_handler_enabled', array( $this, 'wp_fatal_error_handler_enabled' ) );\n\n\t\tadd_filter( 'bulk_actions-plugins', array( $this, 'remove_plugin_bulk_actions' ) );\n\t\tadd_filter( 'handle_bulk_actions-plugins', array( $this, 'handle_plugin_bulk_actions' ), 10, 3 );\n\n\t\tadd_action( 'admin_notices', array( $this, 'prompt_install_default_theme' ) );\n\t\tadd_filter( 'user_has_cap', array( $this, 'remove_plugin_theme_install' ) );\n\n\t\tadd_action( 'plugin_action_links', array( $this, 'plugin_actions' ), 50, 4 );\n\n\t\tadd_action( 'admin_notices', array( $this, 'display_dashboard_widget' ) );\n\t\tadd_action( 'admin_footer', array( $this, 'dashboard_widget_scripts' ) );\n\n\t\tadd_action( 'wp_logout', array( $this, 'health_check_troubleshooter_mode_logout' ) );\n\t\tadd_action( 'init', array( $this, 'health_check_troubleshoot_get_captures' ) );\n\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );\n\n\t\t/*\n\t\t * Plugin activations can be forced by other tools in things like themes, so let's\n\t\t * attempt to work around that by forcing plugin lists back and forth.\n\t\t *\n\t\t * This is not an ideal scenario, but one we must accept as reality.\n\t\t */\n\t\tadd_action( 'activated_plugin', array( $this, 'plugin_activated' ) );\n\n\t\t$this->load_options();\n\t}", "private function __construct() {\n\t\t$plugin = Tribe__Events__Main::instance();\n\n\t\tadd_action( 'admin_menu', array( $this, 'register_menu_item' ) );\n\t\tadd_action( 'current_screen', array( $this, 'action_request' ) );\n\t\tadd_action( 'init', array( $this, 'init' ) );\n\n\t\t// check if the license is valid each time the page is accessed\n\t\tadd_action( 'tribe_aggregator_page_request', array( $this, 'check_for_license_updates' ) );\n\n\t\t// filter the plupload default settings to remove mime type restrictions\n\t\tadd_filter( 'plupload_default_settings', array( $this, 'filter_plupload_default_settings' ) );\n\n\t\t// Setup Tabs Instance\n\t\t$this->tabs = Tribe__Events__Aggregator__Tabs::instance();\n\n\t\ttribe_notice( 'tribe-aggregator-legacy-import-plugins-active', array( $this, 'notice_legacy_plugins' ), 'type=warning' );\n\t}", "function onLoad() {\n\t\t$this->enableDedicatedEvents();\n\t\t$this->config = Config::getInstance();\n\t\t\n\n\t\tif ($this->isPluginLoaded('MLEPP\\Admin', '0.3.0')) {\n\t\t\t$this->callPublicMethod('MLEPP\\Admin', 'addAdminCommand', array($this, 'setText'), array(\"set\", \"headsup\", \"text\"), true, false, false);\n\t\t\t$this->callPublicMethod('MLEPP\\Admin', 'addAdminCommand', array($this, 'setUrl'), array(\"set\", \"headsup\", \"url\"), true, false, false);\n\t\t\t$this->callPublicMethod('MLEPP\\Admin', 'addAdminCommand', array($this, 'setWidth'), array(\"set\", \"headsup\", \"width\"), true, false, false);\n\t\t\t$this->callPublicMethod('MLEPP\\Admin', 'addAdminCommand', array($this, 'setPos'), array(\"set\", \"headsup\", \"pos\"), true, false, false);\n\t\t}\n\n\t\tConsole::println('[' . date('H:i:s') . '] [MLEPP] Plugin: HeadsUp r' . $this->getVersion());\n\t}", "public function init() {\n // Check if Elementor installed and activated\n if ( ! did_action( 'elementor/loaded' ) ) {\n add_action( 'admin_notices', array( $this, 'admin_notice_missing_main_plugin' ) );\n return;\n }\n\n // Check for required Elementor version\n if ( ! version_compare( ELEMENTOR_VERSION, MINIMUM_ELEMENTOR_VERSION, '>=' ) ) {\n add_action( 'admin_notices', array( $this, 'admin_notice_minimum_elementor_version' ) );\n return;\n }\n\n // Check for required PHP version\n if ( version_compare( PHP_VERSION, MINIMUM_PHP_VERSION, '<' ) ) {\n add_action( 'admin_notices', array( $this, 'admin_notice_minimum_php_version' ) );\n return;\n }\n\n // Once we get here, We have passed all validation checks so we can safely include our plugin\n require_once( 'plugin.php' );\n }", "public static function _setup_plugin() {\n\t\t\tadd_filter( 'mce_external_plugins', array( __CLASS__, 'mce_external_plugins' ) );\n\t\t\tadd_filter( 'mce_buttons_2', array( __CLASS__, 'mce_buttons_2' ) );\n\t\t\tadd_filter( 'content_save_pre', array( __CLASS__, 'content_save_pre' ), 20 );\n\t\t}", "public function loadPlugins()\n {\n try {\n $pluginModel = Plugin::model(); \n $records = $pluginModel->findAllByAttributes(array('active'=>1));\n \n foreach ($records as $record) {\n $this->loadPlugin($record->name, $record->id);\n }\n } catch (Exception $exc) {\n // Something went wrong, maybe no database was present so we load no plugins\n }\n\n $this->dispatchEvent(new PluginEvent('afterPluginLoad', $this)); // Alow plugins to do stuff after all plugins are loaded\n }", "private function define_admin_hooks()\n {\n $this->loader->add_action('init',$this,'load_options');\n $this->loader->add_action('plugins_loaded','WordPress_Reactro_Admin', 'load_framework');\n }", "public function init_hooks() {\n\t\tadd_action( 'vc_after_mapping', array( $this, 'vc_after_mapping' ) );\n\t}", "public function admin_init(){\n\t\t\t/* Add theme update data */\n\t\t\tif('plugin' !== $this->config['type']){\n\t\t\t\tadd_filter('pre_set_site_transient_update_themes', array($this, 'add_theme_update_data'), 10, 2);\n\t\t\t}\n\t\t\t/* Add plugin update data */\n\t\t\tif('theme' !== $this->config['type']){\n\t\t\t\tadd_filter('pre_set_site_transient_update_plugins', array($this, 'add_plugin_update_data'), 10, 2);\n\t\t\t}\n\t\t\t/* Plugin Information */\n\t\t\tif('theme' !== $this->config['type']){\n\t\t\t\tadd_filter('plugins_api_result', array($this, 'plugin_info'), 10, 3);\n\t\t\t}\n\t\t}", "public function __construct() {\n\n\t\t\t/* Load plugin files */\n\t\t\tself::load_plugin_files();\n\t\t}", "public function init() {\n\n\t\t\t// Set up localisation\n\t\t\t$this->load_plugin_textdomain();\n\t\t}", "function plugin_action_handler( $plugin='' ) {\n\t\t$this->add_ping( 'plugins', array( 'name' => $plugin ) );\n\t}" ]
[ "0.7031586", "0.7015926", "0.69344616", "0.6934219", "0.66588676", "0.6656148", "0.65598875", "0.6369212", "0.6366392", "0.63332224", "0.63289505", "0.6320001", "0.63069284", "0.6293605", "0.62911415", "0.6285604", "0.6242794", "0.623756", "0.62302303", "0.62060505", "0.6169109", "0.61680764", "0.6163417", "0.6160058", "0.61567134", "0.61567134", "0.61567134", "0.6089008", "0.60438746", "0.603394", "0.60334533", "0.60310996", "0.6023321", "0.6005818", "0.5988477", "0.59876084", "0.59825134", "0.5957071", "0.5948873", "0.5942696", "0.59415054", "0.59380555", "0.5888073", "0.58819294", "0.5877073", "0.587688", "0.5866507", "0.5864727", "0.5856347", "0.5856167", "0.585588", "0.5827748", "0.58245283", "0.5818911", "0.5812058", "0.5811004", "0.5804901", "0.5804731", "0.5796798", "0.5794551", "0.57781285", "0.57689446", "0.57626235", "0.57594436", "0.5754299", "0.5751373", "0.575114", "0.57433486", "0.5734287", "0.5734182", "0.5733908", "0.57298917", "0.57211107", "0.57198936", "0.57187134", "0.57187134", "0.57011056", "0.5696513", "0.5695091", "0.5688405", "0.5687924", "0.5679977", "0.56793886", "0.56766313", "0.56733", "0.567232", "0.567025", "0.56702316", "0.56660473", "0.56619924", "0.5658256", "0.5653175", "0.56486815", "0.56468296", "0.56396234", "0.5637373", "0.56348985", "0.5633313", "0.5633248", "0.5628674", "0.5628269" ]
0.0
-1
add plugin prefs to database
function abl_droploader_prefs($event, $step) { if (function_exists('soo_plugin_pref')) { soo_plugin_pref($event, $step, abl_droploader_defaults()); return true; } else { $msg = 'Please install <em>soo_plugin_pref</em> to edit preferences (Default preferences apply).'; pagetop(gTxt('edit_preferences') . " &#8250; abl_droploader", $msg); $default_prefs = abl_droploader_defaults(); $html = '<table id="list" align="center" border="0" cellpadding="3" cellspacing="0"> <thead> <tr> <th colspan="2"><h1>DropLoader default preferences</h1></th> </tr> <tr> <th>Option</th> <th>Value</th> </tr> </thead> <tbody> '; foreach ($default_prefs as $key => $pref) { $html .= '<tr> <td>' . htmlspecialchars($pref['text']) . '</td> <td>' . htmlspecialchars($pref['val']) . '</td> </tr> '; } $html .= '</tbody> </table> '; echo $html; return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save_addon_prefs(){\n\t\tglobal $sql,$pref;\n// $query = \"SELECT * FROM #plugin WHERE plugin_installflag = 1 AND plugin_addons !='' ORDER BY plugin_path ASC\";\n $query = \"SELECT * FROM #plugin WHERE plugin_addons !='' ORDER BY plugin_path ASC\";\n\n\t\t// clear all addon prefs before re-creation. \n\t\tunset($pref['shortcode_list'],$pref['bbcode_list'],$pref['e_sql_list']);\n foreach($this->plugin_addons as $plg)\n\t\t{\n \tunset($pref[$plg.\"_list\"]);\n\t\t}\n\n\t\tif ($sql -> db_Select_gen($query))\n\t\t{\n\t\t\twhile($row = $sql-> db_Fetch())\n\t\t\t{\n\t\t\t $is_installed = ($row['plugin_installflag'] == 1 );\n $tmp = explode(\",\",$row['plugin_addons']);\n\t\t\t\t$path = $row['plugin_path'];\n\n\t\t\t if ($is_installed)\n\t\t\t {\n \t\tforeach($this->plugin_addons as $val)\n\t\t\t\t{\n \tif(in_array($val,$tmp))\n\t\t\t\t\t{\n \t\t\t\t\t\t$pref[$val.\"_list\"][$path] = $path;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t }\n // search for .bb and .sc files.\n\t\t\t\t$sc_array = array();\n\t\t\t\t$bb_array = array();\n\t\t\t\t$sql_array = array();\n\n foreach($tmp as $adds)\n\t\t\t\t{\n \tif(substr($adds,-3) == \".sc\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$sc_name = substr($adds, 0,-3); // remove the .sc\n\t\t\t\t\t\tif ($is_installed)\n\t\t\t\t\t\t{\n \t $sc_array[$sc_name] = \"0\"; // default userclass = e_UC_PUBLIC\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n \t $sc_array[$sc_name] = e_UC_NOBODY; // register shortcode, but disable it\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif($is_installed && (substr($adds,-3) == \".bb\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$bb_name = substr($adds, 0,-3); // remove the .bb\n \t$bb_array[$bb_name] = \"0\"; // default userclass.\n\t\t\t\t\t}\n\n\t\t\t\t\tif($is_installed && (substr($adds,-4) == \"_sql\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pref['e_sql_list'][$path] = $adds;\n\t\t\t\t\t}\n\t\t\t\t}\n\n // Build Bbcode list (will be empty if plugin not installed)\n if(count($bb_array) > 0)\n\t\t\t\t{\n\t\t\t\t\tksort($bb_array);\n \t$pref['bbcode_list'][$path] = $bb_array;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n if (isset($pref['bbcode_list'][$path])) unset($pref['bbcode_list'][$path]);\n\t\t\t\t}\n\n // Build shortcode list - do if uninstalled as well\n\t\t\t\tif(count($sc_array) > 0)\n\t\t\t\t{\n\t\t\t\t ksort($sc_array);\n\t\t\t\t $pref['shortcode_list'][$path] = $sc_array;\n }\n\t\t\t\telse\n\t\t\t\t{\n if(isset($pref['shortcode_list'][$path])) unset($pref['shortcode_list'][$path]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t \tsave_prefs();\n\t\treturn;\n\n\t}", "function install() {\n\t\tsafe_query('DELETE FROM '.safe_pfx('txp_prefs').' WHERE name LIKE \"wlk_phsb_%\"');\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_notifications_instant',val = '1',type = '1',event = 'wlk_phsb',html = 'yesnoradio',position = '10',user_name = ''\");\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_endpoints',val = '\".implode(\"\\n\", $this->vars['endpoints']).\"',type = '1',event = 'wlk_phsb',html = 'wlk_phsb_textarea',position = '60',user_name = ''\");\n\t}", "function wp_register_persisted_preferences_meta()\n {\n }", "function _sql_add_prefs()\n\t{\n\t\t$sql\t= array();\n\n\t\t$prefs\t= array(\n\t\t\t'max_message_chars'\t\t\t\t=> 6000,\n\t\t\t'message_waiting_period'\t\t=> 24,\n\t\t\t'message_throttling'\t\t\t=> 30,\n\t\t\t'message_day_limit'\t\t\t\t=> 1000,\n\t\t\t'max_recipients_per_message'\t=> 20,\n\t\t);\n\n\t\t$prefs\t= base64_encode( serialize( $prefs ) );\n\n\t\t//\t----------------------------------------\n\t\t//\tGet site ids\n\t\t//\t----------------------------------------\n\n\t\t$query\t= ee()->db->query( \"SELECT site_id FROM exp_sites\" );\n\n\t\tforeach ( $query->result_array() as $row )\n\t\t{\n\t\t\t$sql[]\t= ee()->db->insert_string(\n\t\t\t\t'exp_friends_preferences',\n\t\t\t\tarray(\n\t\t\t\t\t'site_id' \t\t=> $row['site_id'],\n\t\t\t\t\t'preferences' \t=> $prefs\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $sql;\n\t}", "function insert_default_prefs($id){\n\t\t\t\tglobal $sql, $aa, $plugintable, $eArrayStorage;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\t\t\t\t$plugindir\t\t= e_PLUGIN.\"content/\";\n\t\t\t\tunset($content_pref, $tmp);\n\t\t\t\t\n\t\t\t\tif(!is_object($aa)){\n\t\t\t\t\trequire_once($plugindir.\"handlers/content_class.php\");\n\t\t\t\t\t$aa = new content;\n\t\t\t\t}\n\n\t\t\t\t$content_pref = $aa -> ContentDefaultPrefs($id);\n\t\t\t\t$tmp = $eArrayStorage->WriteArray($content_pref);\n\n\t\t\t\t$sql -> db_Update($plugintable, \"content_pref='$tmp' WHERE content_id='$id' \");\n\t\t}", "function add_prefs($galerie)\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $niveau_upload;\r\n\t\tif($user[1] >= $niveau_upload)\r\n\t\t{\r\n\t\t\t$sql = mysql_query(\"SELECT id FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\" . $user[0] . \"' \");\r\n\t\t\t$test = mysql_num_rows($sql);\r\n\t\t\tif($test == 0)\r\n\t\t\t{\r\n\t\t\t\t$add=mysql_query(\"INSERT INTO \".ESPACE_MEMBRE_GALERY_TABLE.\" VALUES ('' , '\" . $user[0] . \"' , '\" . $galerie . \"' )\");\r\n\t\t\t}else{\r\n\t\t\t\t$upd1 = mysql_query(\"UPDATE \".ESPACE_MEMBRE_GALERY_TABLE.\" SET value = '\" . $galerie . \"' WHERE user_id = '\" . $user[0] . \"' \");\r\n\t\t\t}\r\n\t\t\techo \"\t<div style=\\\"text-align: center;\\\"><br /><br />\" . _PREFUPDATED . \"<br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre&op=compte\", 2);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "function wlms_plugin_install()\n{\n wlms_create_table();\n wlms_settings_data();\n}", "function _savesettings()\r\n {\r\n\t\t$settings = JRequest::getVar('settings');\r\n\r\n\t\tjimport('joomla.registry.registry');\r\n\t\t$reg = new JRegistry();\r\n\t\t$reg->loadArray($settings);\r\n\t\t\t\t\r\n\t\tif(JFusionConnect::isJoomlaVersion('1.6')) {\r\n\t\t\t$component =& JTable::getInstance('extension');\r\n\t\t\t$componentid = $component->find(array('type' => 'component','element' => 'com_jfusionconnect'));\r\n\t\t\t$component->load($componentid);\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('extension');\r\n\t\t\t$pluginid = $plugin->find(array('type' => 'plugin','element' => 'jfusionconnect'));\r\n\t\t\t$plugin->load($pluginid);\r\n\t\t\t$key='enabled';\r\n\t\t} else {\r\n\t\t\t$component =& JTable::getInstance('component');\r\n\t\t\t$component->loadByOption('com_jfusionconnect');\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('plugin');\r\n\t\t\t$plugin->_tbl_key = 'element';\r\n\t\t\t$plugin->load('jfusionconnect');\r\n\t\t\t$key='published';\r\n\t\t}\r\n\t\t$component->params = $reg->toString();\r\n\t\t$component->store();\r\n \tif ($settings['enabled']) {\r\n\t\t\t$plugin->$key = 1;\r\n\t\t} else {\r\n\t\t\t$plugin->$key = 0;\r\n\t\t}\r\n\t\t$plugin->store();\r\n }", "function manage_plugin_prefs($action, $prefname, $plugin_folder, $varArray = '') \n\t{\n\t\tglobal $pref;\n\t\tif ($prefname == 'plug_sc' || $prefname == 'plug_bb') \n\t\t{ // Special cases - shortcodes and bbcodes - each plugin may contribute several elements\n\t\t\tforeach($varArray as $code) {\n\t\t\t\t$prefvals[] = \"$code:$plugin_folder\";\n\t\t\t}\n\t\t} else {\n\t\t\t$prefvals[] = $varArray;\n//\t\t\t$prefvals[] = $plugin_folder;\n\t\t}\n\t\t$curvals = explode(',', $pref[$prefname]);\n\n\t\tif ($action == 'add') \n\t\t{\n\t\t\t$newvals = array_merge($curvals, $prefvals);\n\t\t}\n\t\tif ($action == 'remove') \n\t\t{\n\t\t foreach($prefvals as $v) \n\t\t {\n\t\t\tif (($i = array_search($v, $curvals)) !== FALSE) \n\t\t\t{\n\t\t\t unset($curvals[$i]);\n\t\t\t}\n\t\t }\n\t\t $newvals = $curvals;\n\t\t}\n\t\t$newvals = array_unique($newvals);\n\t\t$pref[$prefname] = implode(',', $newvals);\n\n\t\tif(substr($pref[$prefname], 0, 1) == \",\")\n\t\t{\n\t\t $pref[$prefname] = substr($pref[$prefname], 1);\n\t\t}\n\t\tsave_prefs();\n\t}", "function save()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n\n if ($this->plugins[$name]->is_account) {\n $this->plugins[$name]->save();\n } elseif ($this->plugins[$name]->initially_was_account) {\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }", "function store(){\n update_option( $this->option_name, $this->settings );\n }", "private function savePluginData($plugins)\n {\n $dbtable = $this->project->id . '_plugins';\n foreach ($plugins as $plugin) {\n $plugin['timestamp'] = $this->timestamp;\n \\DB::table($dbtable)->insert($plugin);\n }\n }", "public abstract function settingsSave(array &$pluginInfo);", "public function Save() {\n\t\t\n\t\tglobal $sql;\n\t\tforeach( $this->settings as $option => $value ) {\n\t\t\t\n\t\t\t$this->update_option( $option, $value, $this->username );\n\t\t}\n\t}", "function update_plugins_table() \n\t{\n\t\tglobal $sql, $sql2, $mySQLprefix, $menu_pref, $tp, $pref;\n\n\t\trequire_once(e_HANDLER.'file_class.php');\n\n\t\t$fl = new e_file;\n\t\t$pluginList = $fl->get_files(e_PLUGIN, \"^plugin\\.php$\", \"standard\", 1);\n\t\t$sp = FALSE;\n\n// Read all the plugin DB info into an array to save lots of accesses\n\t\t$pluginDBList = array();\n\t\tif ($sql->db_Select('plugin',\"*\"))\n\t\t{\n\t\t while ($row = $sql->db_Fetch())\n\t\t {\n\t\t $pluginDBList[$row['plugin_path']] = $row;\n\t\t $pluginDBList[$row['plugin_path']]['status'] = 'read';\n//\t\t\techo \"Found plugin: \".$row['plugin_path'].\" in DB<br />\";\n\t\t }\n\t\t}\n\n\t\t// Get rid of any variables previously defined which may occur in plugin.php\n\t\tforeach($pluginList as $p)\n\t\t{\n\t\t $defined_vars = array_keys(get_defined_vars());\n\t\t foreach($defined_vars as $varname) \n\t\t {\n\t\t\tif ((substr($varname, 0, 6) == 'eplug_') || (substr($varname, 0, 8) == 'upgrade_')) \n\t\t\t{\n\t\t\t unset($$varname);\n\t\t\t}\n\t\t }\n\n\t\t // We have to include here to set the variables, otherwise we only get uninstalled plugins\n\t\t // Would be nice to eval() the file contents to pick up errors better, but too many path issues\n\t\t $plug['plug_action'] = 'scan';\t\t\t// Make sure plugin.php knows what we're up to\n\t\t include(\"{$p['path']}{$p['fname']}\");\n\t\t $plugin_path = substr(str_replace(e_PLUGIN,\"\",$p['path']),0,-1);\n\n\t\t // scan for addons.\n\t\t $eplug_addons = $this->getAddons($plugin_path);\t\t\t// Returns comma-separated list\n//\t\t $eplug_addons = $this->getAddons($plugin_path,'check');\t\t// Checks opening/closing tags on addon files\n\n\t\t // See whether the plugin needs installation - it does if one or more variables defined\n\t\t $no_install_needed = 1;\n\t\t foreach ($this->all_eplug_install_variables as $check_var)\n\t\t {\n\t\t if (isset($$check_var) && ($$check_var)) { $no_install_needed = 0; }\n\t\t }\n\n\t\t if ($plugin_path == $eplug_folder)\n\t\t {\n\t\t\tif(array_key_exists($plugin_path,$pluginDBList))\n\t\t\t{ // Update the addons needed by the plugin\n\t\t $pluginDBList[$plugin_path]['status'] = 'exists';\n\t\t\t // If plugin not installed, and version number of files changed, update version as well\n\t\t\t if (($pluginDBList[$plugin_path]['plugin_installflag'] == 0) && ($pluginDBList[$plugin_path]['plugin_version'] != $eplug_version))\n\t\t\t { // Update stored version\n\t\t\t\t$pluginDBList[$plugin_path]['plugin_version'] = $eplug_version;\n\t\t\t\t$pluginDBList[$plugin_path]['status'] = 'update';\n\t\t\t }\n\t\t\t if ($pluginDBList[$plugin_path]['plugin_addons'] != $eplug_addons)\n\t\t\t { // Update stored addons list\n\t\t\t\t$pluginDBList[$plugin_path]['plugin_addons'] = $eplug_addons;\n\t\t\t\t$pluginDBList[$plugin_path]['status'] = 'update';\n\t\t\t }\n\t\t\t \n\t\t\t if ($pluginDBList[$plugin_path]['plugin_installflag'] == 0)\n\t\t\t { // Plugin not installed - make sure $pref not set\n\t\t\t if (isset($pref['plug_installed'][$plugin_path]))\n\t\t\t\t{\n\t\t\t unset($pref['plug_installed'][$plugin_path]);\n//\t\t\t\t echo \"Remove: \".$plugin_path.\"->\".$ep_row['plugin_version'].\"<br />\";\n\t\t\t\t $sp = TRUE;\n\t\t\t\t}\n\t\t\t }\n\t\t\t else\n\t\t\t {\t// Plugin installed - make sure $pref is set\n\t\t\t\tif (!isset($pref['plug_installed'][$plugin_path]) || ($pref['plug_installed'][$plugin_path] != $pluginDBList[$plugin_path]['plugin_version']))\n\t\t\t\t{\t// Update prefs array of installed plugins\n\t\t\t $pref['plug_installed'][$plugin_path] = $pluginDBList[$plugin_path]['plugin_version'];\n//\t\t\t\t echo \"Add: \".$plugin_path.\"->\".$ep_row['plugin_version'].\"<br />\";\n\t\t\t\t $sp = TRUE;\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{ // New plugin - not in table yet, so add it. If no install needed, mark it as 'installed'\n\t\t\t if ($eplug_name)\n\t\t\t {\n\t\t\t\t// Can just add to DB - shouldn''t matter that its not in our current table\n//\t\t\t\techo \"Trying to insert: \".$eplug_folder.\"<br />\";\n\t\t\t\t$sql->db_Insert(\"plugin\", \"0, '\".$tp -> toDB($eplug_name, true).\"', '\".$tp -> toDB($eplug_version, true).\"', '\".$tp -> toDB($eplug_folder, true).\"', {$no_install_needed}, '{$eplug_addons}' \");\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t else\n\t\t { // May be useful that we ignore what will usually be copies/backups of plugins - but don't normally say anything\n//\t\t echo \"Plugin copied to wrong directory. Is in: {$plugin_path} Should be: {$eplug_folder}<br /><br />\";\n\t\t }\n\t\t}\n\n\t\t// Now scan the table, updating the DB where needed\n\t\tforeach ($pluginDBList as $plug_path => $plug_info)\n\t\t{\n\t\t if ($plug_info['status'] == 'read')\n\t\t {\t// In table, not on server - delete it\n\t\t\t$sql->db_Delete('plugin', \"`plugin_id`='{$plug_info['plugin_id']}'\");\n//\t\t\techo \"Deleted: \".$plug_path.\"<br />\";\n\t\t }\n\t\t if ($plug_info['status'] == 'update')\n\t\t {\n\t\t $temp = array();\n\t\t\tforeach ($this->all_editable_db_fields as $p_f)\n\t\t\t{\n\t\t\t $temp[] =\"`{$p_f}` = '{$plug_info[$p_f]}'\";\n\t\t\t}\n\t\t $sql->db_Update('plugin', implode(\", \",$temp).\" WHERE `plugin_id`='{$plug_info['plugin_id']}'\");\n//\t\t\techo \"Updated: \".$plug_path.\"<br />\";\n\t\t }\n\t\t}\n\t if ($sp) save_prefs();\n\t}", "public function add_plugin($plugin_name, $plugin_url, $checked){\n\t \t$this->load->model('download_model');\t\n\n\t\t\t$query = $this\n\t\t\t\t\t\t->download_model\n\t\t\t\t\t\t->get_site_credentials();\n\n\t\t\t$host = $query[0]->admin_host;\n\t\t\t$user = $query[0]->admin_user;\n\t\t\t$pass = $query[0]->admin_password;\t\t\t\t\n\n\t\t\t$config['hostname'] = \"localhost\";\n\t\t $config['username'] = $user;\n\t\t $config['password'] = $pass;\n\t\t $config['database'] = \"wordpress_default_plugins\";\n\t\t $config['dbdriver'] = \"mysql\";\n\t\t $config['dbprefix'] = \"\";\n\t\t $config['pconnect'] = FALSE;\n\t\t $config['db_debug'] = TRUE;\n\t\t $config['cache_on'] = FALSE;\n\t\t $config['cachedir'] = \"\";\n\t\t $config['char_set'] = \"utf8\";\n\t\t $config['dbcollat'] = \"utf8_general_ci\";\n\n\t\t \t$db2 = $this->load->database($config,TRUE);\n\n\t\t\t$data = array(\n\t\t\t 'plugin_name' => $plugin_name,\n\t\t\t 'plugin_path' => $plugin_url ,\n\t\t\t 'checked' => $checked\n\t\t\t);\n\n\t\t\t$db2->insert('default_plugins', $data); \n\t\t\t\n\t\t\treturn true;\t\t\n\n\t\t}", "public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}", "function prefs_save($args)\n {\n if ($args['section'] != 'mailbox') {\n return $args;\n }\n\n // Load configuration\n $this->load_config();\n\n // Check that configuration is not disabled\n $dont_override = (array) $this->rc->config->get('dont_override', array());\n\n foreach (array('basic', 'desktop', 'sound') as $type) {\n $key = 'newmail_notifier_' . $type;\n if (!in_array($key, $dont_override)) {\n $args['prefs'][$key] = rcube_utils::get_input_value('_' . $key, rcube_utils::INPUT_POST) ? true : false;\n }\n }\n\n $option = 'newmail_notifier_desktop_timeout';\n if (!in_array($option, $dont_override)) {\n if ($value = (int) rcube_utils::get_input_value('_' . $option, rcube_utils::INPUT_POST)) {\n $args['prefs'][$option] = $value;\n }\n }\n\n return $args;\n }", "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "function install_plugin($id) \n\t{\n\t\tglobal $sql, $ns, $sysprefs,$mySQLprefix, $tp;\n\n\t\t// install plugin ...\n\t\t$plug = $this->getinfo($id);\n\t\t$plug['plug_action'] = 'install';\n\n\t\tif ($plug['plugin_installflag'] == FALSE) {\n\t\t\tinclude_once(e_PLUGIN.$plug['plugin_path'].'/plugin.php');\n\n\t\t\t$func = $eplug_folder.'_install';\n\t\t\tif (function_exists($func)) {\n\t\t\t\t$text .= call_user_func($func);\n\t\t\t}\n\n\t\t\tif (is_array($eplug_tables)) {\n\t\t\t\t$result = $this->manage_tables('add', $eplug_tables);\n\t\t\t\tif ($result === TRUE) {\n\t\t\t\t\t$text .= EPL_ADLAN_19.'<br />';\n\t\t\t\t\t//success\n\t\t\t\t} else {\n\t\t\t\t\t$text .= EPL_ADLAN_18.'<br />';\n\t\t\t\t\t//fail\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\tif (is_array($eplug_prefs)) {\n\t\t\t\t$this->manage_prefs('add', $eplug_prefs);\n\t\t\t\t$text .= EPL_ADLAN_8.'<br />';\n\t\t\t}\n\n\n\n\t\t\tif (is_array($eplug_array_pref)){\n\t\t\t\tforeach($eplug_array_pref as $key => $val){\n\t\t\t\t\t$this->manage_plugin_prefs('add', $key, $eplug_folder, $val);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_array($eplug_sc)) {\n\t\t\t\t$this->manage_plugin_prefs('add', 'plug_sc', $eplug_folder, $eplug_sc);\n\t\t\t}\n\n\t\t\tif (is_array($eplug_bb)) {\n\t\t\t\t$this->manage_plugin_prefs('add', 'plug_bb', $eplug_folder, $eplug_bb);\n\t\t\t}\n\n\t\t\tif (is_array($eplug_user_prefs)) {\n\t\t\t\t$sql->db_Select(\"core\", \" e107_value\", \" e107_name = 'user_entended'\");\n\t\t\t\t$row = $sql->db_Fetch();\n\t\t\t\t$user_entended = unserialize($row[0]);\n\t\t\t\twhile (list($e_user_pref, $default_value) = each($eplug_user_prefs)) {\n\t\t\t\t\t$user_entended[] = $e_user_pref;\n\t\t\t\t\t$user_pref['$e_user_pref'] = $default_value;\n\t\t\t\t}\n\t\t\t\tsave_prefs(\"user\");\n\t\t\t\t$tmp = addslashes(serialize($user_entended));\n\t\t\t\tif ($sql->db_Select(\"core\", \"e107_value\", \" e107_name = 'user_entended'\")) {\n\t\t\t\t\t$sql->db_Update(\"core\", \"e107_value = '{$tmp}' WHERE e107_name = 'user_entended' \");\n\t\t\t\t} else {\n\t\t\t\t\t$sql->db_Insert(\"core\", \"'user_entended', '{$tmp}' \");\n\t\t\t\t}\n\t\t\t\t$text .= EPL_ADLAN_8.\"<br />\";\n\t\t\t}\n\n\t\t\tif ($eplug_link === TRUE && $eplug_link_url != '' && $eplug_link_name != '') {\n $plug_perm['everyone'] = e_UC_PUBLIC;\n\t\t\t\t$plug_perm['guest'] = e_UC_GUEST;\n\t\t\t\t$plug_perm['member'] = e_UC_MEMBER;\n\t\t\t\t$plug_perm['mainadmin'] = e_UC_MAINADMIN;\n\t\t\t\t$plug_perm['admin'] = e_UC_ADMIN;\n\t\t\t\t$plug_perm['nobody'] = e_UC_NOBODY;\n\t\t\t\t$eplug_link_perms = strtolower($eplug_link_perms);\n $linkperm = ($plug_perm[$eplug_link_perms]) ? $plug_perm[$eplug_link_perms] : e_UC_PUBLIC;\n\t\t\t\t$this->manage_link('add', $eplug_link_url, $eplug_link_name,$linkperm);\n\t\t\t}\n\n\t\t\tif ($eplug_userclass) {\n\t\t\t\t$this->manage_userclass('add', $eplug_userclass, $eplug_userclass_description);\n\t\t\t}\n\n\t\t\t$this -> manage_search('add', $eplug_folder);\n\n\t\t\t$this -> manage_notify('add', $eplug_folder);\n\n\t\t\t$eplug_addons = $this->getAddons($eplug_folder);\n\n\t\t\t$sql->db_Update('plugin', \"plugin_installflag = 1, plugin_addons = '{$eplug_addons}' WHERE plugin_id = '\".intval($id).\"'\");\n\t\t\t$pref['plug_installed'][$plugin_path] = $plug['plugin_version'];\n\t\t\tsave_prefs();\n\t\t\t\n if($rssmess) { $text .= $rssmess; }\n\t\t\t$text .= (isset($eplug_done) ? \"<br />{$eplug_done}\" : \"<br />\".LAN_INSTALL_SUCCESSFUL);\n\t\t} else {\n\t\t\t$text = EPL_ADLAN_21;\n\t\t}\n\t\tif($eplug_conffile){ $text .= \"&nbsp;<a href='\".e_PLUGIN.\"$eplug_folder/$eplug_conffile'>[\".LAN_CONFIGURE.\"]</a>\"; }\n\t\t$ns->tablerender(EPL_ADLAN_33, $text);\n\t}", "function plugin_postinstall()\n{\n global $_CONF, $_TABLES, $pi_admin;\n\n require_once $_CONF['path_system'] . 'classes/config.class.php';\n\n $plg_config = config::get_instance();\n $_PLG_CONF = $plg_config->get_config('{plugin}');\n\n $admin_group_id = DB_getItem($_TABLES['groups'], 'grp_id', \"grp_name = '{$pi_admin}'\");\n $blockadmin_id = DB_getItem($_TABLES['groups'], 'grp_id', \"grp_name = 'Block Admin'\");\n\n $DEFVALUES = array();\n $DEFVALUES[] = \"INSERT INTO {$_TABLES['{plugin}']} (up_title, up_value, owner_id, group_id) \"\n . \"VALUES ('Sample Data', 100, 2, #group#)\";\n $DEFVALUES[] = \"INSERT INTO {$_TABLES['{plugin}']} (up_title, up_value, owner_id, group_id) \"\n . \"VALUES ('More Sample Data', 200, 2, #group#)\";\n\n foreach ($DEFVALUES as $sql) {\n $sql = str_replace('#group#', $admin_group_id, $sql);\n DB_query($sql, 1);\n if (DB_error()) {\n COM_error(\"SQL error in {plugin} plugin postinstall, SQL: \" . $sql);\n return false;\n }\n }\n\n return true;\n}", "protected function doPrePluginOptionsSave() {\n\t\t$oDp = $this->loadDP();\n\n\t\tif ( $this->getOpt( 'activated_at', 0 ) <= 0 ) {\n\t\t\t$this->setOpt( 'activated_at', $oDp->time() );\n\t\t}\n\t\tif ( $this->getOpt( 'installation_time', 0 ) <= 0 ) {\n\t\t\t$this->setOpt( 'installation_time', $oDp->time() );\n\t\t}\n\n\t\t$this->setOpt( 'installed_version', $this->getController()->getVersion() );\n\t}", "function notification_user_settings_save() {\n\tglobal $CONFIG;\n\t//@todo Wha??\n\tinclude($CONFIG->path . \"actions/notifications/settings/usersettings/save.php\");\n}", "function store_data($data, $data_name)\n{\n /* @todo store the PUA data in its own table */\n update_option($data_name, serialize($data));\n}", "function _arc_meta_install_prefs()\n{\n if (!isset($prefs['arc_meta_homepage_title'])) {\n set_pref('arc_meta_homepage_title', '%n | %t', 'arc_meta', PREF_PLUGIN, 'text_input', 10);\n }\n if (!isset($prefs['arc_meta_article_title'])) {\n set_pref('arc_meta_article_title', '%a | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 20);\n }\n if (!isset($prefs['arc_meta_comment_title'])) {\n set_pref('arc_meta_comment_title', gTxt('comments_on').' %a | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 30);\n }\n if (!isset($prefs['arc_meta_search_title'])) {\n set_pref('arc_meta_search_title', gTxt('search_results') . ': ' . '%q | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 40);\n }\n if (!isset($prefs['arc_meta_category_title'])) {\n set_pref('arc_meta_category_title', '%c | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 50);\n }\n if (!isset($prefs['arc_meta_section_title'])) {\n set_pref('arc_meta_section_title', '%s | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 60);\n }\n if (!isset($prefs['arc_meta_section_category_title'])) {\n set_pref('arc_meta_section_category_title', '%c - %s | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 70);\n }\n if (!isset($prefs['arc_meta_section_tab'])) {\n set_pref('arc_meta_section_tab', 'content', 'arc_meta', PREF_PLUGIN, '_arc_meta_section_tab_select', 80);\n }\n return;\n}", "function plugin_install () {\n global $wpdb;\n $charset_collate = $wpdb->get_charset_collate();\n\n // First we define our tables. We need 3, so let's create the names\n $pollsTable = $wpdb->prefix . \"polls_\" .\"polls\";\n $optionsTable = $wpdb->prefix . \"polls_\" .\"options\";\n $votesTable = $wpdb->prefix . \"polls_\" .\"votes\";\n\n // Let's now create the tables with the names we built\n\n // Poll is the \"master container\" of our little system\n $createPollTable = \"CREATE TABLE $pollsTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n name tinytext NOT NULL,\n creationDate TIMESTAMP NOT NULL,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n \n // Then we need to create options that are tied to each poll\n $createOptionsTable = \"CREATE TABLE $optionsTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n poll_id mediumInt(9) NOT NULL,\n name tinytext NOT NULL,\n PRIMARY KEY (id),\n FOREIGN KEY (poll_id) REFERENCES {$pollsTable} (id)\n ) $charset_collate;\";\n\n // And finally, we need to store each vote as a row. Each vote belongs to a poll\n // and represents one option from it\n $createVotesTable = \"CREATE TABLE $votesTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n poll_id mediumInt(9) NOT NULL,\n option_id mediumInt(9) NOT NULL,\n creationDate TIMESTAMP NOT NULL,\n PRIMARY KEY (id),\n FOREIGN KEY (poll_id) REFERENCES {$pollsTable} (id),\n FOREIGN KEY (option_id) REFERENCES {$optionsTable} (id)\n ) $charset_collate;\";\n\n // We need to import the upgrade script to make the plugin create the tables upon activation:\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n // And now let's execute our queries\n dbDelta($createPollTable);\n dbDelta($createOptionsTable);\n dbDelta($createVotesTable);\n}", "function install_hooks() {\n // Info that the plugin is activated.\n update_option( 'DB_Plugin_Hooks', true );\n }", "function upgrade_1_22_prefs($content_pref){\n\n\t\t\t//create : item page\n\t\t\t$content_pref['content_admin_subheading'] = '1';\n\t\t\t$content_pref['content_admin_summary'] = '1';\n\t\t\t$content_pref['content_admin_startdate'] = '1';\n\t\t\t$content_pref['content_admin_enddate'] = '1';\n\n\t\t\t//create : category page\n\t\t\t$content_pref['content_admincat_subheading'] = '1';\n\t\t\t$content_pref['content_admincat_comment'] = '1';\n\t\t\t$content_pref['content_admincat_rating'] = '1';\n\t\t\t$content_pref['content_admincat_pe'] = '1';\n\t\t\t$content_pref['content_admincat_visibility'] = '1';\n\t\t\t$content_pref['content_admincat_startdate'] = '1';\n\t\t\t$content_pref['content_admincat_enddate'] = '1';\n\t\t\t$content_pref['content_admincat_uploadicon'] = '1';\n\t\t\t$content_pref['content_admincat_selecticon'] = '1';\n\n\t\t\t//create : submit page\n\t\t\t$content_pref['content_submit_subheading'] = '1';\n\t\t\t$content_pref['content_submit_summary'] = '1';\n\t\t\t$content_pref['content_submit_startdate'] = '1';\n\t\t\t$content_pref['content_submit_enddate'] = '1';\n\n\t\t\t//content manager\n\t\t\t$content_pref['content_manager_approve'] = '255';\n\t\t\t$content_pref['content_manager_personal'] = '255';\n\t\t\t$content_pref['content_manager_category'] = '255';\n\n\t\t\treturn $content_pref;\n\t\t}", "public function refresh_plugin_settings() {\n self::$instance->plugin_settings = self::$instance->get_plugin_settings();\n }", "function addPreference($link,$profile_id,$value)\n\t\t{\n\t\t\t$value = mysqli_escape_string($link,$value);\n\t\t\t$profile_id = mysqli_escape_string($link,$profile_id);\n\t\t\t$sql = 'INSERT INTO preference (profile_id,value) VALUES ('.$profile_id.',\"'.$value.'\")';\n\t\t\tif (mysqli_query($link, $sql)) {\n\t\t\t\t//success\n\t\t\t\treturn \"success\";\n\t\t\t}else{\n\t\t\t\t//error\n\t\t\t\treturn '{\"status\":\"error\",\"message\":\"preference not inserted\"}';\n\t\t\t}\n\t\t}", "function install_settings()\n\t{\n\t\t//-----------------------------------------\n\t\t// Get DB\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' );\t\t\n\t\t\n\t\t$this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_user'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pass'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_host'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pre'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->ipsclass->vars['mysql_codepage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['sql_driver'] );\t\n\t\t//-----------------------------------------\n\t\t// Install settings\n\t\t//-----------------------------------------\n\t\n\t\t$output[] = \"Добавление настроек...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/settings.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\n\t\t//-----------------------------------------\n\t\t// Known settings\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( substr( $this->install->saved_data['install_url'], -1 ) == '/' )\n\t\t{\n\t\t\t$this->install->saved_data['install_url'] = substr( $this->install->saved_data['install_url'], 0, -1 );\n\t\t}\n\t\t\n\t\t$_urls = parse_url( $this->install->saved_data['install_url'] );\n\t\t\n\t\t$known = array( 'email_in' => $this->install->saved_data['admin_email'],\n\t\t\t\t\t\t 'email_out' => $this->install->saved_data['admin_email'],\n\t\t\t\t\t\t 'base_dir' => $this->install->saved_data['install_dir'],\n\t\t\t\t\t\t 'upload_dir' => $this->install->saved_data['install_dir'] . '/uploads',\n\t\t\t\t\t\t 'upload_url' => $this->install->saved_data['install_url'] . '/uploads',\n\t\t\t\t\t\t 'search_sql_method' => $this->install->ipsclass->DB->sql_can_fulltext() ? 'ftext' : 'man',\n\t\t\t\t\t\t //'cookie_domain' => $_urls['host'] != 'localhost' ? '.' . preg_replace( \"#^(?:.+?\\.)?([a-z0-9\\-]{3,})\\.(([a-z]{2,4})(\\.([a-z]{2}))?|museum)$#is\", \"\\\\1.\\\\2\", $_urls['host'] ) : '',\n\t\t\t\t\t );\n\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// Parse\n\t\t//-----------------------------------------\n\n\t\t$fields = array( 'conf_title' , 'conf_description', 'conf_group' , 'conf_type' , 'conf_key' , 'conf_default',\n\t\t\t\t\t\t 'conf_extra' , 'conf_evalphp' , 'conf_protected', 'conf_position', 'conf_start_group', 'conf_end_group',\n\t\t\t\t\t\t 'conf_help_key', 'conf_add_cache' , 'conf_title_keyword' );\n\n\t\t$setting_fields = array( 'conf_title_keyword', 'conf_title_title', 'conf_title_desc', 'conf_title_noshow', 'conf_title_module' );\n\n\t\t//-----------------------------------------\n\t\t// Fix up...\n\t\t//-----------------------------------------\n \n\t\tif ( ! is_array( $xml->xml_array['settingexport']['settinggroup']['setting'][0] ) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Ensure [0] is populated\n\t\t\t//-----------------------------------------\n\n\t\t\t$tmp = $xml->xml_array['settingexport']['settinggroup']['setting'];\n\n\t\t\tunset($xml->xml_array['settingexport']['settinggroup']['setting']);\n\n\t\t\t$xml->xml_array['settingexport']['settinggroup']['setting'][0] = $tmp;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Loop through and sort out settings...\n\t\t//-----------------------------------------\n\n\t\tforeach( $xml->xml_array['settingexport']['settinggroup']['setting'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\n\t\t\t//-----------------------------------------\n\t\t\t// Is setting?\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( ! $entry['conf_is_title']['VALUE'] )\n\t\t\t{\n\t\t\t\tforeach( $fields as $f )\n\t\t\t\t{\n\t\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t\t}\n\n\t\t\t\t$new_settings[] = $newrow;\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Is title?\n\t\t\t//-----------------------------------------\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach( $setting_fields as $f )\n\t\t\t\t{\n\t\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t\t}\n\n\t\t\t\t$new_titles[] = $newrow;\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Sort out titles...\n\t\t//-----------------------------------------\n\n\t\tif ( is_array( $new_titles ) and count( $new_titles ) )\n\t\t{\n\t\t\tforeach( $new_titles as $idx => $data )\n\t\t\t{\n\t\t\t\tif ( $data['conf_title_title'] AND $data['conf_title_keyword'] )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Get ID based on key\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$save = array( 'conf_title_title' => $data['conf_title_title'],\n\t\t\t\t\t\t\t\t 'conf_title_desc' => $data['conf_title_desc'],\n\t\t\t\t\t\t\t\t 'conf_title_keyword' => $data['conf_title_keyword'],\n\t\t\t\t\t\t\t\t 'conf_title_noshow' => $data['conf_title_noshow'],\n\t\t\t\t\t\t\t\t 'conf_title_module' => $data['conf_title_module'] );\n\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Insert first\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$this->install->ipsclass->DB->do_insert( 'conf_settings_titles', $save );\n\n\t\t\t\t\t$conf_id = $this->install->ipsclass->DB->get_insert_id();\n\t\t\t\t\t$save['conf_title_id'] = $conf_id;\n\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Update settings cache\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$setting_groups_by_key[ $save['conf_title_keyword'] ] = $save;\n\t\t\t\t\t$setting_groups[ $save['conf_title_id'] ] = $save;\n\n\t\t\t\t\t$need_update[] = $conf_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Sort out settings\n\t\t//-----------------------------------------\n\n\t\tif ( is_array( $new_settings ) and count( $new_settings ) )\n\t\t{\n\t\t\tforeach( $new_settings as $idx => $data )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Insert known\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\tif ( in_array( $data['conf_key'], array_keys( $known ) ) )\n\t\t\t\t{\n\t\t\t\t\t$data['conf_value'] = $known[ $data['conf_key'] ];\n\t\t\t\t\t#$data['conf_default'] = $known[ $data['conf_key'] ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data['conf_value'] = '';\n\t\t\t\t}\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Now assign to the correct ID based on\n\t\t\t\t// our title keyword...\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$data['conf_group'] = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id'];\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Remove from array\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\tunset( $data['conf_title_keyword'] );\n\n\t\t\t\t$this->install->ipsclass->DB->do_insert( 'conf_settings', $data );\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Update group counts...\n\t\t//-----------------------------------------\n\n\t\tif ( count( $need_update ) )\n\t\t{\n\t\t\tforeach( $need_update as $i => $idx )\n\t\t\t{\n\t\t\t\t$conf = $this->install->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'conf_settings', 'where' => 'conf_group='.$idx ) );\n\n\t\t\t\t$count = intval($conf['count']);\n\n\t\t\t\t$this->install->ipsclass->DB->do_update( 'conf_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->install->template->append( $this->install->template->install_page_refresh( $output ) );\n\t\t$this->install->template->next_action = '?p=install&sub=acpperms';\n\t\t$this->install->template->hide_next = 1;\n\t}", "function load_plugin() {\n global $fb_opt_name, $gp_opt_name, $popup_fb_page, $popup_delay, $fb_popup_box;\n \n if(is_admin()&& get_option('Activated_Plugin')=='Plugin-Slug') {\n delete_option('Activated_Plugin');\n add_option($fb_opt_name,'on');\n add_option($gp_opt_name,'on');\n add_option($popup_fb_page,'codesamplez');\n add_option($popup_delay,'2');\n add_option($fb_popup_box,'on');\n }\n}", "function qa_initialize_postdb_plugins()\n{\n\tglobal $qa_pluginManager;\n\n\trequire_once QA_INCLUDE_DIR . 'app/options.php';\n\tqa_preload_options();\n\n\t$qa_pluginManager->loadPluginsAfterDbInit();\n\tqa_load_override_files();\n\n\tqa_report_process_stage('plugins_loaded');\n}", "protected function set_plugin_fields()\n {\n global $DB;\n\n $this->plugins=array();\n\n $sql = \"SELECT *\n FROM {block_ilp_plugin} as p,\n {block_ilp_report_field} as rf\n WHERE rf.plugin_id = p.id\n AND rf.report_id = :report_id\";\n\n foreach($DB->get_records_sql($sql, array('report_id'=>$this->id)) as $item)\n {\n $this->plugins[$item->name]=$item;\n }\n }", "function hookInstall() {\n// $db = get_db()cou;\n//die(\"got to the installer method...\");\n $this->_saveVocabularies();\n }", "public function update_site_system_preferences($prefs, $site_id = '')\n\t{\n\t\tif ($site_id != '')\n\t\t{\n\t\t\t$this->db->where('site_id', $site_id);\n\t\t}\n\n\t\t$this->db->set('site_system_preferences', base64_encode(serialize($prefs)));\n\t\t$this->db->update('sites');\n\t}", "function updatenote_regsettings() {\n\tregister_setting( 'updatenote-settings', 'updatenote_options', 'updatenote_validate' );\n}", "private function _saveSeo() {\r\n\r\n // get plugins details\r\n $plugin = JPluginHelper::getPlugin( 'system', 'shmobile');\r\n $params = new JRegistry();\r\n $params->loadString( $plugin->params);\r\n\r\n // get current values\r\n $defaultEnabled = $params->get('mobile_switch_enabled');\r\n $defaultTemplate = $params->get('mobile_template');\r\n\r\n // save mobile template switcher params, stored in system plugin\r\n $mobile_switch_enabled = JRequest::getBool( 'mobile_switch_enabled', $defaultEnabled);\r\n $mobile_template = JRequest::getCmd( 'mobile_template', $defaultTemplate);\r\n\r\n // set params\r\n $params->set('mobile_switch_enabled', $mobile_switch_enabled);\r\n $params->set('mobile_template', $mobile_template);\r\n $textParams = (string) $params;\r\n\r\n try {\r\n ShlDbHelper::update( '#__extensions', array('params' => $textParams), array( 'element' => 'shmobile', 'folder' => 'system', 'type' => 'plugin'));\r\n } catch (Exception $e) {\r\n\r\n }\r\n\r\n }", "public function preferences() {\n $prefs = $this->prefs;\n ?>\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>\"><?php _e( 'Author Content is liked', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'added' => 'creds' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>\" value=\"<?php echo $this->core->number( $prefs['added']['creds'] ); ?>\" size=\"8\" /></div>\n </li>\n <li>\n <label for=\"<?php echo $this->field_id( array( 'added' => 'limit' ) ); ?>\"><?php _e( 'Limit', 'rehub_framework' ); ?></label>\n <?php echo $this->hook_limit_setting( $this->field_name( array( 'added' => 'limit' ) ), $this->field_id( array( 'added' => 'limit' ) ), $prefs['added']['limit'] ); ?>\n </li>\n </ol>\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>\"><?php _e( 'Log Template', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'added' => 'log' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>\" value=\"<?php echo esc_attr( $prefs['added']['log'] ); ?>\" class=\"long\" /></div>\n <span class=\"description\"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>\n </li>\n </ol>\n\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>\"><?php _e( 'Author Content is disliked', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'removed' => 'creds' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>\" value=\"<?php echo $this->core->number( $prefs['removed']['creds'] ); ?>\" size=\"8\" /></div>\n </li>\n </ol>\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>\"><?php _e( 'Log Template', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'removed' => 'log' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>\" value=\"<?php echo esc_attr( $prefs['removed']['log'] ); ?>\" class=\"long\" /></div>\n <span class=\"description\"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>\n </li>\n </ol>\n <?php\n }", "public static function save()\n\t{\n\t\tConfigManager::save('discord', self::load(), 'config');\n\t}", "function jpst_register_settings() {\n\tregister_setting( 'jpst-settings-group', 'jpst_oauth','saveOptionCallback' );\n}", "public function admin_init() {\n\t\tregister_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );\n\t}", "public function add_settings() {\n if (self::$settings !== null) {\n $this->print_settings(self::$settings);\n }\n }", "function setModulePref($module,$var,$value,$userID=0)\n {\n $db = & JxSingleton::factory('db');\n\n if(!$userID)\n {\n $user = & JxSingleton::factory('user');\n $userID = $user->userID;\n }\n\n if(!DB::isError($db))\n {\n\n $sql = \"REPLACE INTO preferences\n SET userID='\".$userID.\"',\n module='$module',\n var='$var',\n value='$value'\";\n \n $result = $db->query($sql);\n \n return (!DB::isError($result));\n }\n }", "function append_settings( $addthis ){\n if( $addthis == '' ){ return false; }\n $save = escapeshellarg(\"$addthis\\n\");\n //exec(\"echo $save >> '$this->_settings_file'\");\n exec(\"printf $save >> '$this->_settings_file'\");\n }", "function add_plugin($plugin)\n {\n }", "function saveSettings() {\n\t\t//# convert class variables into an array and save using\n\t\t//# Wordpress functions, \"update_option\" or \"add_option\"\n\t\t//#convert class into array...\n\t\t$settings_array = array();\n\t\t$obj = $this;\n\t\tforeach (array_keys(get_class_vars(get_class($obj))) as $k){\n\t\t\tif (is_array($obj->$k)) {\n\t\t\t\t//serialize any arrays within $obj\n\t\t\t\tif (count($obj->$k)>0) {\n\t\t\t\t\t$settings_array[$k] = esc_attr(serialize($obj->$k));\n\t\t\t\t} else {\n\t\t\t\t\t$settings_array[$k] = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$settings_array[$k] = \"{$obj->$k}\";\n\t\t\t}\n\t\t}\n\t\t//#save array to options table...\n\t\t$options_check = get_option('wassup_settings');\n\t\tif (!empty($options_check)) {\n\t\t\tupdate_option('wassup_settings', $settings_array);\n\t\t} else {\n\t\t\tadd_option('wassup_settings', $settings_array, 'Options for WassUp');\n\t\t}\n\t\treturn true;\n\t}", "private function _add_hook($hook)\n\t{\n\t\tee()->db->insert('extensions', array(\n\t\t\t'class' => $this->class_name,\n\t\t\t'method' => $hook,\n\t\t\t'hook' => $hook,\n\t\t\t'settings' => serialize($this->settings),\n\t\t\t'priority' => 5,\n\t\t\t'version' => $this->version,\n\t\t\t'enabled' => 'y'\n\t\t));\n\t}", "function acf_append_setting($name, $value)\n{\n}", "function plugin_postinstall_nexcontent($pi_name)\r\n{\r\n global $_DB_dbms, $_CONF, $_DB_table_prefix, $_TABLES ;\r\n\r\n $sql= \"INSERT INTO {$_TABLES['nexcontent_pages']} (id,pid,type,pageorder,name,blockformat,heading,content,meta_description,meta_keywords) VALUES (1, 0, 'category', '10', 'frontpage', 'none', 'Front Page Folder', 'Create a page under this folder if you want to have a page loaded as the frontpage', '', '');\";\r\n DB_query($sql);\r\n\r\n return true;\r\n}", "public function save_plugin_settings($user_id, $full_request, $type = \"SAVE\", $allowed_plugins = null)\n {\n global $cnf;\n global $local_server_path;\n\t \n\t if($allowed_plugins != null) {\n\t //OK we have an array of allowed plugins\n\t $plugins = $allowed_plugins;\n\t } else {\n\t //Otherwise, assume all plugins in the global config\n\t $plugins = $cnf['plugins'];\n\t }\n\t \n\t $reloadScreen = false;\n\t \t \n\t //Loop through each class and call each plugin_* -> on_message() function\n\t for($cnt=0; $cnt < count($plugins); $cnt++) {\n\t $plugin_name = $plugins[$cnt];\n\t \n\t \n\t include_once($local_server_path . \"plugins/\" . $plugin_name . \"/index.php\");\n\t $class_name = \"plugin_\" . $plugin_name;\n\t \n\t $pg = new $class_name();\n\t \n\t if(method_exists($pg,\"on_save_settings\") == true) {\n\t //OK call the on_settings function of the plugin\n\t $returns = $pg->on_save_settings($user_id, $full_request, $type);\n\t \n\t \n\t if(strcmp($returns, \"RELOAD\") == 0) {\n\t $reloadScreen = true;\n\t }\n\t } else {\n\t //No on_save_settings() in plugin - do nothing\n\n\t }\n\t }\n\t if($reloadScreen === true) {\n\t return \"RELOAD\"; //This option reloads the entire frame e.g. for a language change\n\t } else {\n\t return true;\n }\n \n }", "public function register_plugin_admin_add_page()\n {\n $self = $this;\n add_options_page(\n 'VivoKey OpenID',\n 'VivoKey OpenID',\n 'manage_options',\n 'VivoKey OpenID Connect',\n function () use ($self) {\n $self->load_view('settings', null);\n }\n );\n }", "protected function doPrePluginOptionsSave() {\r\n\r\n\t\t\t$oDp = $this->loadDataProcessor();\r\n\r\n\t\t\t$sAuthKey = $this->getPluginAuthKey();\r\n\t\t\tif ( empty( $sAuthKey ) || strlen( $sAuthKey ) != 24 ) {\r\n\t\t\t\t$this->setOpt( 'key', $oDp->GenerateRandomString( 24, 7 ) );\r\n\t\t\t}\r\n\r\n\t\t\t$nActivatedAt = $this->getOpt( 'activated_at' );\r\n\t\t\tif ( empty( $nActivatedAt ) ) {\r\n\t\t\t\t$this->setOpt( 'activated_at', $oDp->GetRequestTime() );\r\n\t\t\t}\r\n\t\t\t$nInstalledAt = $this->getOpt( 'installed_at' );\r\n\t\t\tif ( empty( $nInstalledAt ) ) {\r\n\t\t\t\t$this->setOpt( 'installed_at', $oDp->GetRequestTime() );\r\n\t\t\t}\r\n\r\n\t\t\t$this->setOpt( 'installed_version', $this->getController()->getVersion() );\r\n\r\n\t\t\t$nInstalledAt = $this->getOpt( 'installation_time' );\r\n\t\t\tif ( empty( $nInstalledAt ) || $nInstalledAt <= 0 ) {\r\n\t\t\t\t$this->setOpt( 'installation_time', time() );\r\n\t\t\t}\r\n\t\t}", "public function set_plugin_properties() {\n $this->plugin\t= get_plugin_data( SALESFORCE__PLUGIN_FILE );\n $this->basename = plugin_basename( SALESFORCE__PLUGIN_FILE );\n $this->active\t= is_plugin_active( $this->basename );\n }", "public function preferences() {\n\n\t\t\t$prefs = $this->prefs;\n\n?>\n<div class=\"hook-instance\">\n\t<div class=\"row\">\n\t\t<div class=\"col-lg-4 col-md-4 col-sm-12 col-xs-12\">\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label for=\"<?php echo $this->field_id( 'creds' ); ?>\"><?php echo $this->core->plural(); ?></label>\n\t\t\t\t<input type=\"text\" name=\"<?php echo $this->field_name( 'creds' ); ?>\" id=\"<?php echo $this->field_id( 'creds' ); ?>\" value=\"<?php echo $this->core->number( $prefs['creds'] ); ?>\" class=\"form-control\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"col-lg-8 col-md-8 col-sm-12 col-xs-12\">\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label for=\"<?php echo $this->field_id( 'log' ); ?>\"><?php _e( 'Log Template', 'twodayssss' ); ?></label>\n\t\t\t\t<input type=\"text\" name=\"<?php echo $this->field_name( 'log' ); ?>\" id=\"<?php echo $this->field_id( 'log' ); ?>\" placeholder=\"<?php _e( 'required', 'twodayssss' ); ?>\" value=\"<?php echo esc_attr( $prefs['log'] ); ?>\" class=\"form-control\" />\n\t\t\t\t<span class=\"description\"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n<?php\n\n\t\t}", "private function _after_install() {\n global $COURSE, $DB;\n \n if(!$this->_found) { // if the block's instance hasn't been cached\n // lookup the DB to check if this block instance already exists\n $result = $DB->get_record('block_group_choice', array('course_id' => $COURSE->id, 'instance_id' => $this->instance->id));\n if($result) { // if the block's instance already exist in the DB\n $this->_found = true;\n }\n else { // if this block instance doesn't exist we insert a first set of preferences\n $entries = new stdClass();\n $entries->instance_id = $this->instance->id;\n $entries->course_id = $COURSE->id;\n $entries->showgroups = 1;\n $entries->maxmembers = 2;\n $entries->allowchangegroups = 0;\n $entries->allowstudentteams = 1;\n $entries->allowmultipleteams = 0;\n $DB->insert_record('block_group_choice', $entries);\n }\n }\n }", "function install($parent)\n\t{\n\t\t// Connect with DB\n\t\t$db = JFactory::getDbo();\n\n\t\t// Query to update plugin\n\t\t$query = $db->getQuery(true);\n\n\t\t$fields = array(\n\t\t\t$db->quoteName('enabled') . ' = 1',\n\t\t\t$db->quoteName('params') . ' = ' . $db->quote('{\"enabled\":\"1\",\"autopurge\":\"1\",\"maxage\":60,\"excluded_components\":[\"com_users\"]}'),\n\t\t);\n\n\t\t$conditions = array(\n\t\t\t$db->quoteName('element') . ' = ' . $db->quote('bytevarnish'),\n\t\t\t$db->quoteName('type') . ' = ' . $db->quote('plugin'),\n\t\t);\n\n\t\t$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);\n\t\t$db->setQuery($query);\n\t\t$result = $db->execute();\n\n\t\tJFactory::getApplication()->enqueueMessage('Plugin \\'Byte Varnish\\' is enabled', 'message');\n\t}", "function refresh_plugins_transient()\n {\n }", "function the_champ_replicate_settings($blogId){\r\n\t\tglobal $theChampFacebookOptions, $theChampLoginOptions, $theChampSharingOptions;\r\n\t\tadd_blog_option($blogId, 'the_champ_facebook', $theChampFacebookOptions);\r\n\t\tadd_blog_option($blogId, 'the_champ_login', $theChampLoginOptions);\r\n\t\tadd_blog_option($blogId, 'the_champ_sharing', $theChampSharingOptions);\r\n\t}", "function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}", "function _add_setting( $data=array() )\n\t{\n\t\t$setting = array();\n\t\t\n\t\t$setting['conf_title'] = $data['conf_title']['VALUE'];\n\t\t$setting['conf_description'] = $data['conf_description']['VALUE'];\n\t\t$setting['conf_group'] = $data['conf_group']['VALUE'];\n\t\t$setting['conf_type'] = $data['conf_type']['VALUE'];\n\t\t$setting['conf_key'] = $data['conf_key']['VALUE'];\n\t\t$setting['conf_default'] = $data['conf_default']['VALUE'];\n\t\t$setting['conf_extra'] = $data['conf_extra']['VALUE'];\n\t\t$setting['conf_evalphp'] = $data['conf_evalphp']['VALUE'];\n\t\t$setting['conf_protected'] = 1;\n\t\t$setting['conf_position'] = $data['conf_position']['VALUE'];\n\t\t$setting['conf_start_group'] = $data['conf_start_group']['VALUE'];\n\t\t$setting['conf_end_group'] = isset( $data['conf_end_group']['VALUE'] ) ? $data['conf_end_group']['VALUE'] : 0;\n\t\t$setting['conf_help_key'] = $data['conf_help_key']['VALUE'];\n\t\t$setting['conf_add_cache'] = 1;\n\t\t\n\t\tif ( !$this->ipsclass->DB->field_exists( 'conf_help_key', 'conf_settings' ) )\n\t\t{\n\t\t\tunset( $setting['conf_help_key'] );\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'conf_settings', $setting );\n\t}", "function load($plugin) {\r\n $descriptorFileName=\"../plugin/$plugin/pluginDescriptor.xml\";\r\n if (! is_file($descriptorFileName)) {\r\n \terrorLog(\"cannot find file $descriptorFileName for plugin $plugin\");\r\n \techo \"cannot find descriptor for plugin $plugin\";\r\n \texit;\r\n }\r\n $descriptorXml=file_get_contents($descriptorFileName);\r\n $parse = xml_parser_create();\r\n xml_parse_into_struct($parse, $descriptorXml, $value, $index);\r\n xml_parser_free($parse);\r\n \r\n foreach($value as $prop) {\r\n \tif ($prop['tag']=='PROPERTY') {\r\n \t\t//print_r($prop);\r\n \t\t$name=$prop['attributes']['NAME'];\r\n \t\t$value=$prop['attributes']['VALUE'];\r\n \t\t$$name=$value;\r\n \t}\r\n }\r\n \r\n if (isset($sql)) {\r\n \t$sqlfile=\"../plugin/$plugin/$sql\";\r\n \tif (! is_file($sqlfile)) {\r\n \t\terrorLog(\"cannot find file $sqlfile for plugin $plugin\");\r\n \t\techo \"cannot find Sql file for plugin $plugin\";\r\n \t\texit;\r\n \t}\r\n \t//$enforceUTF8=true;\r\n \t//Sql::query(\"SET NAMES utf8\");\r\n \trunScript(null,$sqlfile);\r\n }\r\n // TODO : delete zip file (in the end when all is OK\r\n}", "protected function initPluginData()\n\t{\n\t\t// code here\n\t\t$this->slug = plugin_basename($this->pluginFile);\n\t\t$this->pluginData = get_plugin_data($this->pluginFile);\n\t}", "abstract public function register_plugin();", "public static function rdv_insert_settings() {\n\t\t\tglobal $wpdb, $rdv_table_settings;\n\t\t\t$rdv_table_settings = $wpdb->prefix . 'rendez_vous_settings';\n\n\t\t\t$default_query_array = array(\n\t\t\t\t'rdv_settings_id' => null,\n\t\t\t\t'rdv_sending' => 1,\n\t\t\t\t'rdv_receiving' => 1\n\t\t\t);\n\n\t\t\t$wpdb->insert( $rdv_table_settings, $default_query_array );\n\t\t}", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "function install_plugin_information()\n {\n }", "function myplugin_activate() {\n\n\tglobal $myplugin_options_all, $myplugin_dbtables_all, $myplugin_dbtables_data_all;\n\n\tif ( myplugin_installed_version() != MYPLUGIN_VERSION ) {\n\n\t\tmyplugin_activate_dbtables( $myplugin_dbtables_all, $myplugin_dbtables_data_all );\n\t\tmyplugin_activate_options( $myplugin_options_all );\n\t}\n\n\tadd_option( MYPLUGIN_NAME, MYPLUGIN_VERSION );\n}", "function add_core_data()\n {\n $pncore = array();\n $pncore['version_num'] = _PN_VERSION_NUM;\n $pncore['version_id'] = _PN_VERSION_ID;\n $pncore['version_sub'] = _PN_VERSION_SUB;\n $pncore['logged_in'] = pnUserLoggedIn();\n $pncore['language'] = pnUserGetLang();\n $pncore['themeinfo'] = pnThemeInfo(pnUserGetTheme());\n\n \tpnThemeLoad($pncore['themeinfo']['name']);\n\t\t$colors = array();\n $colors['bgcolor1'] = pnThemeGetVar('bgcolor1');\n $colors['bgcolor2'] = pnThemeGetVar('bgcolor2');\n $colors['bgcolor3'] = pnThemeGetVar('bgcolor3');\n $colors['bgcolor4'] = pnThemeGetVar('bgcolor4');\n $colors['bgcolor5'] = pnThemeGetVar('bgcolor5');\n $colors['sepcolor'] = pnThemeGetVar('sepcolor');\n $colors['textcolor1'] = pnThemeGetVar('textcolor1');\n $colors['textcolor2'] = pnThemeGetVar('textcolor2');\n\n // add userdata\n $pncore['user'] = pnUserGetVars(pnSessionGetVar('uid'));\n\n // add modvars of current module\n $pncore[$this->module] = pnModGetVar($this->module);\n\n // add mod vars of all modules supplied as parameter\n \tforeach (func_get_args() as $modulename) {\n\t // if the modulename is empty do nothing\n\t if(!empty($modulename) && !is_array($modulename) && ($modulename<>$this->module)) {\n // check if user wants to have /PNConfig\n if($modulename==_PN_CONFIG_MODULE) {\n $pnconfig = pnModGetVar(_PN_CONFIG_MODULE);\n foreach($pnconfig as $key => $value) {\n // unserialize all config vars\n \t\t $pncore['pnconfig'][$key] = @unserialize($value);\n }\n } else {\n $pncore[$modulename] = pnModGetVar($modulename);\n }\n }\n }\n\n $this->assign('pncore', $pncore);\n\t\t$this->assign($colors);\n return true;\n }", "public function add_setting( $wp_customize ) {}", "function phpgwapi_upgrade0_9_14_502()\n\t{\n\t\t// we use an additional temp. table for postgres and not rename the existing one, but drop it.\n\t\tif ($GLOBALS['phpgw_setup']->oProc->sType == 'pgsql')\t\n\t\t{\n\t\t\t$GLOBALS['phpgw_setup']->oProc->query(\"SELEcT * INTO TEMPORARY TABLE old_preferences FROM phpgw_preferences\",__LINE__,__FILE__);\n\t\t\t$GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_preferences');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_preferences','old_preferences');\n\t\t}\n\t\t$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_preferences',array(\n\t\t\t'fd' => array(\n\t\t\t\t'preference_owner' => array('type' => 'int','precision' => '4','nullable' => False),\n\t\t\t\t'preference_app' => array('type' => 'varchar','precision' => '25','nullable' => False),\n\t\t\t\t'preference_value' => array('type' => 'text','nullable' => False)\n\t\t\t),\n\t\t\t'pk' => array('preference_owner','preference_app'),\n\t\t\t'fk' => array(),\n\t\t\t'ix' => array(),\n\t\t\t'uc' => array()\n\t\t));\n\t\t$db2 = $GLOBALS['phpgw_setup']->db;\t// we need a 2. result-set\n\t\t$GLOBALS['phpgw_setup']->oProc->query(\"SELECT * FROM old_preferences\");\n\t\twhile ($GLOBALS['phpgw_setup']->oProc->next_record())\n\t\t{\n\t\t\t$owner = (int)$GLOBALS['phpgw_setup']->oProc->f('preference_owner');\n\t\t\t$prefs = unserialize($GLOBALS['phpgw_setup']->oProc->f('preference_value'));\n\n\t\t\tif (is_array($prefs))\n\t\t\t{\n\t\t\t\tforeach ($prefs as $app => $pref)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($app) && count($pref))\n\t\t\t\t\t{\n\t\t\t\t\t\t$app = addslashes($app);\n\t\t\t\t\t\t$pref = serialize($pref);\n\t\t\t\t\t\t$db2->query(\"INSERT INTO phpgw_preferences\".\n\t\t\t\t\t\t\t\" (preference_owner,preference_app,preference_value)\".\n\t\t\t\t\t\t\t\" VALUES ($owner,'$app','$pref')\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$GLOBALS['phpgw_setup']->oProc->DropTable('old_preferences');\n\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.503';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "function qa_initialize_predb_plugins()\n{\n\tglobal $qa_pluginManager;\n\t$qa_pluginManager = new Q2A_Plugin_PluginManager();\n\t$qa_pluginManager->readAllPluginMetadatas();\n\n\t$qa_pluginManager->loadPluginsBeforeDbInit();\n\tqa_load_override_files();\n}", "function bdpp_register_settings() {\n\tregister_setting( 'bdpp_settings', 'bdpp_opts', 'bdpp_validate_settings' );\n}", "public function add()\n\t{\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon_display'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_display_empty'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_select_menu'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_text'\n\t\t);\n\t\t\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_text'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_dc_enable'\n\t\t);\n\t}", "function save_config()\n\t{\n\t\t$i=0;\n\t\t$rows=list_to_map('id',$GLOBALS['SITE_DB']->query_select('pstore_customs',array('*')));\n\t\twhile (array_key_exists('custom_'.strval($i),$_POST))\n\t\t{\n\t\t\t$id=post_param_integer('custom_'.strval($i));\n\t\t\t$title=post_param('custom_title_'.strval($i));\n\t\t\t$description=post_param('custom_description_'.strval($i));\n\t\t\t$enabled=post_param_integer('custom_enabled_'.strval($i),0);\n\t\t\t$cost=post_param_integer('custom_cost_'.strval($i));\n\t\t\t$one_per_member=post_param_integer('custom_one_per_member_'.strval($i),0);\n\t\t\t$delete=post_param_integer('delete_custom_'.strval($i),0);\n\t\t\t$_title=$rows[$id]['c_title'];\n\t\t\t$_description=$rows[$id]['c_description'];\n\t\t\tif ($delete==1)\n\t\t\t{\n\t\t\t\tdelete_lang($_title);\n\t\t\t\tdelete_lang($_description);\n\t\t\t\t$GLOBALS['SITE_DB']->query_delete('pstore_customs',array('id'=>$id),'',1);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$GLOBALS['SITE_DB']->query_update('pstore_customs',array(\n\t\t\t\t\t'c_title'=>lang_remap($_title,$title),\n\t\t\t\t\t'c_description'=>lang_remap($_description,$description),\n\t\t\t\t\t'c_enabled'=>$enabled,\n\t\t\t\t\t'c_cost'=>$cost,\n\t\t\t\t\t'c_one_per_member'=>$one_per_member,\n\t\t\t\t),array('id'=>$id),'',1);\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$title=post_param('custom_title',NULL);\n\t\tif (!is_null($title))\n\t\t{\n\t\t\t$description=post_param('custom_description');\n\t\t\t$enabled=post_param_integer('custom_enabled',0);\n\t\t\t$cost=post_param_integer('custom_cost');\n\t\t\t$one_per_member=post_param_integer('custom_one_per_member',0);\n\n\t\t\t$GLOBALS['SITE_DB']->query_insert('pstore_customs',array(\n\t\t\t\t'c_title'=>insert_lang($title,2),\n\t\t\t\t'c_description'=>insert_lang($description,2),\n\t\t\t\t'c_enabled'=>$enabled,\n\t\t\t\t'c_cost'=>$cost,\n\t\t\t\t'c_one_per_member'=>$one_per_member,\n\t\t\t));\n\t\t}\n\t}", "function addSettings ($name, $value, $type, $protected)\n{\n\tglobal $conn;\n\tglobal $database_table_prefix;\n\t$sql = \"SELECT id FROM \".$database_table_prefix.\"settings WHERE name = '$name' LIMIT 1\";\n\t$rs = $conn->query($sql);\n\tif($conn->query($sql) === false) {\n\t\ttrigger_error('Error: '.$conn->error, E_USER_ERROR);\n\t}\n\n\t$exist = $rs->num_rows;\n\tif($exist==0)\n\t{\n\t\t// insert\n\t\t$query = \"INSERT INTO \".$database_table_prefix.\"settings (id, name, value, type, protected) VALUES (NULL, '$name', '$value', '$type', '$protected')\";\n\t\t$rs = $conn->query($query);\n\t\t$last_inserted_id = $conn->insert_id;\n\t\t$affected_rows = $conn->affected_rows;\n\t}\n\telse\n\t{\n\t\t// update\n\t\t$query = \"UPDATE \".$database_table_prefix.\"settings SET value = '$value' WHERE name = '$name' LIMIT 1\";\n\t\t$rs = $conn->query($query);\n\t\t$affected_rows = $conn->affected_rows;\n\t}\n}", "public function loadSettings()\n\t{\n\t\t// Update picto for Dolibarr 12++\n\t\tif (function_exists('version_compare') && version_compare(DOL_VERSION, '12.0.0') >= 0) {\n\t\t\t$this->picto = \"quicknotes_128.png@quicknotes\";\n\t\t}\n\n\t\t$this->addJsFile('quicknotes.js.php');\n\t\t$this->enableHooks(array(\n\t\t\t'toprightmenu',\n\t\t\t'main',\n\t\t\t'login'\n\t\t));\n\t}", "private function loadPlugins()\n\t{\n\t\t$plugins = plugin_installed_list();\n\t\t$plugins = collect($plugins)->map(function ($item, $key) {\n\t\t\tif (is_object($item)) {\n\t\t\t\t$item = Arr::fromObject($item);\n\t\t\t}\n\t\t\tif (isset($item['item_id']) && !empty($item['item_id'])) {\n\t\t\t\t$item['installed'] = plugin_check_purchase_code($item);\n\t\t\t}\n\t\t\t\n\t\t\treturn $item;\n\t\t})->toArray();\n\t\t\n\t\tConfig::set('plugins', $plugins);\n\t\tConfig::set('plugins.installed', collect($plugins)->whereStrict('installed', true)->toArray());\n\t}", "public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}", "public function action_preferences() {\n $package = Model::factory('package');\n $get_langcolor_info = $package->get_langcolor_info();\n $this->template->meta_description = CLOUD_SITENAME . \" | Preferences \";\n $this->template->meta_keywords = CLOUD_SITENAME . \" | Preferences \";\n $this->template->title = CLOUD_SITENAME . \" | \" . __('Preferences');\n $this->template->page_title = __('Preferences');\n $this->template->content = View::factory(\"admin/package_plan/preferences\")->bind('langcolor_info', $get_langcolor_info);\n }", "function addSetting($link,$profile_id,$type,$value)\n\t\t{\n\t\t\t$type = mysqli_escape_string($link,$type);\n\t\t\t$value = mysqli_escape_string($link,$value);\n\t\t\t$sql = 'INSERT INTO setting (profile_id,type,value) VALUES ('.$profile_id.',\"'.$type.'\",'.$value.')';\n\t\t\tif (mysqli_query($link, $sql)) {\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function top10_install() {\r\n/* Creates new database field */\r\n//add_option('omekafeedpull_omekaroot', '/omeka', '', 'yes');\r\n}", "public function sync()\n {\n $class = explode('\\\\', get_called_class());\n $manager = \\Str::studly(str_replace('EntryModel', null, end($class)));\n\n $existingAddons = $manager::getAll();\n $databaseAddons = $this->all();\n\n // Sync TO the database\n foreach ($existingAddons as $addon) {\n if (!$databaseAddons->findBySlug($addon->slug)) {\n $this->addons->insert(\n array(\n 'slug' => $addon->slug,\n )\n );\n }\n }\n }", "function plugin_install_now()\n{\n global $pi_name, $pi_version, $gl_version, $pi_url, $NEWTABLE, $DEFVALUES, $NEWFEATURE;\n global $_TABLES, $_CONF;\n\n COM_errorLog(\"Attempting to install the $pi_name Plugin\",1);\n $uninstall_plugin = 'plugin_uninstall_' . $pi_name;\n\n // Create the Plugins Tables\n require_once($_CONF['path'] . 'plugins/forum/sql/mysql_install_2.6.php');\n\n for ($i = 1; $i <= count($_SQL); $i++) {\n $progress .= \"executing \" . current($_SQL) . \"<br\" . XHTML . \">\\n\";\n COM_errorLOG(\"executing \" . current($_SQL));\n DB_query(current($_SQL),'1');\n if (DB_error()) {\n COM_errorLog(\"Error Creating $table table\",1);\n $uninstall_plugin ('DeletePlugin');\n return false;\n exit;\n }\n next($_SQL);\n }\n COM_errorLog(\"Success - Created $table table\",1);\n \n // Insert Default Data\n \n foreach ($DEFVALUES as $table => $sql) {\n COM_errorLog(\"Inserting default data into $table table\",1);\n DB_query($sql,1);\n if (DB_error()) {\n COM_errorLog(\"Error inserting default data into $table table\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog(\"Success - inserting data into $table table\",1);\n }\n \n // Create the plugin admin security group\n COM_errorLog(\"Attempting to create $pi_name admin group\", 1);\n DB_query(\"INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr) \"\n . \"VALUES ('$pi_name Admin', 'Users in this group can administer the $pi_name plugin')\",1);\n if (DB_error()) {\n $uninstall_plugin();\n return false;\n exit;\n }\n COM_errorLog('...success',1);\n $query = DB_query(\"SELECT max(grp_id) FROM {$_TABLES['groups']} \");\n list ($group_id) = DB_fetchArray($query);\n\n // Save the grp id for later uninstall\n COM_errorLog('About to save group_id to vars table for use during uninstall',1);\n DB_query(\"INSERT INTO {$_TABLES['vars']} VALUES ('{$pi_name}_admin', $group_id)\",1);\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog('...success',1);\n \n // Add plugin Features\n foreach ($NEWFEATURE as $feature => $desc) {\n COM_errorLog(\"Adding $feature feature\",1);\n DB_query(\"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr) \"\n . \"VALUES ('$feature','$desc')\",1);\n if (DB_error()) {\n COM_errorLog(\"Failure adding $feature feature\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n $query = DB_query(\"SELECT max(ft_id) FROM {$_TABLES['features']} \");\n list ($feat_id) = DB_fetchArray($query);\n\n COM_errorLog(\"Success\",1);\n COM_errorLog(\"Adding $feature feature to admin group\",1);\n DB_query(\"INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES ($feat_id, $group_id)\");\n if (DB_error()) {\n COM_errorLog(\"Failure adding $feature feature to admin group\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog(\"Success\",1);\n } \n \n // OK, now give Root users access to this plugin now! NOTE: Root group should always be 1\n COM_errorLog(\"Attempting to give all users in Root group access to $pi_name admin group\",1);\n DB_query(\"INSERT INTO {$_TABLES['group_assignments']} VALUES ($group_id, NULL, 1)\");\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n\n // Register the plugin with Geeklog\n COM_errorLog(\"Registering $pi_name plugin with Geeklog\", 1);\n DB_delete($_TABLES['plugins'],'pi_name',$pi_name);\n DB_query(\"INSERT INTO {$_TABLES['plugins']} (pi_name, pi_version, pi_gl_version, pi_homepage, pi_enabled) \"\n . \"VALUES ('$pi_name', '$pi_version', '$gl_version', '$pi_url', 1)\");\n\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n\n COM_errorLog(\"Succesfully installed the $pi_name Plugin!\",1);\n return true;\n}", "function tb_addTagBeepToWpAdmin() { \r\n //add in /settings manu\r\n add_options_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitor\", \"tb_load_tagBeepAdmin\"); \r\n //add in the /plugins menu\r\n add_plugins_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitorPlugin\", \"tb_load_tagBeepAdmin\"); \r\n}", "function setDefaultPrefs($module,$prefs)\n {\n if(is_array($prefs) && count($prefs))\n {\n while(list($var,$value) = each($prefs))\n {\n JxPref::setModulePref($module,$var,$value);\n }\n }\n }", "function create_tbl_woo2app_setting(){\r global $wpdb;\r $charset_collate = $wpdb->get_charset_collate();\r $table_name = $wpdb->prefix . 'woo2app_setting';\r $sql = \"CREATE TABLE $table_name (\r\t\tst_id bigint(20) NOT NULL AUTO_INCREMENT,\r\t\tPRIMARY KEY (st_id),\r\t\tst_name varchar(100) NOT NULL,\r\t\tst_value varchar(200) NOT NULL,\r\t\tst_desc\tvarchar(200) NOT NULL\r\t) $charset_collate;\";\r require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r dbDelta( $sql );\r add_option( 'woo2app_version', '1.3' );\r }", "function dbInstall($data='') {\n/*\nmixcloud_favorites - \n*/\n $data = <<<EOD\n mixcloud_favorites: ID int(10) unsigned NOT NULL auto_increment\n mixcloud_favorites: TITLE varchar(100) NOT NULL DEFAULT ''\n mixcloud_favorites: STREAM varchar(255) NOT NULL DEFAULT ''\n mixcloud_favorites: ITEM_ID varchar(255) NOT NULL DEFAULT '' \nEOD;\n parent::dbInstall($data);\n }", "public function save_settings() {\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-settings' !== $_GET['page'])\n return;\n\n if ('swpm_settings' !== $_REQUEST['action'])\n return;\n\n check_admin_referer('swpm-update-settings');\n\n $data = array();\n\n foreach ($_POST['swpm-settings'] as $key => $val) {\n $data[$key] = esc_html($val);\n }\n\n update_option('swpm-settings', $data);\n }", "public static function register()\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//IMPORTANT\n\t\t\t\t//Register all of the options that will be used\n\t\t\t\n//\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_po_quote');\n\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_userid');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_popup_option');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_copypaste_option');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_freecode');\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "protected function updateSettings()\n {\n $this->settings = array();\n $raw_settings = $this->db->fetchAll('SELECT name, value FROM settings');\n\n foreach ($raw_settings as $raw_setting) {\n $this->settings[$raw_setting['name']] = $raw_setting['value'];\n }\n }", "public function save()\n {\n update_option($this->optionKey, $this->fields);\n }", "function install(){\r\n $options = $this->get_options();\r\n $isnew = false;\r\n if(!$installed_version = get_option('twitlink_version')){\r\n // no cl_version saved yet, set it to start of version 3\r\n $installed_version = '2.30';\r\n $isnew = true;\r\n }\r\n if(!$isnew){\r\n // new recode version from 1.27 to 1.30\r\n if(version_compare($this->php_version($installed_version),'1.2.7','>') && version_compare($this->php_version($installed_version),'1.3.0','<')){\r\n // use new default values\r\n $options = $this->get_options(true);\r\n }\r\n\r\n // update options (do this at the end so all the updates can happen first)\r\n update_option($this->db_option,$options); \r\n }\r\n // update twitlink_version in db\r\n if($this->version != $installed_version){\r\n update_option('twitlink_version',$this->version);\r\n }\r\n // add db table if it doesn't exist (backwards compatible with wp-twitip-id plugin)\r\n global $wpdb;\r\n $table_name = $wpdb->prefix . \"wptwitipid\";\r\n if($wpdb->get_var(\"show tables like '$table_name'\") != $table_name) {\r\n $sql = \"CREATE TABLE \" . $table_name . \" (\r\n id mediumint(9) NOT NULL AUTO_INCREMENT,\r\n email varchar(120) NOT NULL,\r\n twitid varchar(120) NOT NULL,\r\n PRIMARY KEY (id),\r\n UNIQUE KEY (email)\r\n );\";\r\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\r\n dbDelta($sql); \r\n }\r\n }", "public function updateUserPreferences()\n {\n $userList = $this->_userDao->getUserList();\n\n // loop through every user and fix it\n foreach ($userList as $user) {\n /*\n * Because we do not get all users' properties from\n * getUserList, retrieve the users' settings from scratch\n */\n $user = $this->_userDao->getUser($user['userid']);\n\n // set the users' preferences\n $this->setSettingIfNot($user['prefs'], 'perpage', 25);\n $this->setSettingIfNot($user['prefs'], 'date_formatting', 'human');\n $this->setSettingIfNot($user['prefs'], 'normal_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'mobile_template', 'mobile');\n $this->setSettingIfNot($user['prefs'], 'tablet_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'count_newspots', true);\n $this->setSettingIfNot($user['prefs'], 'mouseover_subcats', true);\n $this->setSettingIfNot($user['prefs'], 'keep_seenlist', true);\n $this->setSettingIfNot($user['prefs'], 'auto_markasread', true);\n $this->setSettingIfNot($user['prefs'], 'keep_downloadlist', true);\n $this->setSettingIfNot($user['prefs'], 'keep_watchlist', true);\n $this->setSettingIfNot($user['prefs'], 'nzb_search_engine', 'nzbindex');\n $this->setSettingIfNot($user['prefs'], 'show_filesize', true);\n $this->setSettingIfNot($user['prefs'], 'show_reportcount', true);\n $this->setSettingIfNot($user['prefs'], 'minimum_reportcount', 1);\n $this->setSettingIfNot($user['prefs'], 'show_nzbbutton', true);\n $this->setSettingIfNot($user['prefs'], 'show_multinzb', true);\n $this->setSettingIfNot($user['prefs'], 'customcss', '');\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_tag', $user['username']);\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_body', '');\n $this->setSettingIfNot($user['prefs'], 'user_language', 'en_US');\n $this->setSettingIfNot($user['prefs'], 'show_avatars', true);\n $this->setSettingIfNot($user['prefs'], 'usemailaddress_for_gravatar', true);\n\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'action', 'disable');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'local_dir', '/tmp');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'prepare_action', 'merge');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'command', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'url', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'ssl', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'timeout', 15);\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'apikey', '');\n\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'host', '');\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'password', '');\n /* Notifo and NMA are discontinued. */\n $this->unsetSetting($user['prefs']['notifications'], 'nma');\n $this->unsetSetting($user['prefs']['notifications'], 'notifo');\n $this->setSettingIfNot($user['prefs']['notifications']['prowl'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'screen_name', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token_secret', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token_secret', '');\n $notifProviders = Notifications_Factory::getActiveServices();\n foreach ($notifProviders as $notifProvider) {\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider], 'enabled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'watchlist_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'nzb_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'retriever_finished', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'report_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'spot_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'user_added', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'newspots_for_filter', false);\n } // foreach\n\n // make sure a sort preference is defined. An empty field means relevancy\n $this->setSettingIfNot($user['prefs'], 'defaultsortfield', '');\n\n // Remove deprecated preferences\n $this->unsetSetting($user['prefs'], 'search_url');\n $this->unsetSetting($user['prefs'], 'template');\n $this->unsetSetting($user['prefs']['notifications'], 'libnotify');\n\n // Make sure the user has a valid RSA key\n if ($user['userid'] > 2) {\n $rsaKey = $this->_userDao->getUserPrivateRsaKey($user['userid']);\n if (empty($rsaKey)) {\n // Creer een private en public key paar voor deze user\n $spotSigning = Services_Signing_Base::factory();\n $userKey = $spotSigning->createPrivateKey($this->_settings->get('openssl_cnf_path'));\n\n $this->_userDao->setUserRsaKeys($user['userid'], $userKey['public'], $userKey['private']);\n } // if\n } // if\n\n /*\n * In earlier versions, we always appended \"sabnzbd/\" to the URL, so we do this once\n * manually\n */\n if ($this->_settings->get('securityversion') < 0.31) {\n if (!empty($user['prefs']['nzbhandling']['sabnzbd']['url'])) {\n $user['prefs']['nzbhandling']['sabnzbd']['url'] = $user['prefs']['nzbhandling']['sabnzbd']['url'].'sabnzbd/';\n } // if\n } // if\n\n // update the user record in the database\n $this->_userDao->setUser($user);\n } // foreach\n }", "protected function storeExtension()\n\t{\n\t\t// Discover installs are stored a little differently\n\t\tif ($this->route === 'discover_install')\n\t\t{\n\t\t\t$manifest_details = Installer::parseXMLInstallFile($this->parent->getPath('manifest'));\n\n\t\t\t$this->extension->manifest_cache = json_encode($manifest_details);\n\t\t\t$this->extension->state = 0;\n\t\t\t$this->extension->name = $manifest_details['name'];\n\t\t\t$this->extension->enabled = 'editors' === $this->extension->folder ? 1 : 0;\n\t\t\t$this->extension->params = $this->parent->getParams();\n\n\t\t\tif (!$this->extension->store())\n\t\t\t{\n\t\t\t\t// Install failed, roll back changes\n\t\t\t\tthrow new \\RuntimeException(\\JText::_('JLIB_INSTALLER_ERROR_PLG_DISCOVER_STORE_DETAILS'));\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Was there a plugin with the same name already installed?\n\t\tif ($this->currentExtensionId)\n\t\t{\n\t\t\tif (!$this->parent->isOverwrite())\n\t\t\t{\n\t\t\t\t// Install failed, roll back changes\n\t\t\t\tthrow new \\RuntimeException(\n\t\t\t\t\t\\JText::sprintf(\n\t\t\t\t\t\t'JLIB_INSTALLER_ABORT_PLG_INSTALL_ALLREADY_EXISTS',\n\t\t\t\t\t\t\\JText::_('JLIB_INSTALLER_' . $this->route),\n\t\t\t\t\t\t$this->name\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->extension->load($this->currentExtensionId);\n\t\t\t$this->extension->name = $this->name;\n\t\t\t$this->extension->manifest_cache = $this->parent->generateManifestCache();\n\n\t\t\t// Update the manifest cache and name\n\t\t\t$this->extension->store();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Store in the extensions table (1.6)\n\t\t\t$this->extension->name = $this->name;\n\t\t\t$this->extension->type = 'plugin';\n\t\t\t$this->extension->ordering = 0;\n\t\t\t$this->extension->element = $this->element;\n\t\t\t$this->extension->folder = $this->group;\n\t\t\t$this->extension->enabled = 0;\n\t\t\t$this->extension->protected = 0;\n\t\t\t$this->extension->access = 1;\n\t\t\t$this->extension->client_id = 0;\n\t\t\t$this->extension->params = $this->parent->getParams();\n\n\t\t\t// Custom data\n\t\t\t$this->extension->custom_data = '';\n\n\t\t\t// System data\n\t\t\t$this->extension->system_data = '';\n\t\t\t$this->extension->manifest_cache = $this->parent->generateManifestCache();\n\n\t\t\t// Editor plugins are published by default\n\t\t\tif ($this->group === 'editors')\n\t\t\t{\n\t\t\t\t$this->extension->enabled = 1;\n\t\t\t}\n\n\t\t\tif (!$this->extension->store())\n\t\t\t{\n\t\t\t\t// Install failed, roll back changes\n\t\t\t\tthrow new \\RuntimeException(\n\t\t\t\t\t\\JText::sprintf(\n\t\t\t\t\t\t'JLIB_INSTALLER_ABORT_PLG_INSTALL_ROLLBACK',\n\t\t\t\t\t\t\\JText::_('JLIB_INSTALLER_' . $this->route),\n\t\t\t\t\t\t$this->extension->getError()\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Since we have created a plugin item, we add it to the installation step stack\n\t\t\t// so that if we have to rollback the changes we can undo it.\n\t\t\t$this->parent->pushStep(array('type' => 'extension', 'id' => $this->extension->extension_id));\n\t\t}\n\t}", "public function system_save_preference()\n {\n System_helper::save_preference();\n }", "function seed_csp4_activation(){\r\n // Store the plugin version when initial install occurred.\r\n $has_seed_csp4_settings_content = get_option('seed_csp4_settings_content');\r\n if(!empty($has_seed_csp4_settings_content)){\r\n add_option( 'seed_csp4_initial_version', 0, '', false );\r\n }else{\r\n add_option( 'seed_csp4_initial_version', SEED_CSP4_VERSION, '', false );\r\n }\r\n \r\n\r\n // Store the plugin version activated to reference with upgrades.\r\n update_option( 'seed_csp4_version', SEED_CSP4_VERSION, false );\r\n\trequire_once( 'inc/default-settings.php' );\r\n\tadd_option('seed_csp4_settings_content',unserialize($seed_csp4_settings_deafults['seed_csp4_settings_content']));\r\n\tadd_option('seed_csp4_settings_design',unserialize($seed_csp4_settings_deafults['seed_csp4_settings_design']));\r\n\tadd_option('seed_csp4_settings_advanced',unserialize($seed_csp4_settings_deafults['seed_csp4_settings_advanced']));\r\n}", "function webplayer_db_install_data() {\r\n\tglobal $wpdb;\r\n\tglobal $installed_webplayer_version;\r\n\tglobal $webplayer_version;\r\n\r\n\tif ($installed_webplayer_version != $webplayer_version) {\r\n\t\t$table_name = $wpdb->prefix . \"webplayer\";\t\r\n\t\t$wpdb->insert($table_name, array( \r\n\t\t'id' => 1,\r\n\t\t'videoid' => 1,\r\n\t\t'playlistid' => 0,\r\n\t\t'width' => 640, \r\n\t\t'height' => 360, \r\n\t\t'skinmode' => 'static',\r\n \t\t'stretchtype' => 'fill',\r\n \t\t'buffertime' => 3,\r\n \t\t'volumelevel' => 50,\r\n \t\t'autoplay' => 0,\r\n\t\t'playlistautoplay' => 0,\r\n \t\t'playlistopen' => 0,\r\n \t\t'playlistrandom' => 0,\r\n\t\t'controlbar' => 1,\r\n \t\t'playpause' => 1,\r\n \t\t'progressbar' => 1,\r\n \t\t'timer' => 1,\r\n \t\t'share' => 1,\r\n \t\t'volume' => 1,\r\n \t\t'fullscreen' => 1,\r\n \t\t'playdock' => 1,\r\n\t\t'playlist' => 1\r\n\t\t));\r\n\t\t\r\n\t\t$table_name = $wpdb->prefix . \"webplayer_license\";\t\r\n\t\t$wpdb->insert( $table_name, array( \r\n\t\t'id' => 1,\r\n\t\t'licensekey' => 'HD_Webplayer_Commercial_Key', \r\n\t\t'logo' => 'logo.jpg', \r\n\t\t'logoposition' => 'topleft',\r\n\t\t'logoalpha' => 50,\r\n\t\t'logotarget' => 'http://hdwebplayer.com'\r\n\t\t));\r\n\t\t\r\n\t\t$table_name = $wpdb->prefix . \"webplayer_videos\";\t\r\n\t\t$wpdb->insert( $table_name, array( \r\n\t\t'id' => 1,\r\n\t\t'title' => 'Sample Video',\r\n\t\t'type' => 'video',\r\n\t\t'streamer' => '',\r\n\t\t'dvr' => 0,\r\n\t\t'video' => 'http://hdwebplayer.com/player/videos/300.mp4',\r\n\t\t'hdvideo' => '',\r\n\t\t'preview' => '',\r\n\t\t'thumb' => '',\r\n\t\t'token' => '',\r\n\t\t'playlistid' => 0\r\n\t\t));\r\n\t}\r\n}", "function bfa_import_settings_now() {\r\n\tcheck_ajax_referer( \"import_bfa_settings\" );\r\n\t$new_options = maybe_unserialize(bfa_file_get_contents($_FILES['userfile']['tmp_name']));\r\n\tupdate_option('bfa_new_test', $new_options);\r\n\tdie();\r\n}", "function install_plugins_favorites_form()\n {\n }" ]
[ "0.72845775", "0.67024946", "0.659262", "0.639898", "0.61956304", "0.6193791", "0.6148208", "0.61172044", "0.5957165", "0.5910638", "0.5880873", "0.5863317", "0.58583117", "0.5824722", "0.5796143", "0.5710946", "0.5681415", "0.56679344", "0.56034184", "0.55983526", "0.5591214", "0.5572069", "0.55702233", "0.5562702", "0.5550994", "0.5550894", "0.5545956", "0.5524365", "0.5497278", "0.54944724", "0.5480776", "0.5468338", "0.5422584", "0.5421562", "0.5418527", "0.54008424", "0.53714085", "0.53481126", "0.5332485", "0.5330592", "0.5329874", "0.5324582", "0.5324354", "0.5321352", "0.5318248", "0.53068805", "0.5303334", "0.530267", "0.5276453", "0.5270045", "0.5262069", "0.5255918", "0.52536273", "0.5253117", "0.52526045", "0.5251088", "0.5242878", "0.5232298", "0.52318263", "0.5226597", "0.5222558", "0.521816", "0.52127403", "0.5197012", "0.5196646", "0.5188021", "0.5178962", "0.51764804", "0.516704", "0.5165847", "0.5157531", "0.5157259", "0.5156436", "0.5154316", "0.51532674", "0.5145998", "0.5143109", "0.51390207", "0.51384896", "0.5135075", "0.5132514", "0.5129905", "0.5125306", "0.5122815", "0.5119096", "0.51162136", "0.511146", "0.5101727", "0.51014555", "0.50962824", "0.5077565", "0.50764716", "0.5075259", "0.5075237", "0.5073767", "0.507321", "0.5073046", "0.50704765", "0.5066348", "0.5058785" ]
0.51811284
66
get plugin prefs default values
function abl_droploader_defaults($values_only = false) { $defaults = array( 'imageMaxUploadCount' => array( 'val' => '10', 'html' => 'text_input', 'text' => gTxt('abl_droploader_prefs_image_max_upload_count'), ), 'reloadImagesTab' => array( 'val' => '0', 'html' => 'yesnoradio', 'text' => gTxt('abl_droploader_prefs_reload_image_tab'), ), 'useDefaultStylesheet' => array( 'val' => '1', 'html' => 'yesnoradio', 'text' => gTxt('abl_droploader_prefs_use_default_stylesheet'), ), 'customStylesheet' => array( 'val' => '', 'html' => 'text_input', 'text' => gTxt('abl_droploader_prefs_custom_stylesheet'), ), 'articleImageFields' => array( 'val' => '#article-image', 'html' => 'text_input', 'text' => gTxt('abl_droploader_prefs_article_image_fields'), ), //'fileMaxUploadCount' => array( // 'val' => '10', // 'html' => 'text_input', // 'text' => gTxt('abl_droploader_prefs_file_max_upload_count'), //), ); if ($values_only) foreach ($defaults as $name => $arr) $defaults[$name] = $arr['val']; return $defaults; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaults();", "public function GetDefaults ();", "public function getDefaultSettings();", "private function get_defaults() {\n\t\treturn array(\n\t\t\t'phpbb_path' \t\t\t\t=> '',\n\t\t\t'integrateLogin' \t\t\t=> 0, \n\t\t\t'showHdrFtr' \t\t\t\t=> 'NONE',\n\t\t\t'wpSimpleHdr' \t\t\t\t=> 1,\n\t\t\t'dtdSwitch' \t\t\t\t=> 0,\n\t\t\t'phpbbCensor' \t\t\t\t=> 1,\n\t\t\t'wpPageName' \t\t\t\t=> 'page.php',\n\t\t\t'phpbbPadding' \t\t\t\t=> '6-12-6-12',\n\t\t\t'xposting' \t\t\t\t\t=> 0,\n\t\t\t'phpbbSmilies' \t\t\t\t=> 0,\n\t\t\t'avatarsync'\t\t\t\t=> 1,\n\t\t\t'integcreatewp'\t\t\t\t=> 1,\n\t\t\t'integcreatephpbb'\t\t\t=> 1,\n\t\t\t'xpostautolink' \t\t\t=> 0,\n\t\t\t'xpostspam' \t\t\t\t=> 'all',\n\t\t\t'xpostforce' \t\t\t\t=> -1,\n\t\t\t'xposttype' \t\t\t\t=> 'excerpt',\n\t\t\t'xpostprefix'\t\t\t\t=> '[BLOG] ',\n\t\t\t'cssMagic' \t\t\t\t\t=> 1,\n\t\t\t'templateVoodoo' \t\t\t=> 1,\n\t\t\t'useForumPage' \t\t\t\t=> 1\n\t\t);\n\t}", "private static function _get_default_settings()\n\t{\n\t\treturn array(\n\t\t\t'nr_api_key'\t\t\t\t\t\t=> '',\n\t\t\t'nr_apps_list'\t\t\t\t\t\t=> '', // The apps list associated with the account\n\t\t\t'nr_selected_app_servers'\t\t\t=> '', // The servers from the selected app\n\t\t\t'user_datasets'\t\t\t\t\t\t=> '', // Saved user datasets\n\t\t);\n\t}", "public static function get_settings_defaults(){\r\n\t\t\r\n\t\t$defaults = array();\r\n\t\tforeach( self::init_settings() as $settings ){\r\n\t\t\tforeach( $settings as $setting ){\r\n\t\t\t\tif( isset( $setting['id'] ) && isset( $setting['default'] ) ){\r\n\t\t\t\t\t$defaults[$setting['id']] = $setting['default'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $defaults;\r\n\t\t\r\n\t}", "protected function getDefaults(){\n\t\treturn array();\n\t}", "public function getDefaults(): array;", "function fa_get_slider_default_options(){\n\t$slider_options = require_fa_options('slider');\n\treturn $slider_options->get_defaults();\n}", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "public function getDefaultSettings() {\n $defaults = array();\n $fields = $this->getFields();\n foreach ($fields as $field) {\n $default = '';\n if (array_key_exists('default', $field) && $field['default']) {\n $default = $field['default'];\n }\n $defaults[$field['name']] = $default;\n }\n return $defaults;\n }", "public function defaultSettings()\n {\n return $this->repository->get( $this->repoOptionString($this->settingsKey, $this->defaultSettingsKey), array());\n }", "function jb_option_defaults() {\n\t \t$arr = array(\n\t\t'jb_featured_cat_slug' => 'home',\n\t\t'jb_featured_content_limit' => 55,\n\t\t'jb_post_content_limit' => 40\n\t);\n\treturn $arr;\n}", "public function getProfileDefault()\n {\n return $this->getConfig('packages/global_settings_default-profile');\n }", "public static function returnExtConfDefaults() {}", "public function getGeneralSettingsDefaultData()\n {\n $settings = array(\n 'enabled' => 1,\n 'pull_out' => 1,\n 'display_interval' => 1,\n 'custom_css' => '',\n 'wheel_sound' => 1,\n 'show_fireworks' => 0,\n 'pull_out_image_url' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'vss_spinandwin' . DS . 'gift.png'\n );\n return $settings;\n }", "public function & GetDefaults () {\n\t\treturn $this->defaults;\n\t}", "protected function get_default_settings()\n {\n return [\n 'default' => [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ],\n ];\n }", "public function getDefaults() {\n\t\treturn $this->_defaults;\n\t}", "function rp_get_default_settings() {\n\n\t$settings = array(\n\t\t'wpdentist_item_archive_title' => __( 'WPDentist', 'wpdentist' ),\n\t\t'wpdentist_item_description' => __( 'WordPress Dentist.', 'wpdentist' )\n\t);\n\n\treturn $settings;\n}", "public static function getDefaults()\n {\n return [];\n }", "public static function getDefaultSettingsKeys();", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "public function getDefaultVars() {\n\t\t$ret = array();\n\t\tforeach ($this->_vars as $key => $var) {\n\t\t\t$ret[$key] = $var->defaultValue;\n\t\t}\n\t\treturn $ret;\n\t}", "function getSettings() {\n\t\t$current_opts = get_option('wassup_settings');\n\t\t$default_opts = $this->defaultSettings();\n\t\t$settings = array();\n\t\tif (!empty($current_opts) && is_array($current_opts)) {\n\t\t\tforeach ($default_opts as $skey => $defaultvalue) {\n\t\t\t if (array_key_exists($skey,$current_opts)) {\n\t\t\t \t$settings[$skey] = $current_opts[$skey];\n\t\t\t } else {\n\t\t\t \t$settings[$skey] = $defaultvalue;\n\t\t\t }\n\t\t\t} //end foreach\n\t\t} else {\n\t\t\t$settings = $default_opts;\n\t\t}\n\t\treturn $settings;\n\t}", "public static function getDefaultVars()\n {\n return [\n 'posts_per_page' => 15,\n 'topics_per_page' => 15,\n 'hot_threshold' => 20,\n 'email_from' => '', // use system default email\n 'url_ranks_images' => \"ranks\",\n 'post_sort_order' => 'ASC',\n 'log_ip' => false,\n 'extendedsearch' => false,\n 'm2f_enabled' => false,\n 'favorites_enabled' => false,\n 'removesignature' => false,\n 'striptags' => false,\n 'hooks' => ['providers' => [], 'subscribers' => []],\n 'rss2f_enabled' => false,\n 'timespanforchanges' => 24,\n 'forum_enabled' => true,\n 'forum_disabled_info' => 'Sorry! The forums are currently off-line for maintenance. Please try later.',\n 'signaturemanagement' => false,\n 'signature_start' => '--',\n 'signature_end' => '--',\n 'showtextinsearchresults' => false,\n 'minsearchlength' => 3,\n 'maxsearchlength' => 30,\n 'fulltextindex' => false,\n 'solved_enabled' => false,\n 'ajax' => false,\n 'striptagsfromemail' => false,\n 'indexTo' => '',\n 'notifyAdminAsMod' => 2,\n 'defaultPoster' => 2,\n 'onlineusers_moderatorcheck' => false,\n 'forum_subscriptions_enabled' => false,\n 'topic_subscriptions_enabled' => false,\n ];\n }", "private function getDefaults()\n\t{\n\t\t/* @formatter:off */\n\t\treturn array(\n\t\t\t'cli_codepage' => 'cp852',\n\t\t\t'cookie_file' => dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'SESSION_ID',\n\t\t\t'exit_on' => E_ERROR | E_USER_ERROR,\n\t\t\t'is_debug' => false,\n\n\t\t\t/* Services */\n\t\t\t'api' => 'Orkan\\\\Filmweb\\\\Api\\\\Api',\n\t\t\t'tarnsport' => 'Orkan\\\\Filmweb\\\\Transport\\\\Curl',\n\t\t\t'request' => 'Orkan\\\\Filmweb\\\\Transport\\\\CurlRequest',\n\t\t\t'logger' => 'Orkan\\\\Filmweb\\\\Logger',\n\n\t\t\t/* Hide sensitive log data */\n\t\t\t'logger_mask' => array( 'search' => array( $this->pass ), 'replace' => array( '***' ) ),\n\t\t);\n\t\t/* @formatter:on */\n\t}", "function get_defaultsetting() {\n return $this->defaultsetting;\n }", "public function getDefaults() {\n\n\t\treturn [\n\t\t\t'module' => $this->_defaultModule,\n\t\t\t'controller' => $this->_defaultController,\n\t\t\t'action' => $this->_defaultAction,\n\t\t\t'params' => $this->_defaultParams\n\t\t];\n\t}", "public function get_default_options()\n\t{\n\t\t$defaults = array();\n\t\t$defaults['title'] = '';\n\t\t$defaults['placeholder'] = 'Search Connections...';\n\t\t\n\t\treturn $defaults;\n\t}", "function pixgraphy_get_option_defaults_values() {\n\t\tglobal $pixgraphy_default_values;\n\t\t$pixgraphy_default_values = array(\n\t\t\t'pixgraphy_responsive'\t=> 'on',\n\t\t\t'pixgraphy_column_post'\t=>'four',\n\t\t\t'pixgraphy_border_column'\t=>'on',\n\t\t\t'pixgraphy_design_layout' => 'wide-layout',\n\t\t\t'pixgraphy_animate_css'\t=> 'on',\n\t\t\t'pixgraphy_sidebar_layout_options' => 'right',\n\t\t\t'pixgraphy_photography_layout' => 'photography_layout',\n\t\t\t'pixgraphy_search_custom_header' => 0,\n\t\t\t'pixgraphy-img-upload-footer-image' => '',\n\t\t\t'pixgraphy-footer-title'\t=> '',\n\t\t\t'pixgraphy-footer-link'\t=> '#',\n\t\t\t'pixgraphy_header_display'=> 'header_text',\n\t\t\t'pixgraphy_categories'\t=> array(),\n\t\t\t'pixgraphy_custom_css'\t=> '',\n\t\t\t'pixgraphy_scroll'\t=> 0,\n\t\t\t'pixgraphy_tag_text' => esc_html__('Read More','pixgraphy'),\n\t\t\t'pixgraphy_excerpt_length'\t=> '20',\n\t\t\t'pixgraphy_single_post_image' => 'off',\n\t\t\t'pixgraphy_reset_all' => 0,\n\t\t\t'pixgraphy_stick_menu'\t=>0,\n\t\t\t'pixgraphy_blog_post_image' => 'on',\n\t\t\t'pixgraphy_entry_format_blog' => 'excerptblog_display',\n\t\t\t'pixgraphy_search_text' => esc_html__('Search &hellip;','pixgraphy'),\n\t\t\t'pixgraphy_blog_content_layout'\t=> '',\n\t\t\t'pixgraphy_display_page_featured_image'=>0,\n\t\t\t/* Slider Settings */\n\t\t\t'pixgraphy_slider_type'\t=> 'default_slider',\n\t\t\t'pixgraphy_slider_link' =>0,\n\t\t\t'pixgraphy_enable_slider' => 'frontpage',\n\t\t\t'pixgraphy_transition_effect' => 'fade',\n\t\t\t'pixgraphy_transition_delay' => '4',\n\t\t\t'pixgraphy_transition_duration' => '1',\n\t\t\t/* Front page feature */\n\t\t\t'pixgraphy_entry_format_blog' => 'show',\n\t\t\t'pixgraphy_entry_meta_blog' => 'show-meta',\n\t\t\t/*Social Icons */\n\t\t\t'pixgraphy_top_social_icons' =>0,\n\t\t\t'pixgraphy_buttom_social_icons'\t=>0,\n\t\t\t'pixgraphy_social_facebook'=> '',\n\t\t\t'pixgraphy_social_twitter'=> '',\n\t\t\t'pixgraphy_social_pinterest'=> '',\n\t\t\t'pixgraphy_social_dribbble'=> '',\n\t\t\t'pixgraphy_social_instagram'=> '',\n\t\t\t'pixgraphy_social_flickr'=> '',\n\t\t\t'pixgraphy_social_googleplus'=> '',\n\t\t\t'pixgraphy_remove_parallax_fromheader'=>0,\n\t\t\t);\n\t\treturn apply_filters( 'pixgraphy_get_option_defaults_values', $pixgraphy_default_values );\n\t}", "function bdpp_get_settings() {\n\t\n\t$options = get_option('bdpp_opts');\n\t\n\t$settings = (is_array($options)) ? $options : array();\n\t\n\treturn $settings;\n}", "protected function get_default() {\n\t\treturn array(\n\t\t\t'ownerID' => 0,\n\t\t\t'accountID' => '',\n\t\t\t'adsenseLinked' => false,\n\t\t\t'adsConversionID' => '',\n\t\t\t'anonymizeIP' => true,\n\t\t\t'internalWebPropertyID' => '',\n\t\t\t'profileID' => '',\n\t\t\t'propertyID' => '',\n\t\t\t'trackingDisabled' => array( 'loggedinUsers' ),\n\t\t\t'useSnippet' => true,\n\t\t\t'canUseSnippet' => true,\n\t\t\t'dashboardView' => Analytics::DASHBOARD_VIEW,\n\t\t);\n\t}", "function buddyexpressdesk_settings(){\n $settings = new stdClass;\n\t$GET = new BDESK_DB;\n $GET->statement('SELECT * FROM bdesk_site LIMIT 1');\n $GET->execute();\n\t$defaults = $GET->fetch();\n\tforeach ($defaults as $name => $value) {\n\t\tif (empty($paths->$name)) {\n\t\t\t$settings->$name = $value;\n\t\t}\n\t}\n\treturn $settings;\n}", "protected function _getDefaultValues()\n {\n return array(\n );\n }", "public static function getDefaultVars(){\n\t\treturn Array(\n\t\t\t//--whether to output debug messages for this class\n\t\t\t'debug'=> false\n\t\t\t,'contentRelativePath'=> '_content'\n\t\t\t,'host'=> ($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['PWD']\n\t\t\t,'webRoot'=> ($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : $_SERVER['PWD']\n\t\t\t,'wpRelativePath'=> '_wp'\n\t\t\t,'protocol'=> (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? 'https' : 'http'\n\t\t);\n\t}", "protected function get_saved_options() {\n\t\t\tif ( $options = get_option( 'better-related' ) )\n\t\t\t\treturn $options;\n\t\t\t// If the option wasn't found, the plugin wasn't activated properly\n\t\t\t$this->create_fulltext_index( 'posts', 'post_content' );\n\t\t\t$this->create_fulltext_index( 'posts', 'post_title' );\n\t\t\treturn $this->defaults();\n\t\t}", "abstract protected function loadDefaults();", "public function get_settings() {\n\t\tif ( ! is_array( $this->_settings ) ) {\n\t\t\t$this->_settings = get_option( $this->token, array() );\n\t\t}\n\t\t\n\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\tif ( ! isset( $this->_settings[$k] ) && isset( $v['default'] ) ) {\n\t\t\t\t$this->_settings[$k] = $v['default'];\n\t\t\t}\n\t\t\tif ( $v['type'] == 'checkbox' && $this->_settings[$k] != true ) {\n\t\t\t\t$this->_settings[$k] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_settings;\n\t}", "function preferences() { \n\n\t\t$preferences = array(); \n\n\t\t$preferences[] = array('name'=>'hostname','default'=>'xbox','type'=>'string','description'=>'XBOX Hostname');\n\t\t$preferences[] = array('name'=>'smbpath','default'=>'smb://hostname/mp3/','type'=>'string','description'=>'Samba share path to mp3s');\n\t\t\n\t\t//needed to add basic authentication support later\n\t\t//$preferences[] = array('name'=>'username','default'=>'xbox','type'=>'string','description'=>'XBMC Username');\n\t\t//$preferences[] = array('name'=>'password','default'=>'','type'=>'string','description'=>'XBMC Password');\n\n\t\treturn $preferences;\n\n\t}", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "protected function getDefaults()\n {\n return $this->transbankConfig->getDefaults(\n lcfirst(Helpers::classBasename(static::class))\n ) ?? [];\n }", "public function getDisplaySettingsDefaultData()\n {\n $settings = array(\n 'screen_size' => '320_480',\n 'display_frequency' => 1,\n 'hide_after' => 1,\n 'display_position' => 1,\n 'who_to_show' => 'all',\n 'when_to_display' => 'immediately',\n 'time_in_seconds' => 5,\n 'scroll_percent' => 10,\n 'geo_location' => 'always'\n );\n return $settings;\n }", "private static function initialize_defaults() {\r\n\t\t\tself::$default_settings['credentials'] = array();\r\n\r\n\t\t\tself::$default_settings['has_first_question'] = 'no';\r\n\r\n\t\t\t// We want the Urtaks to appear by default, so let's append them\r\n\t\t\tself::$default_settings['placement'] = 'append';\r\n\r\n\t\t\t// We want to default post types to 'post' and 'page'\r\n\t\t\tself::$default_settings['post-types'] = array('page', 'post');\r\n\r\n\t\t\t// We want users to be able to start Urtaks by default\r\n\t\t\tself::$default_settings['user-start'] = 'yes';\r\n\r\n\t\t\t// We want Urtaks to support community moderation by default so that we get more questions and responses\r\n\t\t\tself::$default_settings['moderation'] = 'community';\r\n\r\n\t\t\t// Auto height and width\r\n\t\t\tself::$default_settings['height'] = '';\r\n\t\t\tself::$default_settings['width'] = '';\r\n\r\n\t\t\t// Counter settings\r\n\t\t\tself::$default_settings['counter-icon'] = 'yes';\r\n\t\t\tself::$default_settings['counter-responses'] = 'yes';\r\n\r\n\t\t\t// Profanity\r\n\t\t\tself::$default_settings['blacklisting'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_override'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_words'] = '';\r\n\t\t}", "function get_default_properties()\r\n {\r\n return $this->defaultProperties;\r\n }", "function wpsl_get_settings() {\n\n $settings = get_option( 'wpsl_settings' );\n\n if ( !$settings ) {\n update_option( 'wpsl_settings', wpsl_get_default_settings() );\n $settings = wpsl_get_default_settings();\n }\n\n return $settings;\n}", "function merchant_promos_metabox_defaults() {\n\t\treturn array(\n\t\t\t'amount' => 0,\n\t\t\t'type' => 'fixed',\n\t\t\t'max' => -1,\n\t\t\t'expiration' => '',\n\t\t\t'notify' => '',\n\t\t\t'count' => 0,\n\t\t\t'total' => 0,\n\t\t\t'valid_on' => array(),\n\t\t);\n\t}", "public function getProductDefaults()\n {\n $defaults = $this->_config->get('product_defaults');\n\n if (is_array($defaults)) {\n return $defaults;\n }\n\n return [];\n }", "function tc_get_default_options() {\r\n $def_options = get_option( \"tc_theme_defaults\");\r\n \r\n //Always update the default option when (OR) :\r\n // 1) they are not defined\r\n // 2) customzing => takes into account if user has set a filter or added a new customizer setting\r\n // 3) theme version not defined\r\n // 4) versions are different\r\n if ( ! $def_options || $this -> is_customizing || ! isset($def_options['ver']) || 0 != version_compare( $def_options['ver'] , CUSTOMIZR_VER ) ) {\r\n $def_options = $this -> tc_generate_default_options( $this -> tc_customizer_map( $get_default_option = 'true' ) , 'tc_theme_options' );\r\n //Adds the version\r\n $def_options['ver'] = CUSTOMIZR_VER;\r\n update_option( \"tc_theme_defaults\" , $def_options );\r\n }\r\n return apply_filters( 'tc_default_options', $def_options );\r\n }", "protected function getDefaultValues() {\n\t\treturn array(\n\t\t\t'name' => '',\n\t\t\t'email' => '',\n\t\t\t'isEnabled' => true);\n\t}", "function load_defaults(){\n\t\t\n\t\t$this->choices = array(\n\t\t\t'yes' => __('Enable', 'wa_wcc_txt'),\n\t\t\t'no' => __('Disable', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->loading_places = array(\n\t\t\t'header' => __('Header', 'wa_wcc_txt'),\n\t\t\t'footer' => __('Footer', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->tabs = array(\n\t\t\t'general-settings' => array(\n\t\t\t\t'name' => __('General', 'wa_wcc_txt'),\n\t\t\t\t'key' => 'wa_wcc_settings',\n\t\t\t\t'submit' => 'save_wa_wcc_settings',\n\t\t\t\t'reset' => 'reset_wa_wcc_settings',\n\t\t\t),\n 'configuration' => array(\n 'name' => __('Advanced', 'wa_wcc_txt'),\n 'key' => 'wa_wcc_configuration',\n 'submit' => 'save_wa_wcc_configuration',\n 'reset' => 'reset_wa_wcc_configuration'\n )\n\t\t);\n\t}", "protected function getConfigDefaults() {\n\t\treturn [\n\t\t\t'dbname' => 'gamemonitor',\n\t\t];\n\t}", "public static function getDefaultOptions()\n {\n return self::$defaults;\n }", "public static function getDefaultOptions()\n {\n return self::$defaults;\n }", "public static function get_settings() {\n\t\treturn array_merge( SpamLyticsHelper::default_settings(), get_option( 'spamlytics', array() ) );\n\t}", "function mustsee_theme_settings_defaults( $defaults ) {\n\n\t$defaults['twitter_url'] = '';\n\t$defaults['facebook_url'] = '';\n\t$defaults['pinterest_url'] = '';\n\t$defaults['linkedin_url'] = '';\n\t$defaults['youtube_url'] = '';\n\t$defaults['googleplus_url'] = '';\n\t$defaults['agent_address'] = '';\n\t$defaults['agent_phone'] = '';\n\n\treturn $defaults;\n}", "public function getPluginSettings()\n {\n return $this->origSettings;\n }", "protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// @todo add description strings\n\t\t\t'servers' => '127.0.0.1',\n\t\t\t'port'\t\t\t\t\t=> 6379,\n\t\t\t'maxconnperserv'\t\t=> 32,\n\t\t);\n\t}", "public function defaultSettings()\n\t{\n\t\treturn [\n\t\t\t'notifications' => [\n\t\t\t\t'team_event_create' => 1,\n\t\t\t\t'team_event_update' => 2,\n\t\t\t\t'team_event_delete' => 2,\n\t\t\t\t'team_stats' \t\t=> 1,\n\t\t\t\t'team_post' \t\t=> 1,\n\t\t\t\t'user_post' \t\t=> 2,\n\t\t\t\t'user_stats'\t\t=> 1,\n\t\t\t],\n\t\t];\n\t}", "public static function getUserPreferences()\r\n {\r\n\tif ( empty(self::$userPreferences) )\r\n\t{\r\n\t $prefs = explode(',', HTTP::SERVER('HTTP_ACCEPT_LANGUAGE'));\r\n\t if ( empty($prefs) )\r\n\t {\r\n\t\treturn null;\r\n\t }\r\n\t\r\n\t self::$userPreferences = Array();\r\n\t foreach ( $prefs as $p )\r\n\t {\r\n\t\tself::$userPreferences[] = self::parseUserPreference($p);\r\n\t }\r\n\t}\r\n\r\n\treturn self::$userPreferences;\r\n }", "static function getGeneralSettingsValues(){\r\n\t\t\r\n\t\t$arrValues = get_option('revslider-global-settings', '');\r\n\t\t\r\n\t\t$arrValues = maybe_unserialize($arrValues);\r\n\r\n\t\treturn($arrValues);\r\n\t}", "function initDefaultOptions(){\n\n\t\t\t$defaults = $this->defaultOptions();\n\t\t\treturn update_option( $this->optionsKey, $defaults );\n\t\t}", "private function getDefaultConfig() {\n\t\treturn array(\n\t\t\t'client_id' => '',\n\t\t\t'client_secret' => '',\n\t\t\t'base_url' => '',\n\t\t\t'default_type' => 'user',\n\t\t);\n\t}", "public function getDefaultValues() {\n\t\treturn $this->defaultValues;\n\t}", "function cspm_get_field_default($option_id, $default_value = ''){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * We'll check if the default settings can be found in the array containing the \"(shared) plugin settings\".\r\n\t\t\t * If found, we'll use it. If not found, we'll use the one in [@default_value] instead. */\r\n\t\t\t \r\n\t\t\t$default = $this->cspm_setting_exists($option_id, $this->plugin_settings, $default_value);\r\n\t\t\t\r\n\t\t\treturn $default;\r\n\t\t\t\r\n\t\t}", "function default_configuration()\r\n {\r\n return array();\r\n }", "public function pi_setPiVarDefaults() {}", "private static function getDefaultSettings()\n {\n return array(\n 'driver' => null,\n 'username' => null,\n 'password' => null,\n 'dbname' => null,\n 'host' => null,\n 'port' => null,\n );\n }", "protected function baseConfigurationDefaults() {\n return array(\n 'id' => $this->getPluginId(),\n 'label' => '',\n 'cache' => DRUPAL_CACHE_PER_ROLE,\n );\n }", "function setting_defaults( $defaults ) {\n\n }", "function get_user_setting($name, $default_value = \\false)\n {\n }", "public static function get_gallery_defaults() {\n $gallery_defaults = array(\n 'link' => 'none',\n 'size' => 'full',\n 'columns' => '2'\n );\n $gallery_defaults[self::$data_setting_slug] = '0';\n\n return $gallery_defaults;\n }", "protected function get_default_params() {\n\t\t$defaults = [];\n\t\t$schema = $this->get_public_item_schema();\n\t\tforeach ( $schema['properties'] as $arg => $options ) {\n\t\t\tif ( isset( $options['default'] ) ) {\n\t\t\t\t$defaults[ $arg ] = $options['default'];\n\t\t\t}\n\t\t}\n\t\treturn $defaults;\n\t}", "function get_setting() {\n // has to be overridden\n return NULL;\n }", "function wpsl_get_default_setting( $setting ) {\n\n global $wpsl_default_settings;\n\n return $wpsl_default_settings[$setting];\n}", "protected function defaults() {\n\t\t\t$config = array(\n\t\t\t\t'version' => $this->version,\n\t\t\t\t'autoshowpt' => array(\n\t\t\t\t\t//'post'=> true\n\t\t\t\t),\n\t\t\t\t'usept' => array(\n\t\t\t\t\t'post' => true\n\t\t\t\t),\n\t\t\t\t'usetax' => array(),\n\t\t\t\t'autoshowrss' => false,\n\t\t\t\t'do_c2c' => 1,\n\t\t\t\t'do_t2t' => 0,\n\t\t\t\t'do_t2c' => 0,\n\t\t\t\t'do_k2c' => 0,\n\t\t\t\t'do_k2t' => 0,\n\t\t\t\t'do_x2x' => 1,\n\t\t\t\t'minscore' => 50,\n\t\t\t\t'maxresults' => 5,\n\t\t\t\t'cachetime' => 60,\n\t\t\t\t'filterpriority' => 10,\n\t\t\t\t'log' => false,\n\t\t\t\t'loglevel' => false,\n\t\t\t\t'storage' => 'postmeta',\n\t\t\t\t'storage_id' => 'better-related-',\n\t\t\t\t'querylimit' => 1000,\n\t\t\t\t't_querylimit' => 10000,\n\t\t\t\t'mtime' => time(),\n\t\t\t\t'relatedtitle' => sprintf(\n\t\t\t\t\t\"<strong>%s</strong>\",\n\t\t\t\t\t__( 'Related content:', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'relatednone' => sprintf(\n\t\t\t\t\t\"<p>%s</p>\",\n\t\t\t\t\t__( 'No related content found.', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'thanks' => 'below',\n\t\t\t\t'stylesheet' => true,\n\t\t\t\t'showdetails' => false\n\t\t\t);\n\t\t\treturn $config;\n\t\t}", "public function default_settings() : array {\n\t\treturn [\n\t\t\t'layout' => 'block',\n\t\t\t'newsletter' => '',\n\t\t\t'theme' => 'light',\n\t\t\t'type' => 'subscribe',\n\t\t];\n\t}", "public function getDefaultData()\n {\n return $this->predefined;\n }", "public static function getDefaultOptions(): array\n {\n return self::$defaults;\n }", "public function defaultOptions() {\n return $this->default_options;\n }", "public function get_default_value()\n {\n return [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ];\n }", "public function getDefaultValues()\n {\n return $this->defaultValues;\n }", "public function getDefaultValues()\n {\n return $this->defaultValues;\n }", "function wp_plupload_default_settings()\n {\n }", "public function save_defaults() {\n\n $tmp_options = $this->options;\n\n foreach( $this->pre_fields as $field ) {\n if( ! empty( $field['id'] ) ) {\n $this->options[$field['id']] = $this->get_default( $field, $this->options );\n }\n }\n\n if( $this->args['save_defaults'] && empty( $tmp_options ) ) {\n $this->save_options( $this->options );\n }\n\n }", "function wp_get_widget_defaults()\n {\n }", "function stage_get_default($request, $pop = false)\n{\n return Settings::getDefault($request, $pop);\n}", "public function saveDefaultValues() {\n\n\t\tforeach ( $this->getOptionsList() as $option_page ) {\n\t\t\t$option_page->setDefaultValue();\n\t\t}\n\t}", "public static function getDefaults () {\n\t\t$configuration = array(\n\t\t\t'xtype' => 'textfield',\n\t\t\t'anchor' => '95%',\n\t\t\t'blankText' =>'fieldMandatory',\n\t\t\t'labelSeparator' => '',\n\t\t\t'selectOnFocus' => TRUE,\n\t\t);\n\t\treturn $configuration;\n\t}", "function get_integration_settings($set_admin_defaults = FALSE) {\n\tglobal $db, $wpuAbs;\n\t\n\t$config_fields = get_db_schema();\n\t$wpSettings = array();\n\tif ($wpuAbs->ver == 'PHPBB3') {\n\t\tforeach($config_fields as $var_name => $field_name) {\n\t\t\tif ($wpuAbs->config('wpu_'.$field_name) !== FALSE) {\n\t\t\t\t$wpSettings[$var_name] = $wpuAbs->config('wpu_'.$field_name);\n\t\t\t\t//unset($GLOBALS['config']['wpu_'.$field_name]);\n\t\t\t} elseif ($set_admin_defaults) {\n\t\t\t\t$wpSettings[$var_name] = set_default($var_name);\n\t\t\t}\n\t\t}\n\t\treturn $wpSettings;\t\n\t}\n\t\n\t$sql = 'SELECT * FROM ' . WP_INT_TABLE . ' LIMIT 1';\n\tif (!$result = $db->sql_query($sql)) {\n\t\t//db error -- die\n\t\tmessage_die(GENERAL_ERROR, $lang['WP_DBErr_Retrieve'], __LINE__, __FILE__, $sql);\n\t\treturn FALSE;\n\t}\n\tif (!$db->sql_numrows($result)) {\n\t\t// table not populated yet\n\t\treturn FALSE;\n\t}\n\telse {\n\t\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$fullFieldSet = get_db_schema();\n\t\t\n\t\tforeach($fullFieldSet as $var_name => $field_name) {\n\t\t\t$wpSettings[$var_name] = $row[$field_name];\n\t\t}\n\t}\n}", "protected function defaults() {\n\t\treturn array(\n\t\t\t'content' => false,\n\t\t\t'content_path' => false,\n\t\t\t'markdown' => false,\n\t\t);\n\t}", "public function getSettings(){\r\n\t\treturn $this->initSettings;\r\n\t}", "public function dumpPrefs()\n\t{\n\t\treturn $this->prefs;\n\t}", "protected static function getDefaultSettings()\n {\n return array(\n 'prefix' => '',\n 'throw_exception' => false,\n 'connection' => null\n );\n }", "protected function getDefaultValues() {\n\t\t$user = Environment::getCurrent()->getUser();\n\t\t\n\t\treturn array(\n\t\t\t'email' => $user->getEmail(),\n\t\t\t'emailConfirmation' => $user->getEmail());\n\t}", "public static function getCommandDefaults() {\n\t return self::$commandDefaults \n\t ?? (self::$commandDefaults = array(\n\t 'session' => true,\n\t 'authenticate' => true,\n\t 'authorize' => null,\n\t 'access_level' => 1,\n\t 'validate' => null,\n\t 'post'=> null,\n\t 'get' => null,\n\t 'page' => null,\n\t 'tab' => null,\n\t 'tabgroup' => null));\n\t}", "public function settings()\n\t{\n\t\t$settings = array(\n\t\t\t'user_id' \t=> '',\n\t\t\t'private_key' \t=> '',\n\t\t\t'debug'\t=> array('r',\n\t\t\t\tarray(\n\t\t\t\t\t'y' => lang('yes'),\n\t\t\t\t\t'n' => lang('no')\n\t\t\t\t),\n\t\t\t\t'n'\n\t\t\t)\n\t\t);\n\n\t\treturn $settings;\n\t}", "function getDefaults($app) {\r\n // Get stats object\r\n $stats = $app->getDoc()->stats();\r\n \r\n // Return some defaults\r\n return array(\r\n 'mileage' => (isset($stats['last']['mileage']) && isset($stats['all']['tripdistance'])) ? getMiles($stats['last']['mileage'] + $stats['all']['tripdistance']) : '',\r\n 'location' => (isset($stats['all']['location']) ? $stats['all']['location'] : ''),\r\n 'pricepergallon' => (isset($stats['last']['pricepergallon'])) ? getGasMoney($stats['last']['pricepergallon']) : '',\r\n 'grade' => (isset($stats['all']['grade'])) ? $stats['all']['grade'] : '0'\r\n );\r\n}", "abstract public function get_settings();", "private function gather_plugin_options() {\n $options = array();\n foreach ( $this->OPTIONS as $value ) {\n $options[ $value ] = get_option( $value );\n }\n return array( '_wp_super_cache_options' => $options );\n }", "public function getLookAndFeelSettingsDefaultData()\n {\n $settings = array(\n 'image_url' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'vss_spinandwin' . DS . 'front_image.png',\n 'try_luck_color' => '00c74c',\n 'try_luck_text_color' => 'ffffff',\n 'feel_lucky_text_color' => 'fffbf8',\n 'continue_color' => 'd6042e',\n 'next_time_color' => 'ff8400',\n 'background_color' => '007aa7',\n 'text_color' => 'ffffff',\n 'wheel_color' => '4497bb',\n 'wheel_text_color' => 'ffffff',\n 'theme' => 0,\n 'wheel_design' => 1\n );\n return $settings;\n }" ]
[ "0.7566856", "0.73202425", "0.7093371", "0.7051502", "0.7035544", "0.70052576", "0.69235927", "0.68482", "0.6846756", "0.68136275", "0.6806049", "0.6773219", "0.6759119", "0.6732954", "0.67160577", "0.66929895", "0.6690776", "0.6677039", "0.6669455", "0.66548175", "0.657256", "0.6554196", "0.65370613", "0.6532651", "0.6517775", "0.6517685", "0.65141624", "0.6493778", "0.6472283", "0.6469448", "0.64590263", "0.64366645", "0.64333594", "0.6420688", "0.6411027", "0.6410891", "0.6392526", "0.6381647", "0.63634616", "0.63554436", "0.6350476", "0.6349552", "0.63362384", "0.63201994", "0.6313675", "0.63053817", "0.6303295", "0.6300564", "0.6295575", "0.62869996", "0.62768", "0.6265289", "0.6261277", "0.6261277", "0.6259225", "0.62330705", "0.62298506", "0.6214362", "0.6193759", "0.61886716", "0.61790913", "0.6174128", "0.6172326", "0.61705613", "0.61637163", "0.6162891", "0.61627436", "0.6156959", "0.61502534", "0.6140388", "0.613273", "0.6129406", "0.61290056", "0.6126544", "0.6123575", "0.6115152", "0.6104975", "0.6102195", "0.60940826", "0.6075894", "0.60738003", "0.60726887", "0.60726887", "0.607201", "0.6047923", "0.6027939", "0.6027601", "0.6017401", "0.60156614", "0.6011468", "0.6006723", "0.6006291", "0.60049325", "0.60036916", "0.6002008", "0.59959733", "0.5992515", "0.5985032", "0.5980381", "0.5979831", "0.5975234" ]
0.0
-1
install plugin resources (css, js)
function abl_droploader_install($event, $step, $resources=null, $path='') { global $prefs; $state = 0; if ($resources === null) { $path = $prefs['path_to_site']; $resources = array(); $resources['/res/css/abl.droploader-app.css'] = 'Ym9keSB7CglvdmVyZmxvdy14OiBoaWRkZW47CglvdmVyZmxvdy15OiBzY3JvbGw7Cn0KLyogaW1h Z2UgbGlzdCAqLwovKiNpbWFnZV9jb250cm9sIC5hYmwtZHJvcGxvYWRlci1vcGVuIHsKCWZsb2F0 OiByaWdodDsKCW1hcmdpbi1yaWdodDogMWVtOwoJZm9udDogMWVtIFZlcmRhbmEsIEFyaWFsLCBz YW5zLXNlcmlmOwoJZm9udC13ZWlnaHQ6IGJvbGQ7Cn0qLwoKI2FibC1kcm9wbG9hZGVyLWNsb3Nl IHsKCWRpc3BsYXk6IGJsb2NrOwoJcG9zaXRpb246IGFic29sdXRlOwoJdG9wOiAyZW07CglyaWdo dDogLjVlbTsKCXBhZGRpbmc6IDNweCAxMHB4IDZweCAxMHB4OwoJYm9yZGVyOiAxcHggc29saWQg I2NjYzsKCXRleHQtZGVjb3JhdGlvbjogbm9uZTsKCXZlcnRpY2FsLWFsaWduOiBib3R0b207Cgl0 ZXh0LWFsaWduOiBjZW50ZXI7Cglmb250OiAyZW0gVmVyZGFuYSwgQXJpYWwsIHNhbnMtc2VyaWY7 Cglmb250LXdlaWdodDogYm9sZDsKCWNvbG9yOiAjMjIyOwoJYmFja2dyb3VuZDogI2ZmZjsKCXot aW5kZXg6IDMzMzM7CgljdXJzb3I6IHBvaW50ZXI7Cn0KI2FibC1kcm9wbG9hZGVyLWNsb3NlOmhv dmVyIHsKCWNvbG9yOiAjZjIyOwp9CgojYWJsLWRyb3Bsb2FkZXIgewoJcG9zaXRpb246IGFic29s dXRlOwoJdG9wOiAwOwoJbGVmdDogMDsKCXdpZHRoOiAxMDAlOwoJaGVpZ2h0OiAxMDAlOwp9Cgov KiAjYWJsLWRyb3Bsb2FkZXIgZm9ybSBpbnB1dCB7ICovCiNhYmwtZHJvcGxvYWRlciBmb3JtIGRp diB7CglkaXNwbGF5OiBub25lOwp9CiNhYmwtZHJvcGxvYWRlciAudXBsb2FkLWluZm8gewoJcG9z aXRpb246IGFic29sdXRlOwoJdG9wOiAwOwoJbGVmdDogMDsKCXdpZHRoOiAxMDAlOwoJaGVpZ2h0 OiAxMDAlOwoJdGV4dC1hbGlnbjogY2VudGVyOwoJZm9udC1zaXplOiAxLjVlbTsKCWZvbnQtd2Vp Z2h0OiBub3JtYWw7Cgljb2xvcjogIzIyMjsKCWJhY2tncm91bmQ6IHJnYmEoMjU1LCAyNTUsIDI1 NSwgMC44NSk7Cgl6LWluZGV4OiAzMzMzOwp9CiNhYmwtZHJvcGxvYWRlciAuc2VsZWN0LWZpbGVz IHsKCXBvc2l0aW9uOiBhYnNvbHV0ZTsKCXRvcDogMDsKCWxlZnQ6IDA7Cgl3aWR0aDogMTAwJTsK CWhlaWdodDogMTAwJTsKCWNvbG9yOiAjNjY2OwoJYmFja2dyb3VuZDogcmdiYSgyNDAsIDI0MCwg MjQwLCAwLjc1KTsKCXotaW5kZXg6IDMzMzM7Cn0KI2FibC1kcm9wbG9hZGVyIC5hYmwtZml4ZWQt cG9zIHsKCXBvc2l0aW9uOiBmaXhlZDsKfQojYWJsLWRyb3Bsb2FkZXIgLnNlbGVjdC1maWxlcyBw IHsKCWRpc3BsYXk6IGJsb2NrOwoJcG9zaXRpb246IGFic29sdXRlOwoJdG9wOiA1MCU7CglsZWZ0 OiAwOwoJd2lkdGg6IDEwMCU7CgltYXJnaW46IGF1dG8gMDsKCXRleHQtYWxpZ246IGNlbnRlcjsK CWZvbnQtc2l6ZTogM2VtOwoJZm9udC13ZWlnaHQ6IG5vcm1hbDsKCXZlcnRpY2FsLWFsaWduOiBt aWRkbGU7Cn0KI2FibC1kcm9wbG9hZGVyLWltYWdlLWNhdC1zZWwgewoJZGlzcGxheTogYmxvY2s7 Cglwb3NpdGlvbjogYWJzb2x1dGU7Cgl0b3A6IDhlbTsKCXJpZ2h0OiAxZW07CgliYWNrZ3JvdW5k LWNvbG9yOiAjY2NjOwoJcGFkZGluZzogMWVtOwp9CiNhYmwtZHJvcGxvYWRlci1pbWFnZS1jYXQt c2VsIHNlbGVjdCB7CgltYXJnaW4tdG9wOiAwLjVlbTsKfQojYWJsLWRyb3Bsb2FkZXIgLmltZy1w cmV2aWV3IHsKCXBvc2l0aW9uOiByZWxhdGl2ZTsKCXRvcDogMDsKCWxlZnQ6IDA7Cgl3aWR0aDog MTAwJTsKCWhlaWdodDogMjQwcHg7CgltYXJnaW46IDMwcHggYXV0bzsKCW92ZXJmbG93OiBoaWRk ZW47CglsaXN0LXN0eWxlLXR5cGU6IG5vbmU7CglwYWRkaW5nOiAwOwoJdGV4dC1hbGlnbjogY2Vu dGVyOwp9CiNhYmwtZHJvcGxvYWRlciAuaW1hZ2UtYm94IHsKCWhlaWdodDogMTg2cHg7Cgl2ZXJ0 aWNhbC1hbGlnbjogbWlkZGxlOwoJbGluZS1oZWlnaHQ6IDE4MHB4Owp9CiNhYmwtZHJvcGxvYWRl ciAuaW1hZ2UtYm94IGltZyB7CgltYXgtd2lkdGg6IDI0MHB4OwoJbWF4LWhlaWdodDogMTgwcHg7 Cglib3JkZXI6IDNweCBzb2xpZCAjZmZmOwoJLW1vei1ib3gtc2hhZG93OiAwIDAgMnB4ICMwMDA7 Cgktd2Via2l0LWJveC1zaGFkb3c6IDAgMCAycHggIzAwMDsKCWJveC1zaGFkb3c6IDAgMCAycHgg IzAwMDsKfQojYWJsLWRyb3Bsb2FkZXIgLmltZy1wcmV2aWV3IC5wcmV2aWV3IHsKCXBvc2l0aW9u OiByZWxhdGl2ZTsKCXdpZHRoOiA1MDBweDsKCWhlaWdodDogMjA2cHg7CgltYXJnaW46IDEwcHgg YXV0bzsKCXRleHQtYWxpZ246IGNlbnRlcjsKfQojYWJsLWRyb3Bsb2FkZXIgLmltZy1wcmV2aWV3 IC5wcmV2aWV3LmRvbmUgewoJb3ZlcmZsb3c6IGhpZGRlbjsKCWhlaWdodDogMDsKCXRyYW5zaXRp b246IGhlaWdodCAwLjc1czsKCS1tb3otdHJhbnNpdGlvbjogaGVpZ2h0IDAuNzVzOwoJLXdlYmtp dC10cmFuc2l0aW9uOiBoZWlnaHQgMC43NXM7Cgktby10cmFuc2l0aW9uOiBoZWlnaHQgMC43NXM7 Cn0KLyogcGVyIGltYWdlIHByb2dyZXNzICovCiNhYmwtZHJvcGxvYWRlciAuaW1hZ2UtcHJvZ3Jl c3MgewoJcG9zaXRpb246IHJlbGF0aXZlOwoJaGVpZ2h0OiAxMnB4OwoJd2lkdGg6IDI0NnB4OwoJ bWFyZ2luOiA1cHggYXV0bzsKCXZlcnRpY2FsLWFsaWduOiBtaWRkbGU7Cn0KI2FibC1kcm9wbG9h ZGVyIC5pbWFnZS1wcm9ncmVzcyAucHJvZ3Jlc3MgewoJcG9zaXRpb246IGFic29sdXRlOwoJbGVm dDogMDsKCWhlaWdodDogMTAwJTsKCXdpZHRoOiAwOwoJYmFja2dyb3VuZC1jb2xvcjogIzI1ODZk MDsKfQoKLyogb3ZlcmFsbCBwcm9ncmVzcyAqLwojYWJsLWRyb3Bsb2FkZXIgLmZpbGVzLXByb2dy ZXNzIHsKCXBvc2l0aW9uOiByZWxhdGl2ZTsKCXRvcDogMzUwcHg7CgloZWlnaHQ6IDI0cHg7Cgl3 aWR0aDogNTAwcHg7CgltYXJnaW46IDEwcHggYXV0bzsKfQojYWJsLWRyb3Bsb2FkZXIgLmZpbGVz LXByb2dyZXNzIC5wcm9ncmVzcyB7Cglwb3NpdGlvbjogYWJzb2x1dGU7CglsZWZ0OiAwOwoJaGVp Z2h0OiAxMDAlOwoJd2lkdGg6IDA7CgliYWNrZ3JvdW5kLWNvbG9yOiAjMjU4NmQwOwp9CgovKiBl cnJvciBvciBjb21wbGV0aW9uIG1lc3NhZ2UgKi8KI2FibC1kcm9wbG9hZGVyIC5tZXNzYWdlLWJv eCB7Cglwb3NpdGlvbjogcmVsYXRpdmU7Cgl0b3A6IDM1MHB4OwoJd2lkdGg6IDUwMHB4OwoJbWFy Z2luOiAxMHB4IGF1dG87Cgl0ZXh0LWFsaWduOiBjZW50ZXI7Cglmb250LXNpemU6IHNtYWxsOwp9 Cg=='; $resources['/res/js/abl.droploader-app.js'] = 'KGZ1bmN0aW9uKCQpIHsKCgl2YXIgZGVmYXVsdF9vcHRpb25zID0gewoJCXdpZGdldF9pZDogJ2Fi bC1kcm9wbG9hZGVyJywKCQlzZWxlY3RfZmlsZXNfY2xhc3M6ICdzZWxlY3QtZmlsZXMnLAoJCWlt YWdlX2NhdGVnb3JpZXNfc2VsZWN0OiAnJywKCQlmaWxlZHJvcDogewoJCQlwYXJhbW5hbWU6ICd0 aGVmaWxlJywKCQkJbWF4ZmlsZXM6IGltYWdlX21heF9maWxlcywKCQkJbWF4ZmlsZXNpemU6IGlt YWdlX21heF91cGxvYWRfc2l6ZSwKCQkJdXJsOiAnaW5kZXgucGhwJywKCQkJZmFsbGJhY2tfaWQ6 ICdpbWFnZS11cGxvYWQnLAoJCQloZWFkZXJzOiB7CgkJCQknY2hhcnNldCc6ICd1dGYtOCcKCQkJ fQoJCX0sCgkJbDEwbjogewoJCQknY2xvc2UnOiAnJiN4MDBkNzsnLAoJCQknY2xvc2VfdGl0bGUn OiAnQ2xvc2UgRHJvcExvYWRlcicsCgkJCSdlcnJvcl9tZXRob2QnOiAnTWV0aG9kIHt7bWV0aG9k fX0gZG9lcyBub3QgZXhpc3QgaW4gYWJsLmRyb3Bsb2FkZXItYXBwLmpzLicKCQl9Cgl9OwoJdmFy IG9wdHMsCgkJZHJvcGxvYWRlcl9oaWRkZW4gPSB0cnVlLAoJCWRyb3Bsb2FkZXIgPSBudWxsOwoK CSQuZm4uYWJsRHJvcExvYWRlckFwcCA9IGZ1bmN0aW9uKG1ldGhvZCkgewoKCQl2YXIgbWV0aG9k cyA9IHsKCQkJaW5pdCA6IGZ1bmN0aW9uKG9wdGlvbnMpIHsKCQkJCWlmICghbWV0aG9kcy5pc1N1 cHBvcnRlZCgpKSByZXR1cm4gZmFsc2U7CgkJCQlvcHRzID0gJC5leHRlbmQoe30sIGRlZmF1bHRf b3B0aW9ucywgb3B0aW9ucyk7CgkJCQlpZiAoJCgnI3BhZ2UtYXJ0aWNsZScpLmxlbmd0aCA+IDAp IHsKCQkJCQlhcnRpY2xlX2ltYWdlX2ZpZWxkID0gbmV3IEFycmF5KCk7CgkJCQkJZm9yICh2YXIg aSA9IDA7IGkgPCBhcnRpY2xlX2ltYWdlX2ZpZWxkX2lkcy5sZW5ndGg7ICsraSkgewoJCQkJCQlh cnRpY2xlX2ltYWdlX2ZpZWxkW2ldID0gJChhcnRpY2xlX2ltYWdlX2ZpZWxkX2lkc1tpXSk7CgkJ CQkJfQoJCQkJfQoJCQkJaWYgKCQoJyNoaWRkZW5fY2F0JykubGVuZ3RoID09IDApIHsKCQkJCQkk KCcudXBsb2FkLWZvcm0nKQoJCQkJCQkuYXBwZW5kKCc8aW5wdXQgdHlwZT0iaGlkZGVuIiBpZD0i YWJsX2Ryb3Bsb2FkZXIiIG5hbWU9ImFibF9kcm9wbG9hZGVyIiB2YWx1ZT0iMSIgLz5cbicpCgkJ CQkJCS5hcHBlbmQoJzxpbnB1dCB0eXBlPSJoaWRkZW4iIGlkPSJoaWRkZW5fY2F0IiBuYW1lPSJj YXRlZ29yeSIgdmFsdWU9IiIgLz4nKTsKCQkJCX0KCQkJCWlmIChvcHRzLmltYWdlX2NhdGVnb3Jp ZXNfc2VsZWN0ID09ICcnKSB7CgkJCQkJJC5hamF4KHsKCQkJCQkJdXJsOiAnP2V2ZW50PWFibF9k cm9wbG9hZGVyJnN0ZXA9Z2V0X2Zvcm1fZGF0YSZpdGVtcz1pbWFnZV9jYXRfc2VsZWN0LGwxMG4n LAoJCQkJCQlkYXRhVHlwZTogJ2pzb24nLAoJCQkJCQlhc3luYzogZmFsc2UsCgkJCQkJCXN1Y2Nl c3M6IGZ1bmN0aW9uKGRhdGEpIHsKCQkJCQkJCWlmIChkYXRhLnN0YXR1cyA9PSAnMScpIHsKCQkJ CQkJCQlvcHRzLmltYWdlX2NhdGVnb3JpZXNfc2VsZWN0ID0gZGF0YS5pbWFnZV9jYXRfc2VsZWN0 OwoJCQkJCQkJCW9wdHMubDEwbiA9IGRhdGEubDEwbjsKCQkJCQkJCX0KCQkJCQkJfQoJCQkJCX0p OwoJCQkJfQoJCQkJJCgnYm9keScpLmRlbGVnYXRlKCcjYWJsLWRyb3Bsb2FkZXItY2xvc2UnLCAn Y2xpY2suZHJvcGxvYWRlcicsIGZ1bmN0aW9uKGUpIHsKCQkJCQltZXRob2RzLmNsb3NlKCk7CgkJ CQkJcmV0dXJuIGZhbHNlOwoJCQkJfSk7CgkJCQkkKCdib2R5JykuZGVsZWdhdGUoJyNhYmwtZHJv cGxvYWRlci1pbWFnZS1jYXQtc2VsIConLCAnY2xpY2suZHJvcGxhZGVyJywgZnVuY3Rpb24oZSkg ewoJCQkJCXJldHVybiBmYWxzZTsKCQkJCX0pOwoJCQkJJCgnYm9keScpLmRlbGVnYXRlKCcjYWJs LWRyb3Bsb2FkZXItaW1hZ2UtY2F0LXNlbCBzZWxlY3QnLCAnY2hhbmdlLmRyb3BsYWRlcicsIGZ1 bmN0aW9uKGUpIHsKCQkJCQkkKCcjaGlkZGVuX2NhdCcpLnZhbCgkKHRoaXMpLnZhbCgpKTsKCQkJ CQlyZXR1cm4gZmFsc2U7CgkJCQl9KTsKCQkJCWRyb3Bsb2FkZXIgPSAkKCcudXBsb2FkLWZvcm0n KS5kcm9wbG9hZGVyKG9wdHMpOwoJCQkJJCgnI2FibC1kcm9wbG9hZGVyJykuaGlkZSgpOwoKCSAg ICAgICAJCXJldHVybiB0aGlzLmVhY2goZnVuY3Rpb24oKSB7fSk7CgkJCX0sCgkJCWlzU3VwcG9y dGVkOiBmdW5jdGlvbigpIHsKCQkJCXJldHVybiAoJ2RyYWdnYWJsZScgaW4gZG9jdW1lbnQuY3Jl YXRlRWxlbWVudCgnc3BhbicpKSAmJiAodHlwZW9mIEZpbGVSZWFkZXIgIT0gJ3VuZGVmaW5lZCcp OwoJCQl9LAoJCQlvcGVuOiBmdW5jdGlvbigpIHsKICAgICAgICAJCXJldHVybiB0aGlzLmVhY2go ZnVuY3Rpb24oKSB7CgkJCQkJaWYgKCQoJy51cGxvYWQtZm9ybScpLmxlbmd0aCA+IDApIHsKCQkJ CQkJZHJvcGxvYWRlci5kcm9wbG9hZGVyKCdyZXNldCcpOwoJCQkJCQkkKCcjYWJsLWRyb3Bsb2Fk ZXInKS5zbGlkZURvd24oZnVuY3Rpb24oKSB7CgkJCQkJCQkkKCcjYWJsLWRyb3Bsb2FkZXIgLnNl bGVjdC1maWxlcycpLmFkZENsYXNzKCdhYmwtZml4ZWQtcG9zJyk7CgkJCQkJCQlkcm9wbG9hZGVy X2hpZGRlbiA9IGZhbHNlOwoJCQkJCQkJJCgnaHRtbCcpLmJpbmQoJ2tleXVwLmRyb3Bsb2FkZXIn LCBmdW5jdGlvbihlKSB7CgkJCQkJCQkJaWYgKGUud2hpY2ggPT0gMjcpIHsKCQkJCQkJCQkJbWV0 aG9kcy5jbG9zZSgpOwoJCQkJCQkJCQlyZXR1cm4gZmFsc2U7CgkJCQkJCQkJfQoJCQkJCQkJfSk7 CgkJCQkJCX0pOwoJCQkJCX0KCQkJCX0pOwoJCQl9LAoJCQljbG9zZTogZnVuY3Rpb24oKSB7CgkJ CQkkKCcjYWJsLWRyb3Bsb2FkZXIgLnNlbGVjdC1maWxlcycpLnJlbW92ZUNsYXNzKCdhYmwtZml4 ZWQtcG9zJyk7CgkJCQkkKCcjYWJsLWRyb3Bsb2FkZXInKS5zbGlkZVVwKGZ1bmN0aW9uKCkgewoJ CQkJCWRyb3Bsb2FkZXJfaGlkZGVuID0gdHJ1ZTsKCQkJCQkkKCdodG1sJykudW5iaW5kKCcuZHJv cGxvYWRlcicpOwoJCQkJCWRyb3Bsb2FkZXIgPSBudWxsOwoJCQkJCWlmICgkKCcjcGFnZS1pbWFn ZScpLmxlbmd0aCA+IDAgJiYgcmVsb2FkX2ltYWdlX3RhYiAhPSAwKSB7CgkJCQkJCWxvY2F0aW9u LnJlbG9hZCgpOwoJCQkJCX0KCQkJCX0pOwoJCQkJcmV0dXJuIGZhbHNlOwoJCQl9LAoJCQlkZXN0 cm95IDogZnVuY3Rpb24oKSB7CgkJCQlyZXR1cm4gbWV0aG9kcy5jbG9zZSgpOwoJCQl9CgkJfTsK CgkJaWYgKG1ldGhvZHNbbWV0aG9kXSkgewoJCQlyZXR1cm4gbWV0aG9kc1ttZXRob2RdLmFwcGx5 KHRoaXMsIEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSkpOwoJCX0gZWxz ZSBpZiAodHlwZW9mIG1ldGhvZCA9PT0gJ29iamVjdCcgfHwgISBtZXRob2QpIHsKCQkJcmV0dXJu IG1ldGhvZHMuaW5pdC5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwoJCX0gZWxzZSB7CgkJCSQuZXJy b3IoZ2V0VGV4dChvcHRzLmwxMG4uZXJyb3JfbWV0aG9kLCB7ICdtZXRob2QnOiBtZXRob2QgfSkp OwoJCX0KCgkJLyogc2hvdyBlcnJvciBvciBjb21wbGV0aW9uIG1lc3NhZ2UgKi8KCQlmdW5jdGlv biBnZXRUZXh0KHRleHQsIHZhbHVlcywgbmwyYnIpewoJCQlpZiAodmFsdWVzICE9PSB1bmRlZmlu ZWQgJiYgdmFsdWVzICE9ICcnKSB7CgkJCQlmb3IgKHZhciBlbnRyeSBpbiB2YWx1ZXMpIHsKCQkJ CQl2YXIgcmVnZXhwID0gbmV3IFJlZ0V4cCgne3snICsgZW50cnkgKyAnfX0nLCAnZ2knKTsKCQkJ CQl0ZXh0ID0gdGV4dC5yZXBsYWNlKHJlZ2V4cCwgdmFsdWVzW2VudHJ5XSk7CgkJCQl9CgkJCX0K CQkJaWYgKG5sMmJyID09PSB0cnVlKSB7CgkJCQl0ZXh0ID0gdGV4dC5yZXBsYWNlKC9cXG4vZywg JzxiciAvPicpOwoJCQl9IGVsc2UgewoJCQkJdGV4dCA9IHRleHQucmVwbGFjZSgvXFxuL2csIFN0 cmluZy5mcm9tQ2hhckNvZGUoMTApKTsKCQkJfQoJCQlyZXR1cm4gdGV4dDsKCQl9CgoJfTsKCn0p KGpRdWVyeSk7CgoKJChmdW5jdGlvbigpewoKCXZhciBkcm9wbG9hZGVyX29wdGlvbnMgPSB7CgkJ YWZ0ZXJBbGw6IGZ1bmN0aW9uKGZpbGVzKSB7CgkJCWlmIChmaWxlcy5sZW5ndGggPiAwICYmIGFy dGljbGVfaW1hZ2VfZmllbGQgIT0gbnVsbCkgewoJCQkJZm9yICh2YXIgaSA9IDA7IGkgPCBhcnRp Y2xlX2ltYWdlX2ZpZWxkLmxlbmd0aDsgKytpKSB7CgkJCQkJdmFyIHYgPSAkKGFydGljbGVfaW1h Z2VfZmllbGRbaV0pLnZhbCgpOwoJCQkJCWlmICh2ID09ICcnKSB7CgkJCQkJCXYgPSBmaWxlcy5q b2luKCcsJyk7CgkJCQkJfSBlbHNlIHsKCQkJCQkJdiArPSAnLCcgKyBmaWxlcy5qb2luKCcsJyk7 CgkJCQkJfQoJCQkJCSQoYXJ0aWNsZV9pbWFnZV9maWVsZFtpXSkudmFsKHYpOwoJCQkJCSQoYXJ0 aWNsZV9pbWFnZV9maWVsZFtpXSkuY2hhbmdlKCk7CgkJCQl9CgkJCX0KCQl9LAoJCWwxMG46IHt9 Cgl9OwoKCWlmICgkLmZuLmFibERyb3BMb2FkZXJBcHAoJ2lzU3VwcG9ydGVkJykpIHsKCgkJdmFy IGRvY19sYW5ndWFnZSA9ICQoJ2h0bWwnKS5hdHRyKCdsYW5nJyksCgkJCWltYWdlX3VwbG9hZF9s aW5rID0gJycsCgkJCWltYWdlX3VwbG9hZF9mb3JtID0gJyc7CgoJCWlmIChpbWFnZV91cGxvYWRf Zm9ybSA9PSAnJykgewoJCQkkLmdldEpTT04oCgkJCQknP2V2ZW50PWFibF9kcm9wbG9hZGVyJnN0 ZXA9Z2V0X2Zvcm1fZGF0YSZpdGVtcz1hbGwnLAoJCQkJZnVuY3Rpb24oZGF0YSkgewoJCQkJCWlm IChkYXRhLnN0YXR1cyA9PSAnMScpIHsKCQkJCQkJaW1hZ2VfdXBsb2FkX2xpbmsgPSBkYXRhLmlt YWdlX3VwbG9hZF9saW5rOwoJCQkJCQlpbWFnZV91cGxvYWRfZm9ybSA9IGRhdGEuaW1hZ2VfdXBs b2FkX2Zvcm07CgkJCQkJCWRyb3Bsb2FkZXJfb3B0aW9ucy5pbWFnZV9jYXRlZ29yaWVzX3NlbGVj dCA9IGRhdGEuaW1hZ2VfY2F0X3NlbGVjdDsKCQkJCQkJZHJvcGxvYWRlcl9vcHRpb25zLmwxMG4g PSBkYXRhLmwxMG47CgkJCQkJCWFibERyb3BMb2FkZXJTZXR1cCgpOwoJCQkJCX0KCQkJCX0KCQkJ KTsKCQl9IGVsc2UgewoJCQlhYmxEcm9wTG9hZGVyU2V0dXAoKTsKCQl9CgoJCWZ1bmN0aW9uIGFi bERyb3BMb2FkZXJTZXR1cCgpIHsKCQkJaWYgKCQoJyNwYWdlLWFydGljbGUnKS5sZW5ndGggPiAw ICYmICQoJy51cGxvYWQtZm9ybScpLmxlbmd0aCA9PSAwKSB7CgkJCQkkKCdib2R5JykuYXBwZW5k KGltYWdlX3VwbG9hZF9mb3JtKTsKCQkJfQoJCQkkKCcudXBsb2FkLWZvcm0nKS5oaWRlKCk7CgkJ CWlmICgkKCcjcGFnZS1pbWFnZScpLmxlbmd0aCA+IDApIHsKCQkJCSQoJ2JvZHknKS5hcHBlbmQo JCgnLnVwbG9hZC1mb3JtJykpOyAvLyBtb3ZlIGZvcm0KCQkJLy8JJCgnI2ltYWdlX2NvbnRyb2wn KS5wcmVwZW5kKGltYWdlX3VwbG9hZF9saW5rKTsgLy8gaW5zZXJ0IGxpbmsKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAkKCcudHhwLWNvbnRyb2wtcGFuZWwnKS5wcmVwZW5kKGltYWdl X3VwbG9hZF9saW5rKTsgLy8gaW5zZXJ0IGxpbmsKCQkJfQoJCQkkKCdib2R5JykuZGVsZWdhdGUo Jy5hYmwtZHJvcGxvYWRlci1vcGVuJywgJ2NsaWNrLmRyb3Bsb2FkZXInLCBmdW5jdGlvbihlKSB7 CgkJCQkkKCcudXBsb2FkLWZvcm0nKQoJCQkJCS5hYmxEcm9wTG9hZGVyQXBwKCdpbml0JywgZHJv cGxvYWRlcl9vcHRpb25zKQoJCQkJCS5hYmxEcm9wTG9hZGVyQXBwKCdvcGVuJyk7CgkJCQlyZXR1 cm4gZmFsc2U7CgkJCX0pOwoJCX0KCgl9Cgp9KTsK'; $resources['/res/js/jquery.droploader.js'] = 'H4sIAAAAAAAAA7Ua23LbtvJZ/grEJy2pRKaVzpwXO+5MTprMyUySpon7cKbpaGARkpiQBAeE fDmq/r27iwsBkXKUZuIHSVxgL9gbdpdOF+t6rgtZpw/HbHN0NLrmiuViwdelbtkFgEajRVGK XMnmjJ5GDVe8qnklzljSFPNkgsCK3+K29ow9mUaA4v+w7ycCrVUJKEiplDwXKmtWjcFe8LK8 4vPPsyKHHYj3qm7W2izmXHNgvaWHlUDMFp/hkWBFxZdiNudaLKUqRDtrRSnmGggRvpFcVI2+ w8crsZBKvODz1RnzZ4ejMyX0WtVMq7U4Z0SYL7RQz8oywBZKSRU8r+koHzRXWuQ9+MuiLtpV tNAouVSibX9v4FjRSvlkWlsNF/VCzrS4xTP8AuIz0iRbCSWeXil2+rP5/FhLxeZlMf/MtGTm 1GarURwIOyvqa14W+QzB+q5Bmz3ndS01MyKyzQaX0JzbbcZ+rcs7RgptGVeCgV3kjchZ+qlZ TtinRsDnslhMWFMvxw86NldK3rRCzYDwrF03jTT6SP4n14rZRZZLoIqs7Q7238s3r/9NEltp 2oCklnJW8fpuZv0quZSSIcAc8QF7VwreCnfuzcZ53HbLuGaVbHVADVeIZMnVErUQntuoE1YZ rVo0OLvhPTPC0YE2G/cwc8zkwipxLte1BoCxltuXGWq17BO7RIuSnjcb8iwkZ35k7K20hG5o 1w65VlbiKwn+E9Exxo5G23ObGIyugZrNDDdFvhTgpXpVtBP/bKK4i3OSGKKuOmP1uixdUF7J 2w5gKDtbD0Fn85K36AcGeNI5OoZLh0PB4/aak5wgLDHhJ64LcTMzLt4hxXCPXlTLE7uUhNF7 xVWI64EekYQ7cSuEW8EPIB6duoN5TAs6AVgSal7zKB+Twc7YtEs26ABTn6OA1JTQnd0WuCQb 3YYYRrNA9o8/SZx2aR5ie0MqqpoS0hWsJU/z4pqRsBfHoSWOIR0l7DH6Jv0lT5ufn542PWjb 8JoV+cUxvypPOh85mZeyFceAghtirOTpKTBFmJPLmWufYHa9L1Owh0yNat7dBdvA7pRfY2Qn xf0UndEHyEYSul3DZPvASAtHo4fZos46/YEG/G0GVoav1tzno2LBUozPDCIznY6zWubiLaQ9 dgFKe/nr+zfJ2Nw6p48Y3BbyM6R7WTMTrzeKNzYdnCCEPTqlCwpoWi6Zj3n2ACiuaygeilrk lihtfZgm/4KTsB7KOIMUvNQrlGXqMEYkLXKGuzc1WkOHGaQAsOQYbJWMzwl5S5/o76CR/Xxp M6TGEi6Qvpw+zX2DpAM0DpJ1iLeR9iiWODZXYKOTuaw1Bxsoay3LAYU9Nwl91HEhqxJ7/JVM KFcQx3hPtipykY7PnUtZnYI+wI3Ak4V2fkQPqRHaFlVI07CO6JoTfsFQR3RUILlumEXgdc5c Ucqacr0sanNUzG9ILoPaSdR5CkWjL2YnnWonjhEJiUiZvZCMLCtdlcZIeNIHgXSgC8s3C2rW cQbh3KRJBXyKphTJ2KriAEyutQowJyyg4lVmnTPztPoX45CDGrZoPCpl0510bkz0BbrotKxx fpGhalKwwSVoOCUUrFszX7FOsOqmInp8OHlM+Y4DxcQ+NnRJjO0eozldaFLbns0zWj9MFndG 3jToPLRrT3MxdoHUI2U86AA23rNX8sbUwGYr+CXLC17KpfFpoHYl87tknOWwvgRJvkQ+oZ4g Cwuw7nIQh7smkbGBLLJWy+ZVVQmQTYt3sJmDLNQ8hZEOBFpByvEH3B+qLuo8/5RurLDDjMXz CxOgfMqg3GX4hHWsht8PZy9fvX7xgYlaq7u4K43pOHi/Ux3eB0tdBxtvAVC/hd2r1LiHjbdZ 8IRUYLrWntWi5EqlEMl37q8wkWlsYXRmnHHwSh45R403GyIjqjQzX2NiYYGrNr3Ym8vcQ4Yh 9ueXitftAm6ciCH78UcWrx8oVh/l64Xbd1boh9diL7kn4dVM9jF3jksKURHn46frOeiOv69I 9Di9tsGh3l8mfrEK9Qx2mwtD/3D8oZ7oPhoOaJ3TK2Y3I3bKCooNuz/muYs5JNEQDa/YPoEd nfexO63tIu/qM8KFbNQKLEuwAEP3ZVrKI18jEgTp+St5DKlbQZqH1PJMKX6X7jkCeCe6nQfB PQAeqVdpMv3BqRqvkDdGujSJ9E9J1V70vRSN4zPKavEQyyedYkLRNWEQXS5IkdUrVH+KSyGr iEqMGzIbnL8RLZ/hSEqi2W0O2FlCvUlaX263xZF+SHYwpPbq1QHQ1X9IhqxiOQ7w6Wu1GwH2 xQOUBopQ+KULvFcXC69lykuuS3/8+Pxw8ZMn084xIgye58/Rb9Mkl7VIgjukEWoOdyZYFXz0 DderTEE6zNM0jQXB9oQAZsQwZo8YcBuzU7aTSL/WlwMBQq3HY4qsWber1CnNVmauOwp90On8 Xk2HprJT3e62Vcpg7jSxGc4sFsWtyE8aidJHJXcvvEahspwRv6e+25tCQ6jAbn+nznFEmvzH TGDfSv3BDWeTM5u6cehjVNsvofeOdm1B3YUrZTk3ME/96pUS/PN5KMqllG94ffeSpneHyhDP gidsw75U2bHtPxcRZQMxX2O9cLCI8YAZRXTz5TP6lVGhGkj1rcERS2673LPvQTwohsgRg/jo Cs/QUb3fekeGCNl1Weeh91lnGwRp9zYmfG1jRyj6EuJarnV6jGF6PFiXHcOhlajkNY4xjicY StN9B4imPPeZvv+SAE3vRrAhzQmL09nZjo6MRu1cd7cw7fwG8wcObEioT7KooSSl1xfedGE1 UDlFRjVxd9zQQFP2119sVwv7rBYoxfFn2UAT3nvtsU89wRFjYQ/lNPBG5DubYrvPIh+0Kupl tlCyer7i6rnMRfpk6vF4KZTuTNOrenwUxFK6MWDXXLtAYMat35nyOPUd/kDRHISAGy5Bi05d ZThdw0MXrS7mrenWA07Uf/oZwlBZH/MYaLKmAbzzwAjsPNACB15YEDx4Y9GdhiYq9tg4Gijl nJdmxBIfZqeYNcOH4P0CVey77xrGE5MyKnN9gw6KaplMHI6xDFFRwk7mayCFl8p7AtghqqFg 0jA2nlNzUgNdiWK50g5s5iv0ylzW9Nb2IhwNbDqB7FCsVXOQyLe8YDS4G6z/ROTw61n7CxSJ v79/HdTY9jC2672Ug65kKAU1ZqiEHXOQPRm+r5agRkHqtw3VjlFcZJtpInXrELB1+dOVMifF 7GXA/WmDh7PEjaPxzSMiKDMWYkVtd/lcZmy1FLeNtdV7sXxx26TJZoPebdDgdtxucTy7LHym RRFxsA5foEnwjrlIDSEn+B+E/Gd0nbkz0JFofk7jUivNEM3Tjx/r0yXwjjJ9lCbvQ7s3HW2P gjsYsL/BctHFY76dHu633NgTvPDm3yFgZ8ok8k43bobF9jnyPPrvBTZfcWgIajtODd5IZIIa S19NbFx2O2eYYImMPxz9nwYmPoBux+mn39ZC3cGuvwGl0JW/QSMAAA=='; $resources['/res/js/jquery.filedrop.js'] = 'H4sIAAAAAAAAA80a/VPbRvZn81e8uplYLkY2adPLwTl3JJAJd5CmgbR3kzLMIq1tBVlSVyvA l/K/33v7pZUlEpK2M8dMG3v37dv3/bUef7MB38A+n7EqlSD5jYQteP9jxcUKirSaJxnMcgEL uUwfQyzYHFfmMEtSXsJM5EuIeXkp8wJkDhcivy65QISEc6+Si1zswM88uUngPzwz6wdLlqQ7 8O5FIkqZsSU/e3fEzKd/zGkzjPKlAX6eFyuRzBcSgmgIjybbE3jDy7zI07SSSW5xHiURz0oe Q5XFXIBccDg+PIVUL+8QCCAPstgZj6+vr8O8wPW8EhEPczEfG7hyvEzklvkSFovCYH8t8vc8 krDIlx245olcVBdE8/iaWF3xbPz+VxLgFokpFrnF8xMXJdK8AzAJt8OJWX3BmawELw1m/NtL UxQklDyLSdj5DFAtgkHBBApJIha4xkuVFkJ36udcXJoNFC2f5Tfwbfj9ptt/UdE1W0hnkSYs kxr05enx0WMoCx5BcJ2kKVwjGr31M7+4TKTVagksi+Hw4K9Dwvi2ZHMti94J5/DmYG//+ACY hMKTVYEwmsnxxm4wq7KIVBY8GMKHjY2eNrKQX/FMhnisKMOiKhdBP2aSnQqWlTMu+sNdBL1i Au1Mmeh5XsgSpoih15uxNL1g0eV5Eu/AYDDCpUqk9iOKAKW62IHtyWRCC0p8ZGYIUSFHJD4F uWQ3yqB34NHjEdR/4zEczrNcoF0lM0CVVlwbfkLKkfAUJt7p5L+IeHvknz5+pnQEtIfGiNaF 8DWeHZiMGrcdsxvjWheoP8H1nWQDATlhysScw1WeVksOVZHmLC6HFuM1SyQyMJk0KPiRtoD2 QCZ4CvmYVWmKh8ZjRmbGY7pQrgoi590gWaLOxu+L+WBkPhdZ/XmezAZnI4XYnQKDBi5W6K2Z RG1uneJGCOjphVwBE4KtYMlRoZDlgDqRIlGWUCIZ6vSrPPvnyQ+v0LOLnPwVULMlJ9WQLezA h1v6vOAMnbu0X8mxdoDTHformx/g9WJt7Yer1tIRZ1fcX8uj1sk8Wj+YR+vntJIOWLTwFtkM MaEHe0uCa6tzC1wIiozOI/D7SEl0BMlQmTagWLmQtIMe0OspjrXKTyQTksceOr3+IsmSctHY QK+ao7zLtwXKsbGDDs/j5rK9RRFHLvau/0y7/qtcnlRFkdO1/RH0T/P8mGWrF2Sp9J0+4NoR maf7jiaA5/a0cfTPjAjPU5LhOdkislxi4jhPc8we01rlygHOo7zCEDWFiVuiD0l5rpkln/DO lDydUaB4EM6y0EZdArASxqhBBqeFS+HEhJEHIYZWjLMB2lQjxIzAHiG86gIEl4uk3FUaRT5K fkCxqwyUhi6SLDbfCUofexAMvh7Aprot9MLVMCTwYBAtWDbnjuLByLMJTWsPPTbw2R6iB2Eg zzTzdHNPYafzeEgt6BgyBR5K0olUF5T1lpOu+hamPJvLhdpeE7AUlb5CL2pOe5gbhQrbpmww y13KURvrBN9q4VhWwRMdynWJHwzv5psRFnHoi4r+ofDX6zkADFLkyE0oExdaoPlVG5KcvgWo bHYdUgUDzfiDAC27UnTfRWoe7d+PWhOKPk2sDlD3oNXELR1GGnJfs2It87tNtsq6jbYtBAu5 DkNedNdmkzRjzX+EC/jlhOcIhNQATaeQYVKE336DeoUqyVmS8dgQoa9QwTHQIfLd5Ezf1TJw ZOb/xdUaUuVZlMf8vJKzJwFmYcOZOVNlvIxYwQMN9fbN4XMsFfMML1fAHVrC0PKsSlLMykqU lOV0HiOZj2CZ0PcLFEDMxMrcpmo5Vi7oPyR9sLWlarBeLxIqxA5+Eb9kZulCI6fVgQoZSmta 13iD1QyhVMWdjujqowcVlljwymD8cGzUhUEfc3agj3gh1+IzCBNhIr5FMB2P4JHBgfUTQRHL CBVzI7KAjtWGYaCuWNoG2nZAXYhq2a9h7MC3Brt9FgpepCziwfiXzfEcC7YBDIYWgRXq5tTp ob1jldbeITW1Vwe29NtPsIYrE6n6HCyPllukg13F37RPgUVxugmD/uC+yLtXfWNGgXSwV5+7 HRq33PiIAO5ivwvjl7GubNK1IZ4QfHS7YH1JH/L5tDvD7rOavLvoo5IMWx88So55H9Y68Vn/ vhfw5wr4LnhHnQlWZmtXlcrNoGSL3kb64CbykqtUkl2kvBE8uMCeX2I+Rrc6ZnIRCqIvoGMY ZLG5+Ya6yCGMqaTKpbM2Qq0iRFQJrPLla3M3fDX1kOp+l/46YX1QY8TaUJrVu74IUye/Gemw pDuGLpy6wDLc8ZQVNBvBLMevYR9xBcMQQ/cpWkHgh5U4mc1okdKmObPVQK9aD3OAWHcHnk61 bZue2wVShxZvZSobG3kavCUh3LfGZOBVb0LxzZ4bO8p2qfX81zMSGHbgUZ7F5py63W9q7pKW grFM95pEeAQ2AHzua9kYkNsN9/9bmyCRSN3LxjQWY5lp1n0rtVnemEarE6rT3VeqcvjSKgRJ waZfZ8P1hl/NW+DhQ+je1R4z/GCw9DCkBaQfgjgkwa5XNW5ja2vXHFM8GBbeuf2zkG6geusB qmiPBgRBJ8iom7Qh/A0m9gaadHTJ5VstFw3Rg7Z81E4tJfdBZwnLabmPqdU2oqaoe8NpxqWM dFIryq/3nmrC7WzICdkbIlGROblbrdsfUeuGqixoaosFqh4SlWRpS5ZRDNO2RYEwwlhgmaHB nh4HYWt/tmuXDRQWkh2bMfLuL5uL9+IYsCoVK3QPLEDxZpq4ugtU8ZsLUNaSKCHhP38DT0C4 sLlpmXcH9QAwGTbZfMlT8nfnOngdJkEM4VijVSWn+WjNBO3SuMucJTKSzO5rURGImoJyyZ0U FCZvYEATiryyjSh2Lipc4kpgcI3AgvhqalL+2lzrIsAIOxeMJmVyxdfk79/t8kXD20xIJ0tz 0WK9E1IQePHzBY8uic+Sq5kfE5zEoNlfYjnhUK1b5VOYkLGuWYXxcBfn6wMu1BtClCA9rKQL I6FbjJwo5A+2MoZTdsmRP1FK0IaUz2Z6/vyrNSPtcDbaOEPBoGfCb207VKRjyTsZwbZLf8ZW URCehXjI19lU9udutHRrZFKsLO0kuHr41wpdQ0r/SiN1IrQBwrAynfreYNXoZ0Ghpp0madNE 7Y1aCIYjA0SD53NCcq7Gy1OsUL578vgv32Ot0og9uGnF0dNIdVo00dvYVpPKRiBW6J9C47qa sY7Q9ehMd4E+lhGsi7Vn8uQyv+L6KclTTFs1KG0tbOslWPNXmCAu+cojRnGgdpyM9Z0tizbm gse1wZjzt/XHRqjf3HTrxtJdw96zRYCTb56pKiKjBEGvOLvNbfpnr3yWZFgAn0iBJLVNyKqs 6TR30GRqEIiYjBaghsaem90h4i8S8O8TrxPuR6qYdr6zDkjPMRgfOJSSHqoW7ErnHHLvOB+5 kFaHBBu16jxrubZ173hckMxUvwaHZYmMff3dNtghPoZiTIEDCaLK4HrBM3rt0IGSQqowiugI b86TdPnQcHesfht6rMVb39vQrKHSE8btritSSm1nzcFxO30gSBBQ9ZTPsK0pRXRgR62kyb4b d/WH8Hc3OIYdaMDqyOHUcZIvOWXBUuV/HVUSeuWRwKREY+KxKQ7sCTXLgvyCGA8xrCHp9MS4 Uk9kIbxkmLZIFWUleOg06ubYJnB1TOd66zA0nFKMP1udIO6g2bjd1hK6Wdgo++/jo5dSFm84 ekkpXaQ15dSUIEOTx+vcZIvgd00CzgyIpaa5azZV56EeQ+5ozgyc7Zb1vIz+llUqkwJP05zB blNrH1g0HVhsz+xYR9hXeu6kn6iUxYZqwLDrgJaaPLVF9lM3vsqYaiRkRqUKZ32nlXqC580K zYlRLRRsGpGh1sSwq27oxOjovjdOLQStTWcySZ0LzY6n4cZ6nF9n7jHO9My1Nhuga93jx6G8 ocCkse83qc0dFuvHk6OklDxDYfTt4KA/csOQkalHjPLJkuk3EEH/9Q8np33TZlUiHam0ZoRE UFj4Gn94qeuPQWTGSaT+wQgGzhTH3szLintKNunJ3sYBqsrMe65aMiNZRYZZ9wazlyO4cibV SZWCqGd9HvmZS7WBMR27r3n231QDMy/QowK/QPPllplw0J4bk1cQiDAP2af8RjZnIVl+/XFX xzoTv+4nM5qFE/SWZzEORtu2LStcEmNRxAuJx7Itek8HS4eXvOt+eu3R3SuivErX3QWm8m++ NTcFZn7RgbZQckLdloVumog7r+JyZcvwi279MEAByaoc7MD6fbed99marVlZ/dl83jaV5ddz VCJQLecgGiVbd+fyhfXx7yyPnW/5rRUNCXzK3NCg3U6ttxmfVRy1qyMnVEJo9Td1vZc/VPOq dVMta2pcr36YJTJBn1SljCdzOr/RaxSOGx3vYH6p4TVInzMGqZuvxDRdyEqj2TKlcWJzmP2f e8EzRVH7pc7kd/124L/6mbFtvds+u9bpdpxfh2jj8Arq1ummWtffgc3rvYsOUcqZsLOYtV+U fPTN1DwR1/i6b6NX9T/qMv1Gb5+kHQHeYvt+9Vj/GQQ4rPagIYuMH6uJgs2ZTlId1+lfJbjL PsFL44KPPzTbnzH8cYL0lfbpy/88JX7y6qb+1q5T8wA3SWwVEJ2SxiT2aDIx6tNhq37Qpx9u 0XEiw6ZtiiPNVoaekrD7oV/l+QWRP3a61wG/6KE6r/4NQR0sVpL/RAkmuLFcGZHdhNGCied5 zPdkgA35Q5jczGbuoUL/KkvEVPqqFwGPhiUrwgiLFnvpqL5m6GbVVfKEmdrqbZLJJ/pZgTBq GP3WQ7/1IsjwoprNjP5JrH4RgsK8HQY6yyPA/wBgnJmDIy0AAA=='; } foreach($resources as $file => $resource) { $newfile = $path . $file; if (is_array($resource)) { abl_droploader_install($event, $step, $resource, $newfile . '/'); } else { $ok = is_dir(dirname($newfile)); if (!$ok) { $ok = mkdir(dirname($newfile), 0755, true); } if ($ok) { $temp = base64_decode($resource); if (strncmp($temp, "\x1F\x8B", 2) === 0) { $temp = gzinflate(substr($temp, 10)); } if (file_exists($newfile)) unlink($newfile); $handle = fopen($newfile, 'w'); if ($handle !== false) { fwrite($handle, $temp); chmod($newfile, 0644); fclose($handle); } else { $state = E_ERROR; error_log('abl_droploader: ERROR: Creating file \'' . $newfile . '\' failed.'); } } else { $state = E_ERROR; error_log('abl_droploader: ERROR: Creating directory \'' . dirname($newfile) . '\' failed.'); } } } return $state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_assets() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/js/' . $script);\n }\n }\n }", "function mk_resources() {\t\t\n\twp_enqueue_style('style', get_stylesheet_uri());\n\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-3.1.1.min.js', array(), '20120206', true );\n\twp_enqueue_script( 'custom-script', get_template_directory_uri() . '/js/script.js', array( 'jquery'), '1.1', true );\n}", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function plugin_assets() {\n\t\twp_register_script( 'lightbox', plugins_url( 'js/lightbox.js' , __FILE__ ), array( 'jquery' ) );\n\t\twp_enqueue_script( 'lightbox' );\n\n\t\twp_register_style( 'lightbox', plugins_url( 'css/style.css' , __FILE__ ), '', '', 'screen' );\n\t\twp_enqueue_style( 'lightbox' );\n\t}", "public function dt_testimonial_simple_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n }", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "public function load_assets() {\n\t\twponion_load_core_assets( $this->option( 'assets' ) );\n\t}", "public function initAssets()\n {\n add_action(\n \"admin_enqueue_scripts\",\n array($this, 'PluginScripts')\n );\n\n add_action(\n \"admin_enqueue_scripts\",\n array($this, 'PluginStyles')\n );\n }", "function dw_schemas_add_assets() {\n\twp_enqueue_script('schemas-admin-js', '/wp-content/plugins/dw_schemas/assets/scripts.js');\n\twp_enqueue_style('schemas-admin-css', '/wp-content/plugins/dw_schemas/assets/styles.css');\n}", "function my_plugin_assets() {\n\n wp_register_style( 'slider_styleCss', plugins_url( '/css/splide.min.css' , __FILE__ ), array(), '1.0', 'all' );\n wp_enqueue_style( 'slider_styleCss' );\n // custome style\n wp_register_style( 'styleCss', plugins_url( '/css/style.css' , __FILE__ ), array(), '1.0', 'all' );\n wp_enqueue_style( 'styleCss' ); \n\n wp_register_script( 'slider_script', plugins_url( '/js/splide.min.js' , __FILE__ ), array(), '1.0', false );\n wp_enqueue_script( 'slider_script' );\n // customescript\n wp_register_script( 'script', plugins_url( '/js/script.js' , __FILE__ ), array(), '1.0', false );\n wp_enqueue_script( 'script' );\n}", "public function myScripts()\n {\n //wp_register_script('angularjs',plugins_url('bower_components/angular/angular.min.js', __FILE__));\n wp_enqueue_style('grimagecss', plugins_url('style.css', __FILE__));\n //wp_enqueue_script('grimagescripts',plugins_url('/app.js',__FILE__));\n }", "protected function addAssets(): void\n {\n $this->enqueue('assets/dashifen-2022.js');\n $font1 = $this->enqueue('//fonts.googleapis.com/css2?family=El+Messiri&display=swap');\n $font2 = $this->enqueue('//fonts.googleapis.com/css2?family=Roboto&display=swap');\n $css = $this->enqueue('assets/dashifen-2022.css', [$font1, $font2]);\n \n $dir = trailingslashit($this->getStylesheetDir());\n if (file_exists($dir . 'assets/dashifen-2022-components.css')) {\n $this->enqueue('assets/dashifen-2022-components.css', [$css]);\n }\n }", "public function register_assets_admin() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/admin/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/admin/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/admin/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/admin/js/' . $script);\n }\n }\n }", "function petrica_custom_wp_admin_style_and_js_scripts() {\n wp_register_style( 'custom_wp_admin_css', plugin_dir_url(dirname( __FILE__ )) . 'css/style.css', false, '1.0.0' );\n wp_enqueue_style( 'custom_wp_admin_css' );\n wp_enqueue_script( 'script-name', plugin_dir_url(dirname( __FILE__ )) . '/js/petrica-plugin.js', array(), '1.0.0', true );\n }", "public function dt_icon_list_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }", "function plugin_stater_reg_scripts() {\r\n\t// we are telling WP that we depend on jQuery\r\n\twp_register_script( CH_PLUGIN_NAME , plugins_url( '/js/app.js', __FILE__ ), array( 'jquery' ) );\r\n\twp_enqueue_script ( CH_PLUGIN_NAME );\r\n\twp_enqueue_style ( CH_PLUGIN_NAME , plugins_url( '/css/app.css', __FILE__ ) );\r\n}", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "function wm_customizer_panel_enqueue_assets() {\n $ctime = filemtime( get_template_directory() . '/customizer/css/wm-customizer-panel.css' );\n wp_enqueue_style( 'wm-customizer-panel-css', get_template_directory_uri() . '/customizer/css/wm-customizer-panel.css', array( 'customize-controls' ), $ctime );\n $ctime = filemtime( get_template_directory() . '/customizer/js/wm-customizer-panel.js' );\n wp_enqueue_script( 'wm-customizer-panel-js', get_template_directory_uri() . '/customizer/js/wm-customizer-panel.js', array( 'jquery', 'customize-controls' ), $ctime, true );\n }", "public function addRessources()\n {\n // $this->context->controller->addCss(($this->_path . '/views/css/tab.css'), 'all');\n // $this->context->controller->addJquery();\n // $this->context->controller->addJS(($this->_path . '/views/js/script.js'));\n // $this->context->controller->addJS(($this->_path . '/views/js/configuration.js'));\n }", "function wiki_api_import_css() {\n\twp_enqueue_style('style-name', get_stylesheet_uri());\n\twp_enqueue_script('script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true);\n}", "public function loadConfigAssets()\r\n {\r\n $this->app->document->addScript('elements:imagebox/assets/js/myimage.js');\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/editoption.css');\r\n $this->app->document->addScript('elements:imagebox/assets/js/myoption.js');\r\n $this->app->document->addStylesheet('elements:option/option.css');\r\n }", "function csu_hcfw_resources_load_scripts() {\n\twp_enqueue_style( 'csu-hcfw-resources-styles', plugin_dir_url( __FILE__ ) . 'includes/css/styles.css' );\n}", "function theme_files() {\n \n wp_register_style('style', get_template_directory_uri() . '/dist/app.css', [], 1, 'all');\n wp_enqueue_style('style');\n\n wp_enqueue_script('jquery');\n\n wp_register_script('app', get_template_directory_uri() . '/dist/app.js', ['jquery'], 1, true);\n wp_enqueue_script('app');\n}", "private function registerPlugins()\n\t{\n\t\t$assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$assetUrl = Yii::app()->assetManager->publish($assetDir);\n\n\n\t\t$cs = Yii::app()->getClientScript();\n\n\t\tforeach ($this->plugins as $p)\n\t\t{\n\n\t\t\tif ($p['flag'])\n\t\t\t{\n\t\t\t\tforeach ($p['js'] as $js)\n\t\t\t\t\t$cs->registerScriptFile($assetUrl . \"/\" . $js, CClientScript::POS_END);\n\t\t\t}\n\t\t}\n\t}", "function plugin_post_new_scripts() {\r\n\t// Register & enqueue our admin.js file along with its dependancies\r\n\t\t\twp_register_script('framework', $this->plugin_url .'framework.js', array('jquery','media-upload','thickbox','editor'));\r\n\t\t\twp_enqueue_script('framework');\r\n\t\t\twp_enqueue_script('farbtastic'); \r\n\t\t\twp_enqueue_script('suggest'); // Allow Jquery Chosen\r\n\t\t\t\r\n\t\t}", "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "private function setup_assets() {\n\t\t$this->prefix = sanitize_title($this->theme_name) . '-';\n\t\t$public_lib = '/lib/pub/';\n\t\t$source_lib = '/lib/src/';\n\n\t\t//IF WP DEBUG Is ON, load source maps and assets\n\t\tif (constant(\"WP_DEBUG\") === true) {\n\t\t\t//Style Resources\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles',\n\t\t\t\t'path' => $source_lib . 'css/master.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\t\t\t\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'scss',\n\t\t\t\t'path' => $source_lib . 'scss/master.scss',\n\t\t\t\t'deps' => array( $this->prefix . 'styles')\n\t\t\t);\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'css-map',\n\t\t\t\t'path' => $source_lib . 'maps/master.css.map',\n\t\t\t\t'deps' => array( $this->prefix . 'styles', $this->prefix . 'scss')\n\t\t\t);\n\t\t\n\t\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'plugins',\n\t\t\t\t'path' => $source_lib . 'js/plugins.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'the-script',\n\t\t\t\t'path' => $source_lib . 'js/script.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\n\n\t\t\t// $this->scripts[] = array(\n\t\t\t// \t'slug' => $this->prefix . 'script-map',\n\t\t\t// \t'path' => $source_lib . 'maps/scripts.js.map',\n\t\t\t// \t'deps' => array(\n\t\t\t// \t\t'jquery',\n\t\t\t// \t\t$this->prefix . 'script'\n\t\t\t// \t)\n\t\t\t// );\n\t\n\t\t// Otherwise load only minified assets\n\t\t} else {\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles-min',\n\t\t\t\t'path' => $public_lib . 'css/master.min.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t\t'slug' => $this->prefix . 'scripts-min',\n\t\t\t\t\t'path' => $public_lib . 'js/master.min.js',\n\t\t\t\t\t'deps' => array(\n\t\t\t\t\t\t'jquery'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t\t$this->add_wp_script('jquery');\n\t\t\n\t\tadd_action('wp_enqueue_scripts', array( $this, 'theme_assets_handler' ));\n\t}", "function enqueue(){\n wp_enqueue_style('mypluginstyle',PLUGIN_URL.'assets/mystyle.css');\n // enqueue CSS define where the scripts\n wp_enqueue_script('mypluginscript',PLUGIN_URL.'assets/myscript.js');\n }", "public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}", "function register_css() {\n $myStyleUrl = plugins_url(__WP_PLUGIN__.'.css', __FILE__); \n wp_register_style(__WP_PLUGIN__, $myStyleUrl);\n wp_enqueue_style(__WP_PLUGIN__);\n }", "public function addAdminAssets() {\n\t\twp_enqueue_script( 'csframework-admin-upload' );\n\t}", "public function load_assets() {\n\t\t\t//only load styles and js when needed\n\t\t\tif ( $this->is_edit_page() ) {\n\t\t\t\t//styles\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_style( 'wm-options-panel-white-label' );\n\t\t\t\tif ( ! wm_option( 'branding-panel-logo' ) && ! wm_option( 'branding-panel-no-logo' ) )\n\t\t\t\t\twp_enqueue_style( 'wm-options-panel-branded' );\n\t\t\t\twp_enqueue_style( 'color-picker' );\n\n\t\t\t\t//scripts\n\t\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'wm-options-panel' );\n\t\t\t\twp_enqueue_script( 'color-picker' );\n\t\t\t}\n\t\t}", "public function enqueue_plugin_scripts(){\n\t\twp_enqueue_script( 'agenda-plugin-local-js', plugins_url('js/scripts.js', __FILE__ ), array('jquery'), false, true );\n\t\twp_enqueue_style( 'agenda-plugin-local-css', plugins_url('css/styles.css', __FILE__ ) );\n\t}", "function addcss()\n{\nwp_register_style('ahmed_css', plugin_dir_url(__file__).'/styles-ahmed.css');\nwp_enqueue_style('ahmed_css');\n}", "function montheme_register_assets()\n{\n\t//enregistre le style et le script\n\twp_register_style('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css');\n\twp_register_style('style-css', get_stylesheet_uri());\n\twp_register_script('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', [], false, true); //[] =pas de dependance, false = pas de numero de version et true = script chargé dans le footer\n\t//permet d'utiliser le style et le script\n\twp_enqueue_style('bootstrap');\n\twp_enqueue_style('style-css');\n\twp_enqueue_script('bootstrap');\n}", "public function register_assets() {\n\n\t\tforeach ( $this->assets as $asset ) {\n\t\t\t$js_path = $this->plugin->dir() . '/js/dist/' . $asset . '.asset.php';\n\t\t\t$css_path = $this->plugin->dir() . '/css/' . $asset . '.css';\n\t\t\tif ( file_exists( $js_path ) ) {\n\t\t\t\t$assets_dep = require_once $js_path;\n\t\t\t\twp_register_script(\n\t\t\t\t\t'formation-' . $asset . '-js',\n\t\t\t\t\t$this->plugin->asset_url( 'js/dist/' . $asset . '.js' ),\n\t\t\t\t\t$assets_dep['dependencies'],\n\t\t\t\t\t$assets_dep['version'],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tif ( file_exists( $css_path ) ) {\n\t\t\t\t\twp_register_style(\n\t\t\t\t\t\t'formation-' . $asset . '-css',\n\t\t\t\t\t\t$this->plugin->asset_url( 'css/' . $asset . '.css' ),\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t$assets_dep['version']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function stock_toolkit_files(){\n\twp_enqueue_style('owl-carousel', plugin_dir_url( __FILE__ ) . 'assets/css/owl.carousel.min.css');\n\twp_enqueue_style('stock-toolkit-css', plugin_dir_url( __FILE__ ) . 'assets/css/stock-toolkit.css');\n\twp_enqueue_script('owl-carousel', plugin_dir_url( __FILE__ ) . 'assets/js/owl.carousel.min.js', array('jquery'), '1.8', true) ;\n}", "function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}", "function chroma_load_custom_market_css()\n{\n \n wp_enqueue_style (\n 'chroma_market_css',\n plugin_dir_url(__DIR__) . '/css/market.css'\n );\n\n \n wp_enqueue_script (\n 'chroma_market_js',\n plugin_dir_url(__DIR__) . '/js/market.js'\n );\n\n\n\n\n}", "function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}", "function add_qoorate_stylesheet(){\n\t\t// TODO: make call to get styles from QOORATE\n\t\t// MAYBE TODO: cacheing ... place in DB options?\n\t\t\n\t\t//$styleUrl = plugins_url('/css/guthrie.css', __FILE__);\n\t\t//$styleFile = WP_PLUGIN_DIR . '/guthrie/css/guthrie.css';\n\t\t//if ( file_exists($styleFile) ) {\n\t\t//\t\t//echo($styleUrl.\"<br />\");\n\t\t//\t\twp_register_style('guthrie', $styleUrl);\n\t\t//\t\twp_enqueue_style('guthrie');\n\t\t//}\n\t\t// unregister our really old jquery bundled with WP\n\t\t// Maybe we can keep it? should it be an option?\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' );\n\t\twp_enqueue_script( 'jquery' );\n\t}", "public function registerScripts()\n {\n // font awesome. choose css fonts instead of svg, see more at https://fontawesome.com/how-to-use/on-the-web/other-topics/performance\n // to name font awesome handle as `plugin-name-prefix-font-awesome5` is to prevent conflict with other plugins that maybe use older version but same handle that cause some newer icons in this plugin disappears.\n wp_enqueue_style('rundizable-wp-features-font-awesome5', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/fontawesome/css/all.min.css', [], '5.5.0');\n wp_enqueue_style('rundizable-wp-features-rd-settings-tabs-css', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/css/rd-settings-tabs.css', [], RUNDIZABLEWPFEATURES_VERSION);\n wp_enqueue_script('rundizable-wp-features-rd-settings-tabs-js', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/js/rd-settings-tabs.js', ['jquery'], RUNDIZABLEWPFEATURES_VERSION, true);\n }", "public function onLoad() {\n\t\t$this->plugin->wrapper = $this->plugin->factory->wrapper;\n\t\twp_enqueue_style( 'clrchs-admin', $this->plugin->wrapper->getURL('assets/admin.css'), [], $this->plugin->version);\n\t}", "function mightyResources() {\n $css_file = get_stylesheet_directory() . '/dist/assets/css/style.min.css';\n wp_enqueue_style('theme', get_stylesheet_directory_uri() . '/dist/assets/css/style.min.css', '', date('m.d.Y.H.i.s', filemtime($css_file)));\n\t\twp_dequeue_style('wp-block-library');\n\n wp_deregister_script('jquery');\n wp_register_script('jquery', ('//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js'), '', '2.2.4', false);\n wp_enqueue_script('jquery');\n\n // wp_enqueue_script('fontawesome-kit', '//kit.fontawesome.com/72e34829c8.js', '', '1.0', false);\n\t\twp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?key=AIzaSyClqC80DXd3luWXcJZ-a0odx1q6ddTDVr0', '', '1.0', false);\n\n\t\twp_enqueue_script('aos', '//unpkg.com/[email protected]/dist/aos.js', '', '2.3.1', true);\n wp_enqueue_script('theme', get_stylesheet_directory_uri() . '/dist/assets/js/scripts.min.js', ['jquery'], '1.0.6', true);\n\n\t\twp_localize_script('theme', 'globalVar', array(\n\t\t 'themePath' => get_template_directory_uri(),\n\t\t));\n }", "function cap_vc_extend_js_css() {\n //wp_enqueue_style( 'cap_vc_extend_style' );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'cap_vc_extend_js', plugins_url('cap_vc_extend.js', __FILE__), array('jquery') );\n}", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "function ARTEMIS_SWP_plugin_load_admin_scripts_and_styles() {\r\n\t/*generic admin css*/\r\n\twp_register_style( 'js_backend_css', plugins_url('/css/backend_style.css', __FILE__));\r\n\twp_enqueue_style( 'js_backend_css');\r\n\t\r\n\t/*alpha color picker*/\r\n\twp_register_script( 'alpha_color_picker', plugins_url('/js/alpha-color-picker.js', __FILE__), array('jquery', 'wp-color-picker'), '', true);\r\n\twp_enqueue_script( 'alpha_color_picker');\r\n\twp_enqueue_style( 'alpha_color_picker', plugins_url('/css/alpha-color-picker.css', __FILE__ ), array('wp-color-picker'));\r\n\r\n\t/*vc helper*/\r\n\twp_register_script( 'artemis_vc_helper', plugins_url('/js/artemis_vc_helper.js', __FILE__), array('jquery', 'wp-color-picker'), '', true);\r\n\twp_enqueue_script( 'artemis_vc_helper');\r\n}", "public function tiny_assets() {\n wp_enqueue_style( 'tiny-slider-css', '//cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.3/tiny-slider.css', null, 1.0 );\n wp_enqueue_script( 'tiny-slider-js', '//cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.2/min/tiny-slider.js', null, '1.0',true );\n wp_enqueue_script( 'tiny-slider-main-js', plugin_dir_url( __FILE__ ).'/assets/js/main.js', array( 'jquery' ), '1.0',true );\n }", "function ROMP_enquiry_form_admin_assets(){\n\t\twp_enqueue_style('CSS-bootstrap-min', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css');\n\t\twp_enqueue_script('JS-bootstrap-min', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js');\n\t\twp_enqueue_style( 'ROMP-enquiry-form-css', plugins_url( 'romp-enquiry-plugin/assets/css/style.css'), 20, 1 );\n\t}", "function enqueue()\n {\n wp_enqueue_style('mypluginstyles', plugins_url('/assets/mystyle.css', __FILE__));\n wp_enqueue_script('mypluginscript', plugins_url('/assets/myscript.js', __FILE__));\n }", "function register_admin_scripts_and_styles() {\n\t\t\n\t}", "function my_assets() {\n wp_enqueue_style( 'style', get_stylesheet_uri(), array(), '1.0.0' );\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'app', get_template_directory_uri() . '/js/app.js', array(), '1.0.0' );\n}", "private function _addResource()\n {\n //Add Resource\n $this->assets->collection('css_header')\n ->addCss('/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css');\n\n $this->assets->collection('js_footer')\n ->addJs('/plugins/nestable/jquery.nestable.js')\n ->addJs('/plugins/nestable/ui-nestable.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modal.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modalmanager.js')\n ->addJs('/templates/backend/default/js/ui-modals.js');\n }", "function load_core_assets()\n {\n // load core js and css\n $this\n ->add_plugin_theme($this->core_theme, 'core')\n ->add_external_css(array(\n base_url(\"/themes/core/css/core.css\"),\n ))\n ->add_external_js(array(\n \"/themes/core/js/core_i18n.js\",\n ), NULL, TRUE);\n }", "function plugin_admin_scripts() {\r\n\t\t\t// Register & enqueue our admin.js file along with its dependancies\r\n\t\t\twp_register_script('framework', $this->framework_url .'framework.js', array('jquery','media-upload','thickbox','editor'));\r\n\t\t\twp_enqueue_script('framework');\r\n\t\t\t\t\twp_enqueue_script('farbtastic'); \r\n\t\t\twp_enqueue_script('suggest'); // Allow Jquery Chosen\r\n\t\t}", "public function enqueue_styles_and_scripts() {\n wp_enqueue_style($this->plugin_slug . '-plugin-styles', plugins_url('h5p/h5p-php-library/styles/h5p.css'), array(), self::VERSION);\n }", "function reviews_plugin_scripts() { \r\n\twp_enqueue_style( 'main-styles', plugin_dir_url( __FILE__ ) . 'assets/main.css');\r\n\twp_enqueue_style( 'font-awesome', plugin_dir_url( __FILE__ ) . 'assets/font-awesome.css');\r\n\r\n wp_enqueue_script( 'main-reviews', plugin_dir_url( __FILE__ ) . 'assets/reviews.js', array('jquery') );\r\n}", "function pm_register_resources() {\n\t// Styles\n\n wp_enqueue_style( 'normalize', get_stylesheet_directory_uri().'/assets/css/normalize.css' );\n wp_enqueue_style( 'ts-styles', get_stylesheet_directory_uri().'/assets/css/style.css', null, pm_version_hash('/assets/css/style.css') );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Crimson+Text:400,700|Raleway:500,600');\n \n // Scripts\n\n wp_deregister_script( 'jquery' );\n wp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, NULL, true );\n// wp_register_script( 'jquery', 'http://masonry.desandro.com/v2/js/jquery-1.7.1.min.js', false, NULL, true );\n wp_enqueue_script( 'jquery' );\n //wp_enqueue_script( 'jquery-masonry' );\n wp_enqueue_script( 'ts-infinitescroll', get_stylesheet_directory_uri().'/assets/js/infinite-scroll.min.js', null, null, true);\n wp_enqueue_script( 'ts-imagesloaded', get_stylesheet_directory_uri().'/assets/js/imagesloaded.min.js', null, null, true);\n wp_enqueue_script( 'ts-cookies', get_stylesheet_directory_uri().'/assets/js/js.cookies.js', null, null, true);\n wp_enqueue_script( 'ts-tweenmax', '//cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/TweenMax.min.js', null, null, true);\n// wp_enqueue_script( 'ts-masonry', get_stylesheet_directory_uri().'/assets/js/masonry.min.js', null, null, true);\n wp_enqueue_script( 'ts-scripts', get_stylesheet_directory_uri().'/assets/js/ts.js',null, pm_version_hash('/assets/js/ts.js'), true);\n \n // Fonts\n}", "public function registerScripts()\r\n\t{\r\n\t\twp_register_style('social-shares', plugins_url('assets/social-shares.css', __FILE__));\r\n\t\twp_register_script('social-shares', plugins_url('assets/social-shares.js', __FILE__), array('jquery'), false, true);\r\n\t}", "function massively_theme_assets() {\n\n\t\t$var = '1.0.0';\n\n\t\t/* CSS */\n\t\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), '', $var );\n\t\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), '', $var );\n\t\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\n\n\t\t/* JavaScripts */\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), '', $var );\n\t\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), '', $var );\n\t\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), '', $var );\n\t\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), '', $var );\n\t\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), '', $var );\n\t\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\n\t}", "public function addDependencies()\n {\n $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);\n $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);\n $this->Html->css('/attachments/css/attachments.css', ['block' => true]);\n }", "protected function registerAssets(){\n\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCoreScript('jquery');\n\n\t\t$assets_path = dirname(__FILE__) . DIRECTORY_SEPARATOR.'assets';\n\t\t$url = Yii::app()->assetManager->publish($assets_path, false, -1, YII_DEBUG);\n\t\t$webroot = Yii::getPathOfAlias('webroot').DIRECTORY_SEPARATOR;\n\t\t$plugins = array();\n\t\t\n\t\t// register redactor files\n\t\t$cs->registerScriptFile($url.'/chosen.jquery.min.js');\n\t\t$cs->registerCssFile($url.'/chosen.min.css');\n\t\t\n\t\t$cs->registerScript('chosen_'.$this->id, '\n\t\t\t$(\"#'.$this->id.'\").chosen({no_results_text: \"'.Yii::t('chosen', 'Ничего не найдено').'\"});\n\t\t');\n\t\t\n\t}", "function ahla_register_assets()\n{\n\t$assets = AHLAURL . '/assets';\n\t$ver \t = AHLAVER;\n\n\t// theme style.css\n\twp_register_style( 'theme-style' , get_stylesheet_uri() );\n\n\t// others\n\t$file = $assets.'/js/skip-link-focus-fix.js';\n\twp_register_script( 'skip-link-focus-fix', $file, array(), $ver, true );\n\n\tdo_action('ahla_register_assets');\n}", "function wmdm_assets() {\n if (isset($_GET['page']) && $_GET['page'] == 'wmdm-options') {\n\n wp_enqueue_style( 'thickbox' ); // Stylesheet used by Thickbox\n wp_enqueue_script( 'thickbox' );\n wp_enqueue_script( 'media-upload' );\n\n wp_register_script('wmdm_admin', plugins_url( '/js/dot_cfi_admin.js' , __FILE__ ), array( 'thickbox', 'media-upload' ));\n wp_enqueue_script('wmdm_admin');\n\n wp_enqueue_style( 'plugin-admin', plugin_dir_url(__FILE__).'styles/admin-styles.css' );\n }\n\n }", "function Define_Resources() : void\n {\n for($i = 0;$i < count($this->Scripts);$i++)\n {\n if($this->Scripts[$i] instanceof stdClass)\n {\n wp_enqueue_script($this->Scripts[$i]->Handle,$this->Scripts[$i]->Src,$this->Scripts[$i]->Deps,$this->Scripts[$i]->Ver,$this->Scripts[$i]->InFooter);\n }\n }\n for($i = 0;$i < count($this->Styles);$i++)\n {\n if($this->Styles[$i] instanceof stdClass)\n {\n wp_enqueue_style($this->Styles[$i]->Handle,$this->Styles[$i]->Src,$this->Styles[$i]->Deps,$this->Styles[$i]->Ver,$this->Styles[$i]->Media);\n }\n }\n }", "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "function register_crunchpress_panel_styles(){\r\n\t\r\n\t\twp_enqueue_style('jquery-ui',CP_PATH_URL.'/framework/stylesheet/jquery-ui.css');\r\n\t\twp_enqueue_style('cp-panel',CP_PATH_URL.'/framework/stylesheet/cp-panel.css');\r\n\t\twp_enqueue_style('mini-color',CP_PATH_URL.'/framework/stylesheet/jquery.miniColors.css');\r\n\t\twp_enqueue_style('confirm-dialog',CP_PATH_URL.'/framework/stylesheet/jquery.confirm.css');\r\n\t\twp_enqueue_style('jquery-timepicker',CP_PATH_URL.'/framework/stylesheet/jquery.ui.timepicker.css');\r\n\t\t\r\n\t}", "public function register_plugin_styles() {\n\t\twp_register_style ( 'tr-plugin-styles', plugins_url ( 'tr_top_ratter/css/tr_top_ratter.css?v=' . microtime () ) );\n\t\twp_enqueue_style ( 'tr-plugin-styles' );\n\t\t\n\t\twp_register_style ( 'tr_jquery_custom_style', plugins_url ( 'tr_top_ratter/css/jquery-ui.min.css' ) );\n\t\twp_enqueue_style ( 'tr_jquery_custom_style' );\n\t}", "public function enqueue_assets() {\n\t\t\twp_enqueue_style( 'jquery-swiper' );\n\t\t\twp_enqueue_script( 'jquery-swiper' );\n\t\t}", "function stock_toolkit_files(){\n wp_enqueue_style( 'owl-carousel', plugin_dir_url( __FILE__ ). 'assets/css/owl.carousel.css');\n wp_enqueue_script( 'owl-carousel', plugin_dir_url( __FILE__ ). 'assets/js/owl.carousel.min.js', array('jquery'), '20120206', true);\n}", "function wwt_include_javascript_and_css() {\r\n wp_enqueue_script('jquery');\r\n wp_enqueue_script('jquery-ui', plugin_dir_url('js/libs/jquery-ui-1.11.2.min.js', __FILE__), array('jquery'), '1.11.2');\r\n wp_enqueue_script('barcode-component', plugin_dir_url(__FILE__) . 'js/SimpleBarcodeApi.js', array('jquery', 'jquery-ui'));\r\n\r\n wp_enqueue_style('jquery-ui', plugins_url('js/libs/jquery-ui-1.11.2.min.css', __FILE__));\r\n}", "public function admin_enqueue_scripts()\n\t{\n\t\twp_register_style( 'go-git', plugins_url( 'components/css/go-git.css', __DIR__ ), array(), 1 );\n\t\twp_enqueue_style( 'go-git' );\n\t}", "function howes_register_required_plugins(){\n\t\n\t/**\n\t * Array of plugin arrays. Required keys are name and slug.\n\t * If the source is NOT from the .org repo, then source is also required.\n\t */\n\t$plugins = array(\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'Revolution Slider', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'revslider', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> get_template_directory() . '/inc/plugins/revslider.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '5.4.7.4', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'WPBakery Visual Composer', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'js_composer', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> get_template_directory() . '/inc/plugins/js_composer.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '5.4.7', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'CF Post Formats', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'cf-post-formats', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> get_template_directory() . '/inc/plugins/cf-post-formats.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'Envato Market', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'envato-market', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> get_template_directory() . '/inc/plugins/envato-market.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'Breadcrumb NavXT',\n\t\t\t'slug' => 'breadcrumb-navxt',\n\t\t\t'required' => true,\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'Contact Form 7',\n\t\t\t'slug' => 'contact-form-7',\n\t\t\t'required' => true,\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'Max Mega Menu',\n\t\t\t'slug' => 'megamenu',\n\t\t\t'required' => false,\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'Easy Pricing Tables Lite by Fatcat Apps',\n\t\t\t'slug' => 'easy-pricing-tables',\n\t\t\t'required' => false,\n\t\t),\n\t);\n\n\t// Change this to your theme text domain, used for internationalising strings\n\t//$theme_text_domain = 'howes';\n\n\t/**\n\t * Array of configuration settings. Amend each line as needed.\n\t * If you want the default strings to be available under your own theme domain,\n\t * leave the strings uncommented.\n\t * Some of the strings are added into a sprintf, so see the comments at the\n\t * end of each line for what each argument will be.\n\t */\n\t$config = array(\n\t\t'domain' \t\t=> 'howes', \t// Text domain - likely want to be the same as your theme.\n\t\t'default_path' \t\t=> '', \t// Default absolute path to pre-packaged plugins\n\t\t//'parent_menu_slug' \t=> 'themes.php', \t\t\t\t// Default parent menu slug\n\t\t//'parent_url_slug' \t=> 'themes.php', \t\t\t\t// Default parent URL slug\n\t\t'menu' \t\t=> 'install-required-plugins', \t// Menu slug\n\t\t'has_notices' \t=> true, \t// Show admin notices or not\n\t\t'is_automatic' \t=> true,\t\t\t\t\t \t// Automatically activate plugins after installation or not\n\t\t'message' \t\t\t=> '',\t\t\t\t\t\t\t// Message to output right before the plugins table\n\t\t'strings' \t\t=> array(\n\t\t\t'page_title' \t\t\t=> __( 'Install Required Plugins', 'howes' ),\n\t\t\t'menu_title' \t\t\t=> __( 'Install Plugins', 'howes' ),\n\t\t\t'installing' \t\t\t=> __( 'Installing Plugin: %s', 'howes' ), // %1$s = plugin name\n\t\t\t'oops' \t\t\t=> __( 'Something went wrong with the plugin API.', 'howes' ),\n\t\t\t'notice_can_install_required' \t\t\t=> _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_install_recommended'\t\t\t=> _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_install' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_required' \t\t\t=> _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_recommended'\t\t\t=> _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_activate' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s)\n\t\t\t'notice_ask_to_update' \t\t\t\t\t\t=> _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_update' \t\t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s)\n\t\t\t'install_link' \t\t\t\t\t \t\t\t=> _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),\n\t\t\t'activate_link' \t\t\t\t \t\t\t=> _n_noop( 'Activate installed plugin', 'Activate installed plugins' ),\n\t\t\t'return' \t\t\t=> __( 'Return to Required Plugins Installer', 'howes' ),\n\t\t\t'plugin_activated' \t\t\t=> __( 'Plugin activated successfully.', 'howes' ),\n\t\t\t'complete' \t\t\t\t\t\t\t\t\t=> __( 'All plugins installed and activated successfully. %s', 'howes' ), // %1$s = dashboard link\n\t\t)\n\t);\n\ttgmpa( $plugins, $config );\n}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "public function form_css(){\n\t\twp_register_style( 'lead_gen_plugin', plugin_dir_url( __FILE__ ) . 'css/style.css', false );\n\t\twp_enqueue_style( 'lead_gen_plugin' );\n\t}", "function insert_resouces($resources) {\r\n foreach ($resources['css'] as $css) {\r\n echo '<link rel=\"stylesheet\" href=\"'. $css .'\">';\r\n }\r\n foreach ($resources['js'] as $js) {\r\n echo '<script src=\"'. $js .'\"></script>';\r\n }\r\n }", "function example-theme_load_theme_assets() {\n\n\t$assetpath_css = getenv( 'WP_ENV' ) === 'production' ? '/assets/rev/' . asset_path( 'css/main.css' ) : '/assets/build/css/main.css';\n\t$assetpath_js = getenv( 'WP_ENV' ) === 'production' ? '/assets/rev/' . asset_path( 'js/app.js' ) : '/assets/build/js/app.js';\n\n\tif ( ! is_admin() ) {\n\t\twp_enqueue_style( 'example-theme-css-main', get_template_directory_uri() . $assetpath_css );\n\t}\n\n\twp_register_script( 'example-theme-script-main', get_template_directory_uri() . $assetpath_js, array(), '1.0', true );\n\twp_enqueue_script( 'example-theme-script-main' );\n\n}", "public function trad_load_css_and_jss() {\n\t\tif ( ! $this->trad_ioy_shortcodes_activated ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// this tells us if we want to load the .min versions of css and js when available\n\t\t$trad_use_min_js = $this->get_setting( 'trad_use_min_js' );\n\n\t\t// load our plugin-specific css\n\t\tif ( $this->get_setting( 'trad_load_trad_ioy_css' ) ) {\n\t\t\twp_enqueue_style( 'trad-ioy', plugins_url(\n\t\t\t\t'css/stylesheet.css', dirname( __FILE__ ) ) );\n\t\t}\n\n\t\t// load our custom css\n\t\tif ( $this->get_setting( 'trad_ioy_local_css_file' ) ) {\n\t\t\twp_enqueue_style( 'trad-ioy-custom', $this->get_setting( 'trad_ioy_local_css_file' ) );\n\t\t}\n\n\t\tif ( $this->get_setting( 'trad_ioy_local_css' ) ) {\n\t\t\tadd_action( 'wp_head', array( $this, 'trad_ioy_add_custom_css' ) );\n\t\t}\n\t\t// we definitely need jQuery\n\t\twp_enqueue_script( 'jquery' );\n\n\t\tif ( $this->get_setting( 'trad_load_cookie_js' ) ) {\n\t\t\twp_enqueue_script( 'trad-cookie-js', plugins_url(\n\t\t\t\t\t$this->min_or_full( 'js/jquery/jquery.cookie', 'js', false ), dirname( __FILE__ ) ), array( 'jquery' ),\n\t\t\t\tfalse, true );\n\t\t}\n\n\t\tif ( $this->get_setting( 'trad_load_scrollto_js' ) ) {\n\t\t\twp_enqueue_script( 'trad-scrollto-js', plugins_url(\n\t\t\t\t\t$this->min_or_full( 'js/jquery/jquery.scrollTo-1.4.3.1', 'js', $trad_use_min_js ), dirname( __FILE__ ) ),\n\t\t\t\tarray( 'jquery' ), false, true );\n\t\t}\n\n\t\t// add our special javascipt\n\t\tadd_action( 'wp_footer', array( $this, 'trad_ioy_js' ) );\n\t}", "public function register_plugin_styles() {\n\t\twp_enqueue_style( 'teamManager', plugins_url( '/css/TeamManager.css' , __FILE__ ) ); \n\t}", "public function onAfterInstall()\n {\n craft()->db->createCommand()->update(\n 'fields',\n array('type' => 'BetterRedactor'),\n array('type' => 'RichText')\n );\n\n $publicDirectory = craft()->path->appPath . '../../public/redactor_plugins';\n\n if (!IOHelper::folderExists($publicDirectory)) {\n $initialDirectory = craft()->path->getPluginsPath()\n . '/betterredactor/redactor_plugins';\n\n $files = array_filter(\n scandir($initialDirectory),\n function($file) use ($initialDirectory) {\n return is_file(\"$initialDirectory/$file\");\n }\n );\n\n foreach ($files as $file) {\n if (preg_match('((.js|.css)$)i', $file)) {\n IOHelper::copyFile(\n \"$initialDirectory/$file\",\n \"$publicDirectory/$file\"\n );\n }\n }\n }\n }", "public function register_frontend_assets() {\n\t\twp_enqueue_style( 'ghc-functionality', $this->plugin_dir_url( 'dist/css/style.min.css' ), array(), $this->version );\n\n\t\twp_register_script( 'ghc-content-types-filter', $this->plugin_dir_url( 'dist/js/content-types.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-maps', $this->plugin_dir_url( 'dist/js/maps.min.js' ), array( 'jquery', 'google-maps-api' ), $this->version, true );\n\t\twp_register_script( 'google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . get_option( 'options_api_key' ), array(), null, true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters -- let Google Maps handle cache invalidation.\n\n\t\twp_enqueue_script( 'ghc-popups', $this->plugin_dir_url( 'dist/js/popups.min.js' ), array( 'jquery', 'popup-maker-site' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-robly-lists', $this->plugin_dir_url( 'dist/js/robly-lists.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'slick', $this->plugin_dir_url( 'dist/js/slick.min.js' ), array( 'jquery' ), $this->version, true );\n\t\twp_register_style( 'slick', $this->plugin_dir_url( 'dist/css/slick.min.css' ), array(), $this->version, false );\n\t}", "function cam_enqueue_related_pages_scripts_and_styles(){\n // wp_enqueue_style('related-styles', plugins_url('/css/bootstrap.min.css', __FILE__));\n wp_enqueue_script('releated-script', plugins_url( '/js/custom.js' , __FILE__ ), array('jquery','jquery-ui-droppable','jquery-ui-draggable', 'jquery-ui-sortable'));\n }", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function addPluginAdminResources( $page ) {\n global $laterpay_version;\n wp_register_style(\n 'laterpay-admin',\n LATERPAY_ASSET_PATH . '/static/css/laterpay-admin.css',\n array(),\n $laterpay_version\n );\n wp_enqueue_style('laterpay-admin');\n\n wp_register_script(\n 'jquery',\n '//code.jquery.com/jquery-1.11.0.min.js'\n );\n\n if ( $page == 'post.php' || $page == 'post-new.php' ) {\n $this->getPricingPostController()->loadAssets();\n }\n }", "public function js_css_public(){\n\n wp_enqueue_style('asRange', plugin_dir_url(__FILE__). 'libs/assets/css/asRange.min.css', false, $this->version());\n wp_enqueue_style('select2', plugin_dir_url(__FILE__). 'libs/assets/css/select2.min.css', false, $this->version());\n wp_enqueue_style('flatpickr', plugin_dir_url(__FILE__). 'libs/assets/css/flatpickr.min.css', false, $this->version());\n wp_enqueue_style('metform-ui', plugin_dir_url(__FILE__). 'libs/assets/css/metform-ui.css', false, $this->version());\n wp_enqueue_style('font-awesome', plugin_dir_url(__FILE__). 'libs/assets/css/font-awesome.min.css', false, $this->version());\n wp_enqueue_style('metform-style', plugin_dir_url(__FILE__). 'libs/assets/css/style.css', false, $this->version());\n \n wp_enqueue_script('asRange', plugin_dir_url(__FILE__) . 'libs/assets/js/jquery-asRange.min.js', array(), $this->version(), true);\n wp_enqueue_script('select2', plugin_dir_url(__FILE__) . 'libs/assets/js/select2.min.js', array(), $this->version(), true);\n wp_enqueue_script('flatpickr', plugin_dir_url(__FILE__) . 'libs/assets/js/flatpickr.js', array(), $this->version(), true);\n \n wp_register_script('recaptcha', 'https://www.google.com/recaptcha/api.js?onload=onloadMetFormCallback&render=explicit', array(), $this->version(), true);\n wp_enqueue_script('metform-submission', plugin_dir_url(__FILE__) . 'libs/assets/js/submission.js', array(), $this->version(), true);\n \n\n }", "function wptrebs_styles_scripts() {\n wp_enqueue_style( 'wptrebs_feed', plugins_url('..\\assets\\css\\style.css', __FILE__) );\n}", "function theme_assets() {\n\t// load css\n\twp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/css/fontawesome.css' );\n\twp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' );\n\twp_enqueue_style( 'style-css', get_template_directory_uri() . '/style.css', false, time() );\n\n\t// load javascript\n\twp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '', true );\n wp_enqueue_script( 'waterfall-js', get_template_directory_uri() . '/js/waterfall.js', array(), '', true );\n\twp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', array(), '', true);\n}", "function wm_customizer_preview_enqueue_assets() {\n $ctime = filemtime( get_template_directory() . '/customizer/css/wm-customizer-preview.css' );\n wp_enqueue_style( 'wm-customizer-preview-css', get_template_directory_uri() . '/customizer/css/wm-customizer-preview.css', array(), $ctime );\n $ctime = filemtime( get_template_directory() . '/customizer/js/wm-customizer-preview.js' );\n wp_enqueue_script( 'wm-customizer-preview-js', get_template_directory_uri() . '/customizer/js/wm-customizer-preview.js', array( 'jquery' ), $ctime, true );\n }", "public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t}", "function addScriptResources()\t{\n\t\tif (t3lib_extMgm::isLoaded('t3jquery')) {\n\t\t\trequire_once(t3lib_extMgm::extPath('t3jquery').'class.tx_t3jquery.php');\n\t\t}\n\n\t\t// checks if t3jquery is loaded\n\t\tif (T3JQUERY === TRUE) {\n\t\t\ttx_t3jquery::addJqJS();\n\t\t} else {\n\t\t\tif($this->conf['jQueryRes']) $this->jsFile[] = $this->conf['jQueryRes'];\n\t\t\tif($this->conf['tooltipJSRes']) $this->jsFile[] = $this->conf['tooltipJSRes'];\n\t\t}\n\n\t\t// Fix moveJsFromHeaderToFooter (add all scripts to the footer)\n\t\tif ($GLOBALS['TSFE']->config['config']['moveJsFromHeaderToFooter']) {\n\t\t\t$allJsInFooter = TRUE;\n\t\t} else {\n\t\t\t$allJsInFooter = FALSE;\n\t\t}\n\n\t\t$pagerender = $GLOBALS['TSFE']->getPageRenderer();\n\t\t\n\t\t// add all defined JS files\n\t\tif (count($this->jsFile) > 0) {\n\t\t\tforeach ($this->jsFile as $jsToLoad) {\n\t\t\t\tif (T3JQUERY === TRUE) {\n\t\t\t\t\t$conf = array(\n\t\t\t\t\t\t'jsfile' => $jsToLoad,\n\t\t\t\t\t\t'tofooter' => ($this->conf['jsInFooter'] || $allJsInFooter),\n\t\t\t\t\t\t'jsminify' => $this->conf['jsMinify'],\n\t\t\t\t\t);\n\t\t\t\t\ttx_t3jquery::addJS('', $conf);\n\t\t\t\t} else {\n\t\t\t\t\t$file = $GLOBALS['TSFE']->tmpl->getFileName($jsToLoad);\n\t\t\t\t\tif ($file) {\n\t\t\t\t\t\tif ($allJsInFooter) {\n\t\t\t\t\t\t\t$pagerender->addJsFooterFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$pagerender->addJsFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt3lib_div::devLog(\"'{\".$jsToLoad.\"}' does not exists!\", $this->extKey, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add defined CSS file\n\t\tif($this->conf['cssFile']) {\n\t\t\t// Add script only once\n\t\t\t$css = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['cssFile']);\n\t\t\tif ($css) {\n\t\t\t\t$pagerender->addCssFile($css, 'stylesheet', 'all', '', $this->conf['cssMinify']);\n\t\t\t} else {\n\t\t\t\tt3lib_div::devLog(\"'{\".$this->conf['cssFile'].\"}' does not exists!\", $this->extKey, 2);\n\t\t\t}\n\t\t}\n\t}", "public function loadAssets()\n {\n add_action('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n add_filter('script_loader_tag', [$this, 'addAssetAttribute'], 10, 3);\n }", "function thesaasx_enqueue_assets() {\n\n\t$my_theme = wp_get_theme();\n\t$version = $my_theme->get( 'Version' );\n\n\t// Google fonts.\n\t//\n\twp_enqueue_style( 'thesaasx-fonts', thesaasx_fonts_url(), array(), $version );\n\n\n\t// Plugin styles.\n\t//\n\n\twp_enqueue_style( 'font-awesome', THE_PLUGIN_URL . 'assets/vendor/font-awesome/css/font-awesome.min.css' , array(), $version );\n\twp_enqueue_style( 'themify-icons', THE_PLUGIN_URL . 'assets/vendor/themify-icons/themify-icons.css' , array(), $version );\n\twp_enqueue_style( 'et-line', THE_PLUGIN_URL . 'assets/vendor/et-line/style.css' , array(), $version );\n\twp_enqueue_style( 'aos', THE_PLUGIN_URL . 'assets/vendor/aos/aos.css' , array(), $version );\n\twp_enqueue_style( 'jarallax', THE_PLUGIN_URL . 'assets/vendor/jarallax/jarallax.css' , array(), $version );\n\twp_enqueue_style( 'slick', THE_PLUGIN_URL . 'assets/vendor/slick/slick.css' , array(), $version );\n\n\n\n\t// Plugin scripts.\n\t//\n\twp_enqueue_script( 'bootstrap', THE_PLUGIN_URL . 'assets/vendor/bootstrap/js/bootstrap.bundle.min.js' , array( 'jquery' ), $version, true );\n\twp_enqueue_script( 'smoothscroll', THE_PLUGIN_URL . 'assets/vendor/smoothscroll/SmoothScroll.js' , array( ), $version, true );\n\twp_enqueue_script( 'objectfit-polyfill', THE_PLUGIN_URL . 'assets/vendor/objectfit-polyfill/objectFitPolyfill.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'aos', THE_PLUGIN_URL . 'assets/vendor/aos/aos.js' , array( ), $version, true );\n\twp_enqueue_script( 'jquery-countdown', THE_PLUGIN_URL . 'assets/vendor/jquery-countdown/jquery.countdown.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'waypoints', THE_PLUGIN_URL . 'assets/vendor/waypoints/jquery.waypoints.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'countup', THE_PLUGIN_URL . 'assets/vendor/countup/countUp.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'granim', THE_PLUGIN_URL . 'assets/vendor/granim/granim.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'slick', THE_PLUGIN_URL . 'assets/vendor/slick/slick.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'typed', THE_PLUGIN_URL . 'assets/vendor/typed/typed.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'lity', THE_PLUGIN_URL . 'assets/vendor/lity/lity.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'imagesloaded', THE_PLUGIN_URL . 'assets/vendor/imagesloaded/imagesloaded.pkgd.min.js' , array( ), $version, true );\n\twp_enqueue_script( 'shufflejs', THE_PLUGIN_URL . 'assets/vendor/shuffle/shuffle.min.js' , array('imagesloaded'), $version, true );\n\twp_enqueue_script( 'jarallax', THE_PLUGIN_URL . 'assets/vendor/jarallax/jarallax.min.js' , array( 'jquery' ), $version, true );\n\twp_enqueue_script( 'jarallax-video', THE_PLUGIN_URL . 'assets/vendor/jarallax/jarallax-video.min.js' , array( 'jquery' ), $version, true );\n\n\n\t// Theme style.\n\t//\n\twp_enqueue_style( 'thesaasx', THE_PLUGIN_URL . 'assets/css/page.min.css' , array(), $version );\n\n\t// Custom style\n\t$custom_css = thesaasx_custom_font_style();\n\t$custom_css .= thesaasx_custom_color_style();\n\tif ( $custom_css !== '' ) {\n\t\twp_add_inline_style( 'thesaasx', $custom_css );\n\t}\n\n\n\n\t// Theme script.\n\t//\n\twp_enqueue_script( 'thesaasx', THE_PLUGIN_URL . 'assets/js/page.min.js' , array( 'jquery', 'bootstrap' ), $version, true );\n\n\t$googleApiKey_escaped = esc_js( get_theme_mod( 'google_api_key', 'AIzaSyDRBLFOTTh2NFM93HpUA4ZrA99yKnCAsto' ) );\n\t$googleAnalyticsId_escaped = esc_js( get_theme_mod( 'google_analytics_id' ) );\n\t$googlerecaptchav3_escaped = esc_js( get_theme_mod( 'google_recaptcha3_public' ) );\n\t$inline_script = \"page.config({ googleApiKey: '\". $googleApiKey_escaped .\"', googleAnalyticsId: '\". $googleAnalyticsId_escaped .\"', reCaptchaV3SiteKey: '\". $googlerecaptchav3_escaped .\"', contactFormAction: '\". admin_url('admin-ajax.php') .\"' });\";\n\t$inline_script .= get_theme_mod( 'additional_script' );\n\twp_add_inline_script( 'thesaasx', \"jQuery(function($) { \". $inline_script .\" });\" );\n\n\n\t// Comments\n\t//\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "public function register_css () {\n wp_register_style(Plugin::PLUGIN_NAME, plugins_url('assets/css/styles.css', __FILE__), array(), filemtime(Plugin::getPluginPath() . '/assets/css/styles.css'));\n }", "function perusecretland_css_js() {\n wp_enqueue_style( 'perusecretland-fonts', get_stylesheet_directory_uri() . '/css/fonts.css');\n wp_enqueue_style( 'perusecretland-responsive', get_stylesheet_directory_uri() . '/css/responsive.css');\n wp_enqueue_style( 'jquery-chosen', get_stylesheet_directory_uri() . '/css/chosen.min.css');\n wp_enqueue_script( 'perusecretland-easing', get_stylesheet_directory_uri() . '/js/jquery.easing.1.3.js', array('jquery'));\n wp_enqueue_script( 'jquery-chosen', get_stylesheet_directory_uri() . '/js/chosen.jquery.min.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-footer-scripts', get_stylesheet_directory_uri() . '/js/footer.scripts.js', array('jquery', 'jquery-chosen'), false, true );\n }", "public function settings_assets()\n {\n // We're including the WP media scripts here because they're needed for the image upload field\n // If you're not including an image upload then you can leave this function call out\n wp_enqueue_media();\n\n if (defined('WP_SUAPI_DEBUG') && WP_SUAPI_DEBUG) {\n wp_register_script($this->parent->_token . '-settings-js', $this->parent->assets_url . 'js/src/' . $this->parent->_token . '-settings' . $this->parent->script_suffix . '.js', array('jquery'), '1.0.0');\n } else {\n wp_register_script($this->parent->_token . '-settings-js', $this->parent->assets_url . 'js/' . $this->parent->_token . '-settings' . $this->parent->script_suffix . '.js', array('jquery'), '1.0.0');\n }\n wp_enqueue_script($this->parent->_token . '-settings-js');\n }", "public function enqueue_css_js() {\n\t\twp_enqueue_style('wp-pointer');\n\t\twp_enqueue_script('wp-pointer');\n\t}", "public function theme_assets_handler() {\n\t\t\n\t\t$version = wp_get_theme()->get('Version');\n\n\t\t//Enqueue stylesheets\n\t\tforeach ($this->styles as $style) {\n\t\t\twp_register_style($this->prefix . $style['slug'], get_template_directory_uri() . $style['path'], $style['deps'], $version);\n\t\t\twp_enqueue_style($this->prefix . $style['slug']);\n\n\n\n\t\t}\n\t\t\n\t\t//Enqueue Scripts\n\t\tforeach ($this->scripts as $script) {\n\t\t\twp_register_script($this->prefix . $script['slug'], get_template_directory_uri() . $script['path'], $script['deps'], $version);\n\t\t\twp_enqueue_script($this->prefix . $script['slug']);\n\t\t}\n\t\t\n\t\t//Enqueue WP Scripts\n\t\tif(is_array($this->wp_scripts)){\n\t\t\t\n\t\t\tforeach ($this->wp_scripts as $script) {\n\t\t\t\twp_enqueue_script($script);\n\t\t\t}\n\t\t}\n\t}", "function register_assets()\n{\n\n if (is_single()) {\n wp_enqueue_style( //fonctions pour charger un feuille de style css personalisé sur une page en particulier avec la fonction if(is_front_page)\n 'jpg-custom-single-css',\n get_template_directory_uri() . '/assets/styles/projets.css',\n array(),\n '1.0'\n );\n }\n if (is_page()) {\n wp_enqueue_style( //fonctions pour charger un feuille de style css personalisé sur une page en particulier avec la fonction if(is_front_page)\n 'jpg-custom-page-css',\n get_template_directory_uri() . '/assets/styles/page.css',\n array(),\n '1.0'\n );\n }\n\n\n wp_enqueue_style(\n 'jpg',\n get_stylesheet_uri(),\n array(),\n '1.0'\n\n );\n wp_enqueue_style(\n 'wordpress-css',\n \"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\"\n\n );\n wp_enqueue_style(\n 'jpg-custom-css',\n get_template_directory_uri() . '/assets/styles/main.css',\n array(),\n '1.0'\n\n );\n\n\n\n\nwp_enqueue_script(\n 'wordpress',\n 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'\n\n);\n\nwp_enqueue_script(\n 'jpg',\n get_template_directory_uri() . '/assets/scripts/main.js',\n array('wordpress'),\n '1.0',\n true\n);\n}" ]
[ "0.7129204", "0.7021796", "0.69685644", "0.6954948", "0.69465375", "0.69411665", "0.6929059", "0.6929059", "0.68026865", "0.6799345", "0.67820996", "0.6755606", "0.6746891", "0.6736872", "0.672963", "0.6720726", "0.6688862", "0.66869", "0.6658118", "0.6638562", "0.6635246", "0.66327864", "0.66158724", "0.66094226", "0.6598225", "0.6589436", "0.65883684", "0.6584506", "0.65512544", "0.65391916", "0.65321624", "0.6526954", "0.6526674", "0.652415", "0.6515036", "0.6512448", "0.65103894", "0.65072906", "0.6491211", "0.64819604", "0.64744353", "0.6473514", "0.6472911", "0.64705145", "0.64576256", "0.64523375", "0.6447093", "0.64403665", "0.643673", "0.64363277", "0.6430608", "0.64295894", "0.6426485", "0.6423421", "0.642223", "0.6407834", "0.64047426", "0.6401861", "0.64011663", "0.6397678", "0.6396724", "0.6388575", "0.638233", "0.6374564", "0.6368143", "0.63673586", "0.6364124", "0.63588744", "0.6354696", "0.6352865", "0.6350581", "0.634976", "0.63475794", "0.634733", "0.6342696", "0.634215", "0.6341829", "0.63399583", "0.6339062", "0.63362837", "0.63352555", "0.6334872", "0.63346523", "0.6328191", "0.6328079", "0.63279456", "0.6319914", "0.6318915", "0.63183755", "0.63166785", "0.6316152", "0.6308976", "0.63084656", "0.62992626", "0.62968695", "0.6296207", "0.62958884", "0.6292182", "0.6290506", "0.62880087", "0.6285942" ]
0.0
-1
uninstall plugin resources (css, js)
function abl_droploader_uninstall($event, $step) { global $prefs; $state = 0; // uninstall prefs if (!safe_delete('txp_prefs', "name LIKE 'abl_droploader.%'")) { if ($state == 0) $state = E_WARNING; error_log('abl_droploader: WARNING: Removal of plugin preferences failed.'); } // remove textpack entries if (!safe_delete('txp_lang', "name LIKE 'abl_droploader%'")) { if ($state == 0) $state = E_WARNING; error_log('abl_droploader: WARNING: Removal of obsolete textpack entries failed.'); } // remove css, javascript, etc. $path = $prefs['path_to_site']; $resources = array( '/res/css/abl.droploader-app.css', '/res/js/abl.droploader-app.js', '/res/js/jquery.droploader.js', '/res/js/jquery.filedrop.js', '/res/css/', '/res/js/', '/res/', ); foreach ($resources as $res) { $f = $path . $res; if (is_dir($f)) { if (!rmdir($f)) { if ($state == 0 or $state == E_NOTICE) $state = E_WARNING; error_log('abl_droploader: WARNING: Cannot remove directory \'' . $f . '\'.'); } } elseif (is_file($f)) { if (!unlink($f)) { if ($state == 0 or $state == E_NOTICE) $state = E_WARNING; error_log('abl_droploader: WARNING: Cannot remove file \'' . $f . '\'.'); } } } return $state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_plugin_assets() {\n wp_dequeue_style('roots-share-buttons'); // roots-share-buttons/assets/styles/share-buttons.css\n wp_dequeue_script('roots-share-buttons'); //roots-share-buttons/assets/scripts/share-buttons.js\n wp_dequeue_style('wp-biographia-bio'); //wp-biographia/css/wp-biographia-min.css\n}", "function hxp_plugin_deactivation() {\n\twp_dequeue_style( 'hxp_custom_style' );\n\twp_deregister_style( 'hxp_custom_style' );\n\twp_dequeue_script( 'hxp_export_script' );\n\twp_dequeue_script( 'hxp_import_script' );\n\twp_deregister_script( 'hxp_export_script' );\n\t$hxp_upload_dir = wp_upload_dir();\n\thxp_rrmdir( $hxp_upload_dir['basedir'] . '/hxp_exports' );\n\thxp_rrmdir( $hxp_upload_dir['basedir'] . '/hxp_imports' );\n}", "public function uninstallPlugin()\n {\n }", "function uninstall(){}", "public static function uninstall() {\n\t\tglobal $wpdb;\n\n\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM $wpdb->postmeta\n\t\t\tWHERE meta_key LIKE 'im8_additional_css%'\";\n\t\t$wpdb->query($sql);\n\n\t\tdelete_option(self::get_instance()->option_name);\n\t}", "function uninstall_plugin($plugin)\n {\n }", "public static function cleanResources()\n {\n File::deleteDirectory(resource_path('sass'));\n File::delete(resource_path('js/app.js'));\n File::delete(resource_path('js/bootstrap.js'));\n }", "function wrmp_uninstall()\n{\n\tif(!class_exists('WildcardPluginInstaller'))\n\t{\n\t\trequire_once MYBB_ROOT . 'inc/plugins/wrmp/classes/installer.php';\n\t}\n\t$installer = new WildcardPluginInstaller(MYBB_ROOT . 'inc/plugins/wrmp/install_data.php');\n\t$installer->uninstall();\n\n\t// delete our cached version\n\twrmp_unset_cache_version();\n}", "function uninstall(){\n\n }", "function _h_remove_jetpack_footer_assets() {\n wp_deregister_script('sharing-js');\n\n // disable spinner when infinite loading is enabled\n wp_deregister_script('jquery.spin');\n wp_deregister_script('spin');\n}", "function uninstall() {\n\t}", "public static function uninstall(){\n }", "function uninstall_hook()\n\t\t{\n\t\t\t// Delete plugin options\t\t\t\n\t\t\tdelete_option('verify-meta-tags');\n\t\t}", "public function uninstall();", "public function uninstall();", "function my_deregister_scripts(){\r\n\t \twp_deregister_script( 'wp-embed' );\r\n\t}", "function ct_remove_assets() {\n wp_dequeue_style( 'bigcommerce-styles' );\n\n if ( ct_is_pagespeed() ) {\n wp_dequeue_script( 'bigcommerce-manifest' );\n wp_dequeue_script( 'bigcommerce-vendors' );\n wp_dequeue_script( 'bigcommerce-scripts' );\n } else {\n wp_enqueue_script( 'smile.io', 'https://cdn.sweettooth.io/assets/storefront.js', array(), '1.0', true );\n }\n}", "function cleanupPlugin($name)\n\t{\n\t\t$die = function($error, $code = 1) {\n\t\t\t\\cli\\out(\"%1{$error}%n\\n\");\n\t\t\texit($code);\n\t\t};\n\n\t\t$name = Str::slug($name);\n\n\t\t\\cli\\out(\"Cleaning up {$name}...\\n\");\n\n\t\t$composer = $this->path(\"/workbench/plugins/{$name}/composer.json\");\n\t\tif (!$this->files->exists($composer)) {\n\t \t\t$die(\"Coudn't find {$composer} for {$name}\", 1);\n\t \t}\n\n\t \t$package = json_decode( $this->files->get( $composer ) );\n\t \tif (false === $package) {\n\t \t\t$die(\"Coudn't read {$composer} for {$name}\", 2);\n\t \t}\n\n\t \t// remove from composer\n\t \t$process = $this->composer(\"remove {$package->name}\");\n\t\tif (!$process->isSuccessful()) {\n\t\t\t$die(\"Failed to remove {$package->name} from workbench\", 4);\n\t\t}\n\n\t \t// remove from studio\n\t \t$workbench_path = $this->path(\"/workbench/plugins/{$name}\");\n\t \t$process = $this->studio(\"unload {$workbench_path}\");\n\t \tif (!$process->isSuccessful()) {\n\t \t\t$die(\"Failed to unload {$package->name} from your workbench\", 8);\n\t \t}\n\n\t \t// delete the project\n\t \t$this->files->deleteDirectory($workbench_path);\n\t}", "function my_deregister_scripts(){\n wp_deregister_script( 'wp-embed' );\n}", "function uninstall() {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['plugins'].\"` WHERE `name`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['leftsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t}", "public function uninstallPlugin()\n\t{\n\t\treturn true;\t\n\t}", "function remove_theme_mods()\n {\n }", "function mro_deregister_scripts() {\n\n //Deregister styles\n\n\t// Bootstrap\n\twp_dequeue_style( 'tt-bootstrap.css' );\n\twp_deregister_style( 'tt-bootstrap.css' );\n\n\t// icomoon\n\twp_dequeue_style( 'tt-icomoon.css' );\n\twp_deregister_style( 'tt-icomoon.css' );\n\n\t// tt-main-style\n\twp_dequeue_style( 'tt-main-style' );\n\twp_deregister_style( 'tt-main-style' );\n\n\t// tt-theme-style\n\twp_dequeue_style( 'tt-theme-style' );\n\twp_deregister_style( 'tt-theme-style' );\n\n}", "protected static function removeComponent()\n {\n (new Filesystem)->deleteDirectory(\n resource_path('assets/js/components')\n );\n }", "public static function uninstall() {\n\n\t}", "public static function uninstall() {\n\t\t}", "static private function _cleanup() {\n\t\t$active_plugins = (array) get_option( 'active_plugins' );\n\t\t$active_plugins_network = (array) get_site_option( 'active_sitewide_plugins' );\n\n\t\t// workaround for WPMU deactivation bug\n\t\tremove_action( 'deactivate_' . W3TC_FILE, 'deactivate_sitewide_plugin' );\n\n\t\tdo_action( 'deactivate_plugin', W3TC_FILE );\n\n\t\t$key = array_search( W3TC_FILE, $active_plugins );\n\n\t\tif ( $key !== false ) {\n\t\t\tarray_splice( $active_plugins, $key, 1 );\n\t\t}\n\n\t\tunset( $active_plugins_network[W3TC_FILE] );\n\n\t\tdo_action( 'deactivate_' . W3TC_FILE );\n\t\tdo_action( 'deactivated_plugin', W3TC_FILE );\n\n\t\tupdate_option( 'active_plugins', $active_plugins );\n\t\tupdate_site_option( 'active_sitewide_plugins', $active_plugins_network );\n\t}", "function childtheme_remove_scripts(){\n remove_action('wp_enqueue_scripts','thematic_head_scripts');\n}", "function wlms_plugin_uninstall()\n{\n delete_option('wlms_settings');\n}", "function plugin_uninstall() {\n\tdelete_option('access_token');\n\tdelete_option('insta_username');\n\tdelete_option('insta_user_id');\n\tdelete_option('insta_profile_picture');\n}", "public static function uninstall() {\n if ( !current_user_can( 'activate_plugins' ) || __FILE__ !== WP_UNINSTALL_PLUGIN ) {\n return;\n }\n\n check_admin_referer( 'bulk-plugins' );\n\n // Remove all stored clanpress options.\n $options = wp_load_alloptions();\n foreach ( $options as $key => $value ) {\n if ( substr( $key, 0, 9 ) === 'clanpress' ) {\n delete_option( $key );\n }\n }\n }", "function wpgrade_head_cleanup() {\r\n\t// Remove WP version\r\n\tremove_action( 'wp_head', 'wp_generator' );\r\n\t\r\n\tremove_action( 'wp_head', 'rsd_link' );\r\n\t// windows live writer\r\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\r\n\t\r\n\t// remove WP version from css - those parameters can prevent caching\r\n\t//add_filter( 'style_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\t// remove WP version from scripts - those parameters can prevent caching\r\n\t//add_filter( 'script_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\r\n}", "public function uninstall() {\n\n\n }", "function _h_remove_jetpack_head_assets() {\n wp_dequeue_script('devicepx');\n wp_dequeue_style('sharedaddy');\n wp_dequeue_style('social-logos');\n}", "public function remove_conflicting_asset_files() {\n\t\t$scripts = array(\n\t\t\t'jetpack-onboarding-vendor', // Jetpack Onboarding Bluehost.\n\t\t);\n\n\t\tif ( ! empty( $scripts ) ) {\n\t\t\tforeach ( $scripts as $script ) {\n\t\t\t\twp_dequeue_script( $script ); // Remove JS file.\n\t\t\t\twp_deregister_script( $script );\n\t\t\t}\n\t\t}\n\t}", "function deinstallPackageDyntables() {\n @unlink('/usr/local/www/diag_dhcp_leases.php');\n @unlink('/usr/local/www/javascript/dyntables.js');\n @rename('/usr/local/pkg/diag_dhcp_leases.php.org', '/usr/local/www/diag_dhcp_leases.php');\n}", "function deregister_scripts_oembed_footer(){\n\twp_deregister_script( 'wp-embed' );\n}", "function deregister_scripts_oembed_footer(){\n\twp_deregister_script( 'wp-embed' );\n}", "function uninstall() {\n\n\t// Delete the data.\n\tHelpers\\clear_pending_data();\n\n\t// Include our action so that we may add to this later.\n\tdo_action( Core\\HOOK_PREFIX . 'uninstall_process' );\n\n\t// And flush our rewrite rules.\n\tflush_rewrite_rules();\n}", "function shutdown() {\n // Safety for themes not using wp_footer\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "function cardealer_head_cleanup() {\r\n\tadd_filter( 'style_loader_src', 'cardealer_remove_wp_ver_css_js', 9999 ); // remove WP version from css\r\n\tadd_filter( 'script_loader_src', 'cardealer_remove_wp_ver_css_js', 9999 ); // remove WP version from scripts\r\n}", "public function uninstall() {\n\t\tdelete_option('hotlink-no-more');\n\t}", "public function uninstall()\n {\n $this->deleteConfig();\n GPCCore::unregister($this->getPluginName());\n }", "function plugin_uninstall()\r\n{\r\n\tconf_delete_param('piwigopanorama_conf');\r\n\r\n\tpwg_query('ALTER TABLE `'. IMAGES_TABLE .'` DROP `is_panorama`;');\r\n}", "public function ___uninstall() {\n\t\t$logFolder = $this->wire('config')->paths->assets . strtolower(__CLASS__);\n\t\tif(is_dir($logFolder)) {\n\t\t\tif(wireRmdir($logFolder, true) === false) throw new WireException(\"{$logFolder} could not be removed\");\n\t\t}\n\t}", "function deactivate_plugin() {\n\tdelete_option( 'rewrite_rules' );\n}", "function wp_deregister_script($handle)\n {\n }", "public function uninstall()\n {\n }", "public function uninstall()\n {\n }", "function deactivate_plugin() {}", "protected function cleanup()\n {\n $cache = sprintf('%s/phantomjs_*', sys_get_temp_dir());\n\n array_map('unlink', glob($cache));\n }", "protected function removeSymlink()\n {\n File::delete(public_path('theme'));\n }", "function remove_wp_embed_and_jquery() {\n\tif (!is_admin()) {\n\t\twp_deregister_script('wp-embed');\t\t\n\t}\n}", "function noc_deregister_scripts() {\n\n //Deregister styles\n\n\t// Parent\n\twp_dequeue_style( 'theme-style-child' );\n\twp_deregister_style( 'theme-style-child' );\n\n\t// Theme child from parent\n\twp_dequeue_style( 'theme-style' );\n\twp_deregister_style( 'theme-style' );\n\n\t// // tt-main-style\n\t// wp_dequeue_style( 'tt-main-style' );\n\t// wp_deregister_style( 'tt-main-style' );\n\n\t// // tt-theme-style\n\t// wp_dequeue_style( 'tt-theme-style' );\n\t// wp_deregister_style( 'tt-theme-style' );\n\n}", "function wpt_uninstall(){\n //Nothing to say for this version\n}", "function wpt_testimonial_uninstall(){\n\tdelete_option('wpt_effect');\n\tdelete_option('wpt_speed');\n\tdelete_option('wpt_sortby');\n\tdelete_option('wpt_orderby');\n\tdelete_option('wpt_viewall');\n\tdelete_option('wpt_viewall_page');\n}", "public static function _uninstall()\n\t{\n\t\tif( empty(self::$page_ids) )\n\t\t\terror_log('ABNOT@uninstall: Empty $page_ids!');\n\n\t\tforeach( self::$tools as $tool => $t )\n\t\t{\n\t\t\t$pid = get_page_by_title($t['title'], 'OBJECT', 'page');\n\t\t\twp_delete_post($pid->ID, true); // forced\n\t\t}\n\t}", "function crowdx_uninstall(){\r\n\r\n }", "function woodstock_removeDemoModeLink() {\n if ( class_exists('ReduxFrameworkPlugin') ) {\n remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks'), null, 2 );\n }\n if ( class_exists('ReduxFrameworkPlugin') ) {\n remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) ); \n }\n }", "function desativa_embed() {\n wp_deregister_script( 'wp-embed' );\n}", "function remove_default_admin_stylesheets() {\n \t// wp_deregister_style('wp-reset-editor-styles');\n }", "public static function uninstall() {\n // tenemos que borrar el custom post type\n // Es conveniente borrar todos los datos que ha generado el plugin en la BBDD\n }", "function tsapress_clean_assets($content) {\n\t$tsapress_base_dir = tsapress_base_dir();\n $theme_name = next(explode('/themes/', $content));\n \n $current_path = '/'.$tsapress_base_dir.'wp-content/themes/' . $theme_name;\n $new_path = '';\n $content = str_replace($current_path, $new_path, $content);\n \n return $content;\n}", "static function hookUninstall() {\n\t \t// Remove all options\n\t \tforeach(self::$plugin_options as $k => $v) {\n\t \t\tdelete_option($k);\n\t \t}\n\t }", "public static function uninstall() {\n\t\tUninstall::uninstall();\n\t}", "function wp_deregister_script( $handle ) {\r\n\tglobal $wp_scripts;\r\n\tif ( !is_a($wp_scripts, 'WP_Scripts') )\r\n\t\t$wp_scripts = new WP_Scripts();\r\n\r\n\t$wp_scripts->remove( $handle );\r\n}", "function remove_theme_mod($name)\n {\n }", "function uninstall(bool $deleteimages = false)\n{\n $meta = file_exists(DEFAULT_METAFILE) ? textFileToArray(DEFAULT_METAFILE) : null;\n $files = glob(VAR_FOLDER . DS . '{,.}[!.,!..]*', GLOB_MARK|GLOB_BRACE);\n foreach ($files as $file) {\n unlink($file);\n }\n\n if (true === $deleteimages) {\n $imagesdir = $meta && count($meta) && array_key_exists('imagesfolder', $meta) ? ROOT_FOLDER . DS . $meta['imagesfolder'] : DEFAULT_IMAGEFOLDER;\n\n $files = glob($imagesdir . DS . '{,.}[!.,!..]*', GLOB_MARK|GLOB_BRACE);\n foreach ($files as $file) {\n unlink($file);\n }\n }\n\n if ($meta) {\n unlink(DEFAULT_METAFILE);\n }\n}", "function delete_stylesheet() {\n\t\t\t$css_file = $this->get_stylesheet();\n\t\t\tThemify_Filesystem::delete($css_file,'f');\n\t\t}", "public function head_cleanup() {\n\n\t\tremove_action( 'wp_head', 'rsd_link' );\n\t\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t\tremove_action( 'wp_head', 'wp_generator' );\n\t}", "function deenqueue_parent_scripts_styles() {\n wp_dequeue_script( 'one-page-slitslider' );\n wp_deregister_script( 'one-page-slitslider' );\n wp_dequeue_script( 'one-page-custom' );\n wp_deregister_script( 'one-page-custom' );\n}", "function wpb_uninstall() {\n flush_rewrite_rules();\n }", "function crunchify_stop_loading_wp_embed() {\n if (!is_admin()) {\n wp_deregister_script('wp-embed');\n }\n}", "public function tear_down(): void {\n\t\tremove_action( 'wp_body_open', [ $this->instance, 'embed_web_stories' ] );\n\n\t\tremove_theme_support( 'web-stories' );\n\n\t\tdelete_option( Customizer::STORY_OPTION );\n\t\tupdate_option( 'stylesheet', $this->stylesheet );\n\n\t\tparent::tear_down();\n\t}", "static function uninstall(){\n $defaults = self::getdefaults();\n foreach ($defaults as $option ) {\n if ( !is_multisite() ) {\n delete_option($option);\n }\n else {\n delete_site_option($option);\n }\n }\n return;\n }", "abstract protected function deactivate_plugin();", "public function remove() {\n remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n remove_action( 'admin_print_styles', 'print_emoji_styles' );\n }", "function kadence_remove_demo() {\n if ( class_exists( 'ReduxFrameworkPlugin' ) ) {\n remove_filter( 'plugin_row_meta', array(\n ReduxFrameworkPlugin::instance(),\n 'plugin_metalinks'\n ), null, 2 );\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );\n }\n }", "public function deactivatePlugin();", "function classieraRemoveReduxDemoModeLink() { // Be sure to rename this function to something more unique\r\n if ( class_exists('ReduxFrameworkPlugin') ) {\r\n remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks'), null, 2 );\r\n }\r\n if ( class_exists('ReduxFrameworkPlugin') ) {\r\n remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) ); \r\n }\r\n}", "function spartan_head_cleanup() {\n\t// EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// index link\n\tremove_action( 'wp_head', 'index_rel_link' );\n\t// previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n // remove WP version from css\n add_filter( 'style_loader_src', 'spartan_remove_wp_ver_css_js', 9999 );\n // remove Wp version from scripts\n add_filter( 'script_loader_src', 'spartan_remove_wp_ver_css_js', 9999 );\n\n}", "public function clearRIssuesRtfplugins()\n {\n $this->collRIssuesRtfplugins = null; // important to set this to NULL since that means it is uninitialized\n }", "function wp_clean_plugins_cache($clear_update_cache = \\true)\n {\n }", "function webbusiness_reset_cache_custom_css() {\n\tdelete_transient('webbusiness_custom_css_preview');\n\twebbusiness_cache_custom_css_preview();\n}", "public function uninstallHook()\n\t{\n\t\t$ok =\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY) &&\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY_HASH);\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_STORE_AVATAR_HASHES)\n\t\t;\n\t}", "public function on_plugin_uninstall(): void {\n\t\t$this->remove_caps_from_roles();\n\t}", "public function deactivate()\n {\n $this->setTheme(null);\n $this->removeSymlink();\n }", "function clean_installation()\n{\n $files = glob(VAR_FOLDER . DS . '*');\n foreach ($files as $file) {\n if (is_file($file) && $file !== DEFAULT_ACCOUNTFILE && $FILE !== DEFAULT_METAFILE) {\n unlink($file);\n }\n }\n}", "function head_cleanup(){\n\tremove_action( 'wp_head', 'rsd_link' );\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\tremove_action( 'wp_head', 'index_rel_link' );\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\tremove_action( 'wp_head', 'wp_generator' );\n\tadd_filter( 'style_loader_src', 'remove_wp_ver_css_js', 9999 );\n\tadd_filter( 'script_loader_src', 'remove_wp_ver_css_js', 9999 );\n}", "public function on_plugin_uninstall(): void {\n\t\tif ( is_multisite() ) {\n\t\t\tdelete_site_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t}\n\t\tdelete_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t}", "public static function removeInstallToolEnableFile() {}", "public function on_plugin_uninstall(): void {\n\t\tdelete_post_meta_by_key( self::CROPPED_ID_POST_META_KEY );\n\t}", "function on_uninstall ()\n{\n}", "function on_uninstall ()\n{\n}", "function unhook_parent_style() {\n \n wp_dequeue_style( 'genericons' );\n\twp_deregister_style( 'genericons' );\n wp_dequeue_style( 'twentyfifteen-ie' );\n\twp_deregister_style( 'twentyfifteen-ie' );\n wp_dequeue_style( 'twentyfifteen-ie7' );\n\twp_deregister_style( 'twentyfifteen-ie7' );\n wp_dequeue_style( 'twentyfifteen-fonts' );\n\twp_deregister_style( 'twentyfifteen-fonts' );\n}", "function ahla_register_assets()\n{\n\t$assets = AHLAURL . '/assets';\n\t$ver \t = AHLAVER;\n\n\t// theme style.css\n\twp_register_style( 'theme-style' , get_stylesheet_uri() );\n\n\t// others\n\t$file = $assets.'/js/skip-link-focus-fix.js';\n\twp_register_script( 'skip-link-focus-fix', $file, array(), $ver, true );\n\n\tdo_action('ahla_register_assets');\n}", "function startertheme_remove_version() {\nreturn '';\n}", "function remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if ( class_exists( 'ReduxFrameworkPlugin' ) ) {\n remove_filter( 'plugin_row_meta', array(\n ReduxFrameworkPlugin::instance(),\n 'plugin_metalinks'\n ), null, 2 );\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );\n }\n }", "function deactivate_spark_cw_fresh() {\n require_once plugin_dir_path(__FILE__) . 'includes/class-spark-cw-fresh-deactivator.php';\n Spark_Cw_Fresh_Deactivator::deactivate();\n}", "function wp_clean_themes_cache($clear_update_cache = \\true)\n {\n }", "public function uninstall() {\n global $users;\n\n // Remove User Data\n foreach($users->db AS $username => $data) {\n unset($users->db[$username][\"media_order\"]);\n unset($users->db[$username][\"media_items_per_page\"]);\n unset($users->db[$username][\"media_layout\"]);\n unset($users->db[$username][\"media_favorites\"]);\n }\n $users->save();\n\n // Uninstall Plugin\n return parent::uninstall();\n }" ]
[ "0.7359264", "0.71813154", "0.713725", "0.6989342", "0.68762815", "0.68538064", "0.6853646", "0.6670943", "0.6644396", "0.6627345", "0.6602687", "0.6550454", "0.65490544", "0.6534477", "0.6534477", "0.6508509", "0.64985716", "0.64970005", "0.6459887", "0.6459345", "0.64584404", "0.645427", "0.645378", "0.64054966", "0.6383964", "0.6372252", "0.63660336", "0.63598233", "0.6335939", "0.6319304", "0.62985533", "0.6289108", "0.62866515", "0.6277745", "0.62055695", "0.62030625", "0.6194734", "0.6194734", "0.61888933", "0.6186312", "0.6179953", "0.6170347", "0.61466193", "0.61278206", "0.61233926", "0.61217624", "0.61115533", "0.6111146", "0.6111146", "0.61004347", "0.6099176", "0.60941666", "0.6093446", "0.60918933", "0.60901785", "0.60872215", "0.6085277", "0.60821784", "0.6079281", "0.60683525", "0.6068171", "0.6056964", "0.6054779", "0.6020377", "0.59980553", "0.5997387", "0.5996337", "0.5995659", "0.59944415", "0.5985256", "0.59828055", "0.597574", "0.5973938", "0.5957784", "0.5946255", "0.59430456", "0.5942413", "0.5941903", "0.5941777", "0.5939807", "0.59373987", "0.593509", "0.59287256", "0.5926264", "0.58988094", "0.58932465", "0.58923393", "0.588709", "0.58834755", "0.5872662", "0.5863342", "0.58624524", "0.5858486", "0.5858486", "0.58536345", "0.5848213", "0.58452106", "0.58415395", "0.5835864", "0.58279663", "0.5827849" ]
0.0
-1
inject css & js in htmlheader
function abl_droploader_head_end($evt, $stp) { global $event, $step, $prefs, $abl_droploader_prefs; if (($event == 'image' && (in_array($step, array('list', 'image_list', 'image_multi_edit', 'image_change_pageby', 'image_save', '')))) || ($event == 'article' && (in_array($step, array('create', 'edit'))))) { $abl_droploader_prefs = abl_droploader_load_prefs(); $css = ''; if (intval($abl_droploader_prefs['useDefaultStylesheet']) != 0) { $css .= '<link rel="stylesheet" href="../res/css/abl.droploader-app.css" type="text/css" media="screen,projection" />' . n; } if ($abl_droploader_prefs['customStylesheet'] != '') { $css .= '<link rel="stylesheet" href="' . $abl_droploader_prefs['customStylesheet'] . '" type="text/css" media="screen,projection" />' . n; } if ($css == '') { $css = '<link rel="stylesheet" href="../res/css/abl.droploader-app.css" type="text/css" media="screen,projection" />' . n; } $article_image_field_ids = '"' . implode('", "', explode(',', $abl_droploader_prefs['articleImageFields'])) . '"'; $script = '<script type="text/javascript"> var file_max_upload_size = ' . sprintf('%F', (intval($prefs['file_max_upload_size']) / 1048576)) . '; var file_max_files = 5; var image_max_upload_size = 1; var image_max_files = ' . intval($abl_droploader_prefs['imageMaxUploadCount']) . '; var reload_image_tab = ' . intval($abl_droploader_prefs['reloadImagesTab']) . '; var article_image_field_ids = new Array(' . $article_image_field_ids . '); var article_image_field = null; </script> <script src="../res/js/jquery.filedrop.js" type="text/javascript"></script> <script src="../res/js/jquery.droploader.js" type="text/javascript"></script> <script src="../res/js/abl.droploader-app.js" type="text/javascript"></script>' . n; echo $css . $script; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hookHeader()\n {\n // $this->context->controller->addJS('http://code.jquery.com/jquery-2.1.4.min.js');\n // $this->context->controller->addJS($this->_path.'views/js/bootstrap.min.js');\n $this->context->controller->addJS($this->_path.'views/js/front.js');\n $this->context->controller->addCSS($this->_path.'views/css/front.css');\n\n $this->context->controller->addJS($this->_path.'views/js/responsiveslides.js');\n $this->context->controller->addCSS($this->_path.'views/css/responsiveslides.css');\n $this->context->controller->addCSS($this->_path.'views/css/themes.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n\t{\n\t\t$this->context->controller->addJS($this->_path.'/views/js/front.js');\n\t\t$this->context->controller->addCSS($this->_path.'/views/css/front.css');\n\t}", "public function hookHeader(){\n $this->context->controller->addCSS($this->_path.'style.css');\n \n $this->context->controller->addJqueryPlugin(array('scrollTo', 'serialScroll'));\n $this->context->controller->addJS($this->_path.'script.js');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/owl.carousel.min.js');\n $this->context->controller->addCSS($this->_path.'/views/css/owl.carousel.min.css');\n\n $this->context->controller->addJS($this->_path.'/views/js/mf.custom.js');\n $this->context->controller->addCSS($this->_path.'/views/css/mf.theme.default.css');\n\n }", "public function hookHeader()\n {\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function _assign_xoops_header()\n {\n $header_class = webphoto_xoops_header::getInstance($this->_DIRNAME, $this->_TRUST_DIRNAME);\n $header_class->set_flag_css(true);\n $header_class->assign_for_main();\n }", "protected function setHeaders() {\n\t\tif(!self::$headerIncluded) {\n\n\t\t\tif($this->settings['includes']['jquery'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"></script>');\n\n if($this->settings['includes']['mediaelement'])\n\t\t\t $this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/mediaelement-and-player.min.js\"></script>');\n\n\t\t\tif($this->settings['includes']['jquery-resize'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/jquery.ba-resize.min.js\"></script>');\n\t\t\tif($this->settings['includes']['modernizr'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/modernizr-2.5.3.js\"></script>');\n\t\t\t\t\t\t\n\t\t\tif($this->settings['includes']['css'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/CSS/tx-vibeo.css\" />');\n\n if($this->settings['includes']['mediaelement-css'])\n\t\t\t $this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/mediaelementplayer.css\" />');\n\n if($this->settings['includes']['mediaelement-skin-css'])\n $this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/skin-gray.css\" />');\n\n\t\t\tself::$headerIncluded = true;\n\t\t}\n\t}", "public function prepareHead() {\r\n // add jQuery\r\n if($this->cdn_jquery) {\r\n $this->addJS('//code.jquery.com/jquery-2.1.0.min.js', true);\r\n $this->addJS('//code.jquery.com/jquery-migrate-1.2.1.min.js', true);\r\n } else {\r\n $this->addJS(array('jquery-2.1.0.min', 'jquery-migrate-1.2.1.min'));\r\n }\r\n // add bootstrap\r\n if($this->cdn_bootstrap) {\r\n $this->addCSS('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css', true);\r\n $this->addJS('//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', true);\r\n } else {\r\n $this->addCSS('bootstrap.min');\r\n $this->addJS('bootstrap.min');\r\n }\r\n \r\n $this->addCSS(array('bootstrap-switch.min', 'spectrum'));\r\n $this->addJS(array('plugins'));\r\n \r\n // ace code editor\r\n $this->addJS('libs/ace/ace.js', true);\r\n \r\n $this->addCSS('style');\r\n $this->addJS('script');\r\n \r\n $this->smarty->assign(array(\r\n 'title' => $this->title,\r\n 'css_files' => $this->css_files,\r\n 'js_files' => $this->js_files,\r\n ));\r\n }", "private function do_header() {\n $m_header = '';\n $m_header .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\n $m_header .= '<meta http-equiv=\"Content-Language\" content=\"en-gb\" />';\n // $m_header .= '<link rel=stylesheet href=' . $this->c_path . '/../css/reset.css type=text/css />';\n // $m_header .= '<link rel=stylesheet href=' . $this->c_path . '/../css/style.css type=text/css />';\n $this->c_header = $m_header;\n }", "function myheader($additionalHeaderContent = NULL) {\n\t\tprint '<html>';\n\t\t\tprint '<head>';\n\t\t\t\tprint '<title>';\n\t\t\t\t\tif (defined('TITLE')) {\n\t\t\t\t\t\tprint TITLE;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprint 'MiddleClik';\n\t\t\t\t\t}\n\t\t\t\tprint '</title>';\n\t\t\t\tprint \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\";\n\t\t\t\tprint $additionalHeaderContent;\n\t\t\t\tprint \"<style type=\\\"text/css\\\">\";\n\t\t\t\t\tprint '//this is where my css, js goes';\n\t\t\t\tprint \"</style>\";\n\t\t\tprint '</head>';\n\t}", "function head_css()\n{\n return get_view()->headLink() . get_view()->headStyle();\n}", "function header() {\n?>\n<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\n<?php \n // load the javascripts -- this is a little confusing and could be done more better.\n $this->jscript_list();\n $this->css_list();\n?> \n <Title><?php echo $this->title; ?></Title>\n</head>\n\n<?php \n }", "function setHeader($header_template_name)\n\t{\n\n\t\t$header_string\t\t=\t\t$this->gCache->cache_or_get(CACHE_CACHE_TIME_TINY, \"\",$header_template_name, \"load_template_file\",$header_template_name);\n\n\t\t# the header has special substitutions for jquery css and jquery js\n\t\t$jquery_ui_css_string\t=\t\"<link rel='stylesheet' href='\" . \tJQUERY_UI_CSS\t.\t\"' />\";\n\t\t$jquery_ui_js_string\t=\t'<script src=\"' . \tJQUERY_UI_JS\t.\t'\"></script>';\n\n\t\t$jquery_js_string\t\t=\t'<script src=\"' . \tJQUERY_JS\t\t.\t'\"></script>'. \"\\n\";\n\t\t$jquery_js_string\t\t.=\t'<script> window.jQuery || document.write(\"<script src=/app/includes/js/jquery/jquery-1.10.2.min.js><\\/script>\")</script>';\n\n\n\t\t$basic_tags\t\t\t=\n\n\t\t\tarray\n\t\t\t(\n\t\t\t\t\"{{header}}\"\t\t\t\t=>\t$header_string,\n\t\t\t\t\"{{jquery_ui_css}}\"\t\t\t=>\t$jquery_ui_css_string,\n\t\t\t\t\"{{jquery_ui_js}}\"\t\t\t=>\t$jquery_ui_js_string,\n\t\t\t\t\"{{jquery_js}}\"\t\t\t\t=>\t$jquery_js_string,\n\t\t\t);\n\n\n\t\t# append the array\n\t\t$this->sub_tags($basic_tags);\n\n\n\t}", "function loadInHeader() {\n $this->metaData();\n//\t\t$this->loadAddOns();\n $this->onHead(\"onHead\"); // call back to onHead in extensions things js, etc in head\n $this->onEditor(\"onHead\"); // only when login to admin, for fck to work??\n //If not in admin, blank initEditor\n if (!isset($_SESSION['name'])) { // not sure what this does??\n print \"<script type=\\\"text/javascript\\\">function initeditor(){}</script>\\n\";\n }\n }", "protected function renderJavaScriptAndCss() {}", "function getHTML_additionalHeaderData() {\n\t\t\t// get js configs\n\t\t\t// get topical element and overwrite startID in appConf['js.']['config.']\n\t\tif ($this->appConf['topicAtStart']) {\n\t\t\t$this->appConf['js.']['config.']['startIndex'] = $this->appConf['topicId'];\n\t\t}\n\t\t\t// only boolean and integers allowed, strings ar not supported\n\t\tif (is_array($this->appConf['js.']['config.'])) {\n\t\t\t$configArray = array();\n\t\t\tforeach ($this->appConf['js.']['config.'] as $key => $val) {\n\t\t\t\t$configArray[] = trim($key) . ': ' . trim($val);\n\t\t\t}\n\t\t\t$config = implode(', ',$configArray);\n\t\t}\n\t\t\t// additional headers as css & js\n\t\t$GLOBALS['TSFE']->additionalHeaderData['contentcoverflow'] .= '\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\" src=\"' . $this->appConf['js.']['core.']['file'] . '\"></script>\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\" src=\"' . $this->appConf['js.']['more.']['file'] . '\"></script>\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\" src=\"' . $this->appConf['js.']['mod.']['file'] . '\"></script>\n\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->appConf['css.']['file'] . '\" />\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t/* <![CDATA[ */\n\t\t\t\tvar myMooFlowPage = {\n\t\t\t\t\tstart: function(){\n\t\t\t\t\t\tvar mf = new MooFlow($(\\'MooFlow\\'), {\n\t\t\t\t\t\t\t' . $config . ',\n\t\t\t\t\t\t\t\\'onClickView\\': function(obj){\n\t\t\t\t\t\t\t\tmyMooFlowPage.link(obj);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\\'onStart\\': function(){\n\t\t\t\t\t\t\t\tthis.autoPlay = this.auto.periodical(this.options.interval, this);\n\t\t\t\t\t\t\t\tthis.isAutoPlay = true;\n\t\t\t\t\t\t\t\tthis.fireEvent(\\'autoPlay\\');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\n\t\t\t\t\tlink: function(result){\n\t\t\t\t\t\tif (result.target == \"_blank\") {\n\t\t\t\t\t\t\tdocument.location = result.href;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdocument.location = result.href;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\twindow.addEvent(\\'domready\\', myMooFlowPage.start);\n\n\t\t\t\t/* ]]> */\n\t\t\t</script>\n\t\t';\n\t}", "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "function painter_head() {\n\t\techo '<script>window.ideaspace_site_path = \"' . url('/') . '\";</script>';\n\n\t\techo '<script src=\"' . url('public/a-painter/vendor/aframe-input-mapping-component.js') . '\"></script>';\n echo '<script src=\"' . url('public/a-painter/build.js') . '\"></script>';\n echo '<script src=\"' . url('public/a-painter/vendor/aframe-teleport-controls.min.js') . '\"></script>';\n echo '<script src=\"' . url('public/a-painter/vendor/aframe-tooltip-component.min.js') . '\"></script>';\n echo '<link rel=\"stylesheet\" href=\"' . url('public/a-painter/css/main.css') . '\">';\n echo '<link rel=\"manifest\" href=\"' . url('public/a-painter/manifest.webmanifest') . '\">';\n}", "public function addScriptToHeader($context)\n\t\t{\n\t\t\tif(!empty(Symphony::Engine()->Author))\n\t\t\t{\n\t\t\t\tif(Symphony::Engine()->Author->isDeveloper())\n\t\t\t\t{\n\t\t\t\t\t$context['output'] = str_replace('</head>', '\n\t\t\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" media=\"screen,tv,projection\" href=\"'.URL.'/extensions/frontend_debug/assets/frontend_debug.css\" />\n\t\t\t\t\t\t<script type=\"text/javascript\" src=\"'.URL.'/extensions/frontend_debug/assets/frontend_debug.js\"></script>\n\t\t\t\t\t\t</head>', $context['output']);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function addHeaderCode() {\r\n echo '<link type=\"text/css\" rel=\"stylesheet\" href=\"' . plugins_url('css/bn-auto-join-group.css', __FILE__).'\" />' . \"\\n\";\r\n}", "protected function addJS() {\n foreach ($this->js_files as $js_file) {\n $this->header.=\"<script type='text/javascript' src='\" . __ASSETS_PATH . \"/\" . $js_file . \"'></script> \\n\";\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->addJS($this->_path.'views/js/back.js');\n $this->context->addCSS($this->_path.'views/css/back.css');\n $this->context->addJS($this->_path.'views/fonts/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/jquery.dataTables.css');\n }\n }", "public function hookHeader()\n {\n $language_code = $this->context->language->language_code;\n $this->context->controller->addJS($this->_path . '/views/js/front.js');\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n if (version_compare(_PS_VERSION_, '1.6.1.0', '>=')) {\n Media::addJsDef(\n array(\n 'wi_weather_provider' => Configuration::get('WI_WEATHER_PROVIDER'),\n 'wi_weather_url' => $this->getUrl(),\n 'wi_weather_city' => $this->getCity($language_code)\n )\n );\n } else {\n $this->context->smarty->assign(\n array(\n 'wi_weather_provider' => Configuration::get('WI_WEATHER_PROVIDER'),\n 'wi_weather_url' => $this->getUrl(),\n 'wi_weather_city' => $this->getCity($language_code)\n )\n );\n\n return $this->context->smarty->fetch(\n _PS_MODULE_DIR_ . $this->name\n . DIRECTORY_SEPARATOR . 'views'\n . DIRECTORY_SEPARATOR . 'templates'\n . DIRECTORY_SEPARATOR . 'front'\n . DIRECTORY_SEPARATOR . 'javascript.tpl'\n );\n }\n }", "public function hookHeader()\n {\n if ($this->context->controller instanceof OrderConfirmationController) {\n $this->context->controller->addJS($this->_path . '/views/js/scratch-card.js');\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n }\n }", "function Header(){\n\t\t}", "function divi_assets_header() {\n\n // Header script loading is simplistic in this starter kit but you may want to change what file is loaded based on various conditions; check out the footer asset loader for an example\n $file = 'divi-header';\n// wp_enqueue_script( 'divi-header', get_stylesheet_directory_uri() . '/js/' . $file . '.js', $deps = array('jquery'), filemtime( get_stylesheet_directory() . '/js/' . $file . '.js' ), false );\n\n // Register and enqueue our main stylesheet with versioning based on last modified time\n wp_register_style( 'divi-style', get_template_directory_uri() . '/style.css', $dependencies = array(), filemtime( get_template_directory() . '/style.css' ) );\n wp_enqueue_style( 'divi-style' );\n// wp_register_style( 'child-style', get_stylesheet_uri(), $dependencies = array(), filemtime( get_stylesheet_directory() . '/style.css' ) );\n// wp_enqueue_style( 'child-style' );\n}", "protected function addCSS() {\n foreach ($this->css_files as $css_file) {\n $this->header.=\"<link rel='stylesheet' href='\" . __ASSETS_PATH . \"/\" . $css_file . \"'/> \\n\";\n }\n }", "function get_css_header();", "public function hookDisplayHeader($params)\n {\n $this->context->controller->addCSS($this->_path.'views/css/front.css');\n }", "private function displayHeader(){\n\t\t\t$html = '<!doctype html>'.\"\\n\";\n\t\t\t$html .= '<!--[if LT IE 9]>'.\"\\n\";\n\t\t\t$html .= '<html class=\"ie\">'.\"\\n\";\n\t\t\t$html .= '<![endIF]-->'.\"\\n\";\n\t\t\t$html .= '<!--[if !IE]><!-->'.\"\\n\";\n\t\t\t$html .= '<html>'.\"\\n\";\n\t\t\t$html .= '<!--<![endif]-->'.\"\\n\";\n\t\t\t$html .= '<head>'.\"\\n\";\n\t\t\t$html .= '<title> PCInsight | ' .$this->pageInfo['pageTitle'].'</title>'.\"\\n\";\n\t\t\t$html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"scripts/loadCSS.php\" />'.\"\\n\";\n\t\t\t$html .= '<link rel=\"shortcut icon\" type=\"image/png\" href=\"resources/images/favicon.png\" />'.\"\\n\";\n\t\t\t$html .= '<link rel=\"icon\" type=\"image/x-icon\" href=\"resources/images/favicon.ico\" />'.\"\\n\";\n\t\t\t$html .= '<meta charset=\"UTF-8\" />'.\"\\n\";\n\t\t\t$html .= '<meta name=\"description\" content=\"'.$this->pageInfo['pageDescription'].'\" />'.\"\\n\";\n\t\t\t$html .= '<script src=\"resources/lib/jquery-1.10.2.min.js\" type=\"text/javascript\"></script>'.\"\\n\";\n\t\t\t$html .= '<script src=\"resources/js/main.js\" type=\"text/javascript\"></script>'.\"\\n\";\n\t\t\t$html .= '</head>'.\"\\n\";\n\t\t\t$html .= '<body class=\"nojs\">'.\"\\n\";\n\t\t\t$html .= '<div id=\"topbar\" class=\"clearfix\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"wrapper\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"left\">'.\"\\n\";\n\t\t\t$html .= '<h1 class=\"mainHeader\"><a href=\"index.php\"><span> PC</span>insight </a></h1>'.\"\\n\";\n\t\t\t$html .= '<nav>'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php\" accesskey=\"1\"> Home </a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=9\" accesskey=\"2\"> Articles </a></li>'.\"\\n\";\t\t\n\t\t\t$html .= '<li><a href=\"index.php?p=10\" accesskey=\"3\"> About </a></li>'.\"\\n\";\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '</nav>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '<div class=\"mobilenav\">'.\"\\n\";\n\t\t\t$html .= '<span class=\"mobileNavBu\"></span>'.\"\\n\";\n\t\t\t$html .= '<div class=\"menu\">'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php\"> Home </a></li>'.\"\\n\"; \n\t\t\t$html .= '<li><a href=\"index.php?p=9\"> Articles </a></li>'.\"\\n\"; \t\t\t\n\t\t\t$html .= '<li><a href=\"index.php?p=10\"> About </a></li>'.\"\\n\";\n\t\t\tif (!(isset($_SESSION['username']))){\n\t\t\t\t$html .= '<li><a href=\"index.php?p=2\" accesskey=\"4\"> Login </a></li>'.\"\\n\";\n\t\t\t\t$html .= '<li><a href=\"index.php?p=3\" accesskey=\"5\"> Register </a></li>'.\"\\n\";\n\t\t\t} else {\n\t\t\t\tif ($this->model->isAdmin()){\n\t\t\t\t\t$html .= '<li><a href=\"admin/\"> Admin </a></li>'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$html .= '<li><a href=\"index.php?p=5\" accesskey=\"6\"> Logout </a></li>'.\"\\n\";\n\t\t\t}\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '<form action=\"index.php\" method=\"get\">'.\"\\n\";\n\t\t\t$html .= '<input type=\"hidden\" name=\"p\" value=\"7\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"text\" class=\"search\" placeholder=\"Search\" name=\"q\" value=\"'.$_GET['q'].'\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"submit\" class=\"btn blue small\" value=\"search\"/>'.\"\\n\";\n\t\t\t$html .= '</form>'.\"\\n\";\t\t\t\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '<div class=\"right\">'.\"\\n\";\n\t\t\tif (!(isset($_SESSION['username']))){\n\t\t\t\t$html .= '<div class=\"login\">'.\"\\n\";\n\t\t\t\t$html .= '<a href=\"index.php?p=2\"> Login </a>'.\"\\n\";\n\t\t\t\t$html .= '<a href=\"index.php?p=3\"> Register </a>'.\"\\n\";\n\t\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t} else {\n\t\t\t\t$html .= '<div class=\"login\">'.\"\\n\";\n\t\t\t\t$html .= '<a href=\"index.php?p=5\"> Logout </a>'.\"\\n\";\n\t\t\t\tif ($this->model->isAdmin()){\n\t\t\t\t\t$html .= '<a href=\"admin/\"> Admin </a>'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t}\n\t\t\t$html .= '<div class=\"search\">'.\"\\n\";\n\t\t\t$html .= '<form action=\"index.php\" method=\"get\">'.\"\\n\"; \n\t\t\t$html .= '<input type=\"hidden\" name=\"p\" value=\"7\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"text\" class=\"search\" placeholder=\"Search\" name=\"q\" value=\"'.$_GET['q'].'\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"submit\" class=\"btn blue small\" value=\"Search\" />'.\"\\n\";\n\t\t\t$html .= '</form>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\tif (!$this->db->isRegistered()){\n\t\t\t\t$html .= '<div class=\"register\"><p> Please register your account <a href=\"index.php?p=13\">here</a></p></div>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}", "private function includeJavaScript() {\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId]\n\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t'pi1/tx_explanationbox_pi1.js\">' .\n\t\t\t'</script>';\n\n\t\tif ($this->hasConfValueString('mooTools')) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId . '_moo']\n\t\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t\t$this->getConfValueString('mooTools') . '\">' .\n\t\t\t\t'</script>';\n\t\t}\n\t}", "public function control_panel__add_to_head()\n\t{\n\t\tif ( URL::getCurrent(false) == '/publish' ) {\n\t\t\treturn $this->css->link('fileclerk.css');\n\t\t}\n\t}", "function add_head() {\r\n\t\tglobal $locale;\r\n\t\t$wpca_settings = get_option('wpcareers');\r\n\t\techo \"<link rel=\\\"stylesheet\\\" href=\\\"\" . $this->plugin_url . \"/themes/default/css/default.css\\\" type=\\\"text/css\\\" media=\\\"screen\\\">\";\r\n\t\tif($wpca_settings['edit_style']==null || $wpca_settings['edit_style']=='plain') {\r\n\t\t\t// nothing\r\n\t\t} elseif($wpca_settings['edit_style']=='tinymce') {\r\n\t\t\t// activate these includes if the user chooses tinyMCE on the settings page\r\n\t\t\t$mce_path = get_option('siteurl');\r\n\t\t\t$mce_path .= '/wp-includes/js/tinymce/tiny_mce.js';\r\n\t\t\techo '<script type=\"text/javascript\" src=\"' . $mce_path . '\"></script>';\r\n\t\t}\r\n\t}", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name || Tools::getValue('configure') == $this->name) {\n $this->context->controller->addJS($this->_path . 'views/js/back.js');\n $this->context->controller->addCSS($this->_path . 'views/css/back.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name || Tools::getValue('configure') == $this->name) {\n $this->context->controller->addJS($this->_path . 'views/js/back.js');\n $this->context->controller->addCSS($this->_path . 'views/css/back.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n }", "function ind_header( ) {\n\t$css = get_theme_root().\"/\".get_template().\"/indizar.css\";\n\tif(file_exists($css)) {\n\t\t$css_register = get_bloginfo('template_directory').'/indizar.css';\n\t} else {\n\t\t$css_register = ind_plugin_url('/css/indizar.css');\n\t}\n\t\n\tif((is_single() || is_page()) && INDIZAR_DIV) {\n\t\t//Define custom JavaScript options\n\t\t//$div = str_replace(array('%id%'), array(get_the_ID()), INDIZAR_DIV);\n\t\t$div = INDIZAR_DIV;\n\t\t$top = INDIZAR_DIV;\n\t\tif(INDIZAR_TOPDIV)\n\t\t\t$top = INDIZAR_TOPDIV;\n\t\t//$top = str_replace(array('%id%'), array(get_the_ID()), $top);\n\t\techo \"<script type='text/javascript'>\n\t\tindizar_div = '$div';\n\t\tindizar_top = '$top';\n\t\t</script>\n\t\t\";\n\n\t\t//Declare javascript\n\t\twp_register_script('scrollto', $url.'/wp-content/plugins/indizar/scripts/jquery.scrollTo-min.js', array('jquery'), INDIZAR_HEADER_V);\n\t\twp_register_script('indizar', $url.'/wp-content/plugins/indizar/indizar.js', array('scrollto'), INDIZAR_HEADER_V);\n\t\twp_enqueue_script('indizar');\n\t\twp_print_scripts( array( 'indizar' ));\n\t}\n\t\n\t//Declare style\n\twp_register_style('indizar', $css_register, false, INDIZAR_HEADER_V);\n\twp_enqueue_style('indizar');\n\twp_print_styles( array( 'indizar' ));\n}", "public function init()\n {\n $this->view->headScript()->exchangeArray(array());\n $this->view->headScript()->appendFile('http://code.jquery.com/jquery.js','text/javascript');\n $this->view->headScript()->appendFile('http://code.jquery.com/ui/1.10.2/jquery-ui.js','text/javascript');\n $this->view->headScript()->appendFile($this->view->baseUrl('/js/bootstrap.min.js'),'text/javascript');\n $this->view->headLink()->exchangeArray(array());\n $this->view->headLink()->appendStylesheet('http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css'); \n $this->view->headLink()->appendStylesheet($this->view->baseUrl('/css/bootstrap.min.css')); \n //$this->view->headLink()->appendStylesheet($this->view->baseUrl('/css/bootstrap-responsive.min.css')); \n $this->view->headLink()->appendStylesheet($this->view->baseUrl('/css/planner.css')); \n $this->view->doctype('XHTML1_STRICT');\n $this->view->headMeta()->exchangeArray(array());\n $this->view->headMeta()\n ->appendName('keywords', 'Homepage')\n ->appendHttpEquiv('viewport','width=device-width, initial-scale=1.0')\n ->appendHttpEquiv('pragma', 'no-cache')\n ->appendHttpEquiv('Cache-Control', 'no-cache')\n ->appendHttpEquiv('Content-Type','text/html; charset=UTF-8')\n ->appendHttpEquiv('Content-Language', 'en-UK')\n ->appendHttpEquiv('X-UA-Compatible', 'IE=edge,chrome=1');\n \n \n }", "public function addHead()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/head.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/head.php\");\n }\n }", "function load_header(){\n\t\techo \"<div style='background:darkblue; height:100px; '> HEADER </div>\";\n\t}", "function getHeader(){\n\t\trequire 'pages/headerfooter/header.html';\n\t}", "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\n\t}", "public static function setHTMLHeader($header) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::setHTMLHeader($header);\t\t\n\t}", "public function header_output() {\n\n\t\t?>\n\t\t<style type='text/css'>\n\t\t\t#site-footer {\n\t\t\t\tbackground-color:#<?php echo get_theme_mod('footer_bg_color') ?> ;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\n\n\t}", "public function buildHeadMarkup(){\n\n echo file_get_contents(\"head/home.html\");\n\n $this->head_script_tags = \"\";\n\n foreach( $this->head_scripts as $value ){\n\n $this->head_script_tags .= \"<script src=\\\"\" . $value . \"\\\"></script>\";\n\n }\n\n $this->head = file_get_contents(\"head/home.html\").$this->head_script_tags.\"</head>\";\n\n }", "function head(){\n\t?><head>\n\t<meta charset=\"UTF-8\">\n\t<title>EEMS</title>\n\t<link rel=\"stylesheet\" href=\"css/style_web.css\" type=\"text/css\">\n\t</head><?php\n}", "function admin_header($title) {\n $rtn_str = \"<html><head><title>$title</title>\";\n $rtn_str .= '<link href=\"assets/jquery-ui/css/smoothness/jquery-ui-1.8.17.custom.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" />';\n $rtn_str .= '<link href=\"assets/admin.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" />';\n \n $rtn_str .= '<script src=\"assets/jquery.min.js\" type=\"text/javascript\"></script>';\n $rtn_str .= '<script src=\"assets/jquery-ui/js/jquery-ui-1.8.17.custom.min.js\" type=\"text/javascript\"></script>';\n \n $rtn_str .= '<script src=\"assets/jquery.tablesorter.min.js\" type=\"text/javascript\"></script>';\n \n $rtn_str .= \"<body><div id='container'>\";\n \n return $rtn_str;\n}", "protected function setHeader($header_extra = '') {\n $this->header = \"<!DOCTYPE html> \\n <html> \\n <head> \\n <meta charset='utf-8'> \\n <title>Log-in Page Project</title>\";\n $this->loadConfig();\n $this->addMeta();\n $this->addJS();\n $this->addCSS();\n $this->header.=$header_extra;\n $this->header.=\"</head>\";\n return $this->header;\n }", "public function head_add($html) {\n\t\tif (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\t$this->_head[] .= $html;\n\t}", "public function hookbackOfficeHeader()\n\t{\n\t\tif (isset(Context::getContext()->controller) && $this->context->controller != null)\n\t\t\t$this->context->controller->addJS($this->_path.'js/clickline_order.js');\n\n//Ponemos el css para el admin\n\t\tif ((int) strcmp((version_compare(_PS_VERSION_, '1.5', '>=') ? Tools::getValue('configure') : Tools::getValue('module_name')), $this->name) == 0)\n\t\t{\n\n\t\t\tif (isset(Context::getContext()->controller) && $this->context->controller != null)\n\t\t\t{\n\t\t\t\t$this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/admin.css');\n\t\t\t\t$this->context->controller->addJS(_MODULE_DIR_.$this->name.'/js/admin.js');\n\t\t\t}\n\t\t}\n\t}", "function addHead()\n\t{\n\n\t\t$app = JFactory::getApplication();\n\t\t$user = JFactory::getUser();\n\t\t$input = $app->input;\n\n\t\t$responsive = $this->getParam('responsive', 1);\n\t\t$navtype = $this->getParam('navigation_type', 'joomla');\n\t\t$navtrigger = $this->getParam('navigation_trigger', 'hover');\n\t\t$offcanvas = $this->getParam('navigation_collapse_offcanvas', 0) || $this->getParam('addon_offcanvas_enable', 0);\n\t\t$legacycss = $this->getParam('legacy_css', 0);\n\t\t$frontedit = in_array($input->getCmd('option'), array('com_media', 'com_config'))\t//com_media or com_config\n\t\t\t\t\t\t\t\t\t\t|| in_array($input->getCmd('layout'), array('edit'))\t\t\t\t\t\t\t\t//edit layout\n\t\t\t\t\t\t\t\t\t\t|| (version_compare(JVERSION, '3.2', 'ge') && $user->id && $app->get('frontediting', 1) && \n\t\t\t\t\t\t\t\t\t\t\t\t($user->authorise('core.edit', 'com_modules') || $user->authorise('core.edit', 'com_menus')));\t//frontediting\n\n\t\t// LEGACY COMPATIBLE\n\t\tif($legacycss){\n\t\t\t$this->addCss('legacy-grid');\t//legacy grid\n\t\t\t$this->addStyleSheet(T3_URL . '/fonts/font-awesome/css/font-awesome.css'); //font awesome 3\n\t\t}\n\n\t\t// FRONTEND EDITING\n\t\tif($frontedit){\n\t\t\t$this->addCss('frontend-edit');\n\t\t}\n\n\t\t// BOOTSTRAP CSS\n\t\t$this->addCss('bootstrap', false);\n\n\t\t// TEMPLATE CSS\n\t\t$this->addCss('template', false);\n\n\t\tif (!$responsive && $this->responcls) {\n\t\t\t$this->addCss('non-responsive'); //no responsive\n\n\t\t\t$nonrespwidth = $this->getParam('non_responsive_width', '970px');\n\t\t\tif(preg_match('/^(-?\\d*\\.?\\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/', $nonrespwidth, $match)){\n\t\t\t\t$nonrespwidth = $match[1] . (!empty($match[2]) ? $match[2] : 'px');\n\t\t\t}\n\t\t\t$this->addStyleDeclaration('.container {width: ' . $nonrespwidth . ' !important;}');\n\t\t\n\t\t} else if(!$this->responcls){\n\t\t\t\n\t\t\t// BOOTSTRAP RESPONSIVE CSS\n\t\t\t$this->addCss('bootstrap-responsive');\n\t\t\t\n\t\t\t// RESPONSIVE CSS\n\t\t\t$this->addCss('template-responsive');\n\t\t}\n\n\t\t// add core megamenu.css in plugin\n\t\t// deprecated - will extend the core style into template megamenu.less & megamenu-responsive.less\n\t\t// to use variable overridden in template\n\t\tif($navtype == 'megamenu'){\n\n\t\t\t// If the template does not overwrite megamenu.less & megamenu-responsive.less\n\t\t\t// We check and included predefined megamenu style in base\n\t\t\tif(!is_file(T3_TEMPLATE_PATH . '/less/megamenu.less')){\n\t\t\t\t$this->addStyleSheet(T3_URL . '/css/megamenu.css');\n\n\t\t\t\tif ($responsive && !$this->responcls){\n\t\t\t\t\t$this->addStyleSheet(T3_URL . '/css/megamenu-responsive.css');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// megamenu.css override in template\n\t\t\t$this->addCss('megamenu');\n\t\t}\n\n\t\t// Add scripts\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\n\t\t\tJHtml::_('jquery.framework');\n\t\t} else {\n\t\t\t$scripts = @$this->_scripts;\n\t\t\t$jqueryIncluded = 0;\n\t\t\tif (is_array($scripts) && count($scripts)) {\n\t\t\t\t//simple detect for jquery library. It will work for most of cases\n\t\t\t\t$pattern = '/(^|\\/)jquery([-_]*\\d+(\\.\\d+)+)?(\\.min)?\\.js/i';\n\t\t\t\tforeach ($scripts as $script => $opts) {\n\t\t\t\t\tif (preg_match($pattern, $script)) {\n\t\t\t\t\t\t$jqueryIncluded = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$jqueryIncluded) {\n\t\t\t\t$this->addScript(T3_URL . '/js/jquery-1.8.3' . ($this->getParam('devmode', 0) ? '' : '.min') . '.js');\n\t\t\t\t$this->addScript(T3_URL . '/js/jquery.noconflict.js');\n\t\t\t}\n\t\t}\n\n\t\tdefine('JQUERY_INCLUED', 1);\n\n\n\t\t// As joomla 3.0 bootstrap is buggy, we will not use it\n\t\t$this->addScript(T3_URL . '/bootstrap/js/bootstrap.js');\n\t\t// a jquery tap plugin\n\t\t$this->addScript(T3_URL . '/js/jquery.tap.min.js');\n\n\t\t// add css/js for off-canvas\n\t\tif ($offcanvas && ($this->responcls || $responsive)) {\n\t\t\t$this->addCss('off-canvas', false);\n\t\t\t$this->addScript(T3_URL . '/js/off-canvas.js');\n\t\t}\n\n\t\t$this->addScript(T3_URL . '/js/script.js');\n\n\t\t//menu control script\n\t\tif ($navtrigger == 'hover') {\n\t\t\t$this->addScript(T3_URL . '/js/menu.js');\n\t\t}\n\n\t\t//reponsive script\n\t\tif ($responsive && !$this->responcls) {\n\t\t\t$this->addScript(T3_URL . '/js/responsive.js');\n\t\t}\n\n\t\t//some helper javascript functions for frontend edit\n\t\tif($frontedit){\n\t\t\t$this->addScript(T3_URL . '/js/frontend-edit.js');\n\t\t}\n\n\t\t//check and add additional assets\n\t\t$this->addExtraAssets();\n\t}", "function dw2_header_prive($flux) {\r\n\t\t$flux .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'._DIR_PLUGIN_DW2.'dw2_styles.css\" />'.\"\\n\";\r\n\t\t$flux .= '<script type=\"text/javascript\" src=\"'._DIR_PLUGIN_DW2.'dw2_back.js\"></script>'.\"\\n\";\r\n\t\treturn $flux;\r\n\t}", "function asu_brand_head_inject() {\n $settings = asu_brand_get_block_settings();\n $cache_id = 'asu_brand:head';\n \n $head_output = asu_brand_get_cached_content($cache_id, $settings->head_path);\n\n // Inject header javascript into <head> and set the weight to a high negative value.\n $asu_sso_signedin = $settings->js_settings['asu_sso_signedin'];\n $asu_sso_signinurl = $settings->js_settings['asu_sso_signinurl'];\n $asu_sso_signouturl = $settings->js_settings['asu_sso_signouturl'];\n $inline_script = <<<EOL\n <script type=\"text/javascript\">\n <!--//--><![CDATA[//><!--\n var ASUHeader = ASUHeader || {};\n ASUHeader.user_signedin = $asu_sso_signedin;\n ASUHeader.signin_url = \"$asu_sso_signinurl\";\n ASUHeader.signout_url = \"$asu_sso_signouturl\";\n //--><!]]>\n </script>\nEOL;\n \n // TODO: If asu.edu/asuthemes/x/headers/default.shtml and asu.edu/asuthemes/x/js/asu_header.js\n // get updated we can remove the first drupal_add_html_head() and $inline_script above.\n drupal_add_js(array('asu_brand' => $settings->js_settings), 'setting');\n drupal_add_js(drupal_get_path('module', 'asu_brand') . '/asu_brand.js', array());\n drupal_add_html_head(array('#type' => 'markup', '#markup' => $inline_script, '#weight' => -100), 'asu_brand_head_js');\n drupal_add_html_head(array('#type' => 'markup', '#markup' => $head_output, '#weight' => -99), 'asu_brand_head');\n}", "private function addCSS()\n {\n Filters::add('head', array($this, 'renderRevisionsCSS'));\n }", "public function admin_head()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->admin_ajax_handler();\n \n $head_content = $this->standard_head(); // We start with the standard stuff.\n \n $head_content .= '<script type=\"text/javascript\" src=\"https://maps.google.com/maps/api/js?sensor=false\"></script>'; // Load the Google Maps stuff for our map.\n \n $head_content .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"';\n \n $url = $this->get_plugin_path();\n \n $head_content .= htmlspecialchars($url);\n \n $head_content .= 'admin_styles.css\" />';\n \n $head_content .= '<script type=\"text/javascript\" src=\"';\n \n $head_content .= htmlspecialchars($url);\n \n if (!defined('_DEBUG_MODE_')) {\n $head_content .= 'js_stripper.php?filename=';\n }\n \n $head_content .= 'admin_javascript.js\"></script>';\n \n return $head_content;\n }", "public function hookBackOfficeHeader()\n {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n }", "public function hookBackOfficeHeader()\n\t{\n\t\tif (Tools::getValue('module_name') == $this->name) {\n\t\t\t$this->context->controller->addJS($this->_path.'views/js/back.js');\n\t\t\t$this->context->controller->addCSS($this->_path.'views/css/back.css');\n\t\t}\n\t}", "public function hookDisplayBackOfficeHeader()\n {\n $this->context->controller->addCSS('modules/backup_pro/views/css/backup_pro.css', true);\n }", "function get_html_header();", "function html_header()\n{\n\techo \"<html>\\n<head>\\n\";\n\techo \"\\t<title>CalDAVTester GUI</title>\\n\";\n\tif (file_exists(__DIR__.'/jquery.js'))\n\t{\n\t\techo \"\\t<script src='jquery.js'></script>\\n\";\n\t}\n\telse\n\t{\n\t\techo \"\\t<script src='https://code.jquery.com/jquery-2.2.4.min.js' integrity='sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=' crossorigin='anonymous'></script>\\n\";\n\t}\n\techo \"\\t<script src='gui.js'></script>\\n\";\n\techo \"\\t<link type='text/css' href='gui.css' rel='StyleSheet'/>\\n\";\n\techo \"</head>\\n<body>\\n\";\n}", "public function hookHeader()\n {\n if (is_dir(_PS_MODULE_DIR_ . $this->name . '/views/fonts/front/' . $this->context->language->iso_code)) {\n $this->context->controller->addCSS($this->_path . 'views/css/front.css');\n }\n }", "protected function htmlHead() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n echo str_repeat(\"\\t\",1) . \"<head>\\n\";\n echo str_repeat(\"\\t\",2) . \"<title>Евиденција волонтера</title>\\n\";\n echo str_repeat(\"\\t\",2) . \"<meta charset=\\\"UTF-8\\\">\\n\";\n echo str_repeat(\"\\t\",2) . \"<link rel=\\\"stylesheet\\\" href=\\\"css/style.css\\\">\\n\";\n if( !is_null($this->cssfile) ) {\n echo str_repeat(\"\\t\",2) . \"<link rel=\\\"stylesheet\\\" href=\\\"css/{$this->cssfile}\\\">\\n\";\n }\n echo str_repeat(\"\\t\",1) . \"</head>\\n\";\n }", "function twentyten_admin_header_style() {\n\t?>\n\t<style type=\"text/css\" id=\"twentyten-admin-header-css\">\n\t/* Shows the same border as on front end */\n\t#headimg {\n\tborder-bottom: 1px solid #000;\n\tborder-top: 4px solid #000;\n\t}\n\t/* If header-text was supported, you would style the text with these selectors:\n\t#headimg #name { }\n\t#headimg #desc { }\n\t*/\n\t</style>\n\t<?php\n\t}", "public function __invoke() {\n//\t\t\t$this->register_effect($e);\n\n\t\tif ($this->header_js) {\n\t\t$this->load_jquery();\n\t\t?>\n<script>\n<?php echo $this->header_js ?>\n</script>\n\n\t\t<?php\n\t\t}\n\t}", "private function renderHead() {\n\t\t\n\t\t\t$this->outputLine('<head>');\n\t\t\t\n\t\t\tif ($this->_title != '') {\n\t\t\t\t$this->outputLine('\t<title>' . $this->_title . '</title>');\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('\t<base href=\"' . $this->_base . '\" />');\n\t\t\t\n\t\t\t$this->outputLine('\t<meta http-equiv=\"content-type\" content=\"' . $this->_contentType . '\" />');\n\t\t\t\n\t\t\t//Meta\n\t\t\tforeach ($this->_meta as $meta) {\n\t\t\t\t$this->outputLine('\t<meta name=\"' . $meta->name . '\" content=\"' . $meta->content . '\" />');\n\t\t\t}\n\t\t\t\n\t\t\t//CSS\n\t\t\tforeach ($this->_css as $css) {\n\t\t\t\t$this->outputLine(\"\t\" . $css);\n\t\t\t}\n\t\t\t\n\t\t\t//JS\n\t\t\tforeach ($this->_js as $js) {\n\t\t\t\t$this->outputLine(\"\t\" . $js);\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('</head>');\n\t\t\n\t\t}", "function stag_header_css() {\n\t?>\n\t<style id=\"stag-custom-css\" type=\"text/css\">\n\t\tbody,\n\t\t.site,\n\t\thr:not(.stag-divider)::before {\n\t\t\tbackground-color: <?php echo stag_theme_mod( 'colors', 'background' ); ?>;\n\t\t}\n\t\tbody, .entry-subtitle {\n\t\t\tfont-family: \"<?php echo stag_theme_mod( 'typography', 'body_font' ); ?>\";\n\t\t}\n\t\ta,\n\t\t.archive-header__title span,\n\t\t.footer-menu a:hover {\n\t\t\tcolor: <?php echo stag_theme_mod( 'colors', 'accent' ); ?>;\n\t\t}\n\t\th1, h2, h3, h4, h5, h6, .button, .stag-button, input[type=\"submit\"], input[type=\"reset\"], .button-secondary, legend, .rcp_subscription_level_name {\n\t\t\tfont-family: \"<?php echo stag_theme_mod( 'typography', 'header_font' ); ?>\";\n\t\t}\n\t\t.post-grid {\n\t\t\tborder-color: <?php echo stag_theme_mod( 'colors', 'background' ); ?>;\n\t\t}\n\t\t<?php echo stag_theme_mod( 'layout_options', 'custom_css' ); ?>\n\t</style>\n\t<?php\n}", "public function themeHeader($end) {\n $domain = $this->getSiteURL();\n \n // front-end only\n if ($end == 'front') {\n // url base\n echo \"\\n\".'<base href=\"'.$this->getSiteURL().'\">';\n }\n echo \"\\n\".'<!-- The Matrix '.self::VERSION.'-->'.\"\\n\";\n // css\n echo ' <!--css-->'.\"\\n\";\n foreach (glob(GSPLUGINPATH.self::FILE.'/css/*.css') as $css) {\n echo ' <link rel=\"stylesheet\" href=\"'.str_replace(GSROOTPATH, $domain, $css).'\"/>'.\"\\n\";\n }\n echo ' <!--/css-->'.\"\\n\";\n \n // js\n echo ' <!--js-->'.\"\\n\";\n $javascript = glob(GSPLUGINPATH.self::FILE.'/js/*.js');\n natsort($javascript);\n \n foreach ($javascript as $js) {\n echo ' <script src=\"'.str_replace(GSROOTPATH, $domain, $js).'\" type=\"text/javascript\"></script>'.\"\\n\";\n }\n echo ' <!--/js-->'.\"\\n\";\n echo '<!--/The Matrix '.self::VERSION.'-->'.\"\\n\";\n }", "function eventoni_add_customization_to_header() {\n\tglobal $wpdb;\n\n\t$options = get_option('eventoni_options');\n\t$background_color = $options['bg_color'];\n\n\techo '<link type=\"text/css\" rel=\"stylesheet\" href=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/css/eventoni_style.css.php?bgc='.urlencode($background_color).'\"/>';\n\t$customization = $wpdb->get_results(\"SELECT option_value FROM $wpdb->options WHERE option_name = 'eventoni_options' LIMIT 1\");\n\t// SACK-Bibliothek fuer Ajax-Request\n\twp_print_scripts( array( 'sack' ));\n\t?>\n<script type=\"text/javascript\">\n//<![CDATA[\n\teventoni_ajax_url = '<?php bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php';\n\teventoni_plugin_url = '<?php bloginfo( 'wpurl' );?>/wp-content/plugins/eventoni-events/';\n\teventoni_vistor_location = '';\n//]]>\n</script>\n\t<?php\n}", "function admin_header_style() {\n\n?>\n\t<style type=\"text/css\">\n\t#headimg {\n\t\twidth: <?php echo HEADER_IMAGE_WIDTH; ?>px;\n\t\theight: <?php echo HEADER_IMAGE_HEIGHT; ?>px;\n\t}\n\t</style>\n<?php\n}", "function cs_header_settings() {\n global $cs_theme_option;\n ?>\n <link rel=\"shortcut icon\" href=\"<?php echo $cs_theme_option['fav_icon'] ?>\" />\n <!--[if lt IE 9]><script src=\"//html5shiv.googlecode.com/svn/trunk/html5.js\"></script><![endif]-->\n <?php \n}", "public function hookHeader($params)\n {\n $this->context->controller->addCSS(($this->_path).'blockproductmanufacturer.css', 'all');\n }", "public function addHeader()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/header.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/header.php\");\n }\n }", "function mpcth_add_admin_head() {\r\n\tmpcth_admin_alternative_styles();\r\n}", "private function _include_css()\n {\n if ( !$this->cache['css'] )\n {\n $this->EE->cp->add_to_head('<style type=\"text/css\">\n .vz_range { padding-bottom:0.5em; }\n .vz_range input { width:97%; padding:4px; }\n .vz_range_min { float:left; width:46%; }\n .vz_range_max { float:right; width:46%; }\n .vz_range_sep { float:left; width:8%; text-align:center; line-height:2; }\n</style>');\n\n $this->cache['css'] = TRUE;\n }\n }", "function html_head_from_all_pagest()\r\n{\r\n $ht_head = '\r\n <!DOCTYPE html>\r\n <html lang=\"en\">\r\n <head>\r\n <meta charset=\"UTF-8\">\r\n <title>Кредитный калькулятор</title>\r\n <link rel=\"stylesheet\" href=\"css/style.css\">\r\n <script src=\"http://code.jquery.com/jquery-1.7.1.min.js\"></script>\r\n <script src=\"js/script.js\"></script> \r\n <style>\r\n body{\r\n font-family: \"Segoe UI Light\";\r\n }\r\n #tr{\r\n \r\n font-size: x-large;\r\n }\r\n \r\n span {\r\n font-weight: 700;\r\n font-size: large;\r\n }\r\n </style> \r\n </head>';\r\n echo $ht_head;\r\n}", "static function header() {\n $url = $GLOBALS[\"path\"] ? $GLOBALS[\"path\"] : \"http://localhost:8000/\";\n echo '<script src=\"'.$url.'pontoon.js\"></script>'.\"\\n\";\n }", "public function siteHead() {\n\t\t$webhook = $this->getValue('page');\n\t\tIF($this->webhook($webhook)) {\n\t\t $html = '';\n\t\t $css = THEME_DIR_CSS . 'contact3.css';\n\t\t IF(file_exists($css)) {\n\t\t\t$html .= Theme::css('css' . DS . 'contact3.css');\n\t\t } else {\n\t\t\t$html .= '<link rel=\"stylesheet\" href=\"' .$this->htmlPath(). 'layout' . DS . 'contact3.css\">' .PHP_EOL;\n\t\t }\n\n\t\t IF($this->getValue('google-recaptcha')){\n\t\t\t$html .= '<script src=\"https://www.google.com/recaptcha/api.js\"></script>';\n\t\t }\n\n\t\t return $html;\n\t\t}\n\n\t\t$webHookForBookingLog = $this->getValue('bookingsDisplayPage');\n\t\tIF($this->webhook($webHookForBookingLog)) {\n\t\t\t// Include plugin's CSS files\n\t\t\t$html = $this->includeCSS('BookingForm.css');\n\t\t\t\n\t\t\treturn $html;\n\t\t}\n\t}", "function flatsome_custom_header_js() {\n if(get_theme_mod('html_scripts_header') && !is_admin()){\n echo get_theme_mod('html_scripts_header');\n }\n}", "public function addHeader(){\n$this->page.= <<<EOD\n<html>\n<head>\n</head>\n<title>\n$this->title\n</title>\n<body>\n<h1 align=\"center\">\n$this->title\n</h1>\nEOD;\n}", "public function head() {\r\n return <<<HTML\r\n <meta charset=\"utf-8\">\r\n <title>$this->title</title>\r\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n <link href=\"steampunked.css\" type=\"text/css\" rel=\"stylesheet\" />\r\n\r\nHTML;\r\n }", "private function _include_jscss()\n {\n if (!$this->cache['jscss'])\n {\n $styles = '<style type=\"text/css\">' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/styles.min.css') . '</style>' . NL;\n $scripts = '<script type=\"text/javascript\">// <![CDATA[ ' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/scripts.min.js') . ' // ]]></script>';\n $this->EE->cp->add_to_head($styles . $scripts);\n\n $this->cache['jscss'] = TRUE;\n }\n }", "function dw2_insert_head($flux) {\r\n\t\t$flux.= \"\\n\".'<script type=\"text/javascript\" src=\"'._DIR_PLUGIN_DW2.'dw2_fermepop.js\"></script>'.\"\\n\";\r\n\t\t$flux.= \"\\n\".'<link rel=\"stylesheet\" type=\"text/css\" href=\"'._DIR_PLUGIN_DW2.'dw2_public_styles.css\" />'.\"\\n\";\r\n\t\treturn $flux;\r\n\t}", "public function dynamic_css() {\n \n global $pbtheme_data;\n \n // Proceed only if user enabled custom header styles\n $enabled = $this->enabled();\n if ( ! $enabled ) {\n return;\n }\n \n // Observers\n $this->include_observers();\n \n // Subject\n require_once dirname( __FILE__ ) . '/inc/class-header-design.php';\n $design = new Pbtheme_Header_Design();\n \n /**\n * Attach below any theme options to apply\n */\n \n // Observers\n $observers = array(\n 'Pbtheme_Header_Topbar_Bgd',\n 'Pbtheme_Header_Topbar_Text_Color',\n 'Pbtheme_Header_Topbar_Link_Color',\n 'Pbtheme_Header_Topbar_Link_Hover_Color',\n 'Pbtheme_Header_Topbar_Border',\n 'Pbtheme_Header_Topbar_Font_Size',\n 'Pbtheme_Header_Bgd',\n 'Pbtheme_Header_Link_Color',\n 'Pbtheme_Header_Link_Hover',\n 'Pbtheme_Header_Border',\n 'Pbtheme_Header_Menu_Style',\n 'Pbtheme_Header_Search_Style',\n 'Pbtheme_Header_Logo_Style',\n 'Pbtheme_Header_Responsive_Menu',\n );\n \n /**\n * Apply styles via observers\n */\n $this->add_observers( $observers, $design );\n $design->apply_styles( $enabled );\n \n }", "function my_header()\r\n{\r\n ?>\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n <meta charset=\"UTF-8\">\r\n <title>Trump Pursuit</title>\r\n <link rel=\"stylesheet\" href=\"./asset/css/reset.css\">\r\n <link rel=\"stylesheet\" href=\"./asset/css/style.css\">\r\n</head>\r\n<?php\r\n}", "function addheadercode_func() {\n echo '<link type=\"text/css\" rel=\"stylesheet\" href=\"'.ILIBRARY_DIR_URL.'styles/generic.css\" />' . \"\\n\";\n}", "function insert_header_code () {\r\n\techo '\r\n\t<script language=\"javascript\" type=\"text/javascript\" src=\"'.get_settings('siteurl').'/wp-content/plugins/sanebull/sbq.js\"></script>\r\n\t<link rel=\"stylesheet\" href=\"'.get_settings('siteurl').'/wp-content/plugins/sanebull/sbq.css\" type=\"text/css\" media=\"screen\" />';\r\n}", "public function ajax_header_add()\n {\n }", "function dg_custom_header() {\n\t\n\t//meta tag view port\n\techo '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\" />';\n\t\n\t// GMT\n\t\n\techo \"\n\t\t<!-- Google Tag Manager -->\n\t\t<script>\n\t\t\t(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n\t\t\tnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n\t\t\tj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n\t\t\t'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n\t\t\t})(window,document,'script','dataLayer','GTM-M794Z5N');\n\t\t</script>\n\t\t<!-- End Google Tag Manager -->\n\t\";\n\t\n\t// for EN typeface\n\techo '<link rel=\"stylesheet\" href=\"https://use.typekit.net/wlv6frg.css\">';\n\t\n\t// favicon\n/*\techo '\n\t\t<link rel=\"icon\" media=\"(prefers-color-scheme:light)\" href=\"' . get_template_directory_uri() . '/img/favicon-dark.png\" type=\"image/png\" />\n\t\t<link rel=\"icon\" media=\"(prefers-color-scheme:dark)\" href=\"' . get_template_directory_uri() . '/img/favicon-light.png\" type=\"image/png\" />\n\t\t';\n*/\t\t\n\t\n}", "function displayHtmlHeader() {\n\t\tglobal $page;\n\t\t\n\t\techo \"<!DOCTYPE html5>\";\n\t\techo \"<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='fr'>\";\n\t\t\n\t\t\techo \"<head>\";\n\t\t\t\t\n\t\t\t\t//Encodage et zoom\n\t\t\t\techo \"<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\";\n\t\t\t\techo \"<meta name='viewport' content='width=device-width, initial-scale=1.0' />\";\n\t\t\t\techo \"<meta http-equiv='X-UA-Compatible' content='IE=edge' />\";\n\t\t\t\t\n\t\t\t\t//Titre de la page\n\t\t\t\techo \"<title>Gestion maintenances | Best Engines Inc.</title>\";\n\t\t\t\t\n\t\t\t\t//Description et auteur de la page\n\t\t\t\techo \"<meta name='description' content='Application de gestion des maintenances de la société Best Engines Inc.' />\";\n\t\t\t\techo \"<meta name='author' content='Best Engines Inc.' />\";\n\t\t\t\t\n\t\t\t\t//Fichiers CSS\n\t\t\t\techo \"<link href='config/css/bootstrap.min.css' rel='stylesheet' />\";\n\t\t\t\techo \"<link href='config/css/animate.css' rel='stylesheet' />\";\n\t\t\t\techo \"<link href='config/css/styles.css' rel='stylesheet' />\";\n\t\t\t\t\n\t\t\t\t//Formulaire d'authentification\n\t\t\t\tif($page == \"authentification\") {\n\t\t\t\t\techo \"<link rel='stylesheet' href='config/font-awesome/css/font-awesome.min.css' />\";\n\t\t\t\t\techo \"<link rel='stylesheet' href='config/css/authentification/form-elements.css' />\";\n\t\t\t\t\techo \"<link rel='stylesheet' href='config/css/authentification/style.css' />\";\n\t\t\t\t\t\n\t\t\t\t\techo \"<!--[if lt IE 9]>\";\n\t\t\t\t\t\techo \"<script src='https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js'></script>\";\n\t\t\t\t\t\techo \"<script src='https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js'></script>\";\n\t\t\t\t\techo \"<![endif]-->\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Font\n\t\t\t\techo \"<link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Montserrat' />\";\n\t\t\t\t\n\t\t\t\t//Favicon\n\t\t\t\techo \"<link href='doc/img/favicon/favicon.png' rel='shortcut icon' />\";\n\n\t\t\techo \"</head>\";\t\t\t\n\t\t\techo \"<body>\";\n\t}", "public function testHeaderHTML() {\n $build['#attached']['library'][] = 'common_test/js-header';\n $assets = AttachedAssets::createFromRenderArray($build);\n\n $js = $this->assetResolver->getJsAssets($assets, FALSE)[0];\n $js_render_array = \\Drupal::service('asset.js.collection_renderer')->render($js);\n $rendered_js = $this->renderer->renderPlain($js_render_array);\n $query_string = $this->container->get('state')->get('system.css_js_query_string') ?: '0';\n $this->assertStringContainsString('<script src=\"' . $this->fileUrlGenerator->generateString('core/modules/system/tests/modules/common_test/header.js') . '?' . $query_string . '\"></script>', $rendered_js, 'The JS asset in common_test/js-header appears in the header.');\n $this->assertStringContainsString('<script src=\"' . $this->fileUrlGenerator->generateString('core/misc/drupal.js'), $rendered_js, 'The JS asset of the direct dependency (core/drupal) of common_test/js-header appears in the header.');\n $this->assertStringContainsString('<script src=\"' . $this->fileUrlGenerator->generateString('core/misc/drupalSettingsLoader.js'), $rendered_js, 'The JS asset of the indirect dependency (core/drupalSettings) of common_test/js-header appears in the header.');\n }", "public function loadHeaderJS() {\n\t\tglobal $m, $a;\n\t\t\n\t\t// load the js base.php\n\t\tinclude apmgetConfig ( 'root_dir' ) . '/js/base.php';\n\t\t\n\t\t// Search for the javascript files to load.\n\t\tif (! isset ( $m )) {\n\t\t\treturn;\n\t\t}\n\t\t$root = apm_BASE_DIR;\n\t\tif (substr ( $root, - 1 ) != '/') {\n\t\t\t$root .= '/';\n\t\t}\n\t\t\n\t\t$base = apm_BASE_URL;\n\t\tif (substr ( $base, - 1 ) != '/') {\n\t\t\t$base .= '/';\n\t\t}\n\t\t// Load the basic javascript used by all modules.\n\t\techo '<script type=\"text/javascript\" src=\"' . $base . 'js/base.js\"></script>';\n\t\t\n\t\t$this->getModuleJS ( $m, $a, true );\n\t}", "function opinionstage_settings_load_header(){\n}", "public function init_header() {\r\n\t\t\twp_enqueue_script( 'jquery' );\r\n\t\t\twp_enqueue_script( 'thickbox' );\r\n\t\t\twp_enqueue_style( 'thickbox' );\r\n\t\t\twp_enqueue_script( 'media-upload' );\r\n\t\t\twp_enqueue_style( 'wp-color-picker' );\r\n\t\t\twp_enqueue_script( 'wp-color-picker' );\r\n\t\t\twp_enqueue_script( 'jquery-ui-sortable' );\r\n\t\t\twp_enqueue_script( 'jquery-ui-progressbar' );\r\n\t\t\twp_enqueue_media();\r\n\r\n\t\t\tif ( ! wp_style_is( 'netivo-jq-ui', 'enqueued' ) ) {\r\n\t\t\t\twp_enqueue_style( 'netivo-jq-ui', NT_CORE_PLUGIN_URL . \"/assets/admin/css/jquery-ui.min.css\" );\r\n\t\t\t}\r\n\r\n\t\t\tif ( ! wp_style_is( 'netivo-admin', 'enqueued' ) ) {\r\n\t\t\t\twp_enqueue_style( 'netivo-admin', NT_CORE_PLUGIN_URL . \"/assets/admin/css/admin.min.css\" );\r\n\t\t\t}\r\n\t\t\tif ( ! wp_script_is( 'netivo-admin', 'enqueued' ) ) {\r\n\t\t\t\twp_enqueue_script( 'netivo-admin', NT_CORE_PLUGIN_URL . \"/assets/admin/js/admin.min.js\" );\r\n\t\t\t}\r\n\t\t\t$this->custom_header();\r\n\t\t}", "public function header() {\r\n $html = <<<HTML\r\n\r\n <header>\r\n <p class=\"welcomeScreen\" ><img src=\"images/title.png\" alt=\"\" ></p>\r\n <h1 class=\"welcomeScreen\">$this->title</h1>\r\n </header>\r\nHTML;\r\n return $html;\r\n }", "function cookiebar_insert_head_css($flux){\n $flux .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.find_in_path(\"css/jquery.cookiebar.css\").'\" />';\n return $flux;\n}", "function links_insert_head_css($flux) {\r\n\t$links = links_configuration();\r\n\r\n\t//Styles\r\n\tif($links['style'] == 'on'){\r\n\t\t$flux .= '<link rel=\"stylesheet\" href=\"'.find_in_path('css/links.css').'\" type=\"text/css\" media=\"all\" />';\r\n\t}\r\n\t//Ouverture d'une nouvelle fenetre : insertion des init js inline, en amont des CSS (perf issue)\r\n\tif($links['window'] == 'on'){\r\n\t\t$js = 'var js_nouvelle_fenetre=\\''._T('links:js_nouvelle_fenetre').'\\';';\r\n\t\t//Ouverture dune nouvelel fenetre sur les liens externes\r\n\t\tif($links['external'] == 'on'){\r\n\t\t\t// quand un site fait du multidomaine on prend en reference le domaine de la page concernee :\r\n\t\t\t// sur www.example.org : autre.example.org est external\r\n\t\t\t// sur autre.example.org : www.example.org est external\r\n\t\t\t// sur un site mono-domaine ca ne change rien :)\r\n\t\t\t// ca marche parce que le cache change quand le HTTP_HOST change (donc quand le domaine change)\r\n\t\t\t$js .= 'var links_site = \\'' . protocole_implicite(url_de_base()) . '\\';';\r\n\t\t}\r\n\t\t//Ouverture d'une nouvelle fenetre sur les documents (extensions a preciser)\r\n\t\tif(($links['download'] == 'on')&&($links['doc_list'])){\r\n\t\t\t$js .= 'var links_doc = \\''.$links['doc_list'].'\\';';\r\n\t\t}\r\n\t\t$flux = '<script type=\"text/javascript\">'.$js.'</script>' . \"\\n\" . $flux;\r\n\t}\r\n\r\n\treturn $flux;\r\n}" ]
[ "0.7204028", "0.71988887", "0.71988887", "0.71988887", "0.71454835", "0.71312165", "0.6978219", "0.683634", "0.6797206", "0.67849", "0.67273986", "0.67120475", "0.67091846", "0.6702548", "0.6668796", "0.6648915", "0.6547907", "0.6537479", "0.6530247", "0.65203923", "0.6495011", "0.64901567", "0.64662457", "0.64566207", "0.64505315", "0.64219904", "0.6390188", "0.6385387", "0.63829637", "0.6378618", "0.6352027", "0.6345462", "0.6342595", "0.63268054", "0.63175935", "0.63139284", "0.6313238", "0.6313238", "0.6306843", "0.6306843", "0.6306843", "0.63026685", "0.63007843", "0.6291907", "0.62827986", "0.6276537", "0.6275314", "0.6275088", "0.62750673", "0.6251401", "0.62458163", "0.623207", "0.6231066", "0.6228979", "0.62257916", "0.62251806", "0.62017506", "0.61960405", "0.6180762", "0.6173969", "0.6168359", "0.61562", "0.61514693", "0.61352044", "0.61324424", "0.6121501", "0.6117997", "0.6113573", "0.61046094", "0.6101057", "0.6094188", "0.60824436", "0.6056067", "0.6055826", "0.6055224", "0.60488623", "0.6034068", "0.60196865", "0.6014071", "0.6002658", "0.60021436", "0.6001768", "0.59869164", "0.59863913", "0.59846634", "0.598036", "0.59791976", "0.597886", "0.59729755", "0.5972861", "0.5971451", "0.5971397", "0.59693277", "0.59644294", "0.5961594", "0.59602416", "0.59558463", "0.5933089", "0.59314936", "0.59305364", "0.5927476" ]
0.0
-1
Insert DropLoader link in column 1 on the writetab
function abl_droploader_article_ui($event, $step, $data) { $content = ' <ul class="abl_droploader plain-list"> <li><a id="abl-droploader-open" class="abl-droploader-open" href="#" title="' . gTxt('abl_droploader_open_title') . '">' . gTxt('abl_droploader_open') . '</a></li> </ul>'; if (is_callable('wrapRegion')) { // new in txp 4.6 return $data.wrapRegion('abl_droploader_group', $content, 'abl_droploader_link', 'upload', 'article_abl_droploader'); } else { return $data.' <div id="abl_droploader_group"><h3 class="plain lever"><a href="#abl_droploader-link">' . gTxt('upload') . '</a></h3> <div id="abl_droploader-link" class="toggle" style="display:none">' . $content . ' </div> </div> '; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showDelete($path)\n\t{\n\t\t$this->table->deleteColumn = true;\n\t\t$this->table->deletelink = $path;\n\t}", "protected function linkAdd() { return \"\"; }", "function addlinks(){\n Vtiger_Link::addLink(0, 'HEADERSCRIPT', 'LSWYSIWYG', 'modules/LSWYSIWYG/resources/WYSIWYG.js','','','');\n\n\t}", "public function column_url($link)\n {\n }", "function links_insert_head($flux) {\r\n\t$links = links_configuration();\r\n\r\n\t//Ouverture d'une nouvelle fenetre\r\n\tif($links['window'] == 'on'){\r\n\t\t$flux .= '<script src=\"'.find_in_path('links.js').'\" type=\"text/javascript\"></script>'. \"\\n\";\r\n\t}\r\n\treturn $flux;\r\n}", "public function setColumnLink($link){\n $this->addVar('COL_LINK', $link);\n }", "function column_inserted( $item ) {\r\n\t\tif ( !MLACore::$process_inserted_in ) {\r\n\t\t\treturn __( 'Disabled', 'media-library-assistant' );\r\n\t\t}\r\n\r\n\t\t$value = '';\r\n\t\tforeach ( $item->mla_references['inserts'] as $file => $inserts ) {\r\n\t\t\tif ( 'base' != $item->mla_references['inserted_option'] ) {\r\n\t\t\t\t$value .= sprintf( '<strong>%1$s</strong><br>', $file );\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * Move parent to the top of the list\r\n\t\t\t */\r\n\t\t\tif ( isset( $inserts[ $item->post_parent ] ) ) {\r\n\t\t\t\t$parent = $inserts[ $item->post_parent ];\r\n\t\t\t\tunset( $inserts[ $item->post_parent ] );\r\n\t\t\t\tarray_unshift( $inserts, $parent );\r\n\t\t\t}\r\n\r\n\t\t\tforeach ( $inserts as $insert ) {\r\n\t\t\t\t$status = self::_format_post_status( $insert->post_status );\r\n\r\n\t\t\t\tif ( $insert->ID == $item->post_parent ) {\r\n\t\t\t\t\t$parent = ',<br>' . __( 'PARENT', 'media-library-assistant' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$parent = '';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$value .= sprintf( '<a href=\"%1$s\" title=\"' . __( 'Edit', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;\">%2$s</a> (%3$s %4$s%5$s%6$s), ',\r\n\t\t\t\t/*%1$s*/ esc_url( add_query_arg( array('post' => $insert->ID, 'action' => 'edit'), 'post.php' ) ),\r\n\t\t\t\t/*%2$s*/ esc_attr( $insert->post_title ),\r\n\t\t\t\t/*%3$s*/ esc_attr( $insert->post_type ),\r\n\t\t\t\t/*%4$s*/ $insert->ID,\r\n\t\t\t\t/*%3$s*/ $status,\r\n\t\t\t\t/*%6$s*/ $parent ) . \"<br>\\r\\n\";\r\n\t\t\t} // foreach $insert\r\n\t\t} // foreach $file\r\n\r\n\t\treturn $value;\r\n\t}", "function add_book_alias_to_dlts_books_page() {\n $results = db_query('\n SELECT \n n.nid,\n i.field_is_part_of_value\n FROM {node} n\n LEFT JOIN {field_data_field_sequence_number} s ON n.nid = s.entity_id\n LEFT JOIN {field_data_field_is_part_of} i ON n.nid = i.entity_id\n WHERE type = :type AND s.field_sequence_number_value = 1\n ', array(':type' => 'dlts_book_page')); \n\n foreach ( $results as $key => $result ) {\n drush_print('Inserting alias books/' . $result->field_is_part_of_value . ' to node/' . $result->nid );\n db_insert('url_alias')->fields(\n array(\n 'source' => 'node/' . $result->nid,\n 'alias' => 'books/' . $result->field_is_part_of_value,\n 'language' => 'en',\n )\n )\n ->execute();\n \n }\n}", "public function onAfterWrite() {\n if (!$this->URLPath) {\n $this->URLPath = Utils::generateURLPath($this->Title, $this->ID);\n $this->write();\n }\n\n parent::onAfterWrite();\n }", "public function after_insert() {}", "function section_linkadmin (){\n section_links_links (true);\n}", "function setMargemDireita($iNumCol = 4) {\n\n $sComando = chr(27) . chr(81) . \" $iNumCol\";\n parent::addComando($sComando);\n }", "function link_database()\n{\n\t$sql=\"CREATE TABLE IF NOT EXISTS `link` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `link` varchar(100) COLLATE utf8_unicode_ci NOT NULL,\n `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\";\n\tlz::h('db')->install($sql);\n}", "public function &draw_report_link_panel($link_or_import, $tag, $label, $preselectedvalue = false)\n {\n $text = '<TD class=\"reportico-maintain-set-field\" style=\"text-align: right; color: #eeeeee; background-color: #000000;\" colspan=\"1\">';\n $type = \"TEXTFIELD\";\n $translateoptions = false;\n\n $striptag = preg_replace(\"/ .*/\", \"\", $tag);\n $showtag = preg_replace(\"/ /\", \"_\", $tag);\n $subtitle = \"\";\n if (preg_match(\"/ /\", $tag)) {\n $subtitle = preg_replace(\"/.* /\", \" \", $tag);\n }\n\n if (array_key_exists($striptag, $this->field_display)) {\n $arval = $this->field_display[$striptag];\n if (array_key_exists(\"Title\", $arval)) {\n $title = $arval[\"Title\"] . $subtitle;\n }\n\n if (array_key_exists(\"Type\", $arval)) {\n $type = $arval[\"Type\"];\n }\n\n if (array_key_exists(\"XlateOptions\", $arval)) {\n $translateoptions = $arval[\"XlateOptions\"];\n }\n\n if (array_key_exists(\"EditMode\", $arval)) {\n $edit_mode = $arval[\"EditMode\"];\n }\n\n if (array_key_exists(\"Values\", $arval)) {\n $tagvals = $arval[\"Values\"];\n }\n\n }\n\n $default = ReporticoApp::getDefaultConfig($striptag, \".\");\n\n $helppage = \"importlink\";\n if ($helppage) {\n if ($this->query->url_path_to_assets) {\n $helpimg = $this->query->url_path_to_assets . \"/images/help.png\";\n $text .= '<a target=\"_blank\" href=\"' . $this->helpPath($helppage, $striptag) . '\">';\n $text .= '<img class=\"reportico-maintain-help-image\" alt=\"tab\" src=\"' . $helpimg . '\">';\n $text .= '</a>&nbsp;';\n } else {\n $helpimg = ReporticoUtility::findBestUrlInIncludePath(\"images/help.png\");\n $dr = ReporticoUtility::getReporticoUrlPath();\n $text .= '<a target=\"_blank\" href=\"' . $this->helpPath($helppage, $striptag) . '\">';\n $text .= '<img class=\"reportico-maintain-help-image\" alt=\"tab\" src=\"' . $dr . $helpimg . '\">';\n $text .= '</a>&nbsp;';\n }\n }\n\n // Show options options to import or link\n $listarr = array();\n if ($link_or_import == \"IMPORT\" || $link_or_import == \"LINKANDIMPORT\") {\n $listarr[\"import\"] = ReporticoLang::templateXlate(\"IMPORTREPORT\");\n }\n\n if ($link_or_import == \"LINK\" || $link_or_import == \"LINKANDIMPORT\") {\n $listarr[\"linkto\"] = ReporticoLang::templateXlate(\"MAKELINKTOREPORT\");\n }\n\n $text .= $this->drawArrayDropdown(\"linkorimport_\" . $this->id, $listarr, $this->query->reportlink_or_import, false, false, true);\n\n $text .= '</a>&nbsp;&nbsp;';\n\n // Draw report names we can link to\n $text .= $this->drawSelectFileList($this->query->reports_path, \"/.*\\.xml/\", false, $preselectedvalue, true, false, \"reportlink\");\n $text .= '<input class=\"' . $this->query->getBootstrapStyle('design_ok') . 'reportico-maintain-button reportico-submit\" style=\"margin-right: 20px\" type=\"submit\" name=\"submit_' . $this->id . '_REPORTLINK\" value=\"' . ReporticoLang::templateXlate(\"OK\") . '\">';\n\n if ($this->query->reportlink_report) {\n // Draw report criteria items we can link to\n $q = ReporticoUtility::loadExistingReport($this->query->reportlink_report, $this->query->projects_folder);\n if (!$q) {\n trigger_error(ReporticoLang::templateXlate(\"NOOPENLINK\") . $this->query->reportlink_report, E_USER_NOTICE);\n } else if (!$q->lookup_queries || count($q->lookup_queries) == 0) {\n trigger_error(ReporticoLang::templateXlate(\"NOCRITLINK\") . $this->query->reportlink_report, E_USER_NOTICE);\n } else {\n if ($link_or_import == \"LINK\") {\n $text .= ReporticoLang::templateXlate(\"MAKELINKTOREPORTITEM\");\n } else {\n $text .= ReporticoLang::templateXlate(\"IMPORTREPORT\");\n }\n\n $text .= \"&nbsp;\";\n $listarr = array();\n $listarr[\"ALLITEMS\"] = ReporticoLang::templateXlate(\"ALLITEMS\");\n if ($tag == \"mainquercrit\") {\n $lq = $q->lookup_queries;\n foreach ($lq as $k => $v) {\n $listarr[$v->query_name] = $v->query_name;\n }\n\n } else if ($tag == \"mainquerassg\") {\n $lq = $q->assignment;\n foreach ($lq as $k => $v) {\n if (strlen($v->expression) > 30) {\n $listarr[$k] = $v->query_name . \" = \" . substr($v->expression, 0, 30) . \"...\";\n } else {\n $listarr[$k] = $v->query_name . \" = \" . $v->expression;\n }\n\n }\n } else if ($tag == \"mainqueroutppghd\") {\n $lq = $q->pageHeaders;\n foreach ($lq as $k => $v) {\n if (strlen($v->text) > 30) {\n $listarr[$k] = $k . \" = \" . substr($v->text, 0, 30) . \"...\";\n } else {\n $listarr[$k] = $k . \" = \" . $v->text;\n }\n\n }\n } else if ($tag == \"mainqueroutppgft\") {\n $lq = $q->pageFooters;\n foreach ($lq as $k => $v) {\n if (strlen($v->text) > 30) {\n $listarr[$k] = $k . \" = \" . substr($v->text, 0, 30) . \"...\";\n } else {\n $listarr[$k] = $k . \" = \" . $v->text;\n }\n\n }\n }\n\n $text .= $this->drawArrayDropdown(\"reportlinkitem_\" . $this->id, $listarr, false, false, false, true);\n $text .= '<input class=\"' . $this->query->getBootstrapStyle('design_ok') . 'reportico-maintain-button reportico-submit\" style=\"margin-right: 20px\" type=\"submit\" name=\"submit_' . $this->id . '_REPORTLINKITEM\" value=\"' . ReporticoLang::templateXlate(\"OK\") . '\">';\n }\n }\n\n $text .= '</TD>';\n //$text .= '</TR>';\n\n return $text;\n }", "function onAfterShowDescription(&$row)\n {\n\n echo '<h3>onAfterShowDescription</h3>'\n . JText::_('PLG_JEA_OWNER_NAME'). ' : <strong>'\n . $row->owner_name . '</strong>';\n }", "public function onRsformBackendAfterShowFormEditTabsTab(): void\n\t{\n\t\t?>\n\t\t<li>\n\t\t\t<?php\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'link',\n\t\t\t\t'javascript: void(0);',\n\t\t\t\t'<span class=\"rsficon jdicon-jdideal\"></span><span class=\"inner-text\">'\n\t\t\t\t. Text::_(\n\t\t\t\t\t'PLG_RSFP_JDIDEAL_LABEL'\n\t\t\t\t) . '</span>'\n\t\t\t);\n\t\t\t?>\n\t\t</li>\n\t\t<?php\n\t}", "function abl_droploader_head_end($evt, $stp) {\n\t\tglobal $event, $step, $prefs, $abl_droploader_prefs;\n\n\t\tif (($event == 'image'\n\t\t\t&& (in_array($step, array('list', 'image_list', 'image_multi_edit', 'image_change_pageby', 'image_save', ''))))\n\t\t|| ($event == 'article'\n\t\t\t&& (in_array($step, array('create', 'edit'))))) {\n\t\t\t$abl_droploader_prefs = abl_droploader_load_prefs();\n\t\t\t$css = '';\n\t\t\tif (intval($abl_droploader_prefs['useDefaultStylesheet']) != 0) {\n\t\t\t\t$css .= '<link rel=\"stylesheet\" href=\"../res/css/abl.droploader-app.css\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\tif ($abl_droploader_prefs['customStylesheet'] != '') {\n\t\t\t\t$css .= '<link rel=\"stylesheet\" href=\"' . $abl_droploader_prefs['customStylesheet'] . '\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\tif ($css == '') {\n\t\t\t\t$css = '<link rel=\"stylesheet\" href=\"../res/css/abl.droploader-app.css\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\t$article_image_field_ids = '\"' . implode('\", \"', explode(',', $abl_droploader_prefs['articleImageFields'])) . '\"';\n\t\t\t$script = '<script type=\"text/javascript\">\n\tvar file_max_upload_size = ' . sprintf('%F', (intval($prefs['file_max_upload_size']) / 1048576)) . ';\n\tvar file_max_files = 5;\n\tvar image_max_upload_size = 1;\n\tvar image_max_files = ' . intval($abl_droploader_prefs['imageMaxUploadCount']) . ';\n\tvar reload_image_tab = ' . intval($abl_droploader_prefs['reloadImagesTab']) . ';\n\tvar article_image_field_ids = new Array(' . $article_image_field_ids . ');\n\tvar article_image_field = null;\n</script>\n<script src=\"../res/js/jquery.filedrop.js\" type=\"text/javascript\"></script>\n<script src=\"../res/js/jquery.droploader.js\" type=\"text/javascript\"></script>\n<script src=\"../res/js/abl.droploader-app.js\" type=\"text/javascript\"></script>' . n;\n\t\t\techo $css . $script;\n\t\t}\n\n\t}", "function abl_droploader_image_ui($event, $step) {\n $content = '<div class=\"abl-droploader-file-uploader\">\n <a id=\"abl-droploader-open\" class=\"abl-droploader-open txp-button\" href=\"#\" title=\"' . gTxt('abl_droploader_open_title') . '\">' . gTxt('abl_droploader_open') . '</a>\n </div>';\n return $content.n;\n }", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "function print_record_positions2($record) {\n ?>\n <tr>\n <td><?php echo htmlspecialchars($record[\"title\"]);?></td>\n <td class=\"centered\"><a class=\"link\" href=\"<?php echo 'delete_position.php?'.http_build_query(array('delete'=>htmlspecialchars($record[\"id\"]), 'id'=>htmlspecialchars($record[\"id\"]))) ?>\">Delete</a> </td>\n </tr>\n <?php\n }", "private function _addExhibitAccessibleURLField()\n {\n $this->db->query(<<<SQL\n ALTER TABLE {$this->db->prefix}neatline_exhibits\n ADD COLUMN accessible_url TEXT NULL;\nSQL\n);\n }", "function XXLINK_edit($action, $lid = '')\n{\n global $_CONF, $_GROUPS, $_TABLES, $_USER, $_LI_CONF,\n $LANG_LINKS_ADMIN, $LANG_ACCESS, $LANG_ADMIN, $MESSAGE;\n\n USES_lib_admin();\n\n $retval = '';\n $editFlag = false;\n\n switch ($action) {\n case 'edit':\n $blocktitle = $LANG_LINKS_ADMIN[1]; // Link Editor\n $saveoption = $LANG_ADMIN['save']; // Save\n break;\n case 'moderate':\n $blocktitle = $LANG_LINKS_ADMIN[65]; // Moderate Link\n $saveoption = $LANG_ADMIN['moderate']; // Save & Approve\n break;\n }\n\n $link_templates = new Template($_CONF['path'] . 'plugins/links/templates/admin/');\n $link_templates->set_file('editor','linkeditor.thtml');\n\n $link_templates->set_var('lang_pagetitle', $LANG_LINKS_ADMIN[28]);\n $link_templates->set_var('lang_link_list', $LANG_LINKS_ADMIN[53]);\n $link_templates->set_var('lang_new_link', $LANG_LINKS_ADMIN[51]);\n $link_templates->set_var('lang_validate_links', $LANG_LINKS_ADMIN[26]);\n $link_templates->set_var('lang_list_categories', $LANG_LINKS_ADMIN[50]);\n $link_templates->set_var('lang_new_category', $LANG_LINKS_ADMIN[52]);\n $link_templates->set_var('lang_admin_home', $LANG_ADMIN['admin_home']);\n $link_templates->set_var('instructions', $LANG_LINKS_ADMIN[29]);\n\n if ($action <> 'moderate' AND !empty($lid)) {\n $result = DB_query(\"SELECT * FROM {$_TABLES['links']} WHERE lid ='$lid'\");\n if (DB_numRows($result) !== 1) {\n $msg = COM_startBlock ($LANG_LINKS_ADMIN[24], '',\n COM_getBlockTemplate ('_msg_block', 'header'));\n $msg .= $LANG_LINKS_ADMIN[25];\n $msg .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));\n return $msg;\n }\n $A = DB_fetchArray($result);\n $access = SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']);\n if ($access == 0 OR $access == 2) {\n $retval .= COM_startBlock($LANG_LINKS_ADMIN[16], '',\n COM_getBlockTemplate ('_msg_block', 'header'));\n $retval .= $LANG_LINKS_ADMIN[17];\n $retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));\n COM_accessLog(\"User {$_USER['username']} tried to illegally submit or edit link $lid.\");\n return $retval;\n }\n $editFlag = true;\n } else {\n if ($action == 'moderate') {\n $result = DB_query (\"SELECT * FROM {$_TABLES['linksubmission']} WHERE lid = '$lid'\");\n $A = DB_fetchArray($result);\n } else {\n $A['lid'] = COM_makesid();\n $A['cid'] = '';\n $A['url'] = '';\n $A['description'] = '';\n $A['title']= '';\n $A['owner_id'] = $_USER['uid'];\n }\n $A['hits'] = 0;\n if (isset ($_GROUPS['Links Admin'])) {\n $A['group_id'] = $_GROUPS['Links Admin'];\n } else {\n $A['group_id'] = SEC_getFeatureGroup ('links.edit');\n }\n SEC_setDefaultPermissions ($A, $_LI_CONF['default_permissions']);\n $access = 3;\n }\n $retval .= COM_startBlock ($blocktitle, '',\n COM_getBlockTemplate ('_admin_block', 'header'));\n\n if ( $editFlag ) {\n $lang_create_or_edit = $LANG_ADMIN['edit'];\n } else {\n $lang_create_or_edit = $LANG_LINKS_ADMIN[51];\n }\n $menu_arr = array(\n array('url' => $_CONF['site_admin_url'] . '/plugins/links/index.php',\n 'text' => $LANG_LINKS_ADMIN[53]),\n array('url' => $_CONF['site_admin_url'] . '/plugins/links/index.php?edit=x',\n 'text' => $lang_create_or_edit,'active'=>true),\n array('url' => $_CONF['site_admin_url'] . '/plugins/links/category.php',\n 'text' => $LANG_LINKS_ADMIN[50]),\n array('url' => $_CONF['site_admin_url'] . '/plugins/links/index.php?validate=enabled',\n 'text' => $LANG_LINKS_ADMIN[26]),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home'])\n );\n\n\n\n $retval .= ADMIN_createMenu($menu_arr, $LANG_LINKS_ADMIN[66], plugin_geticon_links());\n\n $link_templates->set_var('link_id', $A['lid']);\n if (!empty($lid) && SEC_hasRights('links.edit')) {\n $delbutton = '<input type=\"submit\" value=\"' . $LANG_ADMIN['delete']\n . '\" name=\"delete\"%s>';\n $jsconfirm = ' onclick=\"return confirm(\\'' . $MESSAGE[76] . '\\');\"';\n $link_templates->set_var ('delete_option',\n sprintf ($delbutton, $jsconfirm));\n $link_templates->set_var ('delete_option_no_confirmation',\n sprintf ($delbutton, ''));\n $link_templates->set_var ('delete_confirm_msg',$MESSAGE[76]);\n if ($action == 'moderate') {\n $link_templates->set_var('submission_option',\n '<input type=\"hidden\" name=\"type\" value=\"submission\">');\n }\n }\n $link_templates->set_var('lang_linktitle', $LANG_LINKS_ADMIN[3]);\n $link_templates->set_var('link_title',\n htmlspecialchars ($A['title']));\n $link_templates->set_var('lang_linkid', $LANG_LINKS_ADMIN[2]);\n $link_templates->set_var('lang_linkurl', $LANG_LINKS_ADMIN[4]);\n $link_templates->set_var('max_url_length', 255);\n $link_templates->set_var('link_url', $A['url']);\n $link_templates->set_var('lang_includehttp', $LANG_LINKS_ADMIN[6]);\n $link_templates->set_var('lang_category', $LANG_LINKS_ADMIN[5]);\n $othercategory = links_select_box (3,$A['cid']);\n $link_templates->set_var('category_options', $othercategory);\n $link_templates->set_var('lang_ifotherspecify', $LANG_LINKS_ADMIN[20]);\n $link_templates->set_var('category', $othercategory);\n $link_templates->set_var('lang_linkhits', $LANG_LINKS_ADMIN[8]);\n $link_templates->set_var('link_hits', $A['hits']);\n $link_templates->set_var('lang_linkdescription', $LANG_LINKS_ADMIN[9]);\n $link_templates->set_var('link_description', $A['description']);\n $link_templates->set_var('lang_save', $saveoption);\n $link_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);\n\n // user access info\n $link_templates->set_var('lang_accessrights', $LANG_ACCESS['accessrights']);\n $link_templates->set_var('lang_owner', $LANG_ACCESS['owner']);\n $ownername = COM_getDisplayName ($A['owner_id']);\n $link_templates->set_var('owner_username', DB_getItem($_TABLES['users'],\n 'username', \"uid = {$A['owner_id']}\"));\n $link_templates->set_var('owner_name', $ownername);\n $link_templates->set_var('owner', $ownername);\n $link_templates->set_var('link_ownerid', $A['owner_id']);\n $link_templates->set_var('lang_group', $LANG_ACCESS['group']);\n $link_templates->set_var('group_dropdown',\n SEC_getGroupDropdown ($A['group_id'], $access));\n $link_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);\n $link_templates->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']);\n $link_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']));\n $link_templates->set_var('lang_lockmsg', $LANG_ACCESS['permmsg']);\n $link_templates->set_var('gltoken_name', CSRF_TOKEN);\n $link_templates->set_var('gltoken', SEC_createToken());\n $link_templates->parse('output', 'editor');\n $retval .= $link_templates->finish($link_templates->get_var('output'));\n\n $retval .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));\n\n return $retval;\n}", "public function column_name($link)\n {\n }", "protected function write_pre_td(&$cur)\r\n\t{\r\n\t\t?>\r\n\t\t<td style=\"text-align:center;\" id=\"ccms_<?php echo $this->objectname;?>_pic_<?php echo $cur[0];?>\">\r\n\t\t\t<a href=\"javascript:open_showwindow_<?php echo $this->objectname;?>('<?php echo $cur[0];?>');\">\r\n\t\t\t\t<img src=\"<?php echo $this->webpath.$cur[1]; ?>\" alt=\"<?php echo htmlspecialchars($cur[2]);?>\" title=\"<?php echo htmlspecialchars($cur[2]);?>\"<?php\r\n\t\t\t\tif(!empty($this->picstyle))\r\n\t\t\t\t\techo \" class=\\\"\".$this->picstyle.\"\\\"\";\r\n\t\t\t\t?> />\r\n\t\t</a>\r\n\t\t<?php if($this->editmode == 1){ ?>\r\n\t\t\t<br />\r\n\t\t\t<a target=\"ccms_iframe_<?php echo $this->objectname;?>\" class=\"ccms_headeditlink\" href=\"<?php echo CCMS_IFRAMEPATH;?>pictureshow.php?id=<?php echo $this->myid;?>&amp;picname=<?php echo $cur[0];?>&amp;picprename=<?php echo $cur[1];?>\" >Delete</a>\r\n\t\t<?php } ?>\r\n\t\t</td>\r\n\t\t<?php\t\r\n\r\n\t}", "function removelinks(){\n\n Vtiger_Link::deleteLink(0, 'HEADERSCRIPT', 'LSWYSIWYG', 'modules/LSWYSIWYG/resources/WYSIWYG.js','','','');\n\t}", "function load_hyperlink($moduleid, $permType, $linkCaption, $linkURL, $linkTarget) {\n global $dbf;\n global $lang;\n \n if(empty($moduleid)) { exit(\"Please insert the module id.\"); }\n if(empty($permType)){ exit(\"Please insert the permission type value for the hyperlink.\"); }\n if(empty($linkCaption)) { $linkCaption=\"DEFAULT_HYPERLINK\"; }\n if(empty($linkURL)) { exit(\"Passing parameter URL not found!\"); }\n if(empty($linkTarget)) { $linkTarget=\"\"; }\n \n \n $sqlLinkPerm = \"SELECT b.permission_term, b.module_id, a.user_id FROM base_permission_link a\n LEFT JOIN base_user_permission b ON (b.permission_id = a.permission_id) \n WHERE b.permission_term = '$permType' AND user_id='\".$_SESSION['user_id'].\"' AND b.module_id='$moduleid'\";\n \n $dbf->query($sqlLinkPerm);\n $dbf->next_record();\n \n $rows = $dbf->rowdata();\n if($permType != $rows['permission_term']) {\n return;\n } else {\n \n $theHyperlink = \"<a href=\\\"$linkURL\\\" target=\\\"$linkTarget\\\" class=\\\"$permType\\\">$linkCaption</a>\";\n return $theHyperlink;\n }\n}", "function genLink () {\n\t\t\t$db_host=\"127.0.0.1\";\n\t\t\t$db_nombre=\"gallery\";\n\t\t\t$db_user=\"gallery\";\n\t\t\t$db_pass=\"gallery\";\n\t\t\t$link=mysql_connect($db_host, $db_user, $db_pass) or die (\"Error conectando a la base de datos.\");\n\t\t\tmysql_select_db($db_nombre ,$link) or die(\"Error seleccionando la base de datos.\");\n\t\t\t$this->link = $link;\n\t\t}", "function formattingLoad($row){\n //formattingDATE bannerSlide_update_date\n $data = $row->get_value(\"bannerSlide_update_date\");\n $row->set_value(\"bannerSlide_update_date\",date(\"d/m/Y - H:i:s\",strtotime($data)));\n\t\t\t\t \n //formatting EDITOR\n $data = $row->get_value(\"bannerSlide_id\");\n $row->set_value(\"bannerSlide_editor\",\"<a href='index.php?option=bannerSlide&action=update&id={$data}'>Sửa chi tiết</a>\");\n\t}", "function deleted_open() {\n $this->doc .= '<del>';\n }", "function newItemAfter()\r\n\t{\r\n\t\t$this->content_obj->newItemAfter();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "function efTableEditLinks( &$parser, &$text, &$strip_state ){\n\t$l = new TableEditOMPLinker($text);\n\t$text = $l->execute();\n\treturn true;\n}", "function adabs_link( $wp_admin_bar ) {\n $args = array(\n 'id' => '',\n 'title' => '',\n 'href' => 'https://adabs.ch',\n 'meta' => array( 'target' => '_blank', 'rel' => 'noopener' ),\n 'parent' => 'top-secondary'\n );\n\t$wp_admin_bar->add_node( $args );\n}", "public function insert_page_link($data){\n $this->db->insert($data,'links');\n\n }", "function log_viewer_add_menu_item() {\n\techo '<li><a href=\"http://localhost/ds-plugins/log-viewer/page.php\">Log Viewer</a></li>';\n}", "private function writeUrlInternal($row1, $col1, $row2, $col2, $url): void\n {\n $record = 0x01B8; // Record identifier\n\n // Strip URL type\n $url = (string) preg_replace('/^internal:/', '', $url);\n\n // Pack the undocumented parts of the hyperlink stream\n $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000');\n\n // Pack the option flags\n $options = pack('V', 0x08);\n\n // Convert the URL type and to a null terminated wchar string\n $url .= \"\\0\";\n\n // character count\n $url_len = StringHelper::countCharacters($url);\n $url_len = pack('V', $url_len);\n\n $url = StringHelper::convertEncoding($url, 'UTF-16LE', 'UTF-8');\n\n // Calculate the data length\n $length = 0x24 + strlen($url);\n\n // Pack the header data\n $header = pack('vv', $record, $length);\n $data = pack('vvvv', $row1, $row2, $col1, $col2);\n\n // Write the packed data\n $this->append($header . $data . $unknown1 . $options . $url_len . $url);\n }", "function main()\t{\n\n\t\t$content = '';\n\n\t\t$content .= '<br /><b>Change table tx_realurl_redirects:</b><br />\n\t\tRemove the field url_hash from the table tx_realurl_redirects, <br />because it\\'s not needed anymore and it\\'s replaced by the standard TCA field uid as soon as you do <br />the DB updates by the extension manager in the main view of this extension.<br /><br />ALTER TABLE tx_realurl_redirects DROP url_hash<br />ALTER TABLE tx_realurl_redirects ADD uid int(11) auto_increment PRIMARY KEY';\n\t\t\n\t\t$import = t3lib_div::_GP('update');\n\n\t\tif ($import == 'Update') {\n\t\t\t$result = $this->updateRedirectsTable();\n\t\t\t$content2 .= '<br /><br />';\n\t\t\t$content2 .= '<p>Result: '.$result.'</p>';\n\t\t\t$content2 .= '<p>Done. Please accept the update suggestions of the extension manager now!</p>';\n\t\t} else {\n\t\t\t$content2 = '</form>';\n\t\t\t$content2 .= '<form action=\"'.htmlspecialchars(t3lib_div::linkThisScript()).'\" method=\"post\">';\n\t\t\t$content2 .= '<br /><br />';\n\t\t\t$content2 .= '<input type=\"submit\" name=\"update\" value=\"Update\" />';\n\t\t\t$content2 .= '</form>';\n\t\t} \n\n\t\treturn $content.$content2;\n\t}", "function donotuse_dumpredlinks(PDO $dbh_wiki)\n\t{\n\t\t$dbh_wiki->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);\n\t\t$dumppath = self::getDumpPath();\n\n\t\t// Get article and template (10) redlinks\n\t\t$sql = 'SELECT pl_title, COUNT(*) AS pagecnt, SUM(TRUNCATE(pl_from_namespace / 10, 0)) FROM pagelinks\n\t\t\tLEFT JOIN page ON page_title=pl_title AND page_namespace=pl_namespace\n\t\t\tWHERE pl_namespace = 0 AND pl_from_namespace IN (0,10)\n\t\t\tAND page_namespace IS NULL\n\t\t\tGROUP BY pl_title\n\t\t\tHAVING pagecnt > 9';\n\n\t\t$hndl = fopen($dumppath, 'w');\n\t\t$sth = $dbh_wiki->query($sql);\n\t\t$sth->setFetchMode(PDO::FETCH_NUM);\n\n\t\twhile ($row = $sth->fetch()) {\n\t\t\tfwrite($hndl, \"{$row[0]}\\t{$row[1]}\\t{$row[2]}\\n\");\n\t\t}\n\n\t\t$sth->closeCursor();\n\t\tfclose($hndl);\n\t\t$dbh_wiki->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);\n\t}", "function edit_table($table_name){\n\t\t\t$link = 'index.php?module=extends&view=tables&task=edit&tablename='.\t$table_name;\n\t\t\treturn '<a href=\"'.$link.'\" target=\"_blink\">Sửa bảng</a>';\t\t\n\t\t}", "public function afterInsert() {\n\t\t\tparent::afterInsert();\n\t\t\t//$this->pos = 1;\n\t\t\t$this->updatePos(1);\n\t\t}", "function tInserting($table,$field,$parentTable){\r\n $Xs = superGet('*',$table,\"Lang_ID = 1\");\r\n foreach ($Xs as $x) {\r\n echo '<li><a href=\"'.$_SERVER['PHP_SELF'].'?sRid='.$x['ID'].'&sTable='.$table.'&sField='.$field.'&sText='.$x[$field].'&sParentTable='.$parentTable.'&sParentID='.$x[$parentTable].'\">'.$x[$field].'</a></li>';\r\n } \r\n }", "function echoDocumentLink ($row)\r{\r\t// name and the event ids that need to be highlighted.\r\r\t$file = $row[3];\r\t$id1 = $row[6];\r\t$id2 = $row[7];\r\t$file = $row['tmlfile'];\r\t$id1 = $row['eid1'];\r\t$id2 = $row['eid2'];\r\techo \"<a href=displayArticle.php?file=$file&highlight=$id1,$id2 target=_NEW>\";\r\techo \"<img src=inline004.gif border=0></a>\\n\";\r}", "function define_link(){\n\t\t\t$link = \"javascript:set_values(\";\n\t\t\t#print_r($this->column);\n\t\t\tfor($i=0;$i<count($this->column);$i++){\n\t\t\t\t$link .= \"'%$i',\";\t\t\t\t\n\t\t\t}\n\t\t\t$link = substr($link,0,strlen($link)-1);\n\t\t\t$link .= \")\";\n\t\t\treturn $link;\n\t\t}", "function onBeforeShowDescription(&$row)\n {\n echo '<h3>onBeforeShowDescription</h3>'\n . JText::_('PLG_JEA_OWNER_NAME'). ' : <strong>'\n . $row->owner_name . '</strong>';\n }", "function insertar_link(){\t\n\t\t$this->accion=\"Datos del Nuevo Enlace\";\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Guardar\"){\n\t\t\t$this->asignar_valores();\n\t\t\t$sql=\"SELECT * FROM link WHERE nombre_cat='999999'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\tif($resultado=mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=1;\n\t\t\t}else{\n\t\t\t\t$sql=\"INSERT INTO link VALUES ('', '$this->tipo', '$this->nombre', '$this->etiqueta', '$this->claves', '$this->descripcion', '$this->prioridad','$this->icono')\";\n\t\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t\theader(\"location:/admin/link/\");\n\t\t\t\texit();\n\t\t\t}\n\t\t}\t\t\t\n\t}", "function pnAddressBook_admin_menu() {\r\n\r\n \t$settingsURL\t= pnModURL(__PNADDRESSBOOK__,'admin','modifyconfig');\r\n\t$categoryURL\t= pnModURL(__PNADDRESSBOOK__,'admin','categories');\r\n\t$labelURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','labels');\r\n\t$prefixURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','prefixes');\r\n\t$customURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','customfields');\r\n//START - gehunter\r\n\t$exportURL\t\t= pnModURL(__PNADDRESSBOOK__,'user','export');\r\n//END - gehunter\r\n\r\n\t$settingsTXT\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_CONFIG);\r\n\t$categoryTXT\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_pnAB_CATEGORY);\r\n\t$labelTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_LABEL);\r\n\t$prefixTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_PREFIX);\r\n\t$customTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_CUSTOM);\r\n//START - gehunter\r\n\t$exportTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_ADMIN_EXPORT);\r\n//END - gehunter\r\n\r\n\t$output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Title(pnVarPrepHTMLDisplay(_PNADDRESSBOOK));\r\n\t$output->Text('<div align=\"center\">');\r\n\t$output->Text(pnAddressBook_themetable('start',2));\r\n\t$output->Text('<div align=\"center\">');\r\n\t$output->URL($settingsURL,$settingsTXT);\r\n\t$output->Text(' | ');\r\n $output->URL($categoryURL,$categoryTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($labelURL,$labelTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($prefixURL,$prefixTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($customURL,$customTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($exportURL,$exportTXT);\r\n\t$output->Text('</div>');\r\n\t$output->Text(pnAddressBook_themetable('end',2));\r\n\t$output->Text('</div>');\r\n\t$output->Linebreak(1);\r\n\r\n // Return the output that has been generated by this function\r\n return $output->GetOutput();\r\n}", "function newFormBookmark()\n\t{\n\t\t$form = $this->initFormBookmark();\n\t\t$html1 = $form->getHTML();\n\t\t$html2 = '';\n\t\tif (!$_REQUEST[\"bm_link\"])\n\t\t{\n\t\t\t$form2 = $this->initImportBookmarksForm();\n\t\t\t$html2 = \"<br />\" . $form2->getHTML();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $html1.$html2);\n\t}", "function adabs_link($wp_admin_bar)\n{\n $args = array(\n 'id' => '',\n 'title' => '',\n 'href' => 'https://adabs.ch',\n 'meta' => array('target' => '_blank', 'rel' => 'noopener'),\n 'parent' => 'top-secondary'\n );\n $wp_admin_bar->add_node($args);\n}", "function wp_regenthumbs_stamina_custom_column($column_name, $id) {\r\n if( $column_name == 'regenthumbs-stamina' ) {\r\n \t\tprintf(\"<br><a href=\\\"tools.php?page=regenthumbs-stamina&amp;media_ids=%d\\\">%s</a>\",$id, __('Regen. Thumbnail', 'regenthumbs-stamina'));\r\n }\r\n}", "function db_DisplayerINSERT($myServer, $myDB, $TableName){\n\n\t// Prepare the database\n\t$myServer->query('USE '.$myDB);\n\t$sql = 'SELECT * FROM `'.$myDB.'`.`'.$TableName.'`';\n\t$req = $myServer->query($sql);\n\n\t\n\t// Affichage de l'entête du tableau\n\techo '<h2> Table Displayer :</h2>';\n\techo \"<table border=\\\"0\\\" cellpadding=\\\"1\\\">\";\n\techo \"<tr>\";\n\t$tNames= $myServer->query(\"DESCRIBE \".$TableName);\n\t$table_fields = $tNames->fetchAll(PDO::FETCH_COLUMN);\n\t$colNb = $req->columnCount();\n\tfor ($i=0; $i < $colNb; $i++)\n\t{\n\techo \"<td width=\\\"150\\\" align=\\\"center\\\" bgcolor=\\\"#999999\\\">\".$table_fields[$i].\"</td>\";\n\t }\n\t//AJOUT TABLE INSERT : Titre correspondant aux boutons d'action\n\techo \"<td width=\\\"150\\\" align=\\\"center\\\" bgcolor=\\\"#999999\\\">MOD/SUPRR</td>\";\n\techo \"</tr>\";\n\n\n\t// affichage des datas\n\t$tValues = $myServer->query(\"SELECT * FROM \".$myDB.\".\".$TableName);\n\n\twhile ($datas = $tValues->fetch(PDO::FETCH_NUM))\n\t{\n\t\techo \"<tr>\"; // nouvelle ligne du tableau\n\n\t\tfor ($i=0; $i < $colNb; $i++){ // Toutes les lignes de datas\n\t\t\techo \"<td align=\\\"center\\\">\".$datas[$i].\"</td>\";\n\t\t}\n\t\t//AJOUT TABLE INSERT : btns correspondant à la ligne de donnees;\n\t\techo '<td>';\n\t\t\techo \"<table>\";\n\t\t\techo '<tr>';\n\t\t\t\techo '<td>';\n\t\t\t\t\tcreateBtnMod($myServer, $myDB, $TableName, $datas, $colNb);\n\t\t\t\techo '</td>';\n\t\t\t\techo '<td>';\n\t\t\t\tcreateBtnSuprr($myServer, $myDB, $TableName, $datas, $colNb);\n\t\t\t\techo '</td>';\n\t\t\techo '</tr>';\n\t\t\techo \"</table>\";\n\t\techo '</td>';\n\t\techo \"</tr>\"; // fin de la ligne du tableau\n\t}\n\t// terminer la table\n\techo \"</table>\";\n\t\n\t\n}", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "protected function doInsert() {\n return '';\n }", "function link_origin_file($fname, $title=\"\"){\n if (!$title==\"\") $title.=\"<br>\";\n $title.=basename($fname);\n $ageString=file_age_string($fname);\n $ageStyle=file_age_style($fname);\n\n echo \"<div style='font-family: monospace; line-height: 100%;'>\";\n echo html_button_copy($fname, True, \"copy\");\n echo \"<span style='$ageStyle; padding-left: 4px; padding-right: 4px;'>\";\n echo basename($fname);\n echo \" <span style='font-size: 70%'>$ageString</span></span>\";\n echo \"</div>\";\n}", "function insertar_link(){\n $this->accion=\"Nuevo Link\";\n if (isset($_POST['envio']) && $_POST['envio']==\"Guardar\"){\n header(\"location:/admin/link/\");\n\n $this->asignar_valores();\n $sql=\"INSERT INTO link (tipo_cat, nombre_cat, etiqueta_cat, claves_cat, descripcion_cat, prioridad_cat)\n\t\t\t\t\t\tVALUES (?, ?, ?, ?, ?, ?)\";\n\n try{\n $query = $this->connection->prepare($sql);\n $query->bindParam(1, $this->tipo);\n $query->bindParam(2, $this->nombre);\n $query->bindParam(3, $this->etiqueta);\n $query->bindParam(4, $this->claves);\n $query->bindParam(5, $this->descripcion);\n $query->bindParam(6, $this->prioridad);\n $query->execute();\n\n $this->connection->Close();\n }catch (PDOException $e){\n echo('Error Code: '.$e->getMessage());\n exit();\n }\n }\n }", "public function getColumnLink(): HrefElement;", "function col_item_name($row) \n {\n if ( !$this->is_downloading()) {\n return '<a href=\"' . new \\moodle_url('/course/view.php',\n ['id' => $row->courseid]) . '\">' . $row->item_name . '</a>';\n } else {\n return $row->item_name;\n }\n }", "protected function afterInserting()\n {\n }", "public function ln()\n {\n $this->entries[] = '';\n }", "static public function prepHeads()\n {\n self::$heads['row_number'] = '№ п/п';\n self::$heads['locomotive_name'] = 'Наименование';\n}", "function hook_buffer_render_editlink($data)\n{\n\t$form = file_get_contents(PluginManager::$PLUGINS_PATH . '/buffer/fields.html');\n\t$posted = file_get_contents(PluginManager::$PLUGINS_PATH . '/buffer/posted.html');\n\t$html = isset($data['link']['buffer_update_ids']) ? $posted : $form;\n\n\t$data['edit_link_plugin'][] = $html;\n\n\treturn $data;\n}", "protected function renderBrokenLinksTable() {}", "function setTitlelink($v) {\n\t\t$this->set(\"titlelink\",$v);\n\t}", "function redirectToSource($linkid) {\r\n\tglobal $wpdb;\r\n\t$wpdb->update(WP_BARDB_LINKS,array('link_behavior'=>1),array('id'=>$linkid),array('%d'),array('%d'));\r\n}", "function applyShowWpBar($linkid) {\r\n\tglobal $wpdb;\r\n\t$wpdb->update(WP_BARDB_LINKS,array('link_behavior'=>0),array('id'=>$linkid),array('%d'),array('%d'));\r\n}", "function forschungsatlas_admin_url() {\n global $pager_total_items;\n $destination = drupal_get_destination();\n\n drupal_set_title(t('Institutions with broken links'));\n\n $header = array();\n $header[] = array('data' => t('Institution'), 'field' => 'name', 'sort' => 'asc');\n $header[] = array('data' => t('City'), 'field' => 'city');\n $header[] = array('data' => t('Federal State'), 'field' => 'federalstate');\n $header[] = array('data' => t('URL'), 'field' => 'url');\n $header[] = array('data' => t('Updated'), 'field' => 'changed');\n $header[] = array('data' => t('Operation'));\n\n $query = db_select('forschungsatlas__tools_broken_links', 'urls')->extend('PagerDefault')->extend('TableSort');\n $query->join('forschungsatlas__institutions', 'i', 'urls.iid=i.iid');\n $query->join('forschungsatlas__cities', 'c', 'i.cid = c.cid');\n $query->join('forschungsatlas__federal_states', 'fs', 'i.fsid = fs.fsid');\n $query->fields('i', array('iid', 'name', 'url', 'changed'));\n $query->addField('c', 'name', 'city');\n $query->addField('fs', 'name', 'federalstate');\n $query->limit(FORSCHUNGSATLAS_PAGER)\n ->orderByHeader($header);\n $result = $query->execute();\n\n $rows = array();\n foreach ($result as $data) {\n $row = array();\n $row['data']['name'] = check_plain($data->name);\n $row['data']['city'] = check_plain($data->city);\n $row['data']['federalstate'] = $data->federalstate;\n $url = check_url($data->url);\n $row['data']['url'] = l($url, $url, array(\n 'attributes' => array(\n 'target'=>'blank',\n 'class' => 'forschungsatlas-institution-l-ext',\n )\n )\n );\n $row['data']['changed'] = format_date($data->changed, 'short');\n $operations = array();\n $operations['edit'] = array(\n 'title' => t('edit'),\n 'href' => FORSCHUNGSATLAS_CONFIG_PATH. '/institutions/institution/'. $data->iid .'/edit',\n 'query' => $destination,\n );\n $row['data']['operations'] = array(\n 'data' => array(\n '#theme' => 'links',\n '#links' => $operations,\n '#attributes' => array('class' => array('links', 'inline', 'nowrap')),\n ),\n );\n $rows[] = $row;\n } // foreach()\n $build['forschungsatlas_table'] = array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#empty' => t('There are no institutions with broken links.'),\n '#attributes' => array('id' => 'forschungsatlas-table-url'),\n '#caption' => (!empty($pager_total_items[0]) ? format_plural($pager_total_items[0], '1 result', '@count results') : ''),\n );\n $build['forschungsatlas_pager'] = array(\n '#markup' => theme('pager'),\n );\n\n return $build;\n}", "function drop()\n {\n if ($this->GET('sure')) {\n $this->table->drop_field($this->GET('field'));\n $this->table->write();\n $this->structure();\n return;\n }\n $this->displayHead();\n echo 'Do you really want to<br>drop field `' . $this->GET('field') . '`?<p>';\n echo '<a class=\"danger\" href=\"' . $this->SELF . '?method=drop&table=' . $this->table->tablename() . '&field=' . $this->GET('field') . '&sure=1\">Yes</a> | ';\n echo '<a href=\"' . $this->SELF . '?method=structure&table=' . $this->table->tablename() . '\">No</a>';\n }", "function format_task_link($row) {\n if (!identity_can(\"job-view\", $row)){\n return \"...\";\n }\n return format_link(\n url_textblock($row['task_page_name']),\n $row['task_title']);\n }", "function renderFilterCreationLink() {\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER_LINK###');\n\n\t\tif (!isset($this->conf['newfilter_link.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter_link.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter_link.']['form_url.']['returnLast'] = 'url';\n\t\t$content = tslib_cObj::substituteMarker($content, '###FORM_URL###', $this->cObj->typolink('', $this->conf['newfilter_link.']['form_url.']));\n\n\t\treturn $content;\n\t}", "function procMenuAdminDeleteButton()\n\t{\n\t\t$menu_srl = Context::get('menu_srl');\n\t\t$menu_item_srl = Context::get('menu_item_srl');\n\t\t$target = Context::get('target');\n\t\t$filename = Context::get('filename');\n\t\tFileHandler::removeFile($filename);\n\n\t\t$this->add('target', $target);\n\t}", "function character_data($parser, $data) {\r\n if ( $this->make_link ) {\r\n print '<a href=\"http://' . $data . '\" target=\"_blank\">' . $data . '</a>';\r\n $this->make_link = false;\r\n } else {\r\n print $data;\r\n }\r\n }", "public function column_rel($link)\n {\n }", "public function displayColumn1()\r\n\t{\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\r\n\t\t\t\tjQuery(\".remove\").click(function() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (confirm(\"<?php _e('You are about to permanently delete the selected items.\\n\\'Cancel\\' to stop, \\'OK\\' to delete.','framework');?>\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t<?php\r\n\t}", "function callbackDeletePopup() {\n if ($this->deleted) {\n return;\n }\n $child = $this->deleteMenuItem->child;\n $name = $this->name;\n if (!$name) { \n $name = 'UNNAMED';\n }\n $child->set_text('Delete Field : '. $name);\n $this->deleteMenuItem->show();\n \n }", "function register_block_core_comment_edit_link()\n {\n }", "function addContentTip($id,$name1){\n $sql=\"insert into noidungtipnote(name_nd1,id_tip)\n values('$name1','$id')\";\n execute($sql);\n }", "public function GetWysiwygDownloadLink()\n {\n $sName = $this->GetName();\n $sName = str_replace(',', '', $sName);\n $sWysiwygDownloadLink = $this->id.',dl,'.$sName.',ico,kb';\n\n return $sWysiwygDownloadLink;\n }", "function create(){\n // cls_hermes_plugin::cls_hermes_plugin($options); \nglobal $xoopsModuleConfig, $xoopsDB;\n\n //------------------------------------------- \n $decomodele = $this->name;\n $sql = \"('{$decomodele}', 'content','multiline',0,01,'12',''),\n ('{$decomodele}', 'type','list',0,02,'|css|html|text','');\";\n\n \n //--------------------------------------------------\n cls_decoration:: createModele($decomodele, $sql);\n //-------------------------------------------------- \n\n\n}", "function LINK_save($lid, $old_lid, $cid, $categorydd, $url, $description, $title, $hits, $owner_id, $group_id, $perm_owner, $perm_group, $perm_members, $perm_anon, $type)\n{\n global $_CONF, $_GROUPS, $_TABLES, $_USER, $MESSAGE, $LANG_LINKS_ADMIN, $_LI_CONF;\n\n $retval = '';\n\n // Convert array values to numeric permission values\n if (is_array($perm_owner) OR is_array($perm_group) OR is_array($perm_members) OR is_array($perm_anon)) {\n list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon);\n }\n\n // clean 'em up\n $description = DB_escapeString (COM_checkHTML (COM_checkWords (trim($description))));\n $title = DB_escapeString (COM_checkHTML (COM_checkWords (trim($title))));\n $cid = DB_escapeString (trim($cid));\n $url = DB_escapeString(trim($url));\n\n if (empty ($owner_id)) {\n // this is new link from admin, set default values\n $owner_id = $_USER['uid'];\n if (isset ($_GROUPS['Links Admin'])) {\n $group_id = $_GROUPS['Links Admin'];\n } else {\n $group_id = SEC_getFeatureGroup ('links.edit');\n }\n $perm_owner = 3;\n $perm_group = 2;\n $perm_members = 2;\n $perm_anon = 2;\n }\n\n $lid = COM_sanitizeID($lid);\n $old_lid = COM_sanitizeID($old_lid);\n if (empty($lid)) {\n if (empty($old_lid)) {\n $lid = COM_makeSid();\n } else {\n $lid = $old_lid;\n }\n }\n\n // check for link id change\n if (!empty($old_lid) && ($lid != $old_lid)) {\n // check if new lid is already in use\n if (DB_count($_TABLES['links'], 'lid', $lid) > 0) {\n // TBD: abort, display editor with all content intact again\n $lid = $old_lid; // for now ...\n }\n }\n\n $access = 0;\n $old_lid = DB_escapeString ($old_lid);\n if (DB_count ($_TABLES['links'], 'lid', $old_lid) > 0) {\n $result = DB_query (\"SELECT owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['links']} WHERE lid = '{$old_lid}'\");\n $A = DB_fetchArray ($result);\n $access = SEC_hasAccess ($A['owner_id'], $A['group_id'],\n $A['perm_owner'], $A['perm_group'], $A['perm_members'],\n $A['perm_anon']);\n } else {\n $access = SEC_hasAccess ($owner_id, $group_id, $perm_owner, $perm_group,\n $perm_members, $perm_anon);\n }\n if (($access < 3) || !SEC_inGroup ($group_id)) {\n $display .= COM_siteHeader ('menu', $MESSAGE[30]);\n $display .= COM_startBlock ($MESSAGE[30], '',\n COM_getBlockTemplate ('_msg_block', 'header'));\n $display .= $MESSAGE[31];\n $display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));\n $display .= COM_siteFooter ();\n COM_accessLog(\"User {$_USER['username']} tried to illegally submit or edit link $lid.\");\n echo $display;\n exit;\n } elseif (!empty($title) && !empty($description) && !empty($url)) {\n\n if ($categorydd != $LANG_LINKS_ADMIN[7] && !empty($categorydd)) {\n $cid = DB_escapeString ($categorydd);\n } else if ($categorydd != $LANG_LINKS_ADMIN[7]) {\n echo COM_refresh($_CONF['site_admin_url'] . '/plugins/links/index.php');\n }\n\n DB_delete ($_TABLES['linksubmission'], 'lid', $old_lid);\n DB_delete ($_TABLES['links'], 'lid', $old_lid);\n\n DB_save ($_TABLES['links'], 'lid,cid,url,description,title,date,hits,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon', \"'$lid','$cid','$url','$description','$title','\".$_CONF['_now']->toMySQL(true).\"','$hits',$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon\");\n\n if (empty($old_lid) || ($old_lid == $lid)) {\n PLG_itemSaved($lid, 'links');\n } else {\n PLG_itemSaved($lid, 'links', $old_lid);\n }\n\n // Get category for rdf check\n $category = DB_getItem ($_TABLES['linkcategories'],\"category\",\"cid='{$cid}'\");\n COM_rdfUpToDateCheck ('links', $category, $lid);\n $c = glFusion\\Cache::getInstance()->deleteItemsByTag('whatsnew');\n\n if ($type == 'submission') {\n return COM_refresh($_CONF['site_admin_url'] . '/moderation.php');\n } else {\n return PLG_afterSaveSwitch (\n $_LI_CONF['aftersave'],\n COM_buildURL (\"{$_CONF['site_url']}/links/portal.php?what=link&item=$lid\"),\n 'links',\n 2\n );\n }\n } else { // missing fields\n $retval .= COM_siteHeader('menu', $LANG_LINKS_ADMIN[1]);\n $retval .= COM_errorLog($LANG_LINKS_ADMIN[10],2);\n if (DB_count ($_TABLES['links'], 'lid', $old_lid) > 0) {\n $retval .= LINK_edit('edit', $old_lid);\n } else {\n $retval .= LINK_edit('edit', '');\n }\n $retval .= COM_siteFooter();\n\n return $retval;\n }\n}", "private function writeUrlExternal($row1, $col1, $row2, $col2, $url): void\n {\n // Network drives are different. We will handle them separately\n // MS/Novell network drives and shares start with \\\\\n if (preg_match('[^external:\\\\\\\\]', $url)) {\n return;\n }\n\n $record = 0x01B8; // Record identifier\n\n // Strip URL type and change Unix dir separator to Dos style (if needed)\n //\n $url = (string) preg_replace(['/^external:/', '/\\//'], ['', '\\\\'], $url);\n\n // Determine if the link is relative or absolute:\n // relative if link contains no dir separator, \"somefile.xls\"\n // relative if link starts with up-dir, \"..\\..\\somefile.xls\"\n // otherwise, absolute\n\n $absolute = 0x00; // relative path\n if (preg_match('/^[A-Z]:/', $url)) {\n $absolute = 0x02; // absolute path on Windows, e.g. C:\\...\n }\n $link_type = 0x01 | $absolute;\n\n // Determine if the link contains a sheet reference and change some of the\n // parameters accordingly.\n // Split the dir name and sheet name (if it exists)\n $dir_long = $url;\n if (preg_match('/\\\\#/', $url)) {\n $link_type |= 0x08;\n }\n\n // Pack the link type\n $link_type = pack('V', $link_type);\n\n // Calculate the up-level dir count e.g.. (..\\..\\..\\ == 3)\n $up_count = preg_match_all('/\\\\.\\\\.\\\\\\\\/', $dir_long, $useless);\n $up_count = pack('v', $up_count);\n\n // Store the short dos dir name (null terminated)\n $dir_short = (string) preg_replace('/\\\\.\\\\.\\\\\\\\/', '', $dir_long) . \"\\0\";\n\n // Store the long dir name as a wchar string (non-null terminated)\n //$dir_long = $dir_long . \"\\0\";\n\n // Pack the lengths of the dir strings\n $dir_short_len = pack('V', strlen($dir_short));\n //$dir_long_len = pack('V', strlen($dir_long));\n $stream_len = pack('V', 0); //strlen($dir_long) + 0x06);\n\n // Pack the undocumented parts of the hyperlink stream\n $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000');\n $unknown2 = pack('H*', '0303000000000000C000000000000046');\n $unknown3 = pack('H*', 'FFFFADDE000000000000000000000000000000000000000');\n //$unknown4 = pack('v', 0x03);\n\n // Pack the main data stream\n $data = pack('vvvv', $row1, $row2, $col1, $col2) .\n $unknown1 .\n $link_type .\n $unknown2 .\n $up_count .\n $dir_short_len .\n $dir_short .\n $unknown3 .\n $stream_len; /*.\n $dir_long_len .\n $unknown4 .\n $dir_long .\n $sheet_len .\n $sheet ;*/\n\n // Pack the header data\n $length = strlen($data);\n $header = pack('vv', $record, $length);\n\n // Write the packed data\n $this->append($header . $data);\n }", "function saveMetadata(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $metadataJSON = $this->generateJSON();\n\t\t \n\t\t $where = \"source_id = '\".$this->penelopeTabID.\"' \";\n\t\t $db->delete(\"export_tabs_meta\", $where);\n\t\t \n\t\t if(!$this->tableGroupID){\n\t\t\t\t$this->tableGroupID = false;\n\t\t }\n\t\t if(!$this->tablePage){\n\t\t\t\t$this->tablePage = false;\n\t\t }\n\t\t \n\t\t if($this->tablePage < 1){\n\t\t\t\tif(strstr($this->tableID, \"/\")){\n\t\t\t\t\t $tableEx = explode(\"/\", $this->tableID);\n\t\t\t\t\t $this->tablePage = $tableEx[1];\n\t\t\t\t\t $this->tableGroupID = $tableEx[0];\n\t\t\t\t}\n\t\t }\n\t\t if(strstr($this->tableGroupID, \"/\")){\n\t\t\t\t$tableEx = explode(\"/\", $this->tableGroupID);\n\t\t\t\t$this->tableGroupID = $tableEx[0];\n\t\t }\n\t\t \n\t\t $data = array(\t\"source_id\" => $this->penelopeTabID,\n\t\t\t\t\t\t\t\t\"tableID\" => $this->tableID,\n\t\t\t\t\t\t\t\t\"tableGroupID\" => $this->tableGroupID,\n\t\t\t\t\t\t\t\t\"page\" => $this->tablePage,\n\t\t\t\t\t\t\t\t\"title\" => $this->tableName,\n\t\t\t\t\t\t\t\t\"published\" => $this->published,\n\t\t\t\t\t\t\t\t\"pub_created\" => $this->pubCreated,\n\t\t\t\t\t\t\t\t\"pub_update\" => $this->pubUpdate,\n\t\t\t\t\t\t\t\t\"metadata\" => $metadataJSON\n\t\t\t\t\t\t );\n\t\t \n\t\t $db->insert(\"export_tabs_meta\", $data);\n\t }", "function extra_tablenav( $which ) {\n if ( $which == \"top\" ){\n //The code that goes before the table is here\n echo \"<h2>Funny Quotes<a href='admin.php?page=add_funny_quotes' class='add-new-h2'>+ Ajouter une nouvelle citation</a></h2>\";\n }\n }", "function insertPageClip()\n\t{\n\t\tglobal $ilCtrl, $ilUser;\n\t\t\n\t\tinclude_once(\"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php\");\n\t\t\n\t\t$node_id = ilChapterHierarchyFormGUI::getPostNodeId();\n\t\t$first_child = ilChapterHierarchyFormGUI::getPostFirstChild();\n\t\t\n\t\tif (!$first_child)\t// insert after node id\n\t\t{\n\t\t\t$parent_id = $this->tree->getParentId($node_id);\n\t\t\t$target = $node_id;\n\t\t}\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t// insert as first child\n\t\t{\n\t\t\t$parent_id = $node_id;\n\t\t\t$target = IL_FIRST_NODE;\n\t\t}\n\n\t\t// cut and paste\n\t\t$pages = $ilUser->getClipboardObjects(\"pg\");\n\t\t$copied_nodes = array();\n\t\tforeach ($pages as $pg)\n\t\t{\n\t\t\t$cid = ilLMObject::pasteTree($this->content_object, $pg[\"id\"], $parent_id, $target,\n\t\t\t\t$pg[\"insert_time\"], $copied_nodes,\n\t\t\t\t(ilEditClipboard::getAction() == \"copy\"));\n\t\t\t$target = $cid;\n\t\t}\n\t\tilLMObject::updateInternalLinks($copied_nodes);\n\n\t\tif (ilEditClipboard::getAction() == \"cut\")\n\t\t{\n\t\t\t$ilUser->clipboardDeleteObjectsOfType(\"pg\");\n\t\t\t$ilUser->clipboardDeleteObjectsOfType(\"st\");\n\t\t\tilEditClipboard::clear();\n\t\t}\n\t\t\n\t\t$ilCtrl->redirect($this, \"view\");\n\t}", "public function Inserted() {\n\t\t\t// Define sub menu selection\n\t\t\t$GLOBALS['menu']['items']['opt1_css'] = 'details_item_on';\n\t\t\t// Render view\n\t\t\tView::render('itemsInserted');\n \t\t}", "function add($row) {\n\t\t//$y = 0.25 + $this->y * 1.5;\n\t\tif ($this->curLabel == 0) $this->blockOut('page');\n\t\t\n\t\t$this->blockOut('label');\n\t\t\t\n\t\t$short = new slURLShortener();\n\t\t\n\t\t$short->create(WWW_ROOT.\"/item/\".$this->ref.\"/\".$row[\"_KEY\"]);\n\t\t\n\t\t$url = $short->getShortenedURL();\n\n\t\t$qrFile = $this->file.\"-\".($this->imNum++).\".png\";\n\t\t\n\t\t$this->blockOutEnd(array($page, $label, $row));\n\t\t\n\t\t$this->curLabel ++;\n\t\tif ($this->curLabel > $this->labelConfig[\"labels-per-page\"]) {\n\t\t\t$this->blockOutEnd();\n\t\t\t$this->curLabel = 0;\n\t\t\t$this->curPage ++;\n\t\t}\n\t\t\n\t\t//QRcode::png($short->getTinyID(), $qrFile, 'L', 6, 2);\n\t\t\n\t\t//fputs($this->fp,$qrFile.\"\\n\");\n\t\t\n\t\t//$this->pdf->Image($qrFile, $x, $y, 1.5, 1.5, \"PNG\", $url);\n\t\t\t\t\n\t\t//$this->pdf->SetXY(1.5 + $x, $y + 0.1);\n\t\t\n\t\t/*$this->addText($row[\"_NAME\"]);\n\t\tif (isset($row[\"_UNIQUE\"]) && $row[\"_UNIQUE\"] && safeName($row[\"_UNIQUE\"]) != safeName($row[\"_NAME\"])) $this->addText($row[\"_UNIQUE\"]);\n\t\t$this->addText(\"REF: \".$GLOBALS[\"slCore\"]->db->refToNumber(str_replace(\"/\",\".\",$this->ref)).\".\".$row[\"_KEY\"]);\n\t\t$this->addText(WWW_ROOT.\"/sl/tiny?\".$short->id,8);\n\t\t\n\t\t$this->x ++;\n\t\tif ($this->x == 2) {\n\t\t\t$this->x = 0;\n\t\t\t$this->y ++;\n\t\t\tif ($this->y == 7) {\n\t\t\t\t$this->y = 0;\n\t\t\t\t$this->pdf->AddPage();\n\t\t\t}\n\t\t}*/\n\t}", "public function finish_database_export() {\n $this->output('</moodle_database>');\n }", "public function storeFile()\n\t{\n\t\tif (!$this->blnIsModified)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$strFile = trim($this->strTop) . \"\\n\\n\";\n\t\t$strFile .= \"-- LESSON SEGMENT START --\\nCREATE TABLE `tl_cb_lessonsegment` (\\n\";\n\n\t\tforeach ($this->arrData as $k=>$v)\n\t\t{\n\t\t\t$strFile .= \" `$k` $v,\\n\";\n\t\t}\n\n\t\t$strFile .= \") ENGINE=MyISAM DEFAULT CHARSET=utf8;\\n-- LESSON SEGMENT STOP --\\n\\n\";\n\n\t\tif ($this->strBottom != '')\n\t\t{\n\t\t\t$strFile .= trim($this->strBottom) . \"\\n\\n\";\n\t\t}\n\n\t\t$objFile = new File('system/modules/course_builder/config/database.sql');\n\t\t$objFile->write($strFile);\n\t\t$objFile->close();\n\t}", "private function bookmark()\r\n {\r\n \r\n }", "private function getDocLink(DOMElement $column) {\n\t\t\n\t\t$anchors = $column->getElementsByTagName('a');\t\n\t\t$anchor = $anchors->item(0);\t\t\n\t\t\t\t\t\t\n\t\t$url = \"https://www.landtag.nrw.de\".$anchor->getAttribute('href');\t\t\t\n\t\t\t\t\n\t\t$this->official_record_nr = $anchor->nodeValue; \n\t\t\n\t\treturn $url;\n\t}", "function filecabinet_drawer_insert($node) {\n db_query(\"INSERT INTO {org_drawers} (nid, vid, wnid, ouid, drawer, drawerstatus, drawerperm, notes, user) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', '%s', %d)\",\n $node->nid,\n $node->vid,\n $node->wnid,\n $node->ouid,\n $node->drawer,\n $node->drawerstatus,\n $node->drawerperm,\n $node->notes,\n $node->uid);\n}", "public function uploadlink() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }", "function commcsv_tool() {\n\tadd_submenu_page('edit-comments.php', 'Export Commenters data into CSV', 'Export commenters&#39; contacts', 'manage_options', 'commcsv_page', 'commcsv_page' );\n}", "function rest_output_link_header()\n {\n }", "function writeUrl() {\n\n }", "function makeUploadLink($row) {\n $result = 'http://commons.wikimedia.org/wiki/Commons:Upload';\n $result = 'http://commons.wikimedia.org/w/index.php?title=Special:Upload&uploadformstyle=basic';\n if ( $row['objectnaam']!='' ) {\n\tif ( $row['woonplaats']!='' ) {\n\t $description = $row['objectnaam'] . ', ' . $row['woonplaats'] . ' (rijksmonument ' . $row['objrijksnr'] . ')';\n\t} else {\n\t $description = $row['objectnaam'] . ' (rijksmonument ' . $row['objrijksnr'] . ')';\n\t}\n } else {\n\tif ( $row['woonplaats']!='' ) {\n\t if ( $row['adres']!='' ) {\n\t\t$description = 'Rijksmonument ' . $row['objrijksnr'] . ' (' . $row['adres'] . ' ' . $row['woonplaats'] . ')';\n\t } else {\n\t\t$description = 'Rijksmonument ' . $row['objrijksnr'] . ' (' . $row['woonplaats'] . ')';\t\n\t }\n\t} else {\n\t $description = 'Rijksmonument ' . $row['objrijksnr'];\n\t}\n }\n $wpDestFile = $description . '.jpg';\n $wpUploadDescription = '{{Information \\n';\n $wpUploadDescription = $wpUploadDescription . '|Description={{nl|1=' . $description . '}}\\n';\n $wpUploadDescription = $wpUploadDescription . '|Source={{own}}\\n';\n $wpUploadDescription = $wpUploadDescription . '|Date=~~~~~ (upload date)\\n';\n $wpUploadDescription = $wpUploadDescription . '|Author=~~~\\n';\n $wpUploadDescription = $wpUploadDescription . '|Permission=\\n';\n $wpUploadDescription = $wpUploadDescription . '|other_versions=\\n';\n $wpUploadDescription = $wpUploadDescription . '}}\\n';\n $wpUploadDescription = $wpUploadDescription . '{{Object location dec|' . $row['lat'] . '|' . $row['lon'] . '}}\\n';\n $wpUploadDescription = $wpUploadDescription . '<!-- Information produced by http://toolserver.org/~erfgoed/monumenten_op_de_kaart/ from ' . $row['source'] . '-->\\n'; \n $wpUploadDescription = urlencode($wpUploadDescription);\n $wpUploadDescription = str_replace('%5Cn', '%0A', $wpUploadDescription); \n $result = $result . '&wpDestFile=' . urlencode($wpDestFile);\n $result = $result . '&wpUploadDescription=' . $wpUploadDescription;\n //$wpDestFile = '';\n //$wpUploadDescription = '';\n return $result;\n}", "function mpp_Add_Admin_Link()\n{\n add_menu_page(\n 'Moses Post Piglatin page', // Title of the page\n 'Moses Post Piglatin', // Text to show on the menu link\n 'manage_options', // Capability requirement to see the link\n 'includes/mpp-post-piglatin-cp.php' // The 'slug' - file to display when clicking the link\n );\n}", "function mmc_admin_bar( $wp_admin_bar ){\n\t$wp_admin_bar->remove_node('wp-logo');\n\n\t//add a \"help\" node\n\t$wp_admin_bar->add_node( array(\n\t\t'title' => 'Get Help',\n\t\t'href'\t=> 'http://google.com',\n\t\t'id' \t=> 'mmc-help',\n\t\t//'parent' => 'site-name',\n\t\t'meta' => array( 'target' => '_blank' ),\n\t) );\n}", "function insertar($bd);", "function makeLink($title,$open_text,$save_text,$base_path,$prefix=\"\") {\n\t\tglobal $modx;\n\t\t$placeholders = array(\n\t\t\t\"[+open_url+]\" => $this->buildURL(\"debug=open\",$modx->documentIdentifier,$prefix),\n\t\t\t\"[+curl+]\" => $_SERVER[\"REQUEST_URI\"],\n\t\t\t\"[+dbg_title+]\" => $title,\n\t\t\t\"[+dbg_icon_url+]\" => $base_path.'bug.png',\n\t\t\t\"[+save_url+]\" => $this->buildURL(\"debug=save\",$modx->documentIdentifier,$prefix),\n\t\t\t\"[+open_dbg_console+]\" => $open_text,\n\t\t\t\"[+save_dbg_console+]\" => $save_text,\n\t\t);\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"links\"]);\n\t}", "function deposit_tab_options_tab() \n {\n ?> <li class=\"deposit_tab\"><a href=\"#deposit_tab_data\"><?php _e('Deposit Options', 'woothemes'); ?></a></li> <?php\n }", "function callbackNamePressed() {\n $w = $this->table->database->layout->window;\n $w->set_cursor($this->table->database->designer->pointers[GDK_HAND2]);\n //$this->startPos = $w->pointer;\n \n \n // modify this to start on left or right.?\n \n $this->startPos = $this->getStartPos();\n \n \n \n \n $this->nameDrag = true;\n $this->setGC();\n \n $this->lastEnd = false;\n gtk::timeout_add(50,array(&$this,'callbackDragMove'));\n \n }", "function tablerow_close() {\n $this->doc .= DOKU_LF.DOKU_TAB.'</tr>'.DOKU_LF;\n }" ]
[ "0.5417458", "0.53255993", "0.5296434", "0.52941865", "0.525635", "0.5218379", "0.5213051", "0.5123752", "0.5116982", "0.5107883", "0.5098769", "0.50818604", "0.5044262", "0.5017949", "0.5007683", "0.4983361", "0.49684572", "0.49657658", "0.49651095", "0.49639255", "0.49629158", "0.49585462", "0.49522424", "0.49390858", "0.49111822", "0.4902984", "0.48932195", "0.48922178", "0.48865587", "0.48757702", "0.48655647", "0.48534444", "0.48505145", "0.48467112", "0.48456198", "0.48449782", "0.48424724", "0.48388952", "0.4838139", "0.48219886", "0.48112184", "0.48077384", "0.47995245", "0.47951555", "0.47916847", "0.47914857", "0.47844175", "0.47772333", "0.47752792", "0.47736496", "0.47541592", "0.4741965", "0.47397262", "0.47335255", "0.47312105", "0.47281802", "0.4723956", "0.47236705", "0.4718039", "0.4709128", "0.47083366", "0.47079858", "0.47036755", "0.47031984", "0.47015363", "0.46973395", "0.46817997", "0.46770194", "0.46754658", "0.46733415", "0.46656105", "0.4663834", "0.46574587", "0.46532822", "0.4651512", "0.46470803", "0.46469122", "0.46447203", "0.46401763", "0.46331194", "0.46324602", "0.46257767", "0.46206975", "0.46162656", "0.4615659", "0.4613086", "0.46123102", "0.46121034", "0.46105233", "0.46087703", "0.4606804", "0.4602238", "0.45978382", "0.45978266", "0.45953688", "0.45941752", "0.45931858", "0.45924905", "0.45910597", "0.45846403" ]
0.5256284
5
Insert DropLoader link above the imagelist on the imagetab
function abl_droploader_image_ui($event, $step) { $content = '<div class="abl-droploader-file-uploader"> <a id="abl-droploader-open" class="abl-droploader-open txp-button" href="#" title="' . gTxt('abl_droploader_open_title') . '">' . gTxt('abl_droploader_open') . '</a> </div>'; return $content.n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function abl_droploader_article_ui($event, $step, $data) {\n\t\t$content = '\n<ul class=\"abl_droploader plain-list\">\n<li><a id=\"abl-droploader-open\" class=\"abl-droploader-open\" href=\"#\" title=\"' . gTxt('abl_droploader_open_title') . '\">' . gTxt('abl_droploader_open') . '</a></li>\n</ul>';\n\t\tif (is_callable('wrapRegion')) { // new in txp 4.6\n\t\t\treturn $data.wrapRegion('abl_droploader_group', $content, 'abl_droploader_link', 'upload', 'article_abl_droploader');\n\t\t} else {\n\t\t\treturn $data.'\n<div id=\"abl_droploader_group\"><h3 class=\"plain lever\"><a href=\"#abl_droploader-link\">' . gTxt('upload') . '</a></h3>\n<div id=\"abl_droploader-link\" class=\"toggle\" style=\"display:none\">' .\n$content . '\n</div>\n</div>\n';\n\t\t}\n\t}", "function abl_droploader_head_end($evt, $stp) {\n\t\tglobal $event, $step, $prefs, $abl_droploader_prefs;\n\n\t\tif (($event == 'image'\n\t\t\t&& (in_array($step, array('list', 'image_list', 'image_multi_edit', 'image_change_pageby', 'image_save', ''))))\n\t\t|| ($event == 'article'\n\t\t\t&& (in_array($step, array('create', 'edit'))))) {\n\t\t\t$abl_droploader_prefs = abl_droploader_load_prefs();\n\t\t\t$css = '';\n\t\t\tif (intval($abl_droploader_prefs['useDefaultStylesheet']) != 0) {\n\t\t\t\t$css .= '<link rel=\"stylesheet\" href=\"../res/css/abl.droploader-app.css\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\tif ($abl_droploader_prefs['customStylesheet'] != '') {\n\t\t\t\t$css .= '<link rel=\"stylesheet\" href=\"' . $abl_droploader_prefs['customStylesheet'] . '\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\tif ($css == '') {\n\t\t\t\t$css = '<link rel=\"stylesheet\" href=\"../res/css/abl.droploader-app.css\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\t$article_image_field_ids = '\"' . implode('\", \"', explode(',', $abl_droploader_prefs['articleImageFields'])) . '\"';\n\t\t\t$script = '<script type=\"text/javascript\">\n\tvar file_max_upload_size = ' . sprintf('%F', (intval($prefs['file_max_upload_size']) / 1048576)) . ';\n\tvar file_max_files = 5;\n\tvar image_max_upload_size = 1;\n\tvar image_max_files = ' . intval($abl_droploader_prefs['imageMaxUploadCount']) . ';\n\tvar reload_image_tab = ' . intval($abl_droploader_prefs['reloadImagesTab']) . ';\n\tvar article_image_field_ids = new Array(' . $article_image_field_ids . ');\n\tvar article_image_field = null;\n</script>\n<script src=\"../res/js/jquery.filedrop.js\" type=\"text/javascript\"></script>\n<script src=\"../res/js/jquery.droploader.js\" type=\"text/javascript\"></script>\n<script src=\"../res/js/abl.droploader-app.js\" type=\"text/javascript\"></script>' . n;\n\t\t\techo $css . $script;\n\t\t}\n\n\t}", "function link_block_thumb()\n{\n add_image_size('link_block_thumb', 884, 540, true); // Hard crop to exact dimensions (crops sides or top and bottom)\n}", "abstract protected function drop_zone($mform, $imagerepeats);", "function adminSpecial() {\n\t\t$this->adminDefault();\n\t\t$this->baseLink = CMS_WWW_URI.'admin/special.php?module=picture_gallery';\n\t\t$this->setView('admin_list');\n\t}", "function admin_showimage($selection, $path, $options) { global $get, $uri;\n\t$real_path = $path.'/'.$selection;\n\tif (isset($get['o'])) {\n\t\t$url = explode('/',$get['o']);\n\t\t$url1 = explode('|', $url[0]);\n\t\t$url2 = explode('|', $url[1]);\n\t\t$found = in_array('sl', $url1) ? true : false;\n\t\t$link = pre_seao($url1[0], $url2[0], false, true);\n\t\t$link = str_replace('ebookcms.php/', '', $link);\n\t\t$link = str_replace('ebookcms.php?', '?', $link);\n\t\t$add = !isset($get['sl']) ? pre_seao('sl', '1') : '';\n\t\tfor ($i=1; $i<count($url1); $i++) {\n\t\t\t$link .= pre_seao($url1[$i], $url2[$i]);\n\t\t\tif ($i==2 && !$found) {$link .= $add;}\n\t\t}\n\t}\n\techo '<div class=\"show_img\">';\n\tif (!LOGGED && isAllowed('uplimg_access')) {echo t('not_allowed').'</div>'; exit;}\n\tif (is_dir($real_path)) { $images = '';\n\t\t$handle = opendir($real_path);\n\t\t$extensions = array('.jpg', '.bmp', '.gif', '.png');\n\t\twhile (($file = readdir($handle)) == true) {\n\t\t\tif ($file != '.' && $file != '..' && $file != 'thumbs') {\n\t\t\t\tclearstatcache();\n\t\t\t\t$ext = strrchr($file, '.');\n\t\t\t\tif (in_array($ext, $extensions)) {\n\t\t\t\t\tif (file_exists($real_path.'/thumbs/'.$file)) {\n\t\t\t\t\t\t$images = $images.'<li>\n\t\t\t\t\t\t\t<div class=\"si_title\">\n\t\t\t\t\t\t\t\t<h4>'.$file.'</h4>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"si_img\">\n\t\t\t\t\t\t\t\t<img src=\"'.$real_path.'/thumbs/'.$file.'\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"si_foot\">\n\t\t\t\t\t\t\t\t<p><a href=\"'.$link.'\" onClick=\"var r = confirm(\\''.t('delete_img').'?\\'); if (r) {deleteimage(\\''.$file.'\\',\\''.$real_path.'\\');}\" \n\t\t\t\t\t\t\t\t\ttarget=\"_self\">'.t('delete').'</a></p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>';\n\t\t\t\t\t} else {$images = $images.'<li>\n\t\t\t\t\t\t<div class=\"si_title\">\n\t\t\t\t\t\t\t<h4>'.$file.'</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"si_img\">\n\t\t\t\t\t\t\t<img src=\"'.$real_path.'/'.$file.'\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"si_foot\">\n\t\t\t\t\t\t\t<p><a href=\"'.$link.'\" onClick=\"var r = confirm(\\''.t('delete_img').'?\\'); if (r) {deleteimage(\\''.$file.'\\',\\''.$real_path.'\\');}\" \n\t\t\t\t\t\t\t\t\ttarget=\"_self\">'.t('delete').'</a></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>';}\n\t\t\t\t}\n\t\t\t}\n\t\t} closedir($handle);\n\t\tif (!empty($images)) {echo '<ul>'.$images.'</ul><br />';} else {echo t('no_image');}\n\t} else if (empty($selection)) {echo t('select_imgs');}\n\techo '</div>';\n\tif (!empty($images)) {return;}\n}", "public function init(){\n parent::init();\n $this->registerAssets();\n $this->attachBehavior(\"linkCont\", new LinkContainerBehavior());\n \n echo CHtml::openTag( $this->containerTag, $this->getContainerOptions());\n echo CHtml::openTag($this->listTag, $this->getListOptions());\n \n // Remove invisible items\n $items = $this->removeInvisibleItems($this->items);\n \n // Render the items\n $count = count($items);\n foreach ($items as $index=>$item ) {\n echo CHtml::openTag($this->itemTag, $this->getItemOptions($item, $index, $count));\n $item['labelMarkup'] = $this->getLabel($item);\n $item['anchorOptions'] = $this->getAnchorOptions($item, $index, $count);\n $this->renderItem($item);\n echo CHtml::closeTag($this->itemTag);\n }\n }", "function insertUrlImages($image_name){\r\n\t\t\r\n\t}", "function abl_droploader_image_uploaded($event, $step, $id) {\n\t\tif (ps('abl_droploader') == '') return;\n\t\t$response = array(\n\t\t\t'status' => 1,\n\t\t\t'image_id' => $id,\n\t\t);\n\t\techo json_encode($response);\n\t\texit;\n\t}", "function album_list_thumbnail($albumList)\n{\n\tforeach ($albumList as $album) {\n\t\t$id = $album->album_id;\n\t\t$title = $album->album_title;\n\t\t$year = $album->album_year;\n\t\techo \"<div class='col-md-6' data-toggle='tooltip' data-placement='top' title='$title'> \";\n\t\t\techo a_open(\"thumbnail\", base_url().\"album/$id\");\n\t\t\t\techo img(\"data/music/albums/$id/cover.png\");\n\t\t\techo a_close();\n\t\techo div_close();\n\t}\n}", "function bootstrapwp_enhanced_image_navigation($url)\n{\n global $post;\n if (wp_attachment_is_image($post->ID)) {\n $url = $url . '#main';\n }\n return $url;\n}", "function manage_banners(){\r\n\r\n\tglobal $cfg;\r\n\t\r\n\tinclude('./include/admin/adm_item.php');\r\n\t\r\n\t$manager = new adm_item();\r\n\t\r\n\t$manager->type =\t\t\t\t'banner';\r\n\t$manager->type_plural =\t\t\t'banners';\r\n\t$manager->url = \t\t\t\t'##pageroot##/?mode=banner';\r\n\t\r\n\t// initialize fields\r\n\t$manager->sql_item_table = \t\t$cfg['t_banner_items'];\t\t\r\n\t$manager->sql_item_id = \t\t'item_id';\t\t\t\r\n\t$manager->sql_item_data = \t\tarray('alt','src');\t\t\t\r\n\t$manager->sql_item_desc = \t\tarray('Display Text','URL');\r\n\r\n\t$manager->sql_item_unique_keys = array(0,1);\r\n\t\r\n\t$manager->sql_item_hidden =\t\tarray();\r\n\t\r\n\t$manager->sql_join_table = \t\t$cfg['t_banner_groups'];\t\t\r\n\t$manager->sql_order_field = \tfalse;\r\n\t\r\n\t$manager->sql_group_table = \t$cfg['t_banners'];\t\t\r\n\t$manager->sql_group_id =\t\t'banner_id';\t\t\t\r\n\t$manager->sql_group_name = \t\t'name';\r\n\r\n\t$manager->do_content_update = \ttrue;\r\n\t\r\n\t// hooks\r\n\t//$manager->item_delete_hook = \t'user_delete';\r\n\t//$manager->remove_hook = \t\t'user_remove';\r\n\t//$manager->edit_item_hook = \t'user_edititem';\r\n\t\r\n\t$manager->custom_functions = \tarray('banner_autofill');\r\n\t$manager->item_html =\t\t\t\r\n\t\"<p><a href=\\\"$manager->url&amp;action=banner_autofill\\\">Autofill banner images from $cfg[img_autofill_dir]/</a></p>\";\r\n\t\r\n\t$manager->ShowItems();\r\n\t\r\n}", "function bau_ein_upload_link_in_der_adminbar() {\n\n global $wp_admin_bar;\n \n if (current_user_can( 'manage_options' ) ) {\n \n $wp_admin_bar->add_menu( array(\n\t\t'id' => 'medien-hochladen',\n\t\t'title' => 'Medien hochladen',\n\t\t'href' => admin_url( 'media-new.php')\n\t));\n}\n}", "protected function addDisplayToolbar() {\n\t\t$doc = JFactory::getDocument();\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/jmap-48x48.png\")}');\n\t\tJToolBarHelper::title( JText::_('COM_JMAP_CPANEL_TOOLBAR' ), 'jmap' );\n\t\tJToolBarHelper::custom('cpanel.display', 'home', 'home', 'COM_JMAP_CPANEL', false);\n\t}", "function register_block_core_gallery()\n {\n }", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "function load_sp_image_widget() {\n\tregister_widget('SP_Image_Widget');\n}", "protected function addToolbar()\n {\n // Get the results for each action\n $canDo = JoomHelper::getActions();\n\n // Get the toolbar object instance\n $bar = JToolbar::getInstance('toolbar');\n\n JToolBarHelper::title(JText::_('COM_JOOMGALLERY_IMGMAN_IMAGE_MANAGER'), 'images');\n\n if(($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('joom.upload') || count(JoomHelper::getAuthorisedCategories('joom.upload'))) && $this->pagination->total)\n {\n JToolbarHelper::addNew('new');\n }\n\n if(($canDo->get('core.edit') || $canDo->get('core.edit.own')) && $this->pagination->total)\n {\n JToolbarHelper::editList();\n JToolbarHelper::custom('edit', 'checkbox-partial', 'checkbox-partial', 'JTOOLBAR_BATCH');\n JToolbarHelper::custom('showmove', 'move.png', 'move.png', 'COM_JOOMGALLERY_COMMON_TOOLBAR_MOVE');\n JToolbarHelper::custom('recreate', 'refresh.png', 'refresh.png', 'COM_JOOMGALLERY_COMMON_TOOLBAR_RECREATE');\n\n // Instantiate a new JLayoutFile instance and render the rotate button\n $layout = new JLayoutFile('joomgallery.toolbar.rotate', JPATH_COMPONENT_ADMINISTRATOR . '/layouts');\n $dhtml = $layout->render(array('title' => JText::_('COM_JOOMGALLERY_COMMON_TOOLBAR_ROTATE')));\n $bar->appendButton('Custom', $dhtml, 'rotate');\n\n JToolbarHelper::divider();\n }\n\n if($canDo->get('core.edit.state') && $this->pagination->total)\n {\n JToolbarHelper::publishList('publish', 'COM_JOOMGALLERY_COMMON_PUBLISH');\n JToolbarHelper::unpublishList('unpublish', 'COM_JOOMGALLERY_COMMON_UNPUBLISH');\n JToolbarHelper::custom('approve', 'upload.png', 'upload_f2.png', 'COM_JOOMGALLERY_IMGMAN_TOOLBAR_APPROVE');\n JToolbarHelper::divider();\n }\n\n //if($canDo->get('core.delete'))\n //{\n JToolbarHelper::deleteList('', 'remove');\n //}\n\n }", "private function createTabImage()\n {\n $filePath = _PS_MODULE_LENGOW_DIR_ . 'views/img/AdminLengow.gif';\n $fileDest = _PS_MODULE_LENGOW_DIR_ . 'AdminLengow.gif';\n if (!file_exists($fileDest) && LengowMain::compareVersion('1.5') == 0) {\n copy($filePath, $fileDest);\n }\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增轮播图';\n $this->global['pageName'] = 'carousel_add';\n $data = '';\n\n $this->loadViews(\"carousel_add\", $this->global, $data, NULL);\n }\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language, $rekeningju;\r\n\r\n\t\t// \"griddelete\"\r\n\t\tif ($rekeningju->AllowAddDeleteRow) {\r\n\t\t\t$item =& $this->ListOptions->Add(\"griddelete\");\r\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t\t$item->OnLeft = TRUE;\r\n\t\t\t$item->Visible = FALSE; // Default hidden\r\n\t\t}\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "function nuthemes_enhanced_image_navigation( $url, $id ) {\n\tif ( ! is_attachment() && ! wp_attachment_is_image( $id ) )\n\t\treturn $url;\n\n\t$image = get_post( $id );\n\tif ( ! empty( $image->post_parent ) && $image->post_parent != $id )\n\t\t$url .= '#main';\n\n\treturn $url;\n}", "function optinpanda_icon_admin_assets( $hook ) { global $optinpanda;\r\nif ( !in_array( $optinpanda->license->type, array( 'free' ) ) ) {\r\n return; \r\n}\r\n\r\n\r\n ?>\r\n <style>\r\n #toplevel_page_license-manager-optinpanda div.wp-menu-image,\r\n #toplevel_page_license-manager-optinpanda:hover div.wp-menu-image,\r\n #toplevel_page_license-manager-optinpanda.wp-has-current-submenu div.wp-menu-image {\r\n background-position: 8px -30px !important;\r\n }\r\n </style>\r\n <?php\r\n \r\n\r\n}", "function admin_showgal($real_path) {// global $get, $uri;\n\t/*$real_path = $path.'/'.$selection;\n\tif (isset($get['o'])) {\n\t\t$url = explode('/',$get['o']);\n\t\t$url1 = explode('|', $url[0]);\n\t\t$url2 = explode('|', $url[1]);\n\t\t$found = in_array('sl', $url1) ? true : false;\n\t\t$link = pre_seao($url1[0], $url2[0], false, true);\n\t\t$link = str_replace('ebookcms.php/', '', $link);\n\t\t$link = str_replace('ebookcms.php?', '?', $link);\n\t\t$add = !isset($get['sl']) ? pre_seao('sl', '1') : '';\n\t\tfor ($i=1; $i<count($url1); $i++) {\n\t\t\t$link .= pre_seao($url1[$i], $url2[$i]);\n\t\t\tif ($i==2 && !$found) {$link .= $add;}\n\t\t}\n\t}*/\n\techo '<div class=\"show_img\">';\n\tif (is_dir($real_path)) { $images = '';\n\t\t$handle = opendir($real_path);\n\t\t$extensions = array('.jpg', '.bmp', '.gif', '.png');\n\t\twhile (($file = readdir($handle)) == true) {\n\t\t\tif ($file != '.' && $file != '..' && $file != 'thumbs') {\n\t\t\t\tclearstatcache();\n\t\t\t\t$ext = strrchr($file, '.');\n\t\t\t\tif (in_array($ext, $extensions)) {\n\t\t\t\t\tif (file_exists($real_path.'/'.$file)) {\n\t\t\t\t\t\t$images = $images.'<li>\n\t\t\t\t\t\t\t<div class=\"si_img\">\n\t\t\t\t\t\t\t\t<img src=\"'.$real_path.'/'.$file.'\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>';\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t} closedir($handle);\n\t\tif (!empty($images)) {echo '<ul>'.$images.'</ul><br />';} else {echo t('no_image');}\n\t} else if (empty($selection)) {echo t('select_imgs');}\n\techo '</div>';\n\tif (!empty($images)) {return;}\n}", "function song_list_thumbnail($songList)\n{\n\tforeach ($songList as $song) {\n\t\t$id = $song->song_id;\n\t\t$title = $song->song_title;\n\t\t$year = $song->song_year;\n\t\techo \"<div class='col-md-6' data-toggle='tooltip' data-placement='top' title='$title'> \";\n\t\t\techo a_open(\"thumbnail\", base_url().\"song/$id\");\n\t\t\t\techo img(\"data/music/songs/$id/cover.png\");\n\t\t\techo a_close();\n\t\techo div_close();\n\t}\n}", "public function assetThumbnailListAction() {\n\t\t$parentFolder = $this->document->getElement ( \"parentFolder\" );\n\t\tif ($parentFolder) {\n\t\t\t$parentFolder = $parentFolder->getElement ();\n\t\t}\n\t\t\n\t\tif (! $parentFolder) {\n\t\t\t// default is the home folder\n\t\t\t$parentFolder = Asset::getById ( 1 );\n\t\t}\n\t\t\n\t\t// get all children of the parent\n\t\t$list = new \\Asset\\Listing ();\n\t\t$list->setCondition ( \"path like ?\", $parentFolder->getFullpath () . \"%\" );\n\t\t\n\t\t$this->view->list = $list;\n\t}", "function calvero_enhanced_image_navigation( $url, $id ) {\n if ( ! is_attachment() && ! wp_attachment_is_image( $id ) )\n return $url;\n \n $image = get_post( $id );\n if ( ! empty( $image->post_parent ) && $image->post_parent != $id )\n $url .= '#main';\n \n return $url;\n}", "function add_image($image,$imageTitle,$imageDescription,$imageUrlMain,$imageLink2Title,$imageLink2Url,$imageLink3Title,$imageLink3Url,$imageLink4Title,$imageLink4Url)\n\t\t{\n\t\t\t$this -> load -> helper('security');\n\n\t\t\t$data = array('Image' => $image, 'Title' => $imageTitle, 'Description' => $imageDescription, 'Urlmain' => $imageUrlMain, 'link2title' => $imageLink2Title, 'Link2' => $imageLink2Url, 'Link3title' => $imageLink3Title, 'Link3' => $imageLink3Url, 'Link4title' => $imageLink4Title, 'Link4' => $imageLink4Url);\n\n\t\t\t$this -> db -> insert('MediaSlider', $data);\n\t\t}", "function add_image( $url = null, $caption = null, $alt = null, $position = null ) {\n\n\t\t$module = new I2M_Module__image( $url, $caption, $alt, $position );\n\n\t\t$this->module_list[] = $module->get_acf_layout();\n\t\t$this->modules[] = $module;\n\n\t\treturn $module;\n\n\t}", "public function poster() {\r\n $titre = $this->requete->getParametre(\"titre\");\r\n $contenu = $this->requete->getParametre(\"contenu\");\r\n \r\n $this->billet->ajouterBillet($titre, $contenu);\r\n // Exécution de l'action par défaut pour réafficher la liste des billets\r\n $this->executerAction(\"index\"); // utiliser header pour rediriger vers une nouvelle page liste billet admin \r\n }", "function admin_preload ()\n\t{\n\t\t$this->CI->admin_navigation->child_link('configuration',65,'phpBB3',site_url('admincp/phpbb'));\n\t}", "function shortcode_insert_button()\n {\n $this->config['name']\t\t\t= __('Carousel With Thumbnails', 'swedenWp' );\n $this->config['tab']\t\t\t= __('Content Elements', 'swedenWp' );\n $this->config['icon']\t\t\t= swedenBuilder::$path['imagesURL'].\"sc-postslider.png\";\n $this->config['order']\t\t\t= 2;\n $this->config['target']\t\t\t= 'avia-target-insert';\n $this->config['shortcode'] \t\t= 'sw_thumb_nav_carousel';\n $this->config['shortcode_nested'] = array('sw_thumb_carousel_slide');\n $this->config['tooltip'] \t = __('Display a carousel element with thumb navigation', 'swedenWp' );\n }", "function LinkITMenu() {\n add_menu_page('123LinkIt', '123LinkIt', 'manage_options', 'LinkITPluginCentral', 'LinkITPluginCentral', 'http://www.123linkit.com/images/123linkit.favicon.gif', 3);\n }", "function TS_VCSC_Add_Posts_Image_Lean() {\r\n\t\t\t\tvc_lean_map('TS_VCSC_Posts_Image_Grid_Standalone',\t\t\tarray($this, 'TS_VCSC_Add_Posts_Image_Elements'), null);\r\n\t\t\t}", "function add()\n\t{\n\t\t$CFG = $this->config->item('image_configure');\n\t\t$data[\"title\"] = _e(\"Image\");\n\t\t## for check admin or not ##\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\n\t\t$this->load->module('context/context_admin');\n\t\t$user_context = $this->context_admin->getContext();\n\t\t$data['var']['context_dd'] = ( array('' => _e('Choose Context') ) + $user_context );\n\t\t$data['var']['relation_dd'] = ( array('' => _e('Choose Relation') ) );\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"image\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"image_add\", $data, true, \"image\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function getLoaderIconUrl()\n {\n return $this->assetRepository->getUrl(Naming::getModuleName() . '::images/ajax-loader.gif');\n }", "function emc_enhanced_image_navigation( $url, $id ) {\r\n\tif ( ! is_attachment() && ! wp_attachment_is_image( $id ) )\r\n\t\treturn $url;\r\n\r\n\t$image = get_post( $id );\r\n\tif ( ! empty( $image->post_parent ) && $image->post_parent != $id )\r\n\t\t$url .= '#main';\r\n\r\n\treturn $url;\r\n}", "protected function addDisplayToolbar() {\r\n\t\t$doc = JFactory::getDocument();\r\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/icon-48-help.png\")}');\r\n\t\t$doc->addStyleDeclaration('.icon-32-config{background-image:url(\"components/com_jmap/images/icon-32-config.png\")}');\r\n\t\tJToolBarHelper::title( JText::_( 'HELP' ), 'jmap' );\r\n\t\tJToolBarHelper::custom('cpanel.display', 'config', 'config', 'CPANEL', false);\r\n\t}", "function adabs_link( $wp_admin_bar ) {\n $args = array(\n 'id' => '',\n 'title' => '',\n 'href' => 'https://adabs.ch',\n 'meta' => array( 'target' => '_blank', 'rel' => 'noopener' ),\n 'parent' => 'top-secondary'\n );\n\t$wp_admin_bar->add_node( $args );\n}", "function register_links_list_widget()\n{\n register_widget( 'VF_Widget_Links_List' );\n}", "private function loadImages(): void\n {\n if (count($this->images) == 1) {\n $this->addMeta('image', $this->images[0]);\n\n return;\n }\n\n foreach ($this->images as $number => $url) {\n $this->addMeta(\"image{$number}\", $url);\n }\n }", "function addImage($path,$title,$description,$thumb,$lightbox,$uniqueID,$limitImages=0) {\n\t // count of images\n\t if ($limitImages > 1 || $limitImages==0) {\n $this->config['count']++;\n\t }\n // just add the wraps if there is a text for it\n $title = (!$title) ? '' : \"<h3>$title</h3>\";\n $description = (!$description) ? '' : \"<p>$description</p>\";\n \n // generate images\n if ($this->config['watermark']) {\n $imgTSConfigBig = $this->conf['big2.'];\n $imgTSConfigBig['file.']['10.']['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox2.'];\n $imgTSConfigLightbox['file.']['10.']['file'] = $path; \n } else {\n $imgTSConfigBig = $this->conf['big.'];\n $imgTSConfigBig['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox.'];\n $imgTSConfigLightbox['file'] = $path; \n } \n $bigImage = $this->cObj->IMG_RESOURCE($imgTSConfigBig);\n\n $lightbox = ($lightbox=='#' || $lightbox=='' || $this->config['showLightbox']!=1) ? 'javascript:void(0)' : $this->cObj->IMG_RESOURCE($imgTSConfigLightbox);\n \t$lightBoxImage='<a href=\"'.$lightbox.'\" title=\"'.$this->pi_getLL('textOpenImage').'\" class=\"open\"></a>';\n\n if ($thumb) {\n $imgTSConfigThumb = $this->conf['thumb.'];\n $imgTSConfigThumb['file'] = $path; \n $thumbImage = '<img src=\"'.$this->cObj->IMG_RESOURCE($imgTSConfigThumb).'\" class=\"thumbnail\" />';\n }\n\n\t // if just 1 image should be returned\n if ($limitImages==1) {\n \treturn '<img src=\"'.$bigImage.'\" class=\"full\" />';\n }\n\n // build the image element \n $singleImage .= '\n <div class=\"imageElement\">'.$title.$description.\n $lightBoxImage.'\n <img src=\"'.$bigImage.'\" class=\"full\" />\n '.$thumbImage.'\n </div>';\n\n\t\t// Adds hook for processing the image\n\t\t$config['path'] = $path;\n $config['title'] = $title;\n\t\t$config['description'] = $description;\n\t\t$config['uniqueID'] = $uniqueID;\n\t\t$config['thumb'] = $thumb;\n\t\t$config['large'] = $large;\n\t\t$config['lightbox'] = $lightbox;\n\t\t$config['limitImages'] = $limitImages;\n\t\t$config['lightBoxCode'] = $lightBoxImage;\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$singleImage = $_procObj->extraImageProcessor($singleImage,$config, $this);\n\t\t\t}\n\t\t} \n \n return $singleImage;\n }", "function addlinks(){\n Vtiger_Link::addLink(0, 'HEADERSCRIPT', 'LSWYSIWYG', 'modules/LSWYSIWYG/resources/WYSIWYG.js','','','');\n\n\t}", "function theme_banner($location) {\n $banner = new UN_Banner();\n $banner->setWhere(' (isdeleted=0 OR isdeleted IS NULL) AND location='.$banner->quote(filter_var($location)));\n $aAll = $banner->getAll();\n $output = '';\n foreach($aAll as $k=>$f) {\n $output .= '<p>'.url($f['url'], '<img alt=\"'.$f['origname'] . '\" border=\"0\" src=\"'. LC_UPLOAD . $f['filename'].'\"/>').'</p>'; \n }\n echo $output;\n}", "function admin_cropImage()\r\n {\r\n // setting the layout for admin\r\n $this->layout = 'admin';\r\n \r\n // Setting the page title\r\n $this->set(\"title_for_layout\",\"Image Crop\");\r\n \r\n }", "public function listtabelPngAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('PENGADAAN');\n }", "function flatsome_enhanced_image_navigation( $url, $id ) {\n if ( ! is_attachment() && ! wp_attachment_is_image( $id ) )\n return $url;\n\n $image = get_post( $id );\n if ( ! empty( $image->post_parent ) && $image->post_parent != $id )\n $url .= '#main';\n\n return $url;\n}", "function links_insert_head($flux) {\r\n\t$links = links_configuration();\r\n\r\n\t//Ouverture d'une nouvelle fenetre\r\n\tif($links['window'] == 'on'){\r\n\t\t$flux .= '<script src=\"'.find_in_path('links.js').'\" type=\"text/javascript\"></script>'. \"\\n\";\r\n\t}\r\n\treturn $flux;\r\n}", "function adminmenu($url, $title, $image) {\r\n global $counter, $admingraphic;\r\n if ($admingraphic == 1) {\r\n\t$img = \"<img src=\\\"images/admin/$image\\\" border=\\\"0\\\" alt=\\\"\\\"></a><br>\";\r\n\t$close = \"\";\r\n } else {\r\n\t$image = \"\";\r\n\t$close = \"</a>\";\r\n }\r\n echo \"<td align=\\\"center\\\"><font class=\\\"content\\\"><a href=\\\"$url\\\">$img<b>$title</b>$close</font></td>\";\r\n if ($counter == 5) {\r\n\techo \"</tr><tr>\";\r\n\t$counter = 0;\r\n } else {\r\n\t$counter++;\r\n }\r\n}", "function import_product_brands_plugin_menu() {\n\n add_menu_page(\"Import Product Brands Plugin\", \"Import Product Brands\",\"manage_options\", \"import_product_brands\", \"import_csv\",plugins_url('/import-product-brands/img/icon.png'));\n}", "function cpc_broker_list_image( $theuser ){\n\n\tglobal $cp_options;\n\t\n\t// args\n\t$args = array(\n\t\t'author'=>$theuser,\n\t\t'post_type' => array( 'ad_listing' )\n\t);\n\t\n\t// The Query\n\t$author_query = new WP_Query( $args );\n\t\n\t// The Loop\n\tif ( $author_query->have_posts() ) {\n\t\tob_start(); ?>\n\t\t<ul>\n\t\t<?php while ( $author_query->have_posts() ) {\n\t\t\t$author_query->the_post(); ?>\n\t\t\t<li>\n\t\t\t\t<a href=\"<?php echo the_permalink(); ?>\"><h4><?php echo the_title(); ?></h4></a>\n\t\t\t\t<?php if ( $cp_options->ad_images ) cp_ad_loop_thumbnail(); ?>\n\t\t\t</li>\n\t\t<?php } ?>\n\t\t</ul>\n\t<?php\n\t} else {\n\t\t// no posts found\n\t}\n\t/* Restore original Post Data */\n\twp_reset_postdata();\n\treturn ob_get_clean();\n}", "function wpbm_slider_images(){\n global $wpdb;\n include( 'inc/admin/wpbm-slider-image.php' );\n die();\n }", "function adabs_link($wp_admin_bar)\n{\n $args = array(\n 'id' => '',\n 'title' => '',\n 'href' => 'https://adabs.ch',\n 'meta' => array('target' => '_blank', 'rel' => 'noopener'),\n 'parent' => 'top-secondary'\n );\n $wp_admin_bar->add_node($args);\n}", "private function prepareImageList() {\n\t\t\tforeach(scandir($this->templateDirectory) as $templateFileName) {\n\t\t\t\tif((strcmp($templateFileName, \".\") !== 0) && (strcmp($templateFileName, \"..\") !== 0)) {\n\t\t\t\t\t$this->imageList->addItem(new Image($this->templateDirectory, $templateFileName), $templateFileName);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function mmc_admin_bar( $wp_admin_bar ){\n\t$wp_admin_bar->remove_node('wp-logo');\n\n\t//add a \"help\" node\n\t$wp_admin_bar->add_node( array(\n\t\t'title' => 'Get Help',\n\t\t'href'\t=> 'http://google.com',\n\t\t'id' \t=> 'mmc-help',\n\t\t//'parent' => 'site-name',\n\t\t'meta' => array( 'target' => '_blank' ),\n\t) );\n}", "function training_image_callback() {\n $output = array();\n $file_path = drupal_realpath('modules/image/sample.png');\n $source = (object) array(\n 'uid' => 1,\n 'uri' => $file_path,\n 'filename' => basename($file_path),\n 'filemime' => file_get_mimetype($file_path),\n );\n $directory = 'public://';\n file_copy($source, $directory, $replace = FILE_EXISTS_REPLACE);\n $array_style = image_styles();\n foreach ($array_style as $val) {\n $style_name = $val['name'];\n $path = 'public://sample.png';\n $attributes = array(\n 'class' => 'simple-image',\n );\n $output[] = theme('image_style', array(\n 'style_name' => $style_name,\n 'path' => $path,\n 'attributes' => $attributes,\n ));\n }\n\n return theme('item_list', array(\n 'items' => $output,\n 'type' => 'ol',\n 'title' => t('Default image styles'),\n ));\n}", "public function get_image_link()\n {\n }", "function init() {\n if( !is_object( $this->ipsclass->compiled_templates['skin_gallery_imagelisting'] ) ) {\n \t$this->ipsclass->load_template('skin_gallery_imagelisting');\n }\n $this->img_html = $this->ipsclass->compiled_templates[ 'skin_gallery_imagelisting' ];\n }", "function buildImageDisplay($imageArray) {\r\n $id = '<ul id=\"image-display\">';\r\n foreach ($imageArray as $image) {\r\n $id .= '<li>';\r\n $id .= \"<img src='$image[imgPath]' title='$image[invMake] $image[invModel] image on PHP Motors.com' alt='$image[invMake] $image[invModel] image on PHP Motors.com'>\";\r\n $id .= \"<p><a href='/phpmotors/uploads?action=delete&imgId=$image[imgId]&filename=$image[imgName]' title='Delete the image'>Delete $image[imgName]</a></p>\";\r\n $id .= '</li>';\r\n }\r\n $id .= '</ul>';\r\n return $id;\r\n }", "public function initMenu()\n {\n add_menu_page(\n 'Flickr Group Gallery',\n 'Flickr Group Gallery',\n 'administrator',\n 'flickr-group-gallery',\n array($this, 'render'),\n 'dashicons-admin-generic'\n );\n }", "function ucf_post_list_display_gallery_before($content, $posts, $atts)\n{\n ob_start();\n ?>\n <div class=\"ucf-post-list card-layout\" id=\"post-list-<?php echo $atts['list_id']; ?>\">\n <?php\n return ob_get_clean();\n}", "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "private function insert4Action(){\t\t\n\t\tinclude_once (System_Properties::ADMIN_MOD_PATH.'/models/default/db_selVPic.php');\n\t\t$bike = $this -> adminNS -> bikeAds;\n\t\t$this -> actParam = $bike;\t\t\n\t\t$this -> loadBikeCat();\n\t\t\t\t\t\n\t\tif (isset($bike['bikeID'])){\n\t\t\t$bikePhotos = db_selVPic(array(\t'vType'=>System_Properties::BIKE_ABRV,\n\t\t\t\t\t\t\t\t\t\t\t'vID' => $bike['bikeID']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\t\t\tif (($bikePhotos != false) && is_array($bikePhotos) && (count($bikePhotos) > 0)){\n\t\t\t\t$bikePhotoNew = array();\n\t\t\t\tforeach($bikePhotos as $key => $kVal){\n\t\t\t\t\t$bikePhotoNew[$kVal['vPicID']] = $kVal;\n\t\t\t\t}\n\t\t\t\t$this -> adminNS -> bikePhoto = $bikePhotoNew;\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\tif (($bikePhotos != false) && is_array($bikePhotos) && (count($bikePhotos) > 0)){\n\t\t\t\tif (is_array($this -> bikeNS -> bikePhoto)){\n\t\t\t\t\t$this -> bikeNS -> bikePhoto = array_merge($this -> bikeNS -> bikePhoto, $bikePhotos);\n\t\t\t\t}else{\n\t\t\t\t\t$this -> bikeNS -> bikePhoto = $bikePhotos;\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\t$bike['bikePhoto'] = $this -> adminNS -> bikePhoto;\t\t\n\t\t$this -> view -> bike = $bike;\n\t\t$this -> render('insert3');\t\t\t\n\t}", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_host_add_list', array('content' => $content));\n }", "public function show(ImgList $imgList)\n {\n //\n }", "function sf_product_thumb_image_html($html) {\n\t\t$html = '<li>'.$html.'</li>';\n\t\treturn $html;\n\t}", "function addSidebarItem($marker, $data) {\r\n\t\tif(!($this->showSidebar && is_object($marker))) return;\r\n\t\t$data['onclickLink'] = $marker->getClickJS();\r\n\t\t$this->sidebarLinks[] = \\JBartels\\WecMap\\Utility\\Shared::render($data, $this->conf['sidebarItem.']);\r\n\t}", "function feedTheLoader() {\n\t\n}", "function register_block_core_post_navigation_link()\n {\n }", "public function insert_gallery_shortcode() {\n\t\t\n\t\tcheck_ajax_referer( 'daylife-gallery-add-nonce', 'nonce' );\n\t\t// TODO: Update to insert ids into shortcode so it works with new media tool\n\t\techo '[gallery]';\n\t\tdie();\n\n\t}", "function editor_insert_image($html, $id, $caption, $title, $align, $url, $size) {\r\n\tlist($imgsrc) = image_downsize($id, 'hero-review');\r\n//\tlist($imgsrc) = image_downsize($id, $size);\r\n\r\n\t$html = \"<div class=\\\"photo-gallery\\\">\";\r\n\t$html .= \"<img src=\\\"$imgsrc\\\" alt=\\\"$caption\\\">\";\r\n\tif ($caption) {\r\n\t\t$html .= \"<div class=\\\"caption\\\">$caption</div>\";\r\n\t}\r\n\t$html .= \"</div><!-- photo-gallery -->\";\r\n\treturn $html;\r\n}", "function register_block_core_page_list_item()\n {\n }", "function listing_image_add_metabox () {\n\t\tadd_meta_box( 'listingimagediv', __( 'Image Containers Loop', 'text-domain' ), 'listing_image_metabox', 'product', 'side', 'low');\n\t}", "function register_block_core_gallery() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/gallery',\n\t\tarray(\n\t\t\t'render_callback' => function ( $attributes, $content ) {\n\t\t\t\treturn $content;\n\t\t\t},\n\t\t)\n\t);\n}", "function get_sponsors_list($value='')\r{?>\r\r<ul class=\"media-grid\">\r <li>\r <a href=\"http://www.jkbank.net\" target=\"_blank\" class=\"external\">\r <img class=\"thumbnail\" src=\"./media/sponsors/icons/logo_jk.jpg\" alt=\"\">\r </a>\r </li> \r</ul>\r\r\r<?php \r }", "function remove_image_links() {\n update_option('image_default_link_type', 'none');\n}", "function register_block_core_avatar()\n {\n }", "function ShowImageList()\n{\n\techo('<div class=\"panel panel-primary\"><div class=\"panel-heading\">');\n\t\techo('<h3 class=\"panel-title\">');\n\t\techo(\"\".getPara('imagelist','value2'));\n\t\techo('</h3></div>');\n\t\techo('<div class=\"panel-body\">');\n\t\t\n\t\t\techo('<div id=\"myCarousel\" class=\"carousel slide\">\n\t\t\t\t\t <div class=\"carousel-inner\">');\n\t\t\t$str2=\"select * from imagelist order by imageid desc\";\n\t\t\t$result2=mysql_query($str2) or die(mysql_error());\n\t\t\t$k=0;\n\t\t\twhile ($row2=mysql_fetch_array($result2))\n\t\t\t{\n\t\t\t\tif($k==1)\n\t\t\t\t{\n\t\t\t\t\t echo('<div class=\"active item\">\n\t\t\t\t\t <img class=\"img-responsive\" src=\"'.$row2['file'].'\"/>\n\t\t\t\t\t </div>');\n\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\t echo('<div class=\"item\">\n\t\t\t\t\t \t<img class=\"img-responsive\" src=\"'.$row2['file'].'\"\"/>\t\t\t\t \t\n\t\t\t\t\t </div>');\n\t\t\t\t\t }\n\t\t\t\t$k++;\t \n\t\t\t\t}\n\t\t\t\techo('</div>\n\t\t\t\t\t <!-- Carousel nav -->\n\t\t\t\t\t <a class=\"carousel-control left\" href=\"#myCarousel\" data-slide=\"prev\">&lsaquo;</a>\n\t\t\t\t\t <a class=\"carousel-control right\" href=\"#myCarousel\" data-slide=\"next\">&rsaquo;</a>\n\t\t\t\t\t</div>');\n\t\t\techo(\"</div>\");\n\t\t\techo(\"</div>\");\n}", "function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'carousel_upload';\n $data['ret_Url'] = 'carousel_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }", "function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb', $date='', $filmstrip_prev_pos, $filmstrip_next_pos,$max_block_items,$thumb_width)\r\n{\r\n global $CONFIG, $THEME_DIR;\r\n global $template_film_strip, $lang_film_strip, $lang_common, $pic_count,$mar_pic;\r\n\r\n $superCage = Inspekt::makeSuperCage();\r\n\r\n static $template = '';\r\n static $thumb_cell = '';\r\n static $empty_cell = '';\r\n static $spacer = '';\r\n\r\n if (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) { set_js_var('vertstrip', 1); }\r\n\r\n if ((!$template)) {\r\n $template = $template_film_strip;\r\n $thumb_cell = template_extract_block($template, 'thumb_cell');\r\n $empty_cell = template_extract_block($template, 'empty_cell');\r\n }\r\n\r\n $cat_link = is_numeric($aid) ? '' : '&amp;cat=' . $cat;\r\n $date_link = $date=='' ? '' : '&amp;date=' . $date;\r\n\r\n if ($superCage->get->getInt('uid')) {\r\n $uid_link = '&amp;uid=' . $superCage->get->getInt('uid');\r\n } else {\r\n $uid_link = '';\r\n }\r\n\r\n $i = 0;\r\n $thumb_strip = '';\r\n foreach($thumb_list as $thumb) {\r\n $i++;\r\n if ($mode == 'thumb') {\r\n if ($thumb['pos'] == $pos && !$superCage->get->keyExists('film_strip')) {\r\n $thumb['image'] = str_replace('class=\"image\"', 'class=\"image middlethumb\"', $thumb['image']);\r\n }\r\n // determine if thumbnail link targets should open in a pop-up\r\n if ($CONFIG['thumbnail_to_fullsize'] == 1) { // code for full-size pop-up\r\n if (!USER_ID && $CONFIG['allow_unlogged_access'] <= 2) {\r\n $target = 'javascript:;\" onclick=\"alert(\\''.sprintf($lang_errors['login_needed'],'','','','').'\\');';\r\n } elseif (USER_ID && USER_ACCESS_LEVEL <= 2) {\r\n $target = 'javascript:;\" onclick=\"alert(\\''.sprintf($lang_errors['access_intermediate_only'],'','','','').'\\');';\r\n } else {\r\n $target = 'javascript:;\" onclick=\"MM_openBrWindow(\\'displayimage.php?pid=' . $thumb['pid'] . '&fullsize=1\\',\\'' . uniqid(rand()) . '\\',\\'scrollbars=yes,toolbar=no,status=no,resizable=yes,width=' . ((int)$thumb['pwidth']+(int)$CONFIG['fullsize_padding_x']) . ',height=' . ((int)$thumb['pheight']+(int)$CONFIG['fullsize_padding_y']). '\\');';\r\n }\r\n } elseif ($aid == 'lastcom' || $aid == 'lastcomby') {\r\n $page = cpg_get_comment_page_number($thumb['msg_id']);\r\n $page = (is_numeric($page)) ? \"&amp;page=$page\" : '';\r\n $target = \"displayimage.php?album=$aid$cat_link$date_link&amp;pid={$thumb['pid']}$uid_link&amp;msg_id={$thumb['msg_id']}$page#comment{$thumb['msg_id']}\";\r\n } else {\r\n $target = \"displayimage.php?album=$aid$cat_link$date_link&amp;pid={$thumb['pid']}$uid_link#top_display_media\";\r\n }\r\n $params = array(\r\n '{LINK_TGT}' => $target,\r\n '{THUMB}' => $thumb['image'],\r\n '{ONE_WIDTH}' => \"width:\".$thumb_width.\"px; float: left\" ,\r\n );\r\n } else {\r\n $params = array(\r\n '{LINK_TGT}' => \"index.php?cat={$thumb['cat']}\",\r\n '{THUMB}' => $thumb['image'],\r\n '{ONE_WIDTH}' => \"width:\".$thumb_width.\"px; float: left\" ,\r\n );\r\n }\r\n $thumb_strip .= template_eval($thumb_cell, $params);\r\n }\r\n\r\n $tile1 = $THEME_DIR . 'images/tile1.gif';\r\n $tile2 = $THEME_DIR . 'images/tile2.gif';\r\n\r\n\r\n if (defined('THEME_HAS_NAVBAR_GRAPHICS')) {\r\n $location = $THEME_DIR;\r\n } else {\r\n $location= '';\r\n }\r\n $max_itme_width_ul = $max_block_items;\r\n if(($max_block_items%2)==0){\r\n $max_itme_width_ul = $max_block_items +1;\r\n }\r\n $set_width_to_film = \"width:\".($max_block_items*($thumb_width+4)).\"px; position:relative;\";\r\n\r\n $params = array('{THUMB_STRIP}' => $thumb_strip,\r\n '{COLS}' => $i,\r\n '{TILE1}' => $tile1,\r\n '{TILE2}' => $tile2,\r\n '{SET_WIDTH}' => $set_width_to_film,\r\n );\r\n\r\n ob_start();\r\n echo '<div id=\"filmstrip\">';\r\n if (!defined('THEME_HAS_FILM_STRIP_GRAPHIC')) { starttable($CONFIG['picture_table_width']); }\r\n echo template_eval($template, $params);\r\n if (!defined('THEME_HAS_FILM_STRIP_GRAPHIC')) { endtable(); }\r\n echo '</div>';\r\n $film_strip = ob_get_contents();\r\n ob_end_clean();\r\n\r\n return $film_strip;\r\n}", "function getbanners()\n\t\t{\n\t\t\t$banners = $this->manage_content->getValue('banner_info','*');\n\t\t\techo '<div id=\"add_space\">';\n\t\t\tforeach($banners as $banner)\n\t\t\t{\n\t\t\t\tif($banner['banner_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\techo '<a href=\"'.$banner['banner_link'].'\">';\n\t\t\t\t\techo '<div class=\"add_section\"><img src=\"images/'.$banner['banner_image'].'\" style=\"height:'.$banner['banner_height'].'px;width:'.$banner['banner_width'].'px;float:left;\"/></div></a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}", "public function carregar_imagem()\n\t{\n\t\t$id = $this->input->get(\"id_aluno\");\n\t\t$dados[\"aluno\"] = $this->Aluno_Model->retorna_aluno($id);\t\n\t\t//\tCARREGA A VIZUALIZACAO DA VIEW LISTA\n\t\t$this->load->view('layout/cabecalho_secretaria');\n\t\t$this->load->view('layout/menu_lateral_secretaria');\n\t\t$this->load->view('conteudo/_secretaria/_aluno/fotografia', $dados);\n\t\t$this->load->view('layout/rodape');\n\t\t$this->load->view('layout/script');\n\t}", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "function forumAd($links) {\n global $context;\n\n //echo $context['dir'];\n\n $content = '<a href=\"'.$links['forum']['link'].'\" title=\"Anime Empire Youtube\">\n <h2>Anime Empire on Youtube</h2></a>\n\n \n <a><img src=\"'.$context['dir'].'images/ad/youtube.jpg\" /></a>';\n \n return moduleBlack($content);\n}", "function wp_img_tag_add_loading_attr($image, $context)\n {\n }", "public abstract function prepare_item_links($id);", "function fgallery_add_button($buttons) {\n $fgallery_button = \" <a href='\" . esc_url( fgallery_get_add_album_url() ) . \"' id='insert_gallery' class='thickbox' \n title='\".__('Insert gallery into post', 'fgallery').\"'>\n <img src='\" . esc_url( fgallery_get_insert_button_url( ) ) . \"' alt='\".__('Insert gallery into post', 'fgallery').\"' /></a>\";\n $buttons .= $fgallery_button;\n return $buttons;\n}", "function log_viewer_add_menu_item() {\n\techo '<li><a href=\"http://localhost/ds-plugins/log-viewer/page.php\">Log Viewer</a></li>';\n}", "function buildImageDisplay($imageArray)\n{\n $id = '<ul id=\"image-display\">';\n foreach ($imageArray as $image) {\n $id .= '<li>';\n $id .= \"<img src='$image[imgPath]' title='$image[invMake] $image[invModel] image on PHP Motors.com' alt='$image[invMake] $image[invModel] image on PHP Motors.com'>\";\n $id .= \"<p><a href='/phpmotors/uploads?action=delete&imgId=$image[imgId]&filename=$image[imgName]' title='Delete the image'>Delete $image[imgName]</a></p>\";\n $id .= '</li>';\n }\n $id .= '</ul>';\n return $id;\n}", "function add($pos,$url,$img,$title,$accesskey='')\n{\n\tif($pos==0)\n\t\t$this->reflist[]=array($url,$img,$title,$accesskey);\n\telse\n\t\tarray_unshift($this->reflist,array($url,$img,$title,$accesskey));\n}", "public function insert($banner);", "function floated_admin_avatar($name)\n {\n }", "protected function setLinksBar()\n {\n $mysidia = Registry::get(\"mysidia\");\n $this->linksBar = new Paragraph;\n $linkTitle = new Comment(\"{$mysidia->user->username}'s Links:\");\n $linkTitle->setBold();\n $this->linksBar->add($linkTitle);\n \n $linksList = new LinksList(\"ul\");\n $this->setLinks($linksList);\n \n $this->linksBar->add($linksList);\n $this->setDivision($this->linksBar);\n }", "function wpvideocoach_admin_toolbar() {\r\n\tglobal $wp_admin_bar;\r\n\t\r\n\t// Add the Parent link.\r\n\t$adminurl = admin_url('admin.php?page=wpvideocoach');\r\n\t$admin_toolbar_title = wpvideocoach_toolbar_link_title();\r\n\t$wp_admin_bar->add_menu( array(\r\n\t\t'title' => $admin_toolbar_title,\r\n\t\t'href' => $adminurl,\r\n\t\t'id' => 'wpvideocoach_links',\r\n\t));\r\n\r\n}", "public function getThumbnailLocation() {\n\t\treturn Images::BLIZZARD_PATH . $this->thumbnail;\n\t}", "function ll_makelist2($ll_sociallinks, $widgetname){\n\techo '<nav class=\"' . $widgetname .'\"><ul class=\"liblinks-list ' . $widgetname .'\">';\n\tforeach ($ll_sociallinks as $ll_link) {\n\t\techo '<li><a href=\"' . $ll_link[1] . '\" data-icon=\"' . $ll_link[2] . '\">' . $ll_link[0] . '</a></li>';\n\t}\n\techo '</ul></nav>';\n\tunset($ll_links);\n}", "function widgetopts_tab_devices( $args ){ ?>\n <li class=\"extended-widget-opts-tab-devices\">\n <a href=\"#extended-widget-opts-tab-<?php echo $args['id'];?>-devices\" title=\"<?php _e( 'Devices', 'widget-options' );?>\" ><span class=\"dashicons dashicons-smartphone\"></span> <span class=\"tabtitle\"><?php _e( 'Devices', 'widget-options' );?></span></a>\n </li>\n <?php\n }", "function linkdoni_admin_actions() {\r\n $icon_url = '';\r\n $position = '';\r\n // Add a new top-level menu (ill-advised):\r\n add_menu_page(__('myLinksDump', 'myLinksDump'), __('myLinksDump', 'myLinksDump'), 'administrator', 'myLinksDump', 'linkdoni_admin_page');\r\n\r\n // Add a submenu to the custom top-level menu:\r\n add_submenu_page('myLinksDump', __('EditLinksDump', 'myLinksDump'), __('EditLinksDump', 'myLinksDump'), 'administrator', 'list_links', 'linkdoni_edit_page');\r\n \r\n // Add a submenu to the custom top-level menu:\r\n add_submenu_page('myLinksDump', __('Settings', 'myLinksDump'), __('Settings', 'myLinksDump'), 'administrator', 'option_page', 'myLinksDump_options');\r\n}", "function addLocatorItems()\n\t{\n\t\tglobal $ilLocator;\n\t\t\n\t\tif (is_object($this->object))\n\t\t{\n\t\t\t$ilLocator->addItem($this->object->getTitle(),\n\t\t\t\t$this->getGotoLink($this->object->getRefId()), \"\", $_GET[\"ref_id\"]);\n\t\t}\n\t}", "function banner_images_init() {\n\n\t$args = array(\n\n\t\t'label' => 'Banner Image',\n\n\t\t'public' => true,\n\n\t\t'show_ui' => true,\n\n\t\t'capability_type' => 'post',\n\n\t\t'hierarchical' => false,\n\n\t\t'rewrite' => array('slug' => 'banner'),\n\n\t\t'query_var' => true,\n\n\t\t'menu_icon' => 'dashicons-format-gallery',\n\n\t\t'supports' => array(\n\n\t\t\t'title', \n\n\t\t\t'thumbnail',\n\n\t\t)\n\n\t);\n\n\tregister_post_type( 'banner', $args );\n\n}" ]
[ "0.5821236", "0.5731083", "0.5348935", "0.52925766", "0.5190834", "0.5184053", "0.5172822", "0.5155723", "0.50927645", "0.50896585", "0.5076415", "0.50673866", "0.5060036", "0.5054299", "0.50460917", "0.5045767", "0.5042095", "0.5017115", "0.50115144", "0.5004158", "0.4980735", "0.4956837", "0.49423912", "0.4928043", "0.49230126", "0.49223438", "0.49101236", "0.49046093", "0.48887613", "0.48878822", "0.48688093", "0.48680714", "0.48528615", "0.48511007", "0.4845798", "0.48413694", "0.4839852", "0.48339164", "0.48274684", "0.48119366", "0.48076206", "0.4806047", "0.4805241", "0.48038334", "0.4803516", "0.48026392", "0.48017097", "0.47957262", "0.47950348", "0.47785386", "0.47722015", "0.4768845", "0.47551918", "0.47527117", "0.47473624", "0.4735356", "0.47347176", "0.47335154", "0.47241735", "0.47173527", "0.4715089", "0.47086036", "0.47027618", "0.46968007", "0.46915665", "0.46901283", "0.4687833", "0.4686301", "0.46854484", "0.4683014", "0.46829", "0.4680661", "0.46804768", "0.46674833", "0.4661841", "0.4660698", "0.46576256", "0.4657087", "0.4648513", "0.46477348", "0.46467093", "0.4640377", "0.46360382", "0.4634233", "0.4629484", "0.46285933", "0.46192917", "0.46168268", "0.46124274", "0.46123278", "0.4612135", "0.46052212", "0.46048588", "0.45925274", "0.4592337", "0.4589922", "0.4589025", "0.45825273", "0.45800534", "0.45786202" ]
0.61316556
0
get image categoryselector form element
function abl_droploader_get_image_cat_select() { $image_categories = getTree('root', 'image'); //$image_categories_select = str_ireplace("\n", '', tag('<label for="image-category">' . gTxt('image_category') . '</label>' . br . // treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' id="abl-droploader-image-cat-sel" class="category"')); //$alt_caption = tag('<label for="alt-text">'.gTxt('alt_text').'</label>'.br. // fInput('text', 'alt', '', 'edit', '', '', 50, '', 'alt-text'), 'div', ' class="alt text"'). // tag('<label for="caption">'.gTxt('caption').'</label>'.br. // '<textarea id="caption" name="caption"></textarea>' // , 'div', ' class="caption description text"'); $image_categories_select = str_ireplace("\n", '', tag(tag('<label for="image-category">'.gTxt('image_category').'</label>'.br. treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' class="category"'), 'div', ' id="abl-droploader-image-cat-sel"')); return $image_categories_select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionCategoryImage()\n {\n return $this->optionCategoryImage;\n }", "function add_category_image ( $taxonomy ) { ?>\n <div class=\"form-field term-group\">\n <label for=\"category-image-id\"><?php _e('Image', 'hero-theme'); ?></label>\n <input type=\"hidden\" id=\"category-image-id\" name=\"category-image-id\" class=\"custom_media_url\" value=\"\">\n <div id=\"category-image-wrapper\"></div>\n <p>\n <input type=\"button\" class=\"button button-secondary ct_tax_media_button\" id=\"ct_tax_media_button\" name=\"ct_tax_media_button\" value=\"<?php _e( 'Add Image', 'hero-theme' ); ?>\" />\n <input type=\"button\" class=\"button button-secondary ct_tax_media_remove\" id=\"ct_tax_media_remove\" name=\"ct_tax_media_remove\" value=\"<?php _e( 'Remove Image', 'hero-theme' ); ?>\" />\n </p>\n </div>\n <?php\n }", "public function get_image_select_form() {\n\t\t$options = get_option('netx_options');\n\t\t$wrapper = new netxRestWrapper();\n\t\t$netx = $wrapper->getNetx();\n\n\t\t$supportedFileTypes = array(\n\t\t\t//images\n\t\t\t\"jpg\",\n\t\t\t\"jpeg\",\n\t\t\t\"png\",\n\t\t\t\"gif\",\n\t\t\t\"ico\",\n\t\t\t//documents\n\t\t\t\"pdf\",\n\t\t\t\"doc\",\n\t\t\t\"ppt\",\n\t\t\t\"odt\",\n\t\t\t\"xls\",\n\t\t\t\"psd\",\n\t\t\t//audio\n\t\t\t\"mp3\",\n\t\t\t\"m4a\",\n\t\t\t\"ogg\",\n\t\t\t\"wav\",\n\t\t\t//video\n\t\t\t\"mp4\",\n\t\t\t\"mov\",\n\t\t\t\"wmv\",\n\t\t\t\"avi\",\n\t\t\t\"mpg\",\n\t\t\t\"ogv\",\n\t\t\t\"3gp\",\n\t\t\t\"3g2\"\n\t\t);\n\n\t\t$pagingSize = intval($options['netx_paging_size']);\n\t\tif($pagingSize == 0) {\n\t\t\t$pagingSize = 200;\n\t\t}\n\n\t\t//get current category id\n\t\t$currentCatId = (trim($_POST['catId']) != '') ? $_POST['catId'] : $options['netx_base_category_id'];\n\n\t\t//get assets in current category\n\t\t$catAssets = $netx->getAssetsByCategoryID($currentCatId);\n\t\t$catAssetsNum = 0;\n\t\tforeach($catAssets as $key=>$asset){\n\t\t\t$catAssetsNum++;\n\t\t}\n\n\t\t$postID = intval($_REQUEST['post_id']);\n//\t$proxyURL = dirname(__FILE__) . '/proxy.php'\n\t\t?>\n\t\t<script type=\"text/javascript\">post_id = <?php echo $postID ?>;</script>\n\t\t<?php\n\t\t$paged = isset($_GET['paged']) ? $_GET['paged'] : 1;\n\t\t$catAssetsPages = ceil($catAssetsNum/$pagingSize);\n\t\t$catAssetsPage = $netx->getAssetsByCategoryID($currentCatId,$paged);\n\t\tif($catAssetsPages > 1){\n\n\t\t\techo '<div class=\"tablenav\"><div class=\"tablenav-pages\">';\n\t\t\tif($paged != 1){\n\t\t\t\techo '<a class=\"next page-numbers\" data-post-id=\"'.$postID.'\" data-page-num=\"'.($paged-1).'\">&laquo;</a>';\n\t\t\t}\n\t\t\tfor($i=($catAssetsPages <= 5) ? 1 : $paged;$i<=$paged+4;$i++){\n\t\t\t\tif($paged == $i){\n\t\t\t\t\techo '<span class=\"page-numbers current\">'.$i.'</span>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<a class=\"page-numbers\" data-post-id=\"'.$postID.'\" data-page-num=\"'.$i.'\">'.$i.'</a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($paged != $catAssetsPages){\n\t\t\t\techo '<a class=\"next page-numbers\" data-post-id=\"'.$postID.'\" data-page-num=\"'.($paged+1).'\">&raquo;</a>';\n\t\t\t}\n\t\t\techo '</div></div>';\n\t\t}\n\n\t\t$catAssetsPageFiltered = array();\n\n\t\tif(count($catAssetsPage) > 0) {\n\t\t\tforeach($catAssetsPage as $key=>$asset){\n\t\t\t\t$assetID = $asset->getAssetID();\n\t\t\t\t$ast = $netx->getAsset($assetID);\n\n\t\t\t\t$fileIsSupported = false;\n\t\t\t\tforeach($supportedFileTypes as $supportedFileType) {\n\t\t\t\t\t$filename = $ast->getFile();\n\n\t\t\t\t\t$substrlength = strlen('.' . $supportedFileType);\n\t\t\t\t\tif(substr($filename, - $substrlength) === ('.' . $supportedFileType)) {\n\t\t\t\t\t\t$fileIsSupported = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($fileIsSupported) {\n\t\t\t\t\t$catAssetsPageFiltered[$key] = $asset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(count($catAssetsPageFiltered) > 0) {\n\t\t\tforeach($catAssetsPageFiltered as $key=>$asset){\n\t\t\t\t$assetID = $asset->getAssetID();\n\t\t\t\t$ast = $netx->getAsset($assetID);\n\t\t\t\t?>\n\t\t\t\t<div id=\"media-item-<?php echo $assetID; ?>\" class=\"media-item\">\n\t\t\t\t\t<img class=\"pinkynail toggle\" style=\"margin-top: 3px; display: block;\" alt=\"<?php echo $asset->getLabel1(); ?>\" src=\"<?php echo $wrapper->netxThumbUrl($assetID) ?>\" />\n\t\t\t\t\t<a class=\"toggle describe-toggle-on\" style=\"display: block;\">Show</a>\n\t\t\t\t\t<a class=\"toggle describe-toggle-off\" style=\"display: none;\">Hide</a>\n\t\t\t\t\t<div class=\"filename toggle\"><span class=\"title\"><?php echo $asset->getLabel1(); ?></span></div>\n\t\t\t\t\t<table class=\"slidetoggle describe\" style=\"display:none;\">\n\n\t\t\t\t\t\t<thead id=\"media-head-<?php echo $assetID; ?>\" class=\"media-item-info\">\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<td id=\"thumbnail-head-<?php echo $assetID; ?>\" class=\"\">\n\t\t\t\t\t\t\t\t<p><a target=\"_blank\" href=\"<?php echo $wrapper->netxPreviewUrl($assetID); ?>\"><img style=\"margin-top: 3px\" alt=\"\" src=\"<?php echo $wrapper->netxThumbUrl($assetID); ?>\" class=\"thumbnail\"></a></p>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<p><strong>File name:</strong> <?php echo $asset->getLabel2(); ?></p>\n\t\t\t\t\t\t\t\t<p><strong>File type:</strong> <?php echo $asset->getLabel3(); ?></p>\n\t\t\t\t\t\t\t\t<p><strong>File size:</strong> <?php echo $asset->getLabel4(); ?></p>\n\t\t\t\t\t\t\t\t<p><strong>Upload date:</strong> <?php echo $asset->getLabel5(); ?></p>\n\t\t\t\t\t\t\t</td></tr>\n\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr class=\"image-size\">\n\t\t\t\t\t\t\t<th valign=\"top\" class=\"label\" scope=\"row\"><label for=\"asset[<?php echo $assetID; ?>][image-size]\"><span class=\"alignleft\">Size</span><br class=\"clear\"></label></th>\n\t\t\t\t\t\t\t<td class=\"field\">\n\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" value=\"thumbnail\" id=\"image-size-thumbnail-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-thumbnail-<?php echo $assetID; ?>\">Thumbnail</label> <label class=\"help\" for=\"image-size-thumbnail-<?php echo $assetID; ?>\">(150&nbsp;x&nbsp;150)</label></div>\n\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" value=\"medium\" id=\"image-size-preview-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-preview-<?php echo $assetID; ?>\">Preview</label> <label class=\"help\" for=\"image-size-full-<?php echo $assetID; ?>\">(<?php echo $ast->getPreviewfilewidth(); ?>&nbsp;x&nbsp;<?php echo $ast->getPreviewfileheight(); ?>)</label></div>\n\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" checked=\"checked\" value=\"full\" id=\"image-size-full-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-full-<?php echo $assetID; ?>\">Full Size</label> <label class=\"help\" for=\"image-size-full-<?php echo $assetID; ?>\">(<?php echo $ast->getFilewidth(); ?>&nbsp;x&nbsp;<?php echo $ast->getFileheight(); ?>)</label></div>\n\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tif(!empty($ast->getViewNames())){\n\t\t\t\t\t\t\t\t\tforeach($ast->getViewNames() as $viewName) {\n\t\t\t\t\t\t\t\t\t\tif($viewName === 'previewXMP') {\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" checked=\"checked\" value=\"<?php echo $viewName ?>\" id=\"image-size-full-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-full-<?php echo $assetID; ?>\">View: </label> <label class=\"help\" for=\"image-size-full-<?php echo $assetID; ?>\"><?php echo $viewName ?></label></div>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t<?php if(isset($options[\"netx_access_token\"]) && !empty(trim($options[\"netx_access_token\"]))): ?>\n\t\t\t\t\t\t\t<tr class=\"enable-download\">\n\t\t\t\t\t\t\t\t<th valign=\"top\" class=\"label\" scope=\"row\"><label for=\"asset[<?php echo $assetID; ?>][enable-download]\"><span class=\"alignleft\">Enable Download</span><br class=\"clear\"></label></th>\n\t\t\t\t\t\t\t\t<td class=\"field\">\n\t\t\t\t\t\t\t\t\t<div class=\"image-size-item\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" value=\"enable-download\" id=\"asset[<?php echo $assetID; ?>][enable-download]\" name=\"asset[<?php echo $assetID; ?>][enable-download]\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"asset[<?php echo $assetID; ?>][enable-download]\">Save as download link</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t<tr class=\"submit\">\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td class=\"savesend\">\n\t\t\t\t\t\t\t\t<input type=\"button\" data-asset-id=\"<?php echo($assetID); ?>\" value=\"Insert into Post\" class=\"button netx-submit-button netx-add-item-submit\" id=\"\" name=\"send[<?php echo $assetID; ?>]\">\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}else{\n\t\t\t?>\n\t\t\t<p class=\"netx-no-files-found-label\">No Files Found</p>\n\t\t\t<?php\n\t\t}\n\n\t\twp_die();\n\t}", "public function getCategoryFormElements($category) {\n //TYPE\n //DEFAULT ELEMENTS\n //Category ELEMENTS\n \n }", "function extra_category_fields( $tag ) { //check for existing featured ID\n $t_id = $tag->term_id;\n $cat_meta = get_option( \"category_$t_id\");\n\t?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"cat_Image_url\"><?php _e('Category Url'); ?></label></th>\n\t\t<td><input type=\"text\" name=\"Cat_meta[cat_url]\" id=\"Cat_meta[img]\" size=\"3\" style=\"width:60%;\" value=\"<?php echo $cat_meta['cat_url'] ? $cat_meta['cat_url'] : ''; ?>\"><br />\n\t <span class=\"description\"><?php _e('Url for category'); ?></span>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "function updated_category_image ( $term_id, $tt_id ) {\n if( isset( $_POST['category-image-id'] ) && '' !== $_POST['category-image-id'] ){\n $image = $_POST['category-image-id'];\n update_term_meta ( $term_id, 'category-image-id', $image );\n } else {\n update_term_meta ( $term_id, 'category-image-id', '' );\n }\n }", "function category_add_thumbnail_field( $category ) {\n\t\tglobal $wp_taxonomies;\n\t\t?>\n\n\t\t<div class=\"form-field hide-if-no-js\">\n\t\t\t<p style=\"color:#222;font-style:normal;\"><?php _e( 'Featured Image' ); ?></p>\n\t\t\t<div id=\"image-container\">\n\t\t\t\t\n\t\t\t\t<div id=\"selected-image\"></div>\n\t\t\t\t\n\t\t\t\t<a id=\"set-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" data-uploader-title=\"<?php _e( 'Choose a thumbnail for this category', 'category-thumbnail' ); ?>\" data-uploader-button-text=\"<?php _e( 'Set Category Thumbnail', 'category-thumbnail' ); ?>\" href=\"#\" class=\"button thickbox\">\n\t\t\t\t\t<?php _e( 'Set featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<a id=\"remove-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" href=\"#\" style=\"display:none;\">\n\t\t\t\t\t<?php _e( 'Remove featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<input name=\"image\" id=\"image-id\" type=\"hidden\" value=\"\" />\n\t\t\t<p>\n\t\t\t\t<?php printf( __( 'The thumbnail to this %s', 'category-thumbnail' ), $wp_taxonomies[ $category ]->labels->singular_name ); ?>\n\t\t\t</p>\n\t\t</div>\n\t\t\n\t\t<?php\n\t\t\n\t}", "function classiera_my_category_fields($tag) {\r\n $tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t$category_icon_code = isset( $tag_extra_fields[$tag->term_id]['category_icon_code'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['category_icon_code'] ) : '';\r\n\t$category_image = isset( $tag_extra_fields[$tag->term_id]['category_image'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['category_image'] ) : '';\r\n $category_icon_color = isset( $tag_extra_fields[$tag->term_id]['category_icon_color'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['category_icon_color'] ) : '';\r\n $your_image_url = isset( $tag_extra_fields[$tag->term_id]['your_image_url'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['your_image_url'] ) : '';\r\n ?>\r\n\r\n<div class=\"form-field\">\t\r\n<table class=\"form-table\">\r\n <tr class=\"form-field\">\r\n \t<th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Icon Code', 'classiera' ); ?></label></th>\r\n \t<td>\r\n\r\n\t\t\t\t<input id=\"category_icon_code\" type=\"text\" size=\"36\" name=\"category_icon_code\" value=\"<?php $category_icon = stripslashes($category_icon_code); echo esc_attr($category_icon); ?>\" />\r\n <p class=\"description\"><?php esc_html_e( 'AwesomeFont code', 'classiera' ); ?>: <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">fontawesome.io/icons</a> Ex: fa fa-desktop</p>\r\n\r\n\t\t\t</td>\r\n </tr>\r\n\t\t<tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Category Image', 'classiera' ); ?>&nbsp;Size:370x200px:</label></th>\r\n <td>\r\n <?php \r\n\r\n if(!empty($category_image)) {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"category_image_img\" src=\"'. $category_image .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"category_image\" type=\"text\" size=\"36\" name=\"category_image\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$category_image.'\" />';\r\n echo '<input id=\"category_image_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"category_image_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Upload Image\" /> </br>'; \r\n\r\n } else {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"category_image_img\" src=\"'. $category_image .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"category_image\" type=\"text\" size=\"36\" name=\"category_image\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$category_image.'\" />';\r\n echo '<input id=\"category_image_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"category_image_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Upload Image\" /> </br>';\r\n\r\n }\r\n\r\n ?>\r\n </td>\r\n\t\t\t\r\n <script>\r\n var image_custom_uploader;\r\n jQuery('#category_image_button').click(function(e) {\r\n e.preventDefault();\r\n\r\n //If the uploader object has already been created, reopen the dialog\r\n if (image_custom_uploader) {\r\n image_custom_uploader.open();\r\n return;\r\n }\r\n\r\n //Extend the wp.media object\r\n image_custom_uploader = wp.media.frames.file_frame = wp.media({\r\n title: 'Choose Image',\r\n button: {\r\n text: 'Choose Image'\r\n },\r\n multiple: false\r\n });\r\n\r\n //When a file is selected, grab the URL and set it as the text field's value\r\n image_custom_uploader.on('select', function() {\r\n attachment = image_custom_uploader.state().get('selection').first().toJSON();\r\n var url = '';\r\n url = attachment['url'];\r\n jQuery('#category_image').val(url);\r\n jQuery( \"img#category_image_img\" ).attr({\r\n src: url\r\n });\r\n jQuery(\"#category_image_button\").css(\"display\", \"none\");\r\n jQuery(\"#category_image_button_remove\").css(\"display\", \"block\");\r\n });\r\n\r\n //Open the uploader dialog\r\n image_custom_uploader.open();\r\n });\r\n\r\n jQuery('#category_image_button_remove').click(function(e) {\r\n jQuery('#category_image').val('');\r\n jQuery( \"img#category_image_img\" ).attr({\r\n src: ''\r\n });\r\n jQuery(\"#category_image_button\").css(\"display\", \"block\");\r\n jQuery(\"#category_image_button_remove\").css(\"display\", \"none\");\r\n });\r\n </script>\r\n </tr>\r\n <tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Icon Background Color', 'classiera' ); ?></label></th>\r\n <td>\r\n\r\n <link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"<?php echo get_template_directory_uri() ?>/inc/color-picker/css/colorpicker.css\" />\r\n <script type=\"text/javascript\" src=\"<?php echo get_template_directory_uri() ?>/inc/color-picker/js/colorpicker.js\"></script>\r\n <script type=\"text/javascript\">\r\n jQuery.noConflict();\r\n jQuery(document).ready(function(){\r\n jQuery('#colorpickerHolder').ColorPicker({color: '<?php echo $category_icon_color; ?>', flat: true, onChange: function (hsb, hex, rgb) { jQuery('#category_icon_color').val('#' + hex); }});\r\n });\r\n </script>\r\n\r\n <p id=\"colorpickerHolder\"></p>\r\n\r\n <input id=\"category_icon_color\" type=\"text\" size=\"36\" name=\"category_icon_color\" value=\"<?php echo $category_icon_color; ?>\" style=\"margin-top: 20px; max-width: 90px; visibility: hidden;\" />\r\n\r\n </td>\r\n </tr>\r\n <tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Map Pin', 'classiera' ); ?>&nbsp;Size:70x70px:</label></th>\r\n <td>\r\n <?php \r\n\r\n if(!empty($your_image_url)) {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"your_image_url_img\" src=\"'. $your_image_url .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"your_image_url\" type=\"text\" size=\"36\" name=\"your_image_url\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$your_image_url.'\" />';\r\n echo '<input id=\"your_image_url_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"your_image_url_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Upload Image\" /> </br>'; \r\n\r\n } else {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"your_image_url_img\" src=\"'. $your_image_url .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"your_image_url\" type=\"text\" size=\"36\" name=\"your_image_url\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$your_image_url.'\" />';\r\n echo '<input id=\"your_image_url_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"your_image_url_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Upload Image\" /> </br>';\r\n\r\n }\r\n\r\n ?>\r\n </td>\r\n\r\n <script>\r\n var image_custom_uploader2;\r\n jQuery('#your_image_url_button').click(function(e) {\r\n e.preventDefault();\r\n\r\n //If the uploader object has already been created, reopen the dialog\r\n if (image_custom_uploader2) {\r\n image_custom_uploader2.open();\r\n return;\r\n }\r\n\r\n //Extend the wp.media object\r\n image_custom_uploader2 = wp.media.frames.file_frame = wp.media({\r\n title: 'Choose Image',\r\n button: {\r\n text: 'Choose Image'\r\n },\r\n multiple: false\r\n });\r\n\r\n //When a file is selected, grab the URL and set it as the text field's value\r\n image_custom_uploader2.on('select', function() {\r\n attachment = image_custom_uploader2.state().get('selection').first().toJSON();\r\n var url = '';\r\n url = attachment['url'];\r\n jQuery('#your_image_url').val(url);\r\n jQuery( \"img#your_image_url_img\" ).attr({\r\n src: url\r\n });\r\n jQuery(\"#your_image_url_button\").css(\"display\", \"none\");\r\n jQuery(\"#your_image_url_button_remove\").css(\"display\", \"block\");\r\n });\r\n\r\n //Open the uploader dialog\r\n image_custom_uploader2.open();\r\n });\r\n\r\n jQuery('#your_image_url_button_remove').click(function(e) {\r\n jQuery('#your_image_url').val('');\r\n jQuery( \"img#your_image_url_img\" ).attr({\r\n src: ''\r\n });\r\n jQuery(\"#your_image_url_button\").css(\"display\", \"block\");\r\n jQuery(\"#your_image_url_button_remove\").css(\"display\", \"none\");\r\n });\r\n </script>\r\n </tr>\r\n</table>\r\n</div>\r\n\r\n <?php\r\n}", "public function get_selector()\n {\n }", "function update_category_image ( $term, $taxonomy ) { ?>\n <tr class=\"form-field term-group-wrap\">\n <th scope=\"row\">\n <label for=\"category-image-id\"><?php _e( 'Image', 'hero-theme' ); ?></label>\n </th>\n <td>\n <?php $image_id = get_term_meta ( $term -> term_id, 'category-image-id', true ); ?>\n <input type=\"hidden\" id=\"category-image-id\" name=\"category-image-id\" value=\"<?php echo $image_id; ?>\">\n <div id=\"category-image-wrapper\">\n <?php if ( $image_id ) { ?>\n <?php echo wp_get_attachment_image ( $image_id, 'thumbnail' ); ?>\n <?php } ?>\n </div>\n <p>\n <input type=\"button\" class=\"button button-secondary ct_tax_media_button\" id=\"ct_tax_media_button\" name=\"ct_tax_media_button\" value=\"<?php _e( 'Add Image', 'hero-theme' ); ?>\" />\n <input type=\"button\" class=\"button button-secondary ct_tax_media_remove\" id=\"ct_tax_media_remove\" name=\"ct_tax_media_remove\" value=\"<?php _e( 'Remove Image', 'hero-theme' ); ?>\" />\n </p>\n </td>\n </tr>\n <?php\n }", "function &GetSelector()\r\n\t{\r\n\t\treturn $this->FindControl(\"selectorGroup\");\r\n\t}", "public function getCategoryImage($categoryId)\n {\n //$AccentOpaque = array(\"15\",\"50\",\"51\",\"52\",\"57\");\n //$Williamsburg = array(\"26\",\"86\",\"87\",\"88\",\"93\"); \n //$Carolina = array(\"23\",\"59\",\"66\",\"274\"); \n //$Springhill = array(\"25\",\"77\",\"78\",\"79\",\"84\");\n\t $AccentOpaque = array(\"57\");\n\t\t$Hammermill = array(\"246\");\n\t\t$Williamsburg = array(\"93\"); \n\t\t$Carolina = array(\"66\"); \n\t\t$Springhill = array(\"84\");\n\t\t//$PPAllBrands = array(\"209\");\n\t\t$Envelope = array(\"131\");\n\t\t$Forms = array(\"262\", \"263\", \"264\", \"265\", \"266\", \"267\", \"269\", \"270\", \"271\");\n\t\t$Bristols = array(\"233\", \"234\", \"235\", \"236\", \"237\", \"238\", \"239\", \"240\", \"241\");\n\t\t$Specialty = array(\"152\");\n\t\t$HotCupsLids = array(\"182\", \"178\", \"179\", \"183\", \"181\", \"220\", \"228\", \"229\", \"230\");\n\t\t$ColdCupsLids = array(\"158\", \"154\", \"275\", \"276\", \"277\");\n\t\t$FoodPackaging = array(\"213\", \"172\", \"212\", \"221\", \"222\", \"223\", \"214\", \"278\");\n \n //For category logo\n if(in_array($categoryId, $AccentOpaque)){\n //$catImgLogo = \"logo-accentopaque.jpg\";\n $catImgLogo = \"Accent Opaque\";\n }\n\t\t else if(in_array($categoryId, $Hammermill)){\n $catImgLogo = \"Hammermill\";\n }\n else if(in_array($categoryId, $Williamsburg)){\n $catImgLogo = \"Williamsburg\";\n }\n else if(in_array($categoryId, $Carolina)){\n $catImgLogo = \"Carolina\";\n }\n else if(in_array($categoryId, $Springhill)){\n $catImgLogo = \"Springhill\";\n }\n\t\t else if(in_array($categoryId, $Envelope)){\n $catImgLogo = \"Envelope\";\n }\n\t\t else if(in_array($categoryId, $Forms)){\n $catImgLogo = \"Forms\";\n }\n\t\t else if(in_array($categoryId, $Bristols)){\n $catImgLogo = \"Bristols\";\n }\n\t\t else if(in_array($categoryId, $Specialty)){\n $catImgLogo = \"Specialty\";\n }\n\t\t else if(in_array($categoryId, $HotCupsLids)){\n $catImgLogo = \"Hot Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $ColdCupsLids)){\n $catImgLogo = \"Cold Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $FoodPackaging)){\n $catImgLogo = \"Food Packaging\";\n }\n return $catImgLogo;\n }", "function category_edit_thumbnail_field( $tag, $taxonomy ) {\n\t\tglobal $wp_taxonomies;\n\t\t\n\t\t$image = get_option( 'category_thumbnail_image' );\n\t\t\n\t\tif ( is_array( $image ) && array_key_exists( $tag->term_id, $image ) ) {\n\t\t\t$image = $image[ $tag->term_id ];\n\t\t\t$attach = wp_get_attachment_image_src( (int) $image );\n\t\t\n\t\t} else {\n\t\t\t$image = false;\n\t\t\t\n\t\t}\n\t?>\n\t<tr class=\"form-field hide-if-no-js\">\n\t\t<th scope=\"row\" valign=\"top\">\n\t\t\t<p style=\"color:#222;font-size:13px;\"><?php _e( 'Featured Image' ); ?></p>\n\t\t</th>\n\t\t<td>\n\t\t\t<div id=\"image-container\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t<?php if ( $image ) : ?>\n\t\t\t\t\t\n\t\t\t\t<div id=\"selected-image\">\n\t\t\t\t\t<img src=\"<?php echo esc_url( $attach[0] ); ?>\" />\n\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t<a id=\"set-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" data-uploader-title=\"<?php _e( 'Choose a thumbnail for this category', 'category-thumbnail' ); ?>\" data-uploader-button-text=\"<?php _e( 'Set Category Thumbnail', 'category-thumbnail' ); ?>\" href=\"#\" class=\"button thickbox\" style=\"display:none;\">\n\t\t\t\t\t<?php _e( 'Set featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<a id=\"remove-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" href=\"#\">\n\t\t\t\t\t<?php _e( 'Remove featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t<?php else : ?>\n\t\t\t\t\n\t\t\t\t<div id=\"selected-image\"></div>\n\t\t\t\t\n\t\t\t\t<a id=\"set-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" data-uploader-title=\"<?php _e( 'Choose a thumbnail for this category', 'category-thumbnail' ); ?>\" data-uploader-button-text=\"<?php _e( 'Set Category Thumbnail', 'category-thumbnail' ); ?>\" href=\"#\" class=\"button thickbox\">\n\t\t\t\t\t<?php _e( 'Set featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<a id=\"remove-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" href=\"#\" style=\"display:none;\">\n\t\t\t\t\t<?php _e( 'Remove featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<?php endif; ?>\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<input name=\"image\" id=\"image-id\" type=\"hidden\" value=\"<?php echo $image; ?>\" />\n\t\t\t\n\t\t\t<p class=\"description\">\n\t\t\t\t<?php printf( __( 'The thumbnail to this %s', 'category-thumbnail' ), $wp_taxonomies[ $taxonomy ]->labels->singular_name ); ?>\n\t\t\t</p>\n\t\t\t\n\t\t</td>\n\t</tr>\n\t<?php\n\t\t\n\t}", "function classiera_update_my_category_fields($term_id) {\r\n\tif(isset($_POST['taxonomy'])){\t\r\n\t if($_POST['taxonomy'] == 'category'):\r\n\t\t$tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t\t$tag_extra_fields[$term_id]['your_image_url'] = strip_tags($_POST['your_image_url']);\r\n\t\t$tag_extra_fields[$term_id]['category_image'] = $_POST['category_image'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_code'] = $_POST['category_icon_code'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_color'] = $_POST['category_icon_color'];\r\n\t\tupdate_option(MY_CATEGORY_FIELDS, $tag_extra_fields);\r\n\t endif;\r\n\t}\r\n}", "public function es_edit_category_fields( $term, $taxonomy ) {\n\n\t\t\t$banner_id = absint( get_woocommerce_term_meta( $term->term_id, 'banner_id', true ) );\n\n\t\t\tif ( $banner_id ) {\n\t\t\t\t$image = wp_get_attachment_thumb_url( $banner_id );\n\t\t\t} else {\n\t\t\t\t$image = wc_placeholder_img_src();\n\t\t\t}\n\t\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\" valign=\"top\"><label><?php _e( 'Banner', 'woocommerce' ); ?></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<div id=\"product_cat_banner\" style=\"float:left;margin-right:10px;\"><img src=\"<?php echo esc_url( $image ); ?>\" width=\"60px\" height=\"60px\" /></div>\n\t\t\t\t\t<div style=\"line-height:60px;\">\n\t\t\t\t\t\t<input type=\"hidden\" id=\"product_cat_banner_id\" name=\"product_cat_banner_id\" value=\"<?php echo esc_attr( $banner_id ); ?>\" />\n\t\t\t\t\t\t<button type=\"submit\" class=\"banner_upload_image_button button\"><?php _e( 'Upload/Add image', 'woocommerce' ); ?></button>\n\t\t\t\t\t\t<button type=\"submit\" class=\"banner_remove_image_button button\"><?php _e( 'Remove image', 'woocommerce' ); ?></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\n\t\t\t\t\t\t// Uploading files\n\t\t\t\t\t\tvar file_frame;\n\n\t\t\t\t\t\tjQuery( document ).on( 'click', '.banner_upload_image_button', function( event ) {\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t// Create the media frame.\n\t\t\t\t\t\t\tfile_frame = wp.media.frames.downloadable_file = wp.media({\n\t\t\t\t\t\t\t\ttitle: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t\t\tbutton: {\n\t\t\t\t\t\t\t\t\ttext: '<?php _e( 'Use image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// When an image is selected, run a callback.\n\t\t\t\t\t\t\tfile_frame.on( 'select', function() {\n\t\t\t\t\t\t\t\tattachment = file_frame.state().get('selection').first().toJSON();\n\n\t\t\t\t\t\t\t\tjQuery('#product_cat_banner_id').val( attachment.id );\n\t\t\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', attachment.url );\n\t\t\t\t\t\t\t\tjQuery('.banner_remove_image_button').show();\n\n\t\t\t\t\t\t\t\tfile_frame = undefined;\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Finally, open the modal.\n\t\t\t\t\t\t\tfile_frame.open();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tjQuery( document ).on( 'click', '.banner_remove_image_button', function( event ) {\n\t\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', '<?php echo esc_url( wc_placeholder_img_src() ); ?>');\n\t\t\t\t\t\t\tjQuery('#product_cat_banner_id').val('');\n\t\t\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t}", "public function es_add_category_fields() {\n\t\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label><?php _e( 'Banner', 'woocommerce' ); ?></label>\n\t\t\t\t<div id=\"product_cat_banner\" style=\"float:left;margin-right:10px;\"><img src=\"<?php echo esc_url( wc_placeholder_img_src() ); ?>\" width=\"60px\" height=\"60px\" /></div>\n\t\t\t\t<div style=\"line-height:60px;\">\n\t\t\t\t\t<input type=\"hidden\" id=\"product_cat_banner_id\" name=\"product_cat_banner_id\" />\n\t\t\t\t\t<button type=\"button\" class=\"banner_upload_image_button button\"><?php _e( 'Upload/Add image', 'woocommerce' ); ?></button>\n\t\t\t\t\t<button type=\"button\" class=\"banner_remove_image_button button\"><?php _e( 'Remove image', 'woocommerce' ); ?></button>\n\t\t\t\t</div>\n\n\n\t\t\t<script type=\"text/javascript\">\n\n\t\t\t\t// Only show the \"remove image\" button when needed\n\t\t\t\tif ( ! jQuery('#product_cat_banner_id').val() ) {\n\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t}\n\n\t\t\t\t// Uploading files\n\t\t\t\tvar file_frame;\n\n\t\t\t\tjQuery( document ).on( 'click', '.banner_upload_image_button', function( event ) {\n\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t// Create the media frame.\n\t\t\t\t\tfile_frame = wp.media.frames.downloadable_file = wp.media({\n\t\t\t\t\t\ttitle: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',\n\t\t\t\t\t\tbutton: {\n\t\t\t\t\t\t\ttext: '<?php _e( 'Use image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t});\n\n\t\t\t\t\t// When an image is selected, run a callback.\n\t\t\t\t\tfile_frame.on( 'select', function() {\n\t\t\t\t\t\tattachment = file_frame.state().get('selection').first().toJSON();\n\n\t\t\t\t\t\tjQuery('#product_cat_banner_id').val( attachment.id );\n\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', attachment.url );\n\t\t\t\t\t\tjQuery('.banner_remove_image_button').show();\n\n\t\t\t\t\t\tfile_frame = undefined;\n\n\t\t\t\t\t});\n\n\t\t\t\t\t// Finally, open the modal.\n\t\t\t\t\tfile_frame.open();\n\t\t\t\t});\n\n\t\t\t\tjQuery( document ).on( 'click', '.banner_remove_image_button', function( event ) {\n\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', '<?php echo esc_url( wc_placeholder_img_src() ); ?>');\n\t\t\t\t\tjQuery('#product_cat_banner_id').val('');\n\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t</script>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "function eZImageCategory( $id=-1 )\r\n {\r\n $this->ExcludeFromSearch = \"false\";\r\n if ( $id != -1 )\r\n {\r\n $this->ID = $id;\r\n $this->get( $this->ID );\r\n }\r\n }", "function gtags_group_category_form() {\n\tglobal $bp, $show_group_add_form_cats;\t\n\tif ($show_group_add_form_cats) return; // prevents showing form twice\n\t$show_group_add_form_cats = true;\n\n\t// the group category\t\n\t$group_cats = get_option('gtags_category'); \n\tif (empty($group_cats)) return;\n\t\n\t$selected = groups_get_groupmeta( $bp->groups->current_group->id, 'gtags_group_cat' ); \n\t?><label for=\"group-cat\"><?php _e( 'Group Category', 'gtags' ) ?></label>\n\t<select name=\"group-cat\" id=\"group-cat\" />\n\t\t<option value=\"\"><?php _e('--- SELECT ONE ---', 'gtags') ?></option>\n\t<?php foreach ( $group_cats as $tag => $desc ): ?>\n\t\t<?php if ( !$desc ) $desc = $tag; ?>\n\t\t<option value=\"<?php echo $tag; ?>\" <?php if ( $tag == $selected ) echo 'selected=\"selected\"' ?>><?php echo $desc; ?></option>\n\t<?php endforeach; ?>\n\t</select>\n\t<i><?php _e('(the primary group activity)', 'gtags'); ?></i><br><?php \t\n}", "function helperGetCategoryImage($catImg, $parent=0) {\n\t\t$table = 'tx_rggooglemap_cat';\n\t\t$field = 'uid,image,parent_uid';\n\t\t$where = 'deleted = 0 AND hidden=0 ';\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($field,$table,$where,$groupBy='',$orderBy,$limit='');\n\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\tif ($row['image']=='') {\n\t\t\t\t// get image of parent category\n\t\t\t\t$whereTemp = 'deleted = 0 AND hidden=0 AND uid = ' . $row['parent_uid'];\n\t\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery($field,$table,$whereTemp);\n\t\t\t\t$row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res2);\n\t\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res2);\n\t\t\t\t$catImg[$row['uid']] = $row2['image'];\n\t\t\t} else {\n\t\t\t\t$catImg[$row['uid']] = $row['image'];\n\t\t\t}\n\t\t}\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\n\t\treturn $catImg;\n\t}", "function colorpicker_field_add_new_category( $taxonomy ) { ?> \r\n\t<div class=\"form-field term-colorpicker-wrap\"> \r\n\t<label for=\"term-colorpicker\">Category Color</label> \r\n\t<input name=\"_category_color\" value=\"#ffffff\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p>This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</div> <?php }", "function createRatingSelector() {\n global $serendipity;\n\n // Since the inputs are set up with the proper names, the config item\n // gets saved automatically, with no need for magic\n\n // Get the filename to be automatically selected\n $this->set_valid_image_data();\n $cursel = $this->image_name;\n\n $this->select_css = '';\n $this->select_html = '';\n // We will be wrapped in a <tr><td colspan=\"2\">\n $this->select_html .= \"\n<strong>\" . PLUGIN_KARMA_IMAGE . \"</strong><br />\n<span style='color: rgb(94, 122, 148); font-size: 8pt;'>&nbsp;\".PLUGIN_KARMA_IMAGE_DESC.\"</span>\";\n if ($serendipity['version'][0] < 2) {\n $this->select_html .= \"\n</td>\n<td></td>\n</tr>\n<tr>\n<td colspan='2'>\\n\";\n }\n $this->select_html .= \"\n<table border='1' class='serendipity_karmaVote_selectorTable'>\";\n // Add the 'text-only' selection and its CSS\n if ($cursel == '0') {\n $checked = 'checked=\"checked\" ';\n } else {\n $checked = '';\n }\n $this->image_name = '0';\n $bar = $this->createRatingBar('', 0, 0, 'textbar');\n $this->select_html .= \"\n<tr id='serendipity_karmaVote_selectorTable_textOnly'>\n<td colspan='3' align='center'><input type='radio' name='serendipity[plugin][base_image]' value='0' $checked/>\" . PLUGIN_KARMA_STATISTICS_POINTS_NO . \"<br />$bar<br /></td>\\n\";\n $this->select_css .= \"\n.textbar, .textbar a, .textbar a:hover {\n font-size: 100%;\n position: relative;\n background: none;\n}\n.serendipityAdminContent span.textbar {\n color: black !important;\n}\n\";\n // Retrieve all the *valid* images from the image directory\n $files = $this->getImageFiles();\n // Add an <ol> for each rating bar, and add its CSS overrides\n $n = 0;\n foreach ($files as $fdata) {\n // Columnize\n if (($n % 3) == 0) {\n // Time to start a new row\n $this->select_html .= \"</tr>\\n<tr>\\n\";\n }\n\n // Set the image data\n $fname = $fdata['fname'];\n $height = $fdata['height'];\n $width = $fdata['width'];\n $ratio = $width / $height;\n // If this is a single segment, adjust width\n if ($ratio < $this->max_segment_ratio) {\n $width = $width * 5;\n }\n $height = $height / 3;\n // Set up class variables correctly\n $this->image_name = $fname;\n $this->image_width = $width;\n $this->image_height = $height;\n\n // Create a rating bar of this image\n //\n // What would be a good CSS class for this image?\n $css_class = str_replace(array('.',' '), array('_','_'), $fname);\n $checked = '';\n if ($fname == $cursel) {\n $checked = 'checked=\"checked\" ';\n }\n $bar_html = \n\"<td align='center' id='serendipity_karmaVote_select_$css_class'>\n <input type='radio' name='serendipity[plugin][base_image]' value='$fname' $checked/>\n <span style='font-size: 8pt;'>$fname</span><br />\\n\" . \n $this->createRatingBar('', -1, 2, $css_class) .\n\"</td>\\n\";\n $bar_html = sprintf($bar_html, '', '2.5 of 5', '1');\n $this->select_html .= $bar_html;\n // Add the necessary CSS to the stylesheet (will be added when css hooks are called)\n // Sorry to interrupt your regularly scheduled HTML; I need to\n // use the $css_class while it's still here.\n $this->select_css .= \"\n/* Overrides for $css_class */\n.$css_class \n{\n width: ${width}px;\n height: ${height}px;\n}\n.$css_class,\n.$css_class a:hover,\n.$css_class .serendipity_karmaVoting_current-rating\n{\n background-image: url({$serendipity['baseURL']}plugins/serendipity_event_karma/img/${fname});\n}\n.$css_class,\n.$css_class a,\n.$css_class .serendipity_karmaVoting_current-rating\n{\n line-height: ${height}px;\n height: ${height}px;\n}\n\n\";\n $n++;\n } // Go back up for another image\n\n // Check for nothing displayed\n if ($n == 0) {\n // There were no images!\n $this->select_html .= \"</tr>\\n<tr><td>\" . PLUGIN_KARMA_NO_IMAGES . \"</td>\";\n }\n\n // End the table, with a config-item bottom-border separator\n $this->select_html .= \n\"</tr>\\n</table>\\n\";\n if ($serendipity['version'][0] < 2) {\n $this->select_html .= \n\"<tr><td colspan='2' style='border-bottom: 1px solid #000000; vertical-align: top'>&nbsp;<td></tr>\\n\";\n }\n // The config item and row are closed by the core code\n\n return $this->select_html;\n }", "private function categoriesFormInputs()\n {\n // Get the field name of the field with the category icon\n // #47631, dwildt, 1-\n //$arrLabels[ 'catIcon' ] = $this->confMap['configuration.']['categories.']['fields.']['categoryIcon'];\n // #47631, #i0007, dwildt, 10+\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Default space in HTML code\n $tab = ' ';\n\n // FOREACH category label\n//$this->pObj->dev_var_dump( $this->arrCategories );\n // #i0118, dwildt, 1-/+\n //foreach ( $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n foreach ( ( array ) $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n {\n // Get the draft for an input field\n $cObj_name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input' ];\n $cObj_conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input.' ];\n $input = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // replace the category marker\n $input = str_replace( '###CAT###', $labelValue, $input );\n // 4.1.17, 120927, dwildt\n // replace the category marker\n //$labelValueWoSpc = str_replace( ' ', null, $labelValue );\n $labelValueWoSpc = $this->zz_properFormLabel( $labelValue );\n $input = str_replace( '###CAT_WO_SPC###', $labelValueWoSpc, $input );\n // 4.1.17, 120927, dwildt\n // #54548, 131221, dwildt, 6+\n $class = $this->arrCategories[ 'cssClass' ][ $labelKey ];\n if ( !empty( $class ) )\n {\n $class = ' class=\"' . $class . '\"';\n }\n $input = str_replace( '###CLASS###', $class, $input );\n\n // IF draft for an input field contains ###IMG###, render an image\n $pos = strpos( $input, '###IMG###' );\n if ( !( $pos === false ) )\n {\n // SWITCH : Render the image\n switch ( true )\n {\n // #i0062\n case( $labelKey == $this->arrWoCategories[ 'iconKey' ] ):\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n case( is_array( $this->arrCategories[ 'icons' ] ) ):\n // 4.1.7, dwildt, +\n $this->cObjDataAddArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n $img = $this->renderMapMarkerVariablesSystemItem( 'categoryIconLegend' );\n $this->cObjDataRemoveArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n // 4.1.7, dwildt, +\n break;\n default:\n // Render the image\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n }\n // SWITCH : Render the image\n\n $input = str_replace( '###IMG###', $img, $input );\n }\n // IF draft for an input field contains ###IMG###, render an image\n\n $arrInputs[] = $tab . $input;\n }\n // FOREACH category label\n // Move array of input fields to a string\n // #i0118, dwildt, 1-/+\n //$inputs = implode( PHP_EOL, $arrInputs );\n $inputs = implode( PHP_EOL, ( array ) $arrInputs );\n $inputs = trim( $inputs );\n\n // RETURN input fields\n return $inputs;\n }", "public function getImageTag();", "public function getName()\n {\n return 'category_form';\n }", "public function getValueAfterElementHtml()\n {\n $html = '';\n\n switch ($this->getAttribute()) {\n case 'category_ids':\n $image = $this->_assetRepo->getUrl('images/rule_chooser_trigger.gif');\n break;\n }\n\n if (!empty($image)) {\n $html = '<a href=\"javascript:void(0)\" class=\"rule-chooser-trigger\"><img src=\"' .\n $image .\n '\" alt=\"\" class=\"v-middle rule-chooser-trigger\" title=\"' .\n __(\n 'Open Chooser'\n ) . '\" /></a>';\n }\n return $html;\n }", "public function getImagenesIndexCategorias(){\n foreach($this->indexContent as $content){\n //echo \"--------------------- Imagenes --------------<br>\";\n $vectorImagenes = array();\n $dom = new DOMDocument();\n $dom->loadHTML(\"$content\");\n $xpath = new DOMXPath($dom);\n $tag = \"div\";\n $class = \"home-category-box\";\n $consulta = \"//\".$tag.\"[@class='\".$class.\"']\";\n $resultados = $xpath->query($consulta);\n if ($resultados->length > 0){\n $contador = 0;\n foreach($resultados as $imagenes){\n if ($contador == 0){\n $todasImagenes = $imagenes->getElementsByTagName(\"img\");\n if ($todasImagenes->length > 0){\n foreach($todasImagenes as $imagen){\n $urlImagen = $imagen->getAttribute(\"src\");\n //echo \"url imagen categorias padre: \".$urlImagen.\"<br>\";\n array_push($vectorImagenes,$urlImagen);\n }\n }\n }\n $contador++;\n }\n }\n //echo \"--------------------- Fin Imagenes --------------<br>\";\n }\n return $vectorImagenes;\n }", "public function getCategoryIcon();", "public function getFormCategory()\n\t{\n\t\treturn strtolower($this->_removeNonAlphaCharacters($this->category));\n\t}", "public function getSearchCategory(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Block\\Booking\\Form' );\n }", "public function category() {\n\t\treturn static::get_thrive_advanced_label();\n\t}", "function work_category_add_new_meta_field() {\r\n\t\t$textdomain = 'milk';\r\n\t\t?>\r\n\t \t\t<div class=\"row\">\r\n\t \t\t\t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"Featured Image\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to upload featured image for category\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t\t\t \r\n\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t<input \tclass=\"post_meta_image_upload button button-primary\" \r\n\t\t\t\t\t\tname=\"image_btn\" \r\n\t\t\t\t\t\ttype=\"button\" \r\n\t\t\t\t\t\tdata-uploader_title=<?php _e( \"Choose image\", $textdomain ); ?>\r\n\t\t\t\t\t\tdata-uploader_button_text=<?php _e( \"Select\" , $textdomain ); ?>\r\n\t\t\t\t\t\tvalue=<?php _e( \"Select images\", $textdomain ); ?>/>\r\n\t\t\t\t\t<input id=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tname=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tclass=\"img_url\" \r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tstyle=\"display:none\"\r\n\t\t\t\t\t\tvalue=\"\"/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"row\">\r\n\t\t\t \t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"Acent Color\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to select accent color for work categorie preview\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t \t\t\t<div class=\"col-md-6\">\r\n\t\t \t\t\t<input name=\"term_meta[work_color]\" \r\n\t\t\t\t \t\ttype=\"text\" \r\n\t\t\t\t \t\tclass=\"colorPicker\"\r\n\t\t\t\t \t\tid=\"term_meta[work_color]\" \r\n\t\t\t\t \t\tvalue=\"\"\r\n\t\t\t\t \t\tdata-default-color=\"#49b4ff\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t<?php }", "public function create_acf_group()\n {\n if( function_exists('acf_add_local_field_group') ):\n\n acf_add_local_field_group(array(\n 'key' => 'group_60c9f2328988d',\n 'title' => 'Category Options',\n 'fields' => array(\n array(\n 'key' => 'field_60c9f24923514',\n 'label' => 'Category Image',\n 'name' => self::ACF_CAT_IMAGE,\n 'type' => 'image',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'return_format' => 'url',\n 'preview_size' => 'medium',\n 'library' => 'all',\n 'min_width' => '',\n 'min_height' => '',\n 'min_size' => '',\n 'max_width' => '',\n 'max_height' => '',\n 'max_size' => '',\n 'mime_types' => '',\n ),\n ),\n 'location' => array(\n array(\n array(\n 'param' => 'taxonomy',\n 'operator' => '==',\n 'value' => 'category',\n ),\n ),\n ),\n 'menu_order' => 0,\n 'position' => 'normal',\n 'style' => 'default',\n 'label_placement' => 'top',\n 'instruction_placement' => 'label',\n 'hide_on_screen' => '',\n 'active' => true,\n 'description' => '',\n ));\n \n endif;\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n// dd($category->findAll());\n $builder\n ->add('price')\n ->add('name')\n ->add('description')\n /*->add('category', CollectionType::class, array(\n 'entry_type' => CategoryType::class,\n 'allow_add' => true,\n ))*/\n ->add('category', EntityType::class, array(\n 'class' => Category::class,\n 'query_builder' => function (EntityRepository $repository) {\n return $repository -> createQueryBuilder('c')\n ->orderBy('c.name', 'ASC');\n },\n 'choice_label' => 'name',\n ))\n// ->add('images', CollectionType::class, array(\n// 'entry_type' => ImageType::class\n// ))\n ->add('images', FileType::class, [\n 'mapped' => false,\n 'label' => 'Upload images'\n ]);\n }", "function getForumCategoryFormCfg() {\n return array(\n 'infoNotification' => __('NOTIFY_FORUM_IMAGE_SIZE'),\n 'items' => array(\n 'htmlForumCategoryImage' => '',\n 'nom' => array(\n 'label' => __('NAME'),\n 'type' => 'text',\n 'size' => 30,\n 'dataType' => 'text',\n 'required' => true\n ),\n 'image' => array(\n 'label' => __('IMAGE'),\n 'type' => 'text',\n 'size' => 42,\n 'uploadField' => 'uploadImage'\n ),\n 'uploadImage' => array(\n 'label' => __('UPLOAD_IMAGE'),\n 'type' => 'file',\n 'allowedExtension' => array('jpg', 'jpeg', 'png', 'gif'),\n 'uploadDir' => 'upload/Forum/cat'\n ),\n 'niveau' => array(\n 'label' => __('LEVEL'),\n 'type' => 'select',\n 'options' => array(\n 0 => 0,\n 1 => 1,\n 2 => 2,\n 3 => 3,\n 4 => 4,\n 5 => 5,\n 6 => 6,\n 7 => 7,\n 8 => 8,\n 9 => 9\n )\n ),\n 'ordre' => array(\n 'label' => __('ORDER'),\n 'type' => 'text',\n 'value' => '0',\n 'size' => 2,\n 'dataType' => 'integer',\n 'required' => true\n )\n ),\n 'itemsFooter' => array(\n 'submit' => array(\n 'type' => 'submit',\n 'value' => array('CREATE_CATEGORY', 'MODIFY_THIS_CATEGORY'),\n 'inputClass' => array('button')\n )\n )\n );\n}", "function l1NodeCategory($x) {\n global $dom;\n $root = $dom->documentElement;\n $children = $root->childNodes;\n\n $node = $children->item($x);\n $nodeName = $node->nodeName;\n\n switch($nodeName) {\n case p:\n $category = \"pOrBlockquote\";\n break;\n case blockquote:\n $category = \"pOrBlockquote\";\n break;\n case h2:\n $category = \"h\";\n break;\n case h3:\n $category = \"h\";\n break;\n case h4:\n $category = \"h\";\n break;\n case h5:\n $category = \"h\";\n break;\n case pre:\n $category = \"pre\";\n break;\n case hr:\n $category = \"hr\";\n break;\n case table:\n $category = \"table\";\n break;\n case ol:\n $category = \"list\";\n break;\n case ul:\n $category = \"list\";\n break;\n case div:\n // If the first grandchild's nodeName is img then $category is image.\n if ($node->hasChildNodes()) {\n $grandChildren = $node->childNodes;\n $firstGChild = $grandChildren->item(0);\n $fGCNodeName = $firstGChild->nodeName;\n if ($fGCNodeName == \"img\") {\n $category = \"image\";\n break;\n }\n }\n // If there is a class attribute whose value is remarkbox then\n // $category is remark.\n $classAtt = $node->getAttribute(\"class\");\n if ($classAtt == \"remarkbox\") {\n $category = \"remark\";\n break;\n }\n form_destroy();\n die('The div is weird. Err 5187854. -Programmer.');\n default:\n form_destroy();\n die('Node category undefined. Err 6644297. -Programmer.');\n }\n\n return $category;\n}", "function type_url_form_image()\n {\n }", "function mosModelCategoryGetGD($url =null)\r\n{\r\n\tif ($url == null) {\r\n\t\t$url\t\t=\t'http://giaoduc.net.vn/';\r\n\t}\r\n\t$browser\t=\tnew phpWebHacks();\r\n\t$response\t=\t$browser->get($url);\r\n\t$html_obj\t=\tloadHtmlString($response);\r\n\t$arrMenu\t=\tarray();\r\n\tif ($boxsection = $html_obj->find('div[id=\"boxsection\"]',0)) {\r\n\t\t$c_boxgiua1\t=\t$boxsection->find('div[class=\"c_boxgiua1\"]');\r\n\t\tfor ($i=0;$i<count($c_boxgiua1); $i++)\r\n\t\t{\t\t\r\n\t\t\t$obj_menu\t=\tnew stdClass();\r\n\t\t\t$obj_menu->title\t=\t$c_boxgiua1[$i]->find('div[class=\"c_boxgiua1_text\"]',0)->first_child()->innertext;\r\n\t\t\t$obj_menu->link\t=\t$c_boxgiua1[$i]->find('div[class=\"c_boxgiua1_text\"]',0)->first_child()->href;\r\n\t\t\t$obj_menu->parent\t=\t-1;\r\n\t\t\t$obj_menu->published\t=\t0;\r\n\t\t\t$parent\t=\tcount($arrMenu);\r\n\t\t\t$arrMenu[]\t=\t$obj_menu;\r\n\t\t\t$sub_menu\t=\t$c_boxgiua1[$i]->find('div[class=\"c_boxgiua1_nd\"]',0)->first_child();\r\n\t\t\t$items\t\t=\t$sub_menu->find('a');\r\n\t\t\tfor ($j=0; $j<count($items); $j++)\r\n\t\t\t{\r\n\t\t\t\t$item\t=\t$items[$j];\r\n\t\t\t\t$obj_submenu\t=\tnew stdClass();\r\n\t\t\t\t$obj_submenu->title\t=\t$item->innertext;\r\n\t\t\t\t$obj_submenu->link\t=\t$item->href;\r\n\t\t\t\t$obj_submenu->parent=\t$parent;\r\n\t\t\t\t$obj_submenu->published=\t1;\r\n\t\t\t\t$arrMenu[]\t=\t$obj_submenu;\t\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}\r\n\tif ($contentleft = $html_obj->find('div[id=\"contentleft\"]',0)) {\r\n\t\t$showcat_sec\t=\t$contentleft->find('div[class=\"showcat_sec\"]');\r\n\t\t\r\n\t\tfor ($i=0;$i<count($showcat_sec); $i++)\r\n\t\t{\r\n\t\t\t$obj_menu\t=\tnew stdClass();\r\n\t\t\t$obj_menu->title\t=\t$showcat_sec[$i]->find('div[class=\"link_sec\"]',0)->first_child()->innertext;\r\n\t\t\t$obj_menu->link\t=\t$showcat_sec[$i]->find('div[class=\"link_sec\"]',0)->first_child()->href;\r\n\t\t\t$obj_menu->parent\t=\t-1;\r\n\t\t\t$obj_menu->published\t=\t0;\r\n\t\t\t$parent\t=\tcount($arrMenu);\r\n\t\t\t$arrMenu[]\t=\t$obj_menu;\r\n\t\t\t$sub_menu\t=\t$showcat_sec[$i]->find('ul',0);\t\t\t\r\n\t\t\t$items\t\t=\t$sub_menu->find('a');\r\n\t\t\tfor ($j=0; $j<count($items); $j++)\r\n\t\t\t{\r\n\t\t\t\t$item\t=\t$items[$j];\r\n\t\t\t\t$obj_submenu\t=\tnew stdClass();\r\n\t\t\t\t$obj_submenu->title\t=\t$item->innertext;\r\n\t\t\t\t$obj_submenu->link\t=\t$item->href;\r\n\t\t\t\t$obj_submenu->parent=\t$parent;\r\n\t\t\t\t$obj_submenu->published=\t1;\r\n\t\t\t\t$arrMenu[]\t=\t$obj_submenu;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ($contentleft = $html_obj->find('div[id=\"contentleft\"]',0)) {\r\n\t\t$c_box_k2_tit\t=\t$contentleft->find('div[class=\"c_box_k2_tit\"]');\r\n\t\t\r\n\t\tfor ($i=0;$i<count($c_box_k2_tit); $i++)\r\n\t\t{\r\n\t\t\t$obj_menu\t=\tnew stdClass();\r\n\t\t\t$obj_menu->title\t=\t$c_box_k2_tit[$i]->find('div[class=\"c_box_k2_tittext\"]',0)->first_child()->innertext;\r\n\t\t\t$obj_menu->link\t=\t$c_box_k2_tit[$i]->find('div[class=\"c_box_k2_tittext\"]',0)->first_child()->href;\r\n\t\t\t$obj_menu->parent\t=\t-1;\r\n\t\t\t$obj_menu->published\t=\t0;\r\n\t\t\t$parent\t=\tcount($arrMenu);\r\n\t\t\t$arrMenu[]\t=\t$obj_menu;\r\n\t\t\t$sub_menu\t=\t$c_box_k2_tit[$i]->find('ul',0);\t\t\t\r\n\t\t\t$items\t\t=\t$sub_menu->find('a');\r\n\t\t\tfor ($j=0; $j<count($items); $j++)\r\n\t\t\t{\r\n\t\t\t\t$item\t=\t$items[$j];\r\n\t\t\t\t$obj_submenu\t=\tnew stdClass();\r\n\t\t\t\t$obj_submenu->title\t=\t$item->innertext;\r\n\t\t\t\t$obj_submenu->link\t=\t$item->href;\r\n\t\t\t\t$obj_submenu->parent=\t$parent;\r\n\t\t\t\t$obj_submenu->published=\t1;\r\n\t\t\t\t$arrMenu[]\t=\t$obj_submenu;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $arrMenu;\r\n}", "public function admin_image_by_category($id = null) {\n $this->loadModel('GiftImage');\n $logged_in_user = $this->Session->read('Auth.User.id');\n $logged_in_user_parent = $this->Session->read('Auth.User.parent_id');\n $giftImageData = $this->GiftImage->find('all',\n array(\n 'fields' => array('GiftImage.id',\n 'GiftImage.eng_title',\n 'GiftImage.image'),\n 'conditions' => array(\n 'OR' => array(\n array('AND' =>array(\n 'GiftImage.status' => 1,\n 'GiftImage.gift_image_category_id' => $id,\n 'GiftImage.user_id' => 1,\n )),\n array('AND' =>array(\n 'GiftImage.status' => 1,\n 'GiftImage.gift_image_category_id' => $id,\n 'GiftImage.user_id' => $logged_in_user,\n )),\n array('AND' =>array(\n 'GiftImage.status' => 1,\n 'GiftImage.gift_image_category_id' => $id,\n 'GiftImage.user_id' => $logged_in_user_parent,\n )),\n ),\n )\n ));\n $this->set('giftImageData', $giftImageData);\n if($this->request->is('ajax')){\n $this->layout = 'ajax';\n $this->viewPath = \"Elements/admin/GiftCertificates\";\n $this->render('admin_image_by_category');\n }\n }", "public function uploadImage(string $type, $id, $request): ProductCategory;", "function getSelectorName() ;", "function getSelectorName() ;", "function HERITAGE_logo_select_cbk() {\n $logo_url = HERITAGE_get_theme_option('heritage_theme_general_options', 'lc_custom_logo');\n\n ?>\n <input id=\"lc_swp_logo_upload_value\" type=\"text\" name=\"heritage_theme_general_options[lc_custom_logo]\" size=\"150\" value=\"<?php echo esc_url($logo_url); ?>\"/>\n <input id=\"lc_swp_upload_logo_button\" type=\"button\" class=\"button\" value=\"<?php echo esc_html__('Upload Logo', 'heritage'); ?>\" />\n <input id=\"lc_swp_remove_logo_button\" type=\"button\" class=\"button\" value=\"<?php echo esc_html__('Remove Logo', 'heritage'); ?>\" />\n <p class=\"description\">\n <?php echo esc_html__('Upload a custom logo image.', 'heritage'); ?>\n </p>\n\n <div id=\"lc_logo_image_preview\">\n <img class=\"lc_swp_setting_preview_logo\" src=\"<?php echo esc_url($logo_url); ?>\">\n </div>\n\n <?php\n}", "public function form($instance) {\n\n // set up background color\n $bg_color = \"#212121\";\n if (isset($instance['bg_color'])) {\n $bg_color = $instance['bg_color'];\n }\n?>\n <div class=\"an-catlinks-settings-container\">\n <p>\n <label for=\"<?php echo $this->get_field_id( 'bg_color' ); ?>\" style=\"display:block;\"><?php _e( 'Background Color:', 'an_catlinks_wiget' ); ?></label>\n <input class=\"widefat color-picker an-catlist-bg-color-picker\"\n id=\"<?php echo $this->get_field_id( 'bg_color' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'bg_color' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $bg_color ); ?>\" />\n </p>\n\n<?php\n // setup font color\n $font_color = \"#ffffff\";\n if (isset($instance['font_color'])) {\n $font_color = $instance['font_color'];\n }\n?>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'font_color' ); ?>\" style=\"display:block;\"><?php _e( 'Font color:', 'an_catlinks_wiget' ); ?></label>\n <input class=\"widefat color-picker\"\n id=\"<?php echo $this->get_field_id( 'font_color' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'font_color' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $font_color ); ?>\" />\n </p>\n\n<?php\n // set up 1st category\n $cat = 0;\n if (isset($instance['cat1'])) {\n $cat = $instance['cat1'];\n }\n?>\n <!-- 1st category and image -->\n <label for=\"<?php _e($this->get_field_id('cat1')); ?>\"><?php esc_html__(\"Category 1\", \"an_catlinks_wiget\"); ?></label>\n <select id=\"<?php _e($this->get_field_id('cat1')); ?>\" name=\"<?php _e($this->get_field_name('cat1')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n // set up image for the first category\n $image = '';\n if(isset($instance['image1']))\n {\n $image = $instance['image1'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image1' )); ?>\"><?php _e( 'Image 1:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image1' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image1' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto; background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n\n <!-- 2nd category and image -->\n<?php\n $cat = 0;\n if (isset($instance['cat2'])) {\n $cat = $instance['cat2'];\n }\n?>\n <label for=\"<?php _e($this->get_field_id('cat2')); ?>\"><?php esc_html__(\"Category 2\", \"an_catlinks_wiget\"); ?></label>\n <select id=\"<?php _e($this->get_field_id('cat2')); ?>\" name=\"<?php _e($this->get_field_name('cat2')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n $image = '';\n if(isset($instance['image2']))\n {\n $image = $instance['image2'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image2' )); ?>\"><?php _e( 'Image 2:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image2' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image2' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto;background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n\n <!-- 3rd category and image -->\n\n <?php\n $cat = 0;\n if (isset($instance['cat3'])) {\n $cat = $instance['cat3'];\n }\n ?>\n <label for=\"<?php _e($this->get_field_id('cat3')); ?>\"><?php esc_html__(\"Category 3\", \"an_catlinks_wiget\"); ?></label>\n\n <select id=\"<?php _e($this->get_field_id('cat3')); ?>\" name=\"<?php _e($this->get_field_name('cat3')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n $image = '';\n if(isset($instance['image3']))\n {\n $image = $instance['image3'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image3' )); ?>\"><?php _e( 'Image 3:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image3' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image3' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto;background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n </div>\n <script>\n\n (function($) {\n\n $(document).ready(function() {\n $('.color-picker').wpColorPicker({\n change: function(event, ui) {\n $(this).parent().trigger('change');\n\n if ($(this).hasClass('an-catlist-bg-color-picker')) {\n $('.an-catlinks-image-demo img').css('background',$(this).val());\n }\n },\n\n clear: function(event) {\n $(this).parent().trigger('change');\n\n if ($(this).hasClass('an-catlist-bg-color-picker')) {\n $('.an-catlinks-image-demo img').css('background','transparent');\n }\n }\n\n });\n\n });\n }\n )(jQuery);\n\n </script>\n\n<?php\n\n }", "function getParentSelectorName() ;", "function get_category_thumbnail_object( $cat = '' ) {\n\t\tglobal $wp_taxonomies;\n\t\t\n\t\tif ( is_object( $cat ) )\n\t\t\t$cat_id = $cat->term_id;\n\t\t\n\t\tif ( is_numeric( $cat ) )\n\t\t\t$cat_id = (int) $cat;\n\t\t\n\t\tif ( '' == $cat )\n\t\t\t$cat_id = get_category( get_query_var( 'cat' ) )->term_id;\n\t\t\n\t\t\n\t\t$image = get_option( 'category_thumbnail_image' );\n\t\t\n\t\tif ( is_array( $image ) && array_key_exists( $cat_id, $image ) ) {\n\t\t\t$image = $image[ $cat_id ];\n\t\t\t$image = wp_get_attachment_image_src( (int) $image );\n\t\t\t\n\t\t\t$return = new stdClass;\n\t\t\t$return->url = $image[0];\n\t\t\t$return->width = $image[1];\n\t\t\t$return->height = $image[2];\n\t\t\t\n\t\t\treturn $return;\n\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "function getChildSelectorName() ;", "function ag_coll_builder() {\n\trequire_once(AG_DIR . '/functions.php');\n\n\tif(!isset($_POST['coll_id'])) {die('missing data');}\n\t$coll_id = addslashes($_POST['coll_id']);\n\t\t\t\n\t// item categories list\n\t$item_cats = get_terms( 'ag_gall_categories', 'hide_empty=0' );\n\t\n\t// cat and page selector\n\t?>\n <h2></h2>\n \n <div id=\"ag_grid_builder_cat\" class=\"postbox\" style=\"min-width: 630px;\">\n <h3 class=\"hndle\"><?php _e(\"Add Collection Galleries\", 'ag_ml'); ?></h3>\n <div class=\"inside\">\n \n <div class=\"lcwp_mainbox_meta\">\n <table class=\"widefat lcwp_table lcwp_metabox_table\" style=\"border: none;\">\n <tr>\n <td>\n <label style=\"width: 145px;\"><?php _e(\"Gallery Categories\", 'ag_ml'); ?></label>\n \n <select data-placeholder=\"<?php _e(\"Select gallery categories\", 'ag_ml'); ?> ..\" name=\"ag_gall_cats\" id=\"ag_gall_cats\" class=\"lcweb-chosen\" style=\"width: 314px;\" autocomplete=\"off\">\n <option value=\"all\"><?php _e('Any category', 'ag_ml') ?></option>\n \n <?php \n foreach($item_cats as $cat) {\n // WPML fix - get original ID\n if (function_exists('icl_object_id') && isset($GLOBALS['sitpress'])) {\n global $sitepress;\n\t\t\t\t\t\t\t$term_id = icl_object_id($cat->term_id, 'ag_gall_categories', true, $sitepress->get_default_language());\n }\n else {$term_id = $cat->term_id;}\n \n echo '<option value=\"'.$term_id.'\">'.$cat->name.'</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <tr>\n <td style=\"padding-bottom: 0 !important;\">\n <div>\n <label style=\"width: 145px;\"><?php _e(\"Select galleries\", 'ag_ml'); ?></label>\n <input type=\"text\" name=\"ag_coll_gall_search\" id=\"ag_coll_gall_search\" style=\"width: 314px; padding-right: 28px;\" placeholder=\"<?php _e('search galleries', 'ag_ml') ?>\" autocomplete=\"off\" />\n \n <i class=\"ag_cgs_mag\" title=\"<?php _e('search', 'ag_ml') ?>\"></i>\n <i class=\"ag_cgs_del\" title=\"<?php _e('cancel', 'ag_ml') ?>\"></i>\n \n <a href=\"javascript:void(0)\" class=\"ag_cgs_show_all\">(<?php _e('expand', 'ag_ml') ?>)</a>\n </div>\n \n <ul id=\"ag_coll_gall_picker\">\n <?php \n $post_list = ag_cat_galleries_code('all'); \n \n if(!$post_list) {echo '<span>'. __('No galleries found', 'ag_ml') .' ..</span>';}\n else {echo $post_list;}\n ?>\n </ul>\n </td>\n </tr>\n </table> \n <div> \n </div>\n\t</div>\n </div>\n </div>\n \n <div class=\"postbox\" style=\"min-width: 630px;\">\n <h3 class=\"hndle\"><?php _e(\"Collection Builder\", 'ag_ml'); ?></h3>\n <div class=\"inside\">\n \n\t\t<div id=\"visual_builder_wrap\">\n \n\t\t<table id=\"ag_coll_builder\">\n <?php\n $coll_data = get_term($coll_id, 'ag_collections');\n\t\t $coll_composition = unserialize($coll_data->description);\n\t\t $coll_galleries = $coll_composition['galleries'];\n\t\t \n if(is_array( $coll_galleries) && count( $coll_galleries) > 0) {\n\t\t\t\n\t\t\t$a = 0; \n foreach( $coll_galleries as $gdata) {\n\t\t\t $gid = $gdata['id'];\n\t\t\t $gall_img = ag_get_gall_first_img($gid);\t\n\t\t\t\t\n\t\t\t if(get_post_status($gid) == 'publish' && $gall_img) {\n\n\t\t\t\t $rand_check \t= (isset($gdata['rand']) && $gdata['rand'] != 0) ? 'checked=\"checked\"' : '';\n\t\t\t\t $wmark_check \t= (isset($gdata['wmark']) && $gdata['wmark'] != 0) ? 'checked=\"checked\"' : ''; \n\t\t\t\t $filter_check\t= (isset($gdata['filters']) && $gdata['filters'] != 0) ? 'checked=\"checked\"' : ''; \n\t\t\t\t \t\n\t\t\t\t $link_subj \t= (isset($gdata['link_subj'])) ? $gdata['link_subj'] : 'none'; \n\t\t\t\t $link_val \t= (isset($gdata['link_val'])) ? $gdata['link_val'] : '';\n\t\t\t\t $descr \t\t= (isset($gdata['descr'])) ? $gdata['descr'] : ''; \n\t\t\t\t \n\t\t\t\t // custom image\n\t\t\t\t if(isset($gdata['cust_img']) && $gdata['cust_img']) {\n\t\t\t\t\t$cust_img = ag_thumb_src($gdata['cust_img'], 500, 500, 70);\n\t\t\t\t\t$cust_img_id = $gdata['cust_img'];\n\t\t\t\t\t$ci_icon_sel_class = 'ag_coll_cust_img_sel'; \n\t\t\t\t } \n\t\t\t\t else {\n\t\t\t\t\t$cust_img = '';\n\t\t\t\t\t$cust_img_id = '';\n\t\t\t\t\t$ci_icon_sel_class = ''; \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t $orig_thumb = ag_thumb_src($gall_img, 500, 500, 70);\n\t\t\t\t $thumb_to_use = (empty($cust_img)) ? $orig_thumb : $cust_img;\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t // categories\n\t\t\t\t $gall_cats = ag_gallery_cats($gid, 'list', ', ');\n\t\t\t\t $gall_cats = (empty($gall_cats)) ? '<em>'. __('No associated categories', 'ag_ml') .' ..</em>' : '<em class=\"dashicons dashicons-tag\" title=\"'. esc_attr(__('Categories', 'ag_ml')) .'\" style=\"padding-right: 3px; font-size: 16px; line-height: 23px;\"></em> '.$gall_cats;\n\n\t\t\t\t echo '\n\t\t\t\t <tr class=\"coll_component\" id=\"ag_coll_'.$gid.'\">\n\t\t\t\t\t<td class=\"ag_coll_gall_imgbox\" style=\"width: 230px; vertical-align: top; background-image: url('. $thumb_to_use .');\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"lcwp_del_row ag_del_gall\"></div>\n\t\t\t\t\t\t<div class=\"lcwp_move_row\"></div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"ag_coll_cust_img_btn '. $ci_icon_sel_class .'\" title=\"'. esc_attr(__('Manage custom main image', 'ag_ml')) .'\">\n\t\t\t\t\t\t\t<i class=\"fa fa-camera\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"ag_coll_cust_img\" value=\"'. $cust_img_id .'\" class=\"ag_coll_cust_img\" />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"ag_coll_del_cust_img_btn\" title=\"'. esc_attr(__('Remove custom main image', 'ag_ml')) .'\" orig-img=\"'. $orig_thumb .'\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-camera\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"ag_coll_gall_cats\">\n\t\t\t\t\t\t\t<span>'. $gall_cats .'</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"ag_coll_gall_inner\" style=\"vertical-align: top;\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h2>\n\t\t\t\t\t\t\t\t<a href=\"'.get_admin_url().'post.php?post='.$gid.'&action=edit\" target=\"_blank\" title=\"'. __('edit gallery', 'ag_ml').'\">'.get_the_title($gid).'</a>\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div style=\"width: 12.3%; margin-right: 4%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Random display?', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"random\" class=\"ip-checkbox\" value=\"1\" '.$rand_check.' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"width: 12.3%; margin-right: 4%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Use tags filter?', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"tags_filter\" class=\"ip-checkbox\" value=\"1\" '.$filter_check.' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"width: 12.3%; margin-right: 4%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Use watermark?', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"watermark\" class=\"ip-checkbox\" value=\"1\" '.$wmark_check.' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"width: 50%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Image link', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<select name=\"ag_linking_dd\" class=\"ag_linking_dd\">\n\t\t\t\t\t\t\t\t\t<option value=\"none\">'. __('No link', 'ag_ml') .'</option>\n\t\t\t\t\t\t\t\t\t<option value=\"page\" '; if($link_subj == 'page') {echo 'selected=\"selected\"';} echo '>'. __('To a page', 'ag_ml') .'</option>\n\t\t\t\t\t\t\t\t\t<option value=\"custom\" '; if($link_subj == 'custom') {echo 'selected=\"selected\"';} echo '>'. __('Custom link', 'ag_ml') .'</option>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t<div class=\"ag_link_wrap\">'. ag_link_field($link_subj, $link_val) .'</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<textarea name=\"coll_descr\" class=\"coll_descr\" placeholder=\"'. esc_attr(__('Gallery description - supports %IMG-NUM% placeholder', 'ag_ml')) .'\">'.$descr.'</textarea>\n\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t ';\n\t\t\t }\n\t\t\t $a++;\n }\n }\n\t\t else {echo '<tr><td colspan=\"5\"><p>'.__('No selected galleries', 'ag_ml').' ..</p></td></tr>';}\n ?>\n\n </table>\n </div> \n \n\t</div>\n </div>\n </div>\n\t<?php\n\tdie();\n}", "function categoryImage($catId)\n\t{\t\t\n\t\t\n\t\t$table=\"productimages\";\n\t\t$fields=\"*\";\n\t\t$id='*';\n\t\t$key = array(\"productId\"=>0,\"approved\" => 1, \"isCategory\"=>1,\"categoryId\"=>$catId);\n\t\t$fetchUser = $this->get_record_by_ID($table,$key,$id,$fields);\n\t\tif(count($fetchUser)>0)\n\t\t{\n\t\t\treturn $fetchUser;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fetchUser[0]['image640By480']= \"../images/default.gif\";\n\t\t\t$fetchUser[0]['image640by480Height']= 480;\n $fetchUser[0]['image640by480Width'] = 640;\n\t\t\t$fetchUser[0]['image400by300'] =\"../images/default.gif\";;\n $fetchUser[0]['image400by300Height'] = 300;\n $fetchUser[0]['image400by300Width'] = 400;\n $fetchUser[0]['image100by80'] = \"../images/default_100_75.gif\";\n $fetchUser[0]['image100by80Height'] = 75;\n $fetchUser[0]['image100by80Width'] = 100;\n\t\t\treturn $fetchUser;\n\t\t}\n\t}", "protected function _loadPictureForm() {\n\t\tCgn::loadLibrary('Form::lib_cgn_form');\n\t\tCgn::loadLibrary('Html_widgets::lib_cgn_widget');\n\t\t$f = new Cgn_Form('form_upload_profile_pic', '', 'POST', 'multipart/form-data');\n\t\t$f->width = '40em';\n\t\t$f->formHeader = 'Select an image file on your computer (4MB max)';\n\n\t\t$f->layout = new Cgn_Form_Layout_Dl();\n\n\t\t$f->action = cgn_sappurl('account', 'img', 'save');\n\n\t\t$f->appendElement(new Cgn_Form_ElementFile('pic', ''));\n\n\t\treturn $f;\n\t}", "public function getChildSelectorName();", "public function getSelectorHolder()\n {\n return \"$(\\\".step-button-wrapper[data-for='{$this->Name}']\\\")\";\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "function &getByName( $name )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $topic = new eZImageCategory();\r\n\r\n if ( $name != \"\" )\r\n {\r\n $db->array_query( $author_array, \"SELECT ID, Name FROM eZImageCatalogue_Category WHERE Name='$name'\" );\r\n\r\n if ( count( $author_array ) == 1 )\r\n {\r\n $topic = new eZImageCategory( $author_array[0][$db->fieldName( \"ID\" )] );\r\n }\r\n }\r\n\r\n return $topic;\r\n }", "protected function get_display_category()\n\t{\n\t\t$image = ATTACHMENT_CATEGORY_IMAGE;\n\t\t$none = ATTACHMENT_CATEGORY_NONE;\n\t\t$thumb = ATTACHMENT_CATEGORY_THUMB;\n\n\t\t$display_cat = (strpos($this->get('mimetype'), 'image') === 0) ? $image : $none;\n\n\t\tif ($display_cat == $image)\n\t\t{\n\t\t\tif ($this->get('thumbnail'))\n\t\t\t{\n\t\t\t\t$display_cat = $thumb;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($this->config['img_display_inlined'])\n\t\t\t\t{\n\t\t\t\t\tif ($this->config['img_link_width'] || $this->config['img_link_height'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$dimension = @getimagesize($this->get_filepath());\n\n\t\t\t\t\t\t// If the dimensions could not be determined or the image being 0x0 we display it as a link for safety purposes\n\t\t\t\t\t\tif ($dimension === false || empty($dimension[0]) || empty($dimension[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$display_cat = $none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$display_cat = ($dimension[0] <= $this->config['img_link_width'] && $dimension[1] <= $this->config['img_link_height']) ? $image : $none;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$display_cat = $none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Make some decisions based on user options being set.\n\t\tif (($display_cat == $image || $display_cat == $thumb) && !$this->user->optionget('viewimg'))\n\t\t{\n\t\t\t$display_cat = $none;\n\t\t}\n\t\treturn $display_cat;\n\t}", "protected function getCategoryButton() {\n\t\treturn [\n\t\t\t'attributes' => [\n\t\t\t\t'href' => '#/categories',\n\t\t\t\t// add hidden class (the overlay works only, when JS is enabled (class will\n\t\t\t\t// be removed in categories/init.js)\n\t\t\t\t'class' => 'category-button hidden',\n\t\t\t],\n\t\t\t'label' => $this->msg( 'categories' )->text()\n\t\t];\n\t}", "public function getSelectorName();", "public function output_category_widget() {\n\n\t\t$categories = get_terms( 'product_cat', array( 'orderby' => 'name' ) );\n\t\t?>\n\t\t<form method=\"GET\">\n\t\t\t<div>\n\t\t\t\t<select multiple=\"multiple\" data-placeholder=\"<?php _e( 'Select categories&hellip;', 'woocommerce-cost-of-goods' ); ?>\" class=\"wc-enhanced-select\" id=\"category_ids\" name=\"category_ids[]\" style=\"width: 205px;\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$r = array();\n\t\t\t\t\t$r['pad_counts'] = 1;\n\t\t\t\t\t$r['hierarchical'] = 1;\n\t\t\t\t\t$r['hide_empty'] = 1;\n\t\t\t\t\t$r['value'] = 'id';\n\t\t\t\t\t$r['selected'] = $this->category_ids;\n\n\t\t\t\t\tinclude_once( WC()->plugin_path() . '/includes/walkers/class-product-cat-dropdown-walker.php' );\n\n\t\t\t\t\techo wc_walk_category_dropdown_tree( $categories, 0, $r );\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t\t<a href=\"#\" class=\"select_none\"><?php esc_html_e( 'None', 'woocommerce-cost-of-goods' ); ?></a>\n\t\t\t\t<a href=\"#\" class=\"select_all\"><?php esc_html_e( 'All', 'woocommerce-cost-of-goods' ); ?></a>\n\t\t\t\t<input type=\"submit\" class=\"submit button\" value=\"<?php esc_attr_e( 'Show', 'woocommerce-cost-of-goods' ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"range\" value=\"<?php if ( ! empty( $_GET['range'] ) ) echo esc_attr( $_GET['range'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"start_date\" value=\"<?php if ( ! empty( $_GET['start_date'] ) ) echo esc_attr( $_GET['start_date'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"end_date\" value=\"<?php if ( ! empty( $_GET['end_date'] ) ) echo esc_attr( $_GET['end_date'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"<?php if ( ! empty( $_GET['page'] ) ) echo esc_attr( $_GET['page'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"tab\" value=\"<?php if ( ! empty( $_GET['tab'] ) ) echo esc_attr( $_GET['tab'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"report\" value=\"<?php if ( ! empty( $_GET['report'] ) ) echo esc_attr( $_GET['report'] ) ?>\" />\n\t\t\t</div>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery( function() {\n\t\t\t\t\t// select all\n\t\t\t\t\tjQuery( '.chart-widget' ).on( 'click', '.select_all', function() {\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find( 'select option' ).attr( \"selected\", \"selected\" );\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find('select').change();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\n\t\t\t\t\t// select none\n\t\t\t\t\tjQuery( '.chart-widget').on( 'click', '.select_none', function() {\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find( 'select option' ).removeAttr( \"selected\" );\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find('select').change();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t</script>\n\t\t</form>\n\t\t<?php\n\t}", "function get_gallery_article($thisPost){\n $id = $thisPost->ID;\n $title = $thisPost->post_title;\n $image = get_the_post_thumbnail_url($id)?get_the_post_thumbnail_url($id):DF_IMAGE. '/noimage.png';\n $link = get_permalink($id);\n // $terms = get_the_terms( $post->ID, 'publication_category' );\n $data_taxaonomy = get_the_terms($id, 'categories-gallery');\n ?>\n <div class=\"gallery--cont-image\" data-post_id = \"<?php echo $id;?>\" data-slug = \"<?php echo $data_taxaonomy[0]->slug; ?>\">\n <div class=\"background--hidden\"></div>\n <?php \n $data_taxaonomy = get_the_terms($thisPost, 'categories-gallery');\n if(check_taxaonomy($data_taxaonomy) == true):\n ?>\n <div class=\"background-360\">\n <div class=\"content-group\">\n <div class=\"cont-icon\"><img src=\"<?php echo DF_IMAGE.'/icon-3d.png';?>\" alt=\"icon-3d\" /></div>\n <div class=\"cont-text\">EXPLORE 3D SPACE</div>\n </div>\n </div>\n <?php\n endif;\n ?>\n <a href=\"<?php echo $link;?>\">\n <img src=\"<?php echo $image;?>\" alt=\"image-work-page\"/>\n </a>\n </div>\n <?php\n}", "public function getCategoryImageUrlAttribute()\n {\n if (!$this->has_image) return null;\n return asset($this->imageDirectory . '/' . $this->categoryImageFileName);\n }", "public function getComboKindCategory()\n {\n $querystr = <<<EOQUERY\n SELECT * FROM askme_kind_category a\n ORDER BY a.`desc` LIMIT 0,10\nEOQUERY;\n\n $results = $this->c->query($querystr);\n if ($results === FALSE)\n return \"\";\n\n $ret = '<select class=\"gradient_combo\" id=\"id_kind_category\" '.\n 'style=\"margin-right: 10px; width: '.$this->width.'px;\">';\n $ret .= \"<option value='0'>\";\n $ret .= $this->first_element;\n $ret .= \"</option>\";\n\n while (($row = $results->fetch_assoc()) !== NULL)\n {\n $ret .= \"<option value='{$row['id_kind_category']}'>\";\n $ret .= $row['desc'];\n $ret .= \"</option>\";\n }\n\n $ret .= \"</select>\";\n\n $results->close();\n\n return $ret;\n\n }", "function ag_cat_galleries_code($fnc_cat = false) {\t\n\tinclude_once(AG_DIR . '/functions.php');\n\t$cat = $fnc_cat;\n\t$code = '';\n\t\n\t// if is not called directly\n\tif(!$cat) {\n\t\tif(!isset($_POST['gallery_cat'])) {die('missing data');}\n\t\t$cat = $_POST['gallery_cat'];\n\t}\n\n\t$post_list = ag_cat_galleries($cat);\t\n\tif(!$post_list) {return false;}\n\t\n\tforeach($post_list as $post) {\n\t\t$code .= '\n\t\t<li style=\"background-image: url('.ag_thumb_src($post['img'], 200, 170, 70).');\" rel=\"'.$post['id'].'\" title=\"'. __('add to collection', 'ag_ml') .'\" ag-cats=\"'.$post['cats'].'\" ag-img=\"'.ag_thumb_src($post['img'], 500, 500, 70).'\">\n\t\t\t<div title=\"'.$post['title'].'\">'.$post['title'].'</div>\n\t\t</li>';\n\t}\n\n\t\n\tif($fnc_cat == false) {die( $code );}\n\telse {return $code;}\n}", "public function bamobile_taxonomy_field($template, $taxonomy){\r\n $params = array(\r\n 'label' => array(\r\n 'image' => __('Mobile App Images'),\r\n 'upload_image' => __('Upload/Edit Image'),\r\n 'remove_image' => __('Remove image'),\r\n 'note' => __('* This picture only work on Mobile App')\r\n ),\r\n 'mobiconnector_attachment' => null\r\n );\r\n\r\n\r\n if (isset($taxonomy->term_id) && $this->bamobile_has_image($taxonomy->term_id)) {\r\n $image = self::bamobile_get_category_image(array(\r\n 'term_id' => $taxonomy->term_id\r\n ), true);\r\n \r\n $attachment_id = $this->bamobile_get_attachment_id($taxonomy->term_id);\r\n\r\n $params = array_replace_recursive($params, array(\r\n 'mobiconnector_category_avatar' => $image,\r\n 'mobiconnector_attachment' => $attachment_id,\r\n ));\r\n }\r\n\r\n return bamobile_mobiconnector_get_category_template($template, $params, false);\r\n }", "public function getSelectorName() {}", "public function getSelectorName() {}", "public function getSelectorName() {}", "public function getSelectorName() {}", "protected function getSelectorName() {}", "function template_preprocess_excur_service_category(&$vars) {\n $city = menu_get_object('taxonomy_term', 2);\n $vars['city'] = $city->name;\n\n $vocabulary = taxonomy_vocabulary_machine_name_load('category');\n foreach (taxonomy_get_tree($vocabulary->vid, 0, NULL, TRUE) as $key => $term) {\n $vars['categories'][$key]['name'] = $term->name;\n $vars['categories'][$key]['id'] = $term->tid;\n $vars['categories'][$key]['icon'] = theme('image_style', array(\n 'style_name' => '50x50',\n 'path' => $term->field_image[LANGUAGE_NONE][0]['uri'],\n 'alt' => $term->name,\n 'title' => $term->name,\n 'attributes' => array(\n 'class' => array('categoty-icon'),\n ),\n ));\n }\n}", "public function categoryForm(){\n $table = \"categories\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $category){\n echo('<option value=\"'.$category[\"cat_id\"].'\">'.$category[\"cat_name\"].'</option>');\n }\n\n\n }", "public function getArticleSelector() {\n $result = '';\n if ($this->data['wiki_page'] > 0) {\n $result .= sprintf(\n '<article-select href=\"%s\">',\n $this->getWebLink($this->data['wiki_page'])\n );\n $result .= sprintf('<hidden param=\"%s[mode]\"/>', $this->paramName);\n $result .= sprintf(\n '<field param=\"%s[article_field]\" caption=\"%s\" />',\n $this->paramName,\n papaya_strings::escapeHTMLChars($this->data['caption_article'])\n );\n $result .= sprintf(\n '<button caption=\"%s\" />',\n papaya_strings::escapeHTMLChars($this->data['caption_go'])\n );\n $result .= '</article-select>';\n }\n return $result;\n }", "public function chooseCategory(){\n $req = $this->db->query('SELECT * FROM p5_files_category');\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, \n 'taekwondo\\model\\Category');\n return $req;\n }", "public function getCategoriesGroup() {\n\t\t$imageTypes = $this->getImagesTypes();\n\t\t$categories = $this->getCollection()\n\t\t\t\t->addFieldToFilter('status',1);\n\t\t$arrayOptions = array();\n\t\t$i = 1;\n\t\tforeach($imageTypes as $key => $imageType)\n\t\t{\n\t\t\tif($key == 'uncategorized')\n\t\t\t{\n\t\t\t\t$arrayOptions[0] = 'Uncategorized';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$arrayValue = array();\n\t\t\tforeach($categories as $category)\n\t\t\t{\n\t\t\t\tif($category->getImageTypes() == $key)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$arrayValue[] = array('value'=>$category->getId(),'label'=>$category->getTitle());\n\t\t\t\t}\n\t\t\t}\n\t\t\t$arrayOptions[$i]['value'] = $arrayValue;\n\t\t\t$arrayOptions[$i]['label'] = $imageType;\n\t\t\t$i++;\n\t\t}\n\t\treturn $arrayOptions;\n\t}", "public function getProductDefaultConfig() {\n //Selected Image Categories\n $categories = array();\n $imageCategories = $this->artworkcateFactory->create()->getArtworkCateCollection();\n if($imageCategories->count()) {\n foreach($imageCategories as $_category) {\n $categories[$_category->getId()] = array('position' => $_category->getPosition());\n } \n }\n return array(\n 'selected_image' => json_encode($categories),\n );\n }", "public function getOptionImage()\n {\n return $this->optionImage;\n }", "function ciniki_recipes_web_categories($ciniki, $settings, $tnid) {\n\n $strsql = \"SELECT DISTINCT category AS name \"\n . \"FROM ciniki_recipes \"\n . \"WHERE ciniki_recipes.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND (ciniki_recipes.webflags&0x01) = 1 \"\n . \"AND category <> '' \"\n . \"ORDER BY category \"\n . \"\";\n \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.recipes', array(\n array('container'=>'categories', 'fname'=>'name', 'name'=>'category',\n 'fields'=>array('name')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['categories']) ) {\n return array('stat'=>'ok');\n }\n $categories = $rc['categories'];\n\n //\n // Load highlight images\n //\n foreach($categories as $cnum => $cat) {\n //\n // Look for the highlight image, or the most recently added image\n //\n $strsql = \"SELECT ciniki_recipes.primary_image_id, ciniki_images.image \"\n . \"FROM ciniki_recipes, ciniki_images \"\n . \"WHERE ciniki_recipes.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND category = '\" . ciniki_core_dbQuote($ciniki, $cat['category']['name']) . \"' \"\n . \"AND ciniki_recipes.primary_image_id = ciniki_images.id \"\n . \"AND (ciniki_recipes.webflags&0x01) = 1 \"\n . \"ORDER BY (ciniki_recipes.webflags&0x10) DESC, \"\n . \"ciniki_recipes.date_added DESC \"\n . \"LIMIT 1\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.recipes', 'image');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['image']) ) {\n $categories[$cnum]['category']['image_id'] = $rc['image']['primary_image_id'];\n } else {\n $categories[$cnum]['category']['image_id'] = 0;\n }\n }\n\n return array('stat'=>'ok', 'categories'=>$categories); \n}", "function getSelector1Name() ;", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\n }", "public function getTinyCropImage()\n {\n return $this->getFilterImage(TinyCrop::identifier());\n }", "function _arc_meta_category_meta($event, $step, $data, $rs)\n{\n // category types).\n if ($rs['type']!='article') {\n return $data;\n }\n\n // Get the existing meta data for this category.\n $meta = _arc_meta('category', $rs['name'], true);\n\n $form = hInput('arc_meta_id', $meta['id']);\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_title\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_title'), 'label', ' for=\"arc_meta_title\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('text', 'arc_meta_title', $meta['title'], '', '', '', '32', '', 'arc_meta_title') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_image\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_image'), 'label', ' for=\"arc_meta_image\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('number', 'arc_meta_image', $meta['image'], '', '', '', '32', '', 'arc_meta_image') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_robots\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_robots'), 'label', ' for=\"arc_meta_description\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . selectInput('arc_meta_robots', _arc_meta_robots(), $meta['robots'], 'arc_meta_robots') . '</div>';\n $form .= '</div>';\n\n return $data . $form;\n}", "public static function category_box() {\n\t\t\t\n\t\t\tglobal $post;\n\t\t\tglobal $wpdb;\n\t\n\t\t\t$cat_list = $wpdb->get_results( \"SELECT re_int, re_title FROM \".$wpdb->prefix.self::$table_name);?>\n\t\t\t\n\t\t\t<label for=\"siteurl\">Select the appropriate Menu Category for this current dish.<br /></label>\n\t\t\t<p>\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\tif(!empty($cat_list)){\n\t\t\t\t\t\techo \"<select style='width:200px' name='cat_id'>\";\n\t\t\t\t\t\tforeach($cat_list as $list => $val){\n\t\t\t\t\t\t\t$sel = \"\";\n\t\t\t\t\t\t\tif(isset($_GET['menucat']) && ($_GET['menucat'] == $val->re_int )) { \n\t\t\t\t\t\t\t\t$sel = ' selected=\"selected\"'; \n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$menucat = get_post_meta($post->ID, \"meta_menucat\", true);\n\t\t\t\t\t\t\t\tif($menucat == $val->re_int ) { $sel = ' selected=\"selected\"';} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"<option value='\".$val->re_int.\"' \".$sel.\">\".$val->re_title.\"</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"</select>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<a href='edit.php?post_type=menucategory-post&page=menu_listings'>Add Categories First.</a>\";\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t</p>\n\t\t\n\t\t\t<?php\n\t\t}", "function PricerrTheme_category_images()\n{\n $id_icon = 'icon-options-general-img';\n $ttl_of_stuff = 'PricerrTheme - ' . __('Category Images', 'PricerrTheme');\n global $menu_admin_PricerrTheme_theme_bull;\n\n //------------------------------------------------------\n\n $arr = array(\"yes\" => __(\"Yes\", 'PricerrTheme'), \"no\" => __(\"No\", 'PricerrTheme'));\n\n echo '<div class=\"wrap\">';\n echo '<div class=\"icon32\" id=\"' . $id_icon . '\"><br/></div>';\n echo '<h2 class=\"my_title_class_sitemile\">' . $ttl_of_stuff . '</h2>';\n\n ?>\n\n<?php\n\nif (isset($_POST['set_category_image'])) {\n $category_id = $_POST['category_id'];\n $category_image = $_POST['category_image'];\n\n if (!empty($_FILES['category_image']['name'])):\n\n $upload_overrides = array('test_form' => false);\n $uploaded_file = wp_handle_upload($_FILES['category_image'], $upload_overrides);\n\n $file_name_and_location = $uploaded_file['file'];\n $file_title_for_media_library = $_FILES['category_image']['name'];\n\n $arr_file_type = wp_check_filetype(basename($_FILES['category_image']['name']));\n $uploaded_file_type = $arr_file_type['type'];\n\n if ($uploaded_file_type == \"image/png\" or $uploaded_file_type == \"image/jpg\" or $uploaded_file_type == \"image/jpeg\" or $uploaded_file_type == \"image/gif\") {\n\n $attachment = array(\n 'post_mime_type' => $uploaded_file_type,\n 'post_title' => addslashes($file_title_for_media_library),\n 'post_content' => '',\n 'post_status' => 'inherit',\n 'post_parent' => 0,\n\n 'post_author' => $cid,\n );\n\n $attach_id = wp_insert_attachment($attachment, $file_name_and_location, 0);\n $attach_data = wp_generate_attachment_metadata($attach_id, $file_name_and_location);\n wp_update_attachment_metadata($attach_id, $attach_data);\n\n update_post_meta($attach_id, 'category_image', $category_id);\n\n }\n\n echo '<div class=\"saved_thing\">' . __('Image attached. Done.', 'PricerrTheme') . '</div>';\n\n else:\n\n\n echo '<div class=\"saved_thing\">' . __('Please select an image.', 'PricerrTheme') . '</div>';\n\n endif;\n\n}\n\n?>\n\n <style>\n\n .crme_brullet {\n padding: 2px;\n background: white;\n border: 1px solid #ccc;\n }\n\n </style>\n\n\n <script type=\"text/javascript\">\n\n function delete_this_my_pic(id) {\n jQuery.ajax({\n method: 'get',\n url: '<?php echo get_bloginfo('siteurl');?>/index.php?_ad_delete_pid=' + id,\n dataType: 'text',\n success: function (text) {\n window.location.reload();\n\n return false;\n }\n });\n //alert(\"a\");\n\n return false;\n\n }\n\n </script>\n\n\n<div id=\"usual2\" class=\"usual\">\n <ul>\n <li><a href=\"#tabs1\"><?php _e('Set Images', 'PricerrTheme'); ?></a></li>\n </ul>\n\n <div id=\"tabs1\">\n <?php\n\n $categories = get_terms('job_cat', array(\n 'parent' => '0',\n 'hide_empty' => 0\n ));\n if (count($categories) > 0) {\n ?>\n\n <table class=\"sitemile-table\" width=\"650\">\n <tr>\n <td><strong><?php echo __('Category Name', 'PricerrTheme') ?></strong></td>\n <td><strong><?php echo __('Upload Picture', 'PricerrTheme') ?></strong></td>\n <td><strong><?php echo __('Current Picture', 'PricerrTheme') ?></strong></td>\n </tr>\n\n\n <?php\n foreach ($categories as $cat) {\n\n $PricerrTheme_get_cat_pic_attached = PricerrTheme_get_cat_pic_attached($cat->term_id);\n\n ?>\n\n <form method=\"post\" enctype=\"multipart/form-data\">\n <input type=\"hidden\" value=\"<?php echo $cat->term_id ?>\" name=\"category_id\"/>\n <tr>\n <td><?php echo $cat->name ?></td>\n <td><?php if ($PricerrTheme_get_cat_pic_attached == false): ?>\n\n <input type=\"file\" name=\"category_image\" size=\"20\"/>\n\n <?php else: ?>\n <?php _e('Picture attached already.', 'PricerrTheme'); ?>\n <?php endif; ?>\n </td>\n <td>\n\n <?php if ($PricerrTheme_get_cat_pic_attached == false): ?>\n\n <input type=\"submit\" name=\"set_category_image\" size=\"20\" value=\"<?php _e('Upload Image', 'PricerrTheme'); ?>\"/>\n\n <?php else: ?>\n\n <img src=\"<?php echo PricerrTheme_generate_thumb2($PricerrTheme_get_cat_pic_attached, 40, 40); ?>\" width=\"40\" height=\"40\" class=\"crme_brullet\"/>\n <a href=\"\" onclick=\"return delete_this_my_pic('<?php echo $PricerrTheme_get_cat_pic_attached ?>')\">\n <img src=\"<?php bloginfo('template_url') ?>/images/delete.gif\" border=\"0\"/>\n </a>\n <?php endif; ?>\n\n </td>\n </tr>\n </form>\n\n <?php } ?>\n\n </table>\n <?php } ?>\n\n </div>\n\n <?php\n\n echo '</div>';\n\n}", "function surgeon_add_checkbox_image_field($post, $product_addons, $loop, $option) {\n wp_enqueue_media();\n ob_start();\n ?>\n <td class=\"checkbox_column\">\n <input type=\"hidden\" name=\"product_addon_option_image[<?php echo $loop; ?>][]\" value=\"<?php echo esc_attr( $option['image'] ); ?>\" class=\"image_attachment_id\" />\n <?php if (is_numeric($option['image'])) { \n $image_src = wp_get_attachment_image_src($option['image']);\n ?>\n <img class=\"image-preview\" src=\"<?php echo $image_src[0]; ?>\" width=\"60\" height=\"60\" style=\"max-height: 60px; width: 60px;\">\n <?php } ?>\n <input type=\"button\" class=\"button upload_image_button\" value=\"<?php _e( 'Upload image' ); ?>\" />\n </td>\n <?php\n $output = ob_get_clean();\n echo $output;\n\n}", "public function getChildSelectorName() {}", "private function getCategory()\n {\n $catobj = (object)Array();\n $catobj->preview = $this->getFilePath('preview');\n $catobj->category = $this->category_number;\n $catobj->html = $this->getContent();\n $catobj->googleFonts = [];\n $catobj->contentCss = $this->getFilePath('relative_css');\n $catobj->contentClass = $this->getCSSClass($this->getFilePath('css'));\n return $catobj;\n }", "function colorpicker_field_edit_category( $term ) { \r\n\t$color = get_term_meta( $term->term_id, '_category_color', true ); \r\n\t$color = ( ! empty( $color ) ) ? \"#{$color}\" : '#ffffff'; ?> \r\n\t<tr class=\"form-field term-colorpicker-wrap\"> \r\n\t<th scope=\"row\">\r\n\t<label for=\"term-colorpicker\">Select Color</label>\r\n\t</th> \r\n\t<td> \r\n\t<input name=\"_category_color\" value=\"<?php echo $color; ?>\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p class=\"description\">This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</td> \r\n\t</tr> <?php }", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryImageComponen()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.ImageComponentTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "function getCategorySelection() {\n\t\tif($this->conf['hideCategorySelection'])\n return '';\n\n\t\t$this->getCategoryQuery();\n\n\t\t$select_fields = \t'tx_tdcalendar_categories.uid';\n\t\t$select_fields .=\t', tx_tdcalendar_categories.title';\n\t\t$select_fields .=\t', tx_tdcalendar_categories.color';\n\n\t\t$from_table =\t\t'tx_tdcalendar_categories';\n\n\t\t$where_clause = \t'1';\n\t\t$where_clause .= \t$this->enableFieldsCategories;\n\t\t$where_clause .= \t$this->getCategoryQuery();\n\n\t\t$where_clause .=\t$this->getPagesQuery('tx_tdcalendar_categories');\n\n\t\t$orderBy =\t\t\t'tx_tdcalendar_categories.uid';\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t$select_fields,\n\t\t\t$from_table,\n\t\t\t$where_clause,\n\t\t\t$groupBy='',\n\t\t\t$orderBy,\n\t\t\t$limit=''\n\t\t);\n\n\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res) <= 1)\n\t\t\treturn '';\n\n\t\t$vars['category'] = 0;\n\n\t\t$cats = array();\n\t\t$cats[$this->pi_linkTP_keepPIvars_url($vars, $this->caching)] = $this->pi_getLL('allCats');\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\t\t\tif($this->conf['currCat']==$row['uid'])\n\t\t\t\t$sel=$row['title'];\n\t\t\t$vars['category']=$row['uid'];\n\t\t\t$cats[$this->pi_linkTP_keepPIvars_url($vars, $this->caching)] = $row['title'];\n }\n\n\t\treturn $this->selectInputOnChange('category', $cats, $sel ,\"document.location = '' + this.options[selectedIndex].value;\");\n\t}", "function getHomeCategoriesSelect()\n {\n return $this->getCategoryDropDown('frmDoSearch_Keyword_Category', 0, true);\n }", "public function getParentSelectorName() {}", "public function getViewedCategory();", "function CategoryForm() {\r\n\r\n\t\t$member = Member::currentUser();\r\n\r\n\t\t// Need to sort out how going to handle multiple instances of category\r\n\t\t// front end grid field : https://github.com/webbuilders-group/silverstripe-frontendgridfield\r\n\t\t// grid field extension : https://github.com/silverstripe-australia/silverstripe-gridfieldextensions\r\n\t\t$category = Category::get()->first();\r\n\t\t$fields = $category->FormFields();\r\n\r\n $actions = FieldList::create(\r\n FormAction::create(\"doCategoryForm\")->setTitle(\"Submit\")->addExtraClass('productive'),\r\n FormAction::create(\"cancel\")->setTitle(\"Cancel\")\r\n );\r\n\r\n $form = Form::create($this, 'CategoryForm', $fields, $actions);\r\n\r\n return $form;\r\n\r\n\t}", "public function getSelector()\n {\n return $this->Selector;\n }", "static function get_images_by_cat_id($post){\n\t\treturn self::$db->where('cat_id',$post)->get('stock')->row();\n\t}", "public function getParentSelectorName();", "public function getCategoryImageFileNameAttribute()\n {\n return $this->id . '-image.png';\n }", "protected\n\tfunction getOptions()\n\t{\n\n\t\t// Initialize variables.\n\t\t$session = Factory::getSession();\n\t\t$options = array();\n\n\t\t// Initialize some field attributes.\n\t\t$extension = $this->element['extension'] ? (string) $this->element['extension'] : (string) $this->element['scope'];\n\t\t$published = (string) $this->element['published'];\n\n\t\t// OLD values\n\t\t// Load the category options for a given extension.\n\t\tif (!empty($extension))\n\t\t{\n\n\t\t\t// Filter over published state or not depending upon if it is present.\n\t\t\tif ($published)\n\t\t\t{\n\t\t\t\t$options = HTMLHelper::_('category.options', $extension, array('filter.published' => explode(',', $published)));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$options = HTMLHelper::_('category.options', $extension);\n\t\t\t}\n\n\t\t\t// Verify permissions. If the action attribute is set, then we scan the options.\n\t\t\tif ($action = (string) $this->element['action'])\n\t\t\t{\n\n\t\t\t\t// Get the current user object.\n\t\t\t\t$user = Factory::getUser();\n\n\t\t\t\t// TODO: Add a preload method to Access so that we can get all the asset rules in one query and cache them.\n\t\t\t\t// eg Access::preload('core.create', 'com_content.category')\n\t\t\t\tforeach ($options as $i => $option)\n\t\t\t\t{\n\t\t\t\t\t// Unset the option if the user isn't authorised for it.\n\t\t\t\t\tif (!$user->authorise($action, $extension . '.category.' . $option->value))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($options[$i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFactory::getApplication()->enqueueMessage('500 - ' . Text::_('JLIB_FORM_ERROR_FIELDS_CATEGORY_ERROR_EXTENSION_EMPTY'), 'warning');\n\t\t}\n\n\t\t// if no value exists, try to load a selected filter category from the old category filters\n\t\tif (!$this->value && ($this->form instanceof Form))\n\t\t{\n\t\t\t$context = $this->form->getName();\n\t\t\t$this->value = array();\n\t\t\tfor ($i = 0; $i < 20; $i++)\n\t\t\t{\n\t\t\t\tif ($this->form->getValue(\"catid$i\", \"params\", 0))\n\t\t\t\t{\n\t\t\t\t\t$this->value[] = $this->form->getValue(\"catid$i\", \"params\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Merge any additional options in the XML definition.\n\t\t$options = array_merge(parent::getOptions(), $options);\n\n\t\treturn $options;\n\n\t}", "public function gallery_get_images_post()\n {\n $data['selected_id'] = $this->input->post('id', true);\n\n if ($data['selected_id'] == 0) {\n $data['images'] = $this->gallery_image_model->get_images();\n } else {\n $data['images'] = $this->gallery_image_model->get_images_by_category($data['selected_id']);\n }\n\n $data['categories'] = $this->gallery_category_model->get_categories();\n $this->load->view('blog/partials/_get_photos', $data);\n }", "public function getCategory()\n\t{\n\t\tglobal $jlistConfig;\n $options = '';\n \n if (!is_object($this->_item)) {\n\n\t\t\t$categories = JDCategories::getInstance('jdownloads', $options);\n\t\t\t$this->_item = $categories->get($this->getState('category.id', 'root'));\n\n\t\t\t// Compute selected asset permissions.\n\t\t\tif (is_object($this->_item)) {\n\t\t\t\t$user\t= JFactory::getUser();\n\t\t\t\t$userId\t= $user->get('id');\n\t\t\t\t$asset\t= 'com_jdownloads.category.'.$this->_item->id;\n\n\t\t\t\t// Check general create permission.\n\t\t\t\tif ($user->authorise('core.create', $asset)) {\n\t\t\t\t\t$this->_item->getParams()->set('access-create', true);\n\t\t\t\t}\n\n\t\t\t\t// TODO: Why aren't we lazy loading the children and siblings?\n\t\t\t\t$this->_children = $this->_item->getChildren();\n\t\t\t\t$this->_parent = false;\n\n\t\t\t\tif ($this->_item->getParent()) {\n\t\t\t\t\t$this->_parent = $this->_item->getParent();\n\t\t\t\t}\n\n\t\t\t\t$this->_rightsibling = $this->_item->getSibling();\n\t\t\t\t$this->_leftsibling = $this->_item->getSibling(false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_children = false;\n\t\t\t\t$this->_parent = false;\n\t\t\t}\n \n if (count($this->_children)){\n for ($i = 0; $i < count($this->_children); $i++) { \n if(isset($this->_children[$i])){\n // Get the tags\n $this->_children[$i]->tags = new JHelperTags;\n $this->_children[$i]->tags->getItemTags('com_jdownloads.category', $this->_children[$i]->id);\n }\n }\n }\n\t\t}\n\n\t\treturn $this->_item;\n\t}", "function extra_category_fields( $tag ) {\n\n\t// Get term id\n\t$tag_id\t\t= $tag->term_id;\n\t$term_meta\t= get_option( \"category_$tag_id\");\n\n\t// Category Style\n\t$style = isset ( $term_meta['athen_term_style'] ) ? $term_meta['athen_term_style'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_style\"><?php _e( 'Style', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_style]\" id=\"term_meta[term_style]\">\n\t\t\t<option value=\"\" <?php selected( $style ); ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"large-image\" <?php selected( $style, 'large-image' ); ?>><?php _e( 'Large Image', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"thumbnail\" <?php selected( $style, 'thumbnail' ); ?>><?php _e( 'Thumbnail', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"grid\" <?php selected( $style, 'grid' ); ?>><?php _e( 'Grid', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Grid Columns\n\t$grid_cols = isset ( $term_meta['athen_term_grid_cols'] ) ? $term_meta['athen_term_grid_cols'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_grid_cols\"><?php _e( 'Grid Columns', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_grid_cols]\" id=\"term_meta[athen_term_grid_cols]\">\n\t\t\t<option value=\"\" <?php selected( $grid_cols ); ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"4\" <?php selected( $grid_cols, 4 ) ?>>4</option>\n\t\t\t<option value=\"3\" <?php selected( $grid_cols, 3 ) ?>>3</option>\n\t\t\t<option value=\"2\" <?php selected( $grid_cols, 2 ) ?>>2</option>\n\t\t\t<option value=\"1\" <?php selected( $grid_cols, 1 ) ?>>1</option>\n\t\t</select>\n\t</td>\n\t</tr>\n\n\t<?php\n\t// Grid Style\n\t$grid_style = isset ( $term_meta['athen_term_grid_style'] ) ? $term_meta['athen_term_grid_style'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_grid_style\"><?php _e( 'Grid Style', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_grid_style]\" id=\"term_meta[athen_term_grid_style]\">\n\t\t\t<option value=\"\" <?php selected( $grid_style ) ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"fit-rows\" <?php selected( $grid_style, 'fit-rows' ) ?>><?php _e( 'Fit Rows', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"masonry\" <?php selected( $grid_style, 'masonry' ) ?>><?php _e( 'Masonry', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Layout Style\n\t$layout = isset ( $term_meta['athen_term_layout'] ) ? $term_meta['athen_term_layout'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_layout\"><?php _e( 'Layout', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_layout]\" id=\"term_meta[athen_term_layout]\">\n\t\t\t<option value=\"\" <?php selected( $layout ) ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"right-sidebar\" <?php selected( $layout, 'right-sidebar' ) ?>><?php _e( 'Right Sidebar', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"left-sidebar\" <?php selected( $layout, 'left-sidebar' ) ?>><?php _e( 'Left Sidebar', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"full-width\" <?php selected( $layout, 'full-width' ) ?>><?php _e( 'Full Width', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Pagination Type\n\t$pagination = isset ( $term_meta['athen_term_pagination'] ) ? $term_meta['athen_term_pagination'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_pagination\"><?php _e( 'Pagination', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_pagination]\" id=\"term_meta[athen_term_pagination]\">\n\t\t\t<option value=\"\" <?php echo ( $pagination == \"\") ? 'selected=\"selected\"': ''; ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"standard\" <?php selected( $pagination, 'standard' ) ?>><?php _e( 'Standard', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"infinite_scroll\" <?php selected( $pagination, 'infinite_scroll' ) ?>><?php _e( 'Inifinite Scroll', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"next_prev\" <?php selected( $pagination, 'next_prev' ) ?>><?php _e( 'Next/Previous', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Excerpt length\n\t$excerpt_length = isset ( $term_meta['athen_term_excerpt_length'] ) ? $term_meta['athen_term_excerpt_length'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_excerpt_length\"><?php _e( 'Excerpt Length', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_excerpt_length]\" id=\"term_meta[athen_term_excerpt_length]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $excerpt_length; ?>\">\n\t\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Posts Per Page\n\t$posts_per_page = isset ( $term_meta['athen_term_posts_per_page'] ) ? $term_meta['athen_term_posts_per_page'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_posts_per_page\"><?php _e( 'Posts Per Page', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_posts_per_page]\" id=\"term_meta[athen_term_posts_per_page]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $posts_per_page; ?>\">\n\t\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Image Width\n\t$athen_term_image_width = isset ( $term_meta['athen_term_image_width'] ) ? $term_meta['athen_term_image_width'] : '';?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_image_width\"><?php _e( 'Image Width', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_image_width]\" id=\"term_meta[athen_term_image_width]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $athen_term_image_width; ?>\">\n\t\t</td>\n\t</tr>\n\t\t\n\t<?php\n\t// Image Height\n\t$athen_term_image_height = isset ( $term_meta['athen_term_image_height'] ) ? $term_meta['athen_term_image_height'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_image_height\"><?php _e( 'Image Height', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_image_height]\" id=\"term_meta[athen_term_image_height]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $athen_term_image_height; ?>\">\n\t\t</td>\n\t</tr>\n<?php\n}", "function getElement(array $config, $options = array()){\n \n // die(var_dump($this->_value));\n \n if(empty($options['set'])){\n \n $element = new Zend_Form_Element_MultiCheckbox($config); \n $element->setDescription('Catergory Set Empty @todo click to edit');\n // $element->setMultiOptions($options);\n // echo debugArray($this->_value);\n // die(debugArray($config));\n //$element->setValue($this->_value);\n return $element;\n \n throw new InvalidArgumentException('Missing Set Id');\n }\n $service = new Content_Model_Category_Service();\n\n $objects = $service->getObjectsBySet($options['set']);\n $options = array();\n foreach($objects as $value){\n $options[$value->id] = $value->title;\n }\n \n $element = new Zend_Form_Element_MultiCheckbox($config); \n $element->setMultiOptions($options);\n // echo debugArray($this->_value);\n // die(debugArray($config));\n $element->setValue($this->_value);\n return $element;\n }" ]
[ "0.62970215", "0.62586004", "0.6227012", "0.57733345", "0.56803226", "0.56673837", "0.5647469", "0.5637749", "0.5631106", "0.56053597", "0.55868727", "0.55862486", "0.55563235", "0.55137765", "0.5445103", "0.54429305", "0.5440785", "0.5428641", "0.54227984", "0.53898305", "0.5370384", "0.5331752", "0.53148514", "0.53062683", "0.5296137", "0.5259856", "0.52558374", "0.5246756", "0.52417064", "0.52321017", "0.52298325", "0.5225191", "0.51865447", "0.5179011", "0.5172592", "0.514073", "0.51391894", "0.51309305", "0.5126503", "0.51166534", "0.51166534", "0.51158744", "0.510456", "0.510018", "0.5096931", "0.5091613", "0.50829625", "0.5076928", "0.50750196", "0.50702214", "0.50692266", "0.5064669", "0.50528926", "0.5042306", "0.50421095", "0.50277925", "0.50242865", "0.5019893", "0.50093585", "0.5001064", "0.4997466", "0.49968255", "0.49965945", "0.49965945", "0.49965945", "0.49965945", "0.49960983", "0.4992572", "0.49875733", "0.4986789", "0.49857205", "0.49802333", "0.49797735", "0.49756122", "0.49683583", "0.49680713", "0.49576032", "0.49490923", "0.49489295", "0.49473888", "0.49399534", "0.4938406", "0.4930045", "0.49297243", "0.4928996", "0.49250498", "0.4922242", "0.49214575", "0.4915779", "0.4914858", "0.4909482", "0.49094573", "0.49064726", "0.49060413", "0.48805144", "0.48783404", "0.48589772", "0.4852246", "0.4851539", "0.48515078" ]
0.7250795
0
get localised items from textpack
function abl_droploader_get_localisation() { $l10n = array( 'open' => '', 'open_title' => '', 'close' => '', 'close_title' => '', 'error_method' => '', 'info_text' => '', 'err_invalid_filetype' => '', 'err_browser_not_supported' => '', 'err_too_many_files' => '', 'err_file_too_large' => '', 'all_files_uploaded' => '', 'no_files_uploaded' => '', 'some_files_uploaded' => '', ); foreach ($l10n as $k => $v) { $l10n[$k] = gTxt('abl_droploader_' . $k); } return $l10n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetLocalizedTexts()\n\t{\n\t\t$result = $this->sendRequest(\"GetLocalizedTexts\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "private function extractGettextStrings()\n {\n $translation = null;\n $translationObjects = array();\n $lookupDirectories = array(\n Strata::getVendorPath() . 'strata-mvc' . DIRECTORY_SEPARATOR . 'strata' . DIRECTORY_SEPARATOR . 'src',\n Strata::getSrcPath(),\n Strata::getThemesPath(),\n );\n\n foreach ($lookupDirectories as $directory) {\n $translationObjects = $this->recurseThroughDirectory($directory);\n\n // Merge all translation objects into a bigger one\n foreach ($translationObjects as $t) {\n if (is_null($translation)) {\n $translation = $t;\n } else {\n $translation->mergeWith($t);\n }\n }\n }\n\n return $translation;\n }", "public function getMultilingual();", "public function getStrings ()\n {\n return $this->translate;\n }", "public function getLocalizedStringsList() {\n return $this->_get(1);\n }", "protected abstract function getTranslations();", "public function loc($mod){\n\n\t$loc = 'fr';\n\n\t$doc = new DOMDocument();\n\t$doc->preserveWhiteSpace = false;\n\t$doc->load(APP.'/module/core/config/language-'.$loc.'.xml');\n\n\t$items\t= array();\n\t$xpath \t= new DOMXPath($doc);\n\t$data\t= $xpath->query('/language/item');\n\n\tforeach($data as $e){\n\t\t$items[$e->getAttributeNode('key')->nodeValue] = utf8_decode($e->nodeValue);\n\t#\t$items[$e->getAttributeNode('key')->nodeValue] = $e->nodeValue;\n\t}\n\n\t# - - - - - - - - - - - - - - - - - - - - - - - -\t\n\n\t$xml = APP.'/module/'.$mod.'/config/language-'.$loc.'.xml';\n\n\tif(file_exists($xml)){\n\t\t$doc = new DOMDocument();\n\t\t$doc->preserveWhiteSpace = false;\n\t\t$doc->load($xml);\n\t\n\t\t$xpath \t= new DOMXPath($doc);\n\t\t$data\t= $xpath->query('/language/item');\n\t\n\t\tif($data->length > 0){\n\t\t\tforeach($data as $e){\n\t\t\t\t$items[$e->getAttributeNode('key')->nodeValue] = utf8_decode($e->nodeValue);\n\t\t\t#\t$items[$e->getAttributeNode('key')->nodeValue] = $e->nodeValue;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $items;\n}", "public function getTwords() {\n $this->tlist = getTranslatables($this->langtag);\n }", "protected function localizer() {\n\t\treturn wponion_localize()->as_array();\n\t}", "function getTranslationObject();", "function load_texts($file)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid language file found in language folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__LANGUAGE__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}", "public function translations() {\n return $this->client->get(self::$apiName, array());\n }", "function ting_ting_collection_convert_list() {\n return array(\n 'title_full' => t('Collection title and author names'),\n //'title' => t('Collection title'),\n );\n}", "function get_i18n_strings() {\n return [\n 'Results per row' => __( 'Results per row', 'fwp' ),\n 'Grid gap' => __( 'Grid gap', 'fwp' ),\n 'Text style' => __( 'Text style', 'fwp' ),\n 'Text color' => __( 'Text color', 'fwp' ),\n 'Font size' => __( 'Font size', 'fwp' ),\n 'Background color' => __( 'Background color', 'fwp' ),\n 'Border' => __( 'Border', 'fwp' ),\n 'Border style' => __( 'Border style', 'fwp' ),\n 'None' => __( 'None', 'fwp' ),\n 'Solid' => __( 'Solid', 'fwp' ),\n 'Dashed' => __( 'Dashed', 'fwp' ),\n 'Dotted' => __( 'Dotted', 'fwp' ),\n 'Double' => __( 'Double', 'fwp' ),\n 'Border color' => __( 'Border color', 'fwp' ),\n 'Border width' => __( 'Border width', 'fwp' ),\n 'Button text' => __( 'Button text', 'fwp' ),\n 'Button text color' => __( 'Button text color', 'fwp' ),\n 'Button padding' => __( 'Button padding', 'fwp' ),\n 'Separator' => __( 'Separator', 'fwp' ),\n 'Custom CSS' => __( 'Custom CSS', 'fwp' ),\n 'Column widths' => __( 'Column widths', 'fwp' ),\n 'Content' => __( 'Content', 'fwp' ),\n 'Image size' => __( 'Image size', 'fwp' ),\n 'Author field' => __( 'Author field', 'fwp' ),\n 'Display name' => __( 'Display name', 'fwp' ),\n 'User login' => __( 'User login', 'fwp' ),\n 'User ID' => __( 'User ID', 'fwp' ),\n 'Field type' => __( 'Field type', 'fwp' ),\n 'Text' => __( 'Text', 'fwp' ),\n 'Date' => __( 'Date', 'fwp' ),\n 'Number' => __( 'Number', 'fwp' ),\n 'Date format' => __( 'Date format', 'fwp' ),\n 'Input format' => __( 'Input format', 'fwp' ),\n 'Number format' => __( 'Number format', 'fwp' ),\n 'Link' => __( 'Link', 'fwp' ),\n 'Link type' => __( 'Link type', 'fwp' ),\n 'Post URL' => __( 'Post URL', 'fwp' ),\n 'Custom URL' => __( 'Custom URL', 'fwp' ),\n 'Open in new tab?' => __( 'Open in new tab?', 'fwp' ),\n 'Prefix' => __( 'Prefix', 'fwp' ),\n 'Suffix' => __( 'Suffix', 'fwp' ),\n 'Hide item?' => __( 'Hide item?', 'fwp' ),\n 'Padding' => __( 'Padding', 'fwp' ),\n 'Unique name' => __( 'Unique name', 'fwp' ),\n 'CSS class' => __( 'CSS class', 'fwp' ),\n 'Button Border' => __( 'Button border', 'fwp' ),\n 'Term URL' => __( 'Term URL', 'fwp' ),\n 'Fetch' => __( 'Fetch', 'fwp' ),\n 'All post types' => __( 'All post types', 'fwp' ),\n 'and show' => __( 'and show', 'fwp' ),\n 'per page' => __( 'per page', 'fwp' ),\n 'Sort by' => __( 'Sort by', 'fwp' ),\n 'Posts' => __( 'Posts', 'fwp' ),\n 'Post Title' => __( 'Post Title', 'fwp' ),\n 'Post Name' => __( 'Post Name', 'fwp' ),\n 'Post Type' => __( 'Post Type', 'fwp' ),\n 'Post Date' => __( 'Post Date', 'fwp' ),\n 'Post Modified' => __( 'Post Modified', 'fwp' ),\n 'Menu Order' => __( 'Menu Order', 'fwp' ),\n 'Custom Fields' => __( 'Custom Fields', 'fwp' ),\n 'Narrow results by' => __( 'Narrow results by', 'fwp' ),\n 'Hit Enter' => __( 'Hit Enter', 'fwp' ),\n 'Add sort' => __( 'Add sort', 'fwp' ),\n 'Add filter' => __( 'Add filter', 'fwp' ),\n 'Enter term slugs' => __( 'Enter term slugs', 'fwp' ),\n 'Enter values' => __( 'Enter values', 'fwp' ),\n 'Layout' => __( 'Layout', 'fwp' ),\n 'Content' => __( 'Content', 'fwp' ),\n 'Style' => __( 'Style', 'fwp' ),\n 'Advanced' => __( 'Advanced', 'fwp' ),\n 'Row' => __( 'Row', 'fwp' ),\n 'Column' => __( 'Column', 'fwp' ),\n 'Start typing' => __( 'Start typing', 'fwp' ),\n 'Label' => __( 'Label', 'fwp' ),\n 'Name' => __( 'Name', 'fwp' ),\n 'Facet type' => __( 'Facet type', 'fwp' ),\n 'Copy shortcode' => __( 'Copy shortcode', 'fwp' ),\n 'Data source' => __( 'Data source', 'fwp' ),\n 'Switch to advanced mode' => __( 'Switch to advanced mode', 'fwp' ),\n 'Switch to visual mode' => __( 'Switch to visual mode', 'fwp' ),\n 'Display' => __( 'Display', 'fwp' ),\n 'Query' => __( 'Query', 'fwp' ),\n 'Help' => __( 'Help', 'fwp' ),\n 'Display Code' => __( 'Display Code', 'fwp' ),\n 'Query Arguments' => __( 'Query Arguments', 'fwp' ),\n 'Saving' => __( 'Saving', 'fwp' ),\n 'Indexing' => __( 'Indexing', 'fwp' ),\n 'Indexing complete' => __( 'Indexing complete', 'fwp' ),\n 'Looking' => __( 'Looking', 'fwp' ),\n 'Purging' => __( 'Purging', 'fwp' ),\n 'Copied!' => __( 'Copied!', 'fwp' ),\n 'Press CTRL+C to copy' => __( 'Press CTRL+C to copy', 'fwp' ),\n 'Activating' => __( 'Activating', 'fwp' ),\n 'Re-index' => __( 'Re-index', 'fwp' ),\n 'Stop indexer' => __( 'Stop indexer', 'fwp' ),\n 'Loading' => __( 'Loading', 'fwp' ),\n 'Importing' => __( 'Importing', 'fwp' ),\n 'Convert to query args' => __( 'Convert to query args', 'fwp' )\n ];\n }", "function wp_get_installed_translations($type)\n {\n }", "public function localization() {\n\t\t\tload_plugin_textdomain( 'bitlive-custom-codes', false, __DIR__ . '/languages/' );\n\t\t}", "function wp_get_available_translations()\n {\n }", "function simplecontext_convert_list() {\n return array(\n 'item1' => t('Item1'),\n 'item2' => t('Item2'),\n 'description' => t('Description'),\n );\n}", "protected function translate(&$items)\n\t{\n\t\t$lang = JFactory::getLanguage();\n\t\t$clientPath = $this->getState('client_id') ? JPATH_ADMINISTRATOR : JPATH_SITE;\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$extension = $item->module;\n\t\t\t$source = $clientPath . \"/modules/$extension\";\n\t\t\t$lang->load(\"$extension.sys\", $clientPath, null, false, true)\n\t\t\t\t|| $lang->load(\"$extension.sys\", $source, null, false, true);\n\t\t\t$item->name = JText::_($item->name);\n\n\t\t\tif (is_null($item->pages))\n\t\t\t{\n\t\t\t\t$item->pages = JText::_('JNONE');\n\t\t\t}\n\t\t\telseif ($item->pages < 0)\n\t\t\t{\n\t\t\t\t$item->pages = JText::_('COM_MODULES_ASSIGNED_VARIES_EXCEPT');\n\t\t\t}\n\t\t\telseif ($item->pages > 0)\n\t\t\t{\n\t\t\t\t$item->pages = JText::_('COM_MODULES_ASSIGNED_VARIES_ONLY');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$item->pages = JText::_('JALL');\n\t\t\t}\n\t\t}\n\t}", "public function load_textdomain()\n {\n }", "function lang() {\r\n\t\t\tload_plugin_textdomain( 'rv-portfolio', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\r\n\t\t}", "public static function get_localized_data() {\n\t\treturn [\n\t\t\t'entities' => Entity::get_data_to_localize(),\n\t\t];\n\t}", "function i18n() {\n\tload_theme_textdomain( 'additive', ADDITIVE_PATH . '/languages' );\n }", "public function get_desired_languages();", "function localization() {\n load_plugin_textdomain( 'cynetique-labels', false, dirname( plugin_basename( __FILE__ ) ) . '/language/' );\n}", "public function languages();", "protected function getTranslateTools() {}", "function demos_convert_list() {\n return array(\n 'item1' => t('Item1'),\n 'item2' => t('Item2'),\n 'description' => t('Description'),\n );\n}", "protected function loadLocalization() {}", "public function translated();", "public function translated();", "function my_text_strings( $translated_text, $text, $domain ) {\n switch ( $translated_text ) {\n case 'Ver carrito' :\n $translated_text = __( 'Agregaste este producto ¿Quieres ver el Carrito?', 'woocommerce' );\n break;\n case 'Log in' :\n $translated_text = __( 'Entrar', 'woocommerce' );\n break;\n case 'Cart totals' :\n $translated_text = __( 'Total del carrito', 'woocommerce' );\n break;\n case 'Proceed to checkout' :\n $translated_text = __( 'Proceder a revision', 'woocommerce' );\n break;\n case 'Shipping' :\n $translated_text = __( 'Envio', 'woocommerce' );\n break;\n case 'Sort By' :\n $translated_text = __( 'Ordenar por', 'woocommerce' );\n break;\n case 'Price Range' :\n $translated_text = __( 'Rango de precio', 'woocommerce' );\n break;\n case 'Categories' :\n $translated_text = __( 'Categorias', 'woocommerce' );\n break;\n case 'None' :\n $translated_text = __( 'Ninguna', 'woocommerce' );\n break;\n case 'Review Count' :\n $translated_text = __( 'Recuento de revisión', 'woocommerce' );\n break;\n case 'Popularity' :\n $translated_text = __( 'Popularidad', 'woocommerce' );\n break;\n case 'Average rating' :\n $translated_text = __( 'Puntuación media', 'woocommerce' );\n break;\n case 'Newness' :\n $translated_text = __( 'Novedad', 'woocommerce' );\n break;\n case 'Price: low to high' :\n $translated_text = __( 'Precios de Menor a Mayor', 'woocommerce' );\n break;\n case 'Price: high to low' :\n $translated_text = __( 'Precio: de Mayor a Menor', 'woocommerce' );\n break;\n case 'Random Products' :\n $translated_text = __( 'Productos Aleatorios', 'woocommerce' );\n break;\n case 'Product Name' :\n $translated_text = __( 'Alfabeticamente', 'woocommerce' );\n break;\n case 'Related products' :\n $translated_text = __( 'Productos relacionados', 'woocommerce' );\n break;\n case 'has been added to your cart.' :\n $translated_text = __( 'Ha sido agregado a tu carro', 'woocommerce' );\n break;\n case 'Company name' :\n $translated_text = __( 'Nombre de empresa', 'woocommerce' );\n break;\n case '(optional)' :\n $translated_text = __( '(Opcional)', 'woocommerce' );\n break;\n case 'Street address' :\n $translated_text = __( 'Dirección', 'woocommerce' );\n break;\n case 'Apartment, suite, unit etc. (optional)' :\n $translated_text = __( 'Apartamento, suite, unidad, etc. (opcional)', 'woocommerce' );\n break;\n case 'Email address' :\n $translated_text = __( 'Dirección de correo electrónico', 'woocommerce' );\n break;\n case 'Ship to a different address?' :\n $translated_text = __( '¿Envia a una direccion diferente?', 'woocommerce' );\n break;\n case 'Notes about your order, e.g. special notes for delivery.' :\n $translated_text = __( 'Notas especiales para la entrega.', 'woocommerce' );\n break;\n case 'Shipping' :\n $translated_text = __( 'Envio', 'woocommerce' );\n break;\n\n case 'Billing details' :\n $translated_text = __( 'Detalles de facturación', 'woocommerce' );\n break;\n case 'Direct bank transfer' :\n $translated_text = __( 'Transferencia bancaria directa', 'woocommerce' );\n break;\n case 'Gracias. Tu pedido ha sido recibido.' :\n $translated_text = __( '¡Gracias por su compra!. Su pedido ha sido recibido con exito. Si precisa cualquier aclaracion o tiene alguna duda, use el formulario de CONTACTANOS para hacernos llegar su consulta. En breve nos pondremos en contacto con usted para confirmar su pedido y cuando le sera enviado. ', 'woocommerce' );\n break;\n case 'PayPal Express Checkout' :\n $translated_text = __( 'PayPal Pago exprés', 'woocommerce' );\n break;\n \n case 'privacy policy' :\n $translated_text = __( 'Politicas de Privacidad', 'woocommerce' );\n break;\n\n case 'Continue to payment' :\n $translated_text = __( 'Continuar con el pago', 'woocommerce' );\n break;\n case 'Undo?' :\n $translated_text = __( '¿Deshacer?', 'woocommerce' );\n break;\n case 'Return to shop' :\n $translated_text = __( 'Tienda', 'woocommerce' );\n break;\n case 'From your account dashboard you can view your ':\n $translated_text = __( 'Desde el panel de su cuenta puede ver su', 'woocommerce-page' );\n break;\n case 'recent orders':\n $translated_text = __( 'ordenes recientes', 'woocommerce-page' );\n break;\n case ', manage your ':\n $translated_text = __( 'administrar su', 'woocommerce-page' );\n break;\n }\n return $translated_text;\n}", "function load_text() {\n if (empty($this->grade_grades_text)) {\n $this->grade_grades_text = grade_grades_text::fetch('itemid', $this->itemid, 'userid', $this->userid);\n }\n return $this->grade_grades_text;\n }", "function localisation_sc_map() {\n\treturn vdsl_get_template( 'archive-retailers.php' );\n}", "public function getTextItems()\n {\n $parameters = func_get_args();\n\n //set parameter values\n if (count($parameters) == 1) {\n $pageNumber = $parameters[0];\n } else if (count($parameters) == 2) {\n $pageNumber = $parameters[0];\n $fragmentNumber = $parameters[1];\n }\n\n\n $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName();\n if (isset($parameters[0])) {\n $strURI .= '/pages/' . $pageNumber;\n if (isset($parameters[1])) {\n $strURI .= '/fragments/' . $fragmentNumber;\n }\n }\n $strURI .= '/TextItems';\n $signedURI = Utils::sign($strURI);\n\n $responseStream = Utils::processCommand($signedURI, 'GET', '', '');\n\n $json = json_decode($responseStream);\n\n return $json->TextItems->List;\n }", "function getAll()\r\n\t\t{\r\n\t\t\treturn $this->lang;\r\n\t\t}", "public function WordCollection()\n {\n $myWords = parent::WordCollection();\n\n if(!$myWords->loadedFromFile())\n {\n // English Words\n $myWords->addText(\"en-us\", \"TITLE\", \"Module Login\");\n\n // Portuguese Words\n $myWords->addText(\"pt-br\", \"TITLE\", \"Módulo de Login\");\n }\n\n return $myWords;\n }", "function fusion_app_textdomain_strings() {\n\n\tglobal $fusion_settings;\n\tif ( ! $fusion_settings ) {\n\t\t$fusion_settings = Fusion_Settings::get_instance();\n\t}\n\n\t$text_strings = [\n\n\t\t'custom_css' => esc_html__( 'Custom CSS', 'fusion-builder' ),\n\t\t'builder' => esc_html__( 'Builder', 'fusion-builder' ),\n\t\t'library' => esc_html__( 'Library', 'fusion-builder' ),\n\t\t'add_css_code_here' => esc_html__( 'Add your CSS code here...', 'fusion-builder' ),\n\t\t'delete_page_layout' => esc_html__( 'Delete page layout', 'fusion-builder' ),\n\t\t'undo' => esc_html__( 'Undo', 'fusion-builder' ),\n\t\t'redo' => esc_html__( 'Redo', 'fusion-builder' ),\n\t\t'save' => esc_html__( 'Save', 'fusion-builder' ),\n\t\t'dont_save' => esc_html__( 'Don\\'t Save', 'fusion-builder' ),\n\t\t'leave' => esc_html__( 'Save & Leave', 'fusion-builder' ),\n\t\t'just_leave' => esc_html__( 'Just Leave', 'fusion-builder' ),\n\t\t'delete_item' => esc_html__( 'Delete item', 'fusion-builder' ),\n\t\t'clone_item' => esc_html__( 'Clone item', 'fusion-builder' ),\n\t\t'edit_item' => esc_html__( 'Edit item', 'fusion-builder' ),\n\t\t'element_settings' => esc_html__( 'Element Options', 'fusion-builder' ),\n\t\t/* translators: Element settings. */\n\t\t'custom_element_settings' => esc_html__( '%s Options', 'fusion-builder' ),\n\t\t'full_width_section' => esc_html__( 'Container', 'fusion-builder' ),\n\t\t'section_settings' => esc_html__( 'Container Options', 'fusion-builder' ),\n\t\t'insert_section' => esc_html__( 'Insert Container', 'fusion-builder' ),\n\t\t'clone_section' => esc_html__( 'Clone Container', 'fusion-builder' ),\n\t\t'save_section' => esc_html__( 'Save Container', 'fusion-builder' ),\n\t\t'delete_section' => esc_html__( 'Delete Container', 'fusion-builder' ),\n\t\t'builder_sections' => esc_html__( 'Builder Containers', 'fusion-builder' ),\n\t\t'click_to_toggle' => esc_html__( 'Click to toggle', 'fusion-builder' ),\n\t\t'save_custom_section' => esc_html__( 'Save Custom Container', 'fusion-builder' ),\n\t\t'save_custom_template' => esc_html__( 'Save Custom Template', 'fusion-builder' ),\n\t\t'save_custom_section_info' => esc_html__( 'Custom containers will be stored and managed on the Library tab', 'fusion-builder' ),\n\t\t'enter_name' => esc_html__( 'Enter Name...', 'fusion-builder' ),\n\t\t'column' => esc_html__( 'Column', 'fusion-builder' ),\n\t\t'columns' => esc_html__( 'Columns', 'fusion-builder' ),\n\t\t'resize_column' => esc_html__( 'Resize column', 'fusion-builder' ),\n\t\t'resized_column' => esc_html__( 'Resized Column to', 'fusion-builder' ),\n\t\t'column_library' => esc_html__( 'Column Options', 'fusion-builder' ),\n\t\t'clone_column' => esc_html__( 'Clone column', 'fusion-builder' ),\n\t\t'save_column' => esc_html__( 'Save column', 'fusion-builder' ),\n\t\t'delete_column' => esc_html__( 'Delete column', 'fusion-builder' ),\n\t\t'delete_row' => esc_html__( 'Delete row', 'fusion-builder' ),\n\t\t'clone_column' => esc_html__( 'Clone column', 'fusion-builder' ),\n\t\t'save_custom_column' => esc_html__( 'Save Custom Column', 'fusion-builder' ),\n\t\t'save_custom_column_info' => esc_html__( 'Custom elements will be stored and managed on the Library tab', 'fusion-builder' ),\n\t\t'add_element' => esc_html__( 'Add element', 'fusion-builder' ),\n\t\t'element' => esc_html__( 'Element', 'fusion-builder' ),\n\t\t'insert_columns' => esc_html__( 'Insert Columns', 'fusion-builder' ),\n\t\t'search' => esc_html__( 'Search', 'fusion-builder' ),\n\t\t'search_elements' => esc_html__( 'Search Elements', 'fusion-builder' ),\n\t\t'search_containers' => esc_html__( 'Search Containers', 'fusion-builder' ),\n\t\t'search_columns' => esc_html__( 'Search Columns', 'fusion-builder' ),\n\t\t'builder_columns' => esc_html__( 'Builder Columns', 'fusion-builder' ),\n\t\t'library_columns' => esc_html__( 'Library Columns', 'fusion-builder' ),\n\t\t'library_sections' => esc_html__( 'Library Containers', 'fusion-builder' ),\n\t\t'cancel' => esc_html__( 'Cancel', 'fusion-builder' ),\n\t\t'select_element' => esc_html__( 'Select Element', 'fusion-builder' ),\n\t\t'builder_elements' => esc_html__( 'Builder Elements', 'fusion-builder' ),\n\t\t'layout_section_elements' => esc_html__( 'Layout Section Elements', 'fusion-builder' ),\n\t\t'library_elements' => esc_html__( 'Library Elements', 'fusion-builder' ),\n\t\t'generator_elements_tooltip' => esc_html__( 'Inline element for usage in the Fusion Builder Generator.', 'fusion-builder' ),\n\t\t'template_max_use_limit' => esc_html__( 'This element can be added only', 'fusion-builder' ),\n\t\t'time' => esc_html__( 'time.', 'fusion-builder' ),\n\t\t'times' => esc_html__( 'times.', 'fusion-builder' ),\n\t\t'inner_columns' => esc_html__( 'Nested Columns', 'fusion-builder' ),\n\t\t'element_settings' => esc_html__( 'Element Options', 'fusion-builder' ),\n\t\t'clone_element' => esc_html__( 'Clone Element', 'fusion-builder' ),\n\t\t'save_element' => esc_html__( 'Save Element', 'fusion-builder' ),\n\t\t'save_global' => esc_html__( 'Save As Global', 'fusion-builder' ),\n\t\t'delete_element' => esc_html__( 'Delete Element', 'fusion-builder' ),\n\t\t'save_custom_element' => esc_html__( 'Save Custom Element', 'fusion-builder' ),\n\t\t'save_custom_element_info' => esc_html__( 'Custom elements will be stored and managed on the Library tab', 'fusion-builder' ),\n\t\t'add_edit_items' => esc_html__( 'Add / Edit Items', 'fusion-builder' ),\n\t\t'sortable_items_info' => esc_html__( 'Add or edit new items for this element. Drag and drop them into the desired order.', 'fusion-builder' ),\n\t\t'delete_inner_columns' => esc_html__( 'Delete inner columns', 'fusion-builder' ),\n\t\t'clone_inner_columns' => esc_html__( 'Clone inner columns', 'fusion-builder' ),\n\t\t'save_inner_columns' => esc_html__( 'Save inner columns', 'fusion-builder' ),\n\t\t'delete_inner_columns' => esc_html__( 'Delete inner columns', 'fusion-builder' ),\n\t\t'save_nested_columns' => esc_html__( 'Save Nested Columns', 'fusion-builder' ),\n\t\t'select_options_or_leave_blank_for_all' => esc_html__( 'Select or Leave Blank for All', 'fusion-builder' ),\n\t\t'select_categories_or_leave_blank_for_all' => esc_html__( 'Select or Leave Blank for All', 'fusion-builder' ),\n\t\t'select_categories_or_leave_blank_for_none' => esc_html__( 'Select or Leave Blank for None', 'fusion-builder' ),\n\t\t'select_post_status_leave_blank_for_publish' => esc_html__( 'Select or Leave Blank for Published', 'fusion-builder' ),\n\t\t'please_enter_element_name' => esc_html__( 'Please enter element name', 'fusion-builder' ),\n\t\t'are_you_sure_you_want_to_delete_this_layout' => esc_html__( 'You are about to remove all page layout. Do you still want to proceed?', 'fusion-builder' ),\n\t\t'are_you_sure_you_want_to_delete_this' => esc_html__( 'Are you sure you want to delete this ?', 'fusion-builder' ),\n\t\t'are_you_sure_you_want_to_delete_global' => esc_html__( 'This is a global item. Deleting this element will remove it from every page you have it on. Are you sure you want to remove it?', 'fusion-builder' ),\n\t\t'global_element' => __( 'Global element<br>Click to disable global status', 'fusion-builder' ),\n\t\t'global_column' => __( 'Global column<br>Click to disable global status', 'fusion-builder' ),\n\t\t'global_container' => __( 'Global container<br>Click to disable global status', 'fusion-builder' ),\n\t\t'duplicate_element_name_error' => esc_html__( 'An element with this name already exists. Please enter different name.', 'fusion-builder' ),\n\t\t'please_enter_template_name' => esc_html__( 'Please enter template name', 'fusion-builder' ),\n\t\t'save_page_layout' => esc_html__( 'Save page layout', 'fusion-builder' ),\n\t\t'upload' => esc_html__( 'Upload', 'fusion-builder' ),\n\t\t'upload_image' => esc_html__( 'Upload Image', 'fusion-builder' ),\n\t\t'upload_audio' => esc_html__( 'Upload Audio', 'fusion-builder' ),\n\t\t'edit' => esc_html__( 'Edit', 'fusion-builder' ),\n\t\t'remove' => esc_html__( 'Remove', 'fusion-builder' ),\n\t\t'attach_images' => esc_html__( 'Attach Images to Gallery', 'fusion-builder' ),\n\t\t'insert' => esc_html__( 'Insert', 'fusion-builder' ),\n\t\t'pre_built_page' => esc_html__( 'Pre-Built Page', 'fusion-builder' ),\n\t\t'to_get_started' => esc_html__( 'To get started, add a Container, or add a pre-built page.', 'fusion-builder' ),\n\t\t'to_get_started_ptb' => esc_html__( 'To get started building your Page Title Bar, add a container.', 'fusion-builder' ),\n\t\t'to_get_started_footer' => esc_html__( 'To get started building your Footer, add a container.', 'fusion-builder' ),\n\t\t'to_get_started_sub' => esc_html__( 'The building process always starts with a container, then columns, then elements.', 'fusion-builder' ),\n\t\t'watch_the_video' => esc_html__( 'Watch The Video!', 'fusion-builder' ),\n\t\t'edit_settings' => esc_html__( 'Edit Settings', 'fusion-builder' ),\n\t\t'backward_history' => esc_html__( 'Backward History', 'fusion-builder' ),\n\t\t'duplicate_content' => esc_html__( 'Duplicate Content', 'fusion-builder' ),\n\t\t'forward_history' => esc_html__( 'Forward History', 'fusion-builder' ),\n\t\t'save_custom_content' => esc_html__( 'Save Custom Content', 'fusion-builder' ),\n\t\t'delete_content' => esc_html__( 'Delete Content', 'fusion-builder' ),\n\t\t'add_content' => esc_html__( 'Add Content', 'fusion-builder' ),\n\t\t'additional_docs' => esc_html__( 'Click the ? icon to view additional documentation', 'fusion-builder' ),\n\t\t'getting_started_video' => esc_html__( 'Getting Started Video', 'fusion-builder' ),\n\t\t'icon_control_description' => esc_html__( 'Icon Control Descriptions:', 'fusion-builder' ),\n\t\t'history' => esc_html__( 'History', 'fusion-builder' ),\n\t\t'collapse_sections' => esc_html__( 'Collapse Sections', 'fusion-builder' ),\n\t\t'history_states' => esc_html__( 'History States', 'fusion-builder' ),\n\t\t'empty' => esc_html__( 'Start', 'fusion-builder' ),\n\t\t'moved_column' => esc_html__( 'Moved Column', 'fusion-builder' ),\n\t\t'added_custom_element' => esc_html__( 'Added Custom Element: ', 'fusion-builder' ),\n\t\t'added_custom_column' => esc_html__( 'Added Custom Column: ', 'fusion-builder' ),\n\t\t'added_columns' => esc_html__( 'Added Columns', 'fusion-builder' ),\n\t\t'added_custom_section' => esc_html__( 'Added Custom Container: ', 'fusion-builder' ),\n\t\t'deleted' => esc_html__( 'Deleted', 'fusion-builder' ),\n\t\t'cloned' => esc_html__( 'Cloned', 'fusion-builder' ),\n\t\t'pasted' => esc_html__( 'Pasted', 'fusion-builder' ),\n\t\t'pasted' => esc_html__( 'Pasted', 'fusion-builder' ),\n\t\t'moved' => esc_html__( 'Moved', 'fusion-builder' ),\n\t\t'edited' => esc_html__( 'Edited', 'fusion-builder' ),\n\t\t'reset_to_default' => esc_html__( 'Reset to Default', 'fusion-builder' ),\n\t\t'added_nested_columns' => esc_html__( 'Added Nested Columns', 'fusion-builder' ),\n\t\t'edited_nested_columns' => esc_html__( 'Edited Nested Columns', 'fusion-builder' ),\n\t\t'deleted_nested_columns' => esc_html__( 'Deleted Nested Columns', 'fusion-builder' ),\n\t\t'moved_nested_column' => esc_html__( 'Moved Nested Column', 'fusion-builder' ),\n\t\t'head_title' => esc_html__( 'Head Title', 'fusion-builder' ),\n\t\t'currency' => esc_html__( 'Currency', 'fusion-builder' ),\n\t\t'price' => esc_html__( 'Price', 'fusion-builder' ),\n\t\t'period' => esc_html__( 'Period', 'fusion-builder' ),\n\t\t'enter_text' => esc_html__( 'Enter Text', 'fusion-builder' ),\n\t\t'added' => esc_html__( 'Added', 'fusion-builder' ),\n\t\t'added_section' => esc_html__( 'Added Container', 'fusion-builder' ),\n\t\t'cloned_nested_columns' => esc_html__( 'Cloned Nested Columns', 'fusion-builder' ),\n\t\t'content_imported' => esc_html__( 'Content Imported', 'fusion-builder' ),\n\t\t'table_intro' => esc_html__( 'Visually create your table below, add or remove rows and columns', 'fusion-builder' ),\n\t\t'add_table_column' => esc_html__( 'Add Column', 'fusion-builder' ),\n\t\t'add_table_row' => esc_html__( 'Add Row', 'fusion-builder' ),\n\t\t'column_title' => esc_html__( 'Column', 'fusion-builder' ),\n\t\t'standout_design' => esc_html__( 'Standout', 'fusion-builder' ),\n\t\t'add_button' => esc_html__( 'Add Button', 'fusion-builder' ),\n\t\t'yes' => esc_html__( 'Yes', 'fusion-builder' ),\n\t\t'no' => esc_html__( 'No', 'fusion-builder' ),\n\t\t'table_options' => esc_html__( 'Table Options', 'fusion-builder' ),\n\t\t'table' => esc_html__( 'Table', 'fusion-builder' ),\n\t\t'toggle_all_sections' => esc_html__( 'Toggle All Containers', 'fusion-builder' ),\n\t\t'cloned_section' => esc_html__( 'Cloned Container', 'fusion-builder' ),\n\t\t'deleted_section' => esc_html__( 'Deleted Container', 'fusion-builder' ),\n\t\t'image' => esc_html__( 'Image', 'fusion-builder' ),\n\t\t'audio' => esc_html__( 'Audio', 'fusion-builder' ),\n\t\t'select_image' => esc_html__( 'Select Image', 'fusion-builder' ),\n\t\t'select_audio' => esc_html__( 'Select Image', 'fusion-builder' ),\n\t\t'select_images' => esc_html__( 'Select Images', 'fusion-builder' ),\n\t\t'select_video' => esc_html__( 'Select Video', 'fusion-builder' ),\n\t\t'select_audio' => esc_html__( 'Select Audio', 'fusion-builder' ),\n\t\t'select_icon' => esc_html__( 'Select Icon', 'fusion-builder' ),\n\t\t'search_icons' => esc_html__( 'Search Icons', 'fusion-builder' ),\n\t\t'empty_section' => esc_html__( 'To Add Elements, You Must First Add a Column', 'fusion-builder' ),\n\t\t'empty_section_with_bg' => esc_html__( 'This is an empty container with a background image. To add elements, you must first add a column', 'fusion-builder' ),\n\t\t/* translators: Child element name. */\n\t\t'empty_parent' => esc_html__( 'Empty %s element, please add child elements here.', 'fusion-builder' ),\n\t\t'to_add_images' => esc_html__( 'To add images to this post or page for attachments layout, navigate to \"Upload Files\" tab in media manager and upload new images.', 'fusion-builder' ),\n\t\t'importing_single_page' => esc_html__( 'WARNING: Importing a single demo page will remove all other page content, fusion page options and page template. Fusion Theme Options and demo images are not imported. Click OK to continue or cancel to stop.', 'fusion-builder' ),\n\t\t'content_error_title' => esc_html__( 'Content Error', 'fusion-builder' ),\n\t\t/* translators: Link URL. */\n\t\t'content_error_description' => sprintf( __( 'Your page content could not be displayed as a Fusion Builder layout. Most likely that means, there is some invalid markup or shortcode in it. Please check the contents in the text editor. <a href=\"%s\" target=\"_blank\">See here for more information</a>.', 'fusion-builder' ), 'https://theme-fusion.com/documentation/fusion-builder/technical/page-content-not-parsable-fusion-builder/' ),\n\t\t'unknown_error_title' => esc_html__( 'Unknown Error Occurred', 'fusion-builder' ),\n\t\t/* translators: Link URL. */\n\t\t'unknown_error_link' => sprintf( __( '<a href=\"%s\" target=\"_blank\">Click here to learn more.</a>', 'fusion-builder' ), '#' ),\n\t\t'unknown_error_copy' => esc_html__( 'Click here to copy the full error message.', 'fusion-builder' ),\n\t\t'unknown_error_copied' => esc_html__( 'Full error message copied.', 'fusion-builder' ),\n\t\t'moved_container' => esc_html__( 'Moved Container', 'fusion-builder' ),\n\t\t'currency_before' => esc_html__( 'Before', 'fusion-builder' ),\n\t\t'currency_after' => esc_html__( 'After', 'fusion-builder' ),\n\t\t'delete_nextpage' => esc_html__( 'Delete Next Page Divider', 'fusion-builder' ),\n\t\t'toggle_element' => esc_html__( 'Toggle Element', 'fusion-builder' ),\n\t\t'drag_element' => esc_html__( 'Drag Element', 'fusion-builder' ),\n\t\t'deleted_nextpage' => esc_html__( 'Deleted Next Page Divider', 'fusion-builder' ),\n\t\t'added_nextpage' => esc_html__( 'Added Next Page Divider', 'fusion-builder' ),\n\t\t'nextpage' => esc_html__( 'Next Page', 'fusion-builder' ),\n\t\t'library_misc' => esc_html__( 'Special', 'fusion-builder' ),\n\t\t'special_title' => esc_html__( 'Special Items', 'fusion-builder' ),\n\t\t'special_description' => esc_html__( 'The next page item allows you to break your page into several pages. Simply insert it onto the page, and automatic pagination will show on the frontend.', 'fusion-builder' ),\n\t\t'select_link' => esc_html__( 'Select Link', 'fusion-builder' ),\n\t\t'color_palette_options' => esc_html__( 'Color palette options', 'fusion-builder' ),\n\t\t'background_color' => esc_html__( 'Background Color', 'fusion-builder' ),\n\t\t'border_color' => esc_html__( 'Border Color', 'fusion-builder' ),\n\t\t'legend_text_color' => esc_html__( 'Legend Value Text Color', 'fusion-builder' ),\n\t\t'enter_value' => esc_html__( 'Enter Value', 'fusion-builder' ),\n\t\t'legend_label' => esc_html__( 'Legend Label', 'fusion-builder' ),\n\t\t'x_axis_label' => esc_html__( 'X Axis Label', 'fusion-builder' ),\n\t\t/* translators: Search type. */\n\t\t'search_placeholder' => esc_html__( 'Search %s', 'fusion-builder' ),\n\t\t'chart_bg_color_title' => esc_html__( 'Chart Background Color', 'fusion-builder' ),\n\t\t/* translators: Default value description & value. */\n\t\t'chart_bg_color_desc' => sprintf( __( 'Controls the background of the chart. %s', 'fusion-builder' ), $fusion_settings->get_default_description( 'chart_bg_color', '', 'color-alpha', true, '' ) ),\n\t\t'chart_axis_text_color_title' => esc_html__( 'Chart Axis Text Color', 'fusion-builder' ),\n\t\t/* translators: Default value description & value. */\n\t\t'chart_axis_text_color_desc' => sprintf( __( 'Controls the text color of the x-axis and y-axis. %s', 'fusion-builder' ), $fusion_settings->get_default_description( 'chart_axis_text_color', '', 'color-alpha', true, '' ) ),\n\t\t'chart_gridline_color_title' => esc_html__( 'Chart Gridline Color', 'fusion-builder' ),\n\t\t/* translators: Default value description & value. */\n\t\t'chart_gridline_color_desc' => sprintf( __( 'Controls the color of the chart background grid lines and values. %s', 'fusion-builder' ), $fusion_settings->get_default_description( 'chart_gridline_color', '', 'color-alpha', true, '' ) ),\n\t\t'chart_padding_title' => esc_html__( 'Chart Padding Options', 'fusion-builder' ),\n\t\t'chart_padding_desc' => esc_html__( 'Controls the top/right/bottom/left padding of the chart.', 'fusion-builder' ),\n\t\t'chart_options' => esc_html__( 'Chart Options', 'fusion-builder' ),\n\t\t'chart' => esc_html__( 'Chart Data', 'fusion-builder' ),\n\t\t'chart_border_size_heading' => esc_html__( 'Border Size', 'fusion-builder' ),\n\t\t'chart_border_size_desc ' => esc_html__( 'Set chart border size in pixels.', 'fusion-builder' ),\n\t\t'chart_intro' => esc_html__( 'Visually create your chart data below, add or remove data sets and their styling', 'fusion-builder' ),\n\t\t'chart_intro_fe' => esc_html__( 'Visually create your chart data below', 'fusion-builder' ),\n\t\t'chart_bars_note' => __( '<strong>IMPORTANT NOTE:</strong> If you are using a <strong>Bar</strong> or <strong>Horizontal Bar Chart</strong>, the table interface below and available options will change depending on the number of datasets added. This setup is needed in order to ensure maximum flexibility for your chart styling.', 'fusion-builder' ),\n\t\t'add_chart_column' => esc_html__( '+ Add Value Column', 'fusion-builder' ),\n\t\t'add_chart_row' => esc_html__( '+ Add Data Set', 'fusion-builder' ),\n\t\t'chart_dataset' => esc_html__( 'Data Set', 'fusion-builder' ),\n\t\t'chart_dataset_styling' => esc_html__( 'Data Set Styling', 'fusion-builder' ),\n\t\t'chart_value_set_styling' => esc_html__( 'Value Set Styling', 'fusion-builder' ),\n\t\t'chart_table_button_desc' => esc_html__( 'Build your chart data visually', 'fusion-builder' ),\n\t\t'chart_table_button_text' => esc_html__( 'Edit Chart Data Table', 'fusion-builder' ),\n\t\t'user_login_register_note' => esc_html__( 'Registration confirmation will be emailed to you.', 'fusion-builder' ),\n\t\t'are_you_sure_you_want_to_remove_global' => esc_html__( 'Are you sure you want to remove global property?', 'fusion-builder' ),\n\t\t'remove_global' => esc_html__( 'Remove Global?', 'fusion-builder' ),\n\t\t'removed_global' => esc_html__( 'Removed Global Status', 'fusion-builder' ),\n\t\t'container_draft' => esc_html__( 'Draft container.', 'fusion-builder' ),\n\t\t'container_scheduled' => esc_html__( 'Scheduled container.', 'fusion-builder' ),\n\t\t'container_publish' => esc_html__( 'Click to remove sheduling.', 'fusion-builder' ),\n\t\t'are_you_sure_you_want_to_publish' => esc_html__( 'Are you sure you want to remove sheduling? This will set the container to be a normally published element.', 'fusion-builder' ),\n\t\t'container_published' => esc_html__( 'Container published.', 'fusion-builder' ),\n\t\t'on' => esc_html__( 'On', 'fusion-builder' ),\n\t\t'off' => esc_html__( 'Off', 'fusion-builder' ),\n\t\t'get_started_video' => esc_html__( 'Watch Our Get Started Video', 'fusion-builder' ),\n\t\t'get_started_video_description' => esc_html__( 'Do you need a helping hand? Let us guide you.', 'fusion-builder' ),\n\t\t'watch_the_video_link' => esc_html__( 'Watch The Video', 'fusion-builder' ),\n\t\t'fusion_builder_docs' => esc_html__( 'Fusion Builder Docs', 'fusion-builder' ),\n\t\t'fusion_builder_docs_description' => esc_html__( 'Videos not for you? That\\'s ok! We have you covered.', 'fusion-builder' ),\n\t\t'fusion_panel_desciption_toggle' => esc_html__( 'Toggle Description', 'fusion-builder' ),\n\t\t'fusion_dimension_top_label' => esc_html__( 'Top', 'fusion-builder' ),\n\t\t'fusion_dimension_bottom_label' => esc_html__( 'Bottom', 'fusion-builder' ),\n\t\t'fusion_dimension_left_label' => esc_html__( 'Left', 'fusion-builder' ),\n\t\t'fusion_dimension_right_label' => esc_html__( 'Right', 'fusion-builder' ),\n\t\t'fusion_dimension_height_label' => esc_html__( 'Height', 'fusion-builder' ),\n\t\t'fusion_dimension_width_label' => esc_html__( 'Width', 'fusion-builder' ),\n\t\t'fusion_dimension_top_left_label' => esc_html__( 'Top/Left', 'fusion-builder' ),\n\t\t'fusion_dimension_top_right_label' => esc_html__( 'Top/Right', 'fusion-builder' ),\n\t\t'fusion_dimension_bottom_left_label' => esc_html__( 'Bot/Left', 'fusion-builder' ),\n\t\t'fusion_dimension_bottom_right_label' => esc_html__( 'Bot/Right', 'fusion-builder' ),\n\t\t'fusion_dimension_all_label' => esc_html__( 'All', 'fusion-builder' ),\n\t\t'confirm' => esc_html__( 'Confirm', 'fusion-builder' ),\n\t\t'unsaved_changes' => esc_html__( 'Unsaved Changes', 'fusion-builder' ),\n\t\t'changes_will_be_lost' => esc_html__( 'Your changes will be lost, do you want to save changes before leaving?', 'fusion-builder' ),\n\t\t'reset' => esc_html__( 'Reset', 'fusion-builder' ),\n\t\t'reset_element_options' => esc_html__( 'Reset to Defaults', 'fusion-builder' ),\n\t\t'reset_element_options_confirmation' => esc_html__( 'Are you sure you want to reset this element\\'s options to default?', 'fusion-builder' ),\n\t\t'remove_element_options_confirmation' => esc_html__( 'Are you sure you want to delete this element?', 'fusion-builder' ),\n\t\t'i_agree' => esc_html__( 'I agree', 'fusion-builder' ),\n\t\t'are_you_sure' => esc_html__( 'Are you sure?', 'fusion-builder' ),\n\t\t'im_sure' => esc_html__( 'I\\'m sure', 'fusion-builder' ),\n\t\t'ok' => esc_html__( 'Ok', 'fusion-builder' ),\n\t\t'import_demo_page' => esc_html__( 'Import Demo Page', 'fusion-builder' ),\n\t\t'extended_options' => esc_html__( 'Extended options', 'fusion-builder' ),\n\t\t'align_text' => esc_html__( 'Align text', 'fusion-builder' ),\n\t\t'align_left' => esc_html__( 'Align left', 'fusion-builder' ),\n\t\t'align_center' => esc_html__( 'Align center', 'fusion-builder' ),\n\t\t'align_right' => esc_html__( 'Align right', 'fusion-builder' ),\n\t\t'align_justify' => esc_html__( 'Justify', 'fusion-builder' ),\n\t\t'indent' => esc_html__( 'Indent', 'fusion-builder' ),\n\t\t'outdent' => esc_html__( 'Outdent', 'fusion-builder' ),\n\t\t'accept' => esc_html__( 'Accept', 'fusion-builder' ),\n\t\t'typography' => esc_html__( 'Typography', 'fusion-builder' ),\n\t\t'typography_settings' => esc_html__( 'Settings', 'fusion-builder' ),\n\t\t'typography_family' => esc_html__( 'Family', 'fusion-builder' ),\n\t\t'typography_tag' => esc_html__( 'Tag', 'fusion-builder' ),\n\t\t'typography_fontsize' => esc_html__( 'Font Size', 'fusion-builder' ),\n\t\t'typography_lineheight' => esc_html__( 'Line Height', 'fusion-builder' ),\n\t\t'typography_letterspacing' => esc_html__( 'Letter Spacing', 'fusion-builder' ),\n\t\t'typography_variant' => esc_html__( 'Variant', 'fusion-builder' ),\n\t\t'typography_subset' => esc_html__( 'Subset', 'fusion-builder' ),\n\t\t'typography_default' => esc_html__( 'Default', 'fusion-builder' ),\n\t\t'font_color' => esc_html__( 'Font color', 'fusion-builder' ),\n\t\t'inline_element_edit' => esc_html__( 'Edit Inline Element', 'fusion-builder' ),\n\t\t'inline_element_remove' => esc_html__( 'Remove Inline Element', 'fusion-builder' ),\n\t\t'inline_element_delete' => esc_html__( 'Delete All', 'fusion-builder' ),\n\t\t'delete' => esc_html__( 'Delete', 'fusion-builder' ),\n\t\t'preview_mode' => esc_html__( 'Preview Mode', 'fusion-builder' ),\n\t\t'preview_mode_notice' => esc_html__( 'Please beware that editing options are limited on this mode. All open dialogs and panels will be closed.', 'fusion-builder' ),\n\t\t'multi_dialogs' => esc_html__( 'Multiple Dialogs', 'fusion-builder' ),\n\t\t'multi_dialogs_notice' => esc_html__( 'Please close other open dialogs first to use this option.', 'fusion-builder' ),\n\t\t'widget' => esc_html__( 'Widget', 'fusion-builder' ),\n\t\t'select_widget' => esc_html__( 'No widget selected. Edit to select widget type.', 'fusion-builder' ),\n\n\t\t/* translators: Add unknown element type. */\n\t\t'add_unknown' => esc_html__( 'Add %s', 'fusion-builder' ),\n\t\t'link_options' => esc_html__( 'Link Options', 'fusion-builder' ),\n\t\t'open_in_new_tab' => esc_html__( 'Open Link in New Tab', 'fusion-builder' ),\n\t\t'clear' => esc_html__( 'Clear', 'fusion-builder' ),\n\t\t'remove_format' => esc_html__( 'Remove formatting', 'fusion-builder' ),\n\t\t'gallery_placeholder' => esc_html__( 'Please add a gallery image here.', 'fusion-builder' ),\n\t\t'slider_placeholder' => esc_html__( 'Please select a slider for it to display here.', 'fusion-builder' ),\n\t\t'form_placeholder' => esc_html__( 'Please select a form for it to display here.', 'fusion-builder' ),\n\t\t'video_placeholder' => esc_html__( 'Please add a video here.', 'fusion-builder' ),\n\t\t'search_results' => esc_html__( 'Search Results', 'fusion-builder' ),\n\t\t'problem_saving' => esc_html__( 'Page Save Incomplete', 'fusion-builder' ),\n\t\t'changes_not_saved' => esc_html__( 'Not all content has saved correctly. Click ok to return to the page editor and try again.', 'fusion-builder' ),\n\t\t'page_save_failed' => esc_html__( 'Page Save Failed', 'fusion-builder' ),\n\t\t'authentication_no_heartbeat' => esc_html__( 'Security nonce check failed. Attempts to reconnect were also unsuccessful. Please ensure WordPress Heartbeat is not disabled.', 'fusion-builder' ),\n\t\t'layout_cleared' => esc_html__( 'Layout cleared.', 'fusion-builder' ),\n\t\t'remove' => esc_html__( 'Remove', 'fusion-builder' ),\n\t\t'enter_value' => esc_attr__( 'Enter value', 'fusion-builder' ),\n\t\t'import_failed' => esc_attr__( 'Import Failed', 'fusion-builder' ),\n\t\t'import_failed_description' => esc_attr__( 'Please check that the file selected is valid JSON. Click ok to return to the page editor and try again.', 'fusion-builder' ),\n\t\t'saved' => esc_attr__( 'Saved', 'fusion-builder' ),\n\t\t'as_global' => esc_attr__( 'As global', 'fusion-builder' ),\n\t\t'front_end_redirect_confirm' => esc_html__( 'This action will redirect you to the front-end builder. All unsaved changes will be lost. Are you sure?', 'fusion-builder' ),\n\t\t'duplicate_slider_revolution' => esc_html__( 'Duplicate Slider Revolution detected. Duplicate sliders will not be rendered whilst in the live editor.', 'fusion-builder' ),\n\t\t/* Translators: List of tags. */\n\t\t'tags' => esc_html__( 'Tags: %s', 'fusion-builder' ),\n\t\t'other' => esc_html__( 'Other', 'fusion-builder' ),\n\t\t'dynamic_data' => esc_html__( 'Dynamic Data', 'fusion-builder' ),\n\t\t'select_dynamic_content' => esc_html__( 'Select Dynamic Content', 'fusion-builder' ),\n\t\t'custom_fonts' => esc_html__( 'Custom Font(s)', 'fusion-builder' ),\n\t\t'add_new' => esc_html__( 'Add New', 'fusion-builder' ),\n\t\t'add' => esc_html__( 'Add', 'fusion-builder' ),\n\t\t'separate_with_comma' => esc_html__( 'Separate with Commas', 'fusion-builder' ),\n\t\t'previous' => esc_html__( 'Previous', 'fusion-builder' ),\n\t\t'next' => esc_html__( 'Next', 'fusion-builder' ),\n\t\t'related_posts' => esc_html__( 'Related Posts', 'fusion-builder' ),\n\t\t'related_projects' => esc_html__( 'Related Projects', 'fusion-builder' ),\n\t\t'related_faqs' => esc_html__( 'Related Faqs', 'fusion-builder' ),\n\t\t'project_details' => esc_html__( 'Project Details', 'fusion-builder' ),\n\t\t'add_custom_icon_set' => esc_html__( 'Add Custom Icon Set', 'fusion-builder' ),\n\t\t'edit_layout_section' => esc_html__( 'Edit Layout Section', 'fusion-builder' ),\n\t\t'edit_content_layout_section' => esc_html__( 'Edit Content Layout Section', 'fusion-builder' ),\n\t\t'edit_footer_layout_section' => esc_html__( 'Edit Footer Layout Section', 'fusion-builder' ),\n\t\t'dynamic_source' => esc_html__( 'Set dynamic content to update preview source.', 'fusion-builder' ),\n\n\t\t/* translators: The iconset name. */\n\t\t'no_results_in' => esc_html__( 'No Results in \"%s\"', 'fusion-builder' ),\n\t];\n\n\treturn $text_strings;\n}", "public function wpl_toolskit_load_textdomain() {\n\t\tload_plugin_textdomain( 'medical-toolskit', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );\t\n\t}", "protected function getLanguages() {}", "public function messages()\n {\n $pieces = explode('\\\\', __CLASS__);\n $pack = mb_strtolower($pieces[1]);\n // dddx($pieces);\n $pieces = \\array_slice($pieces, 3);\n $pieces = collect($pieces)->map(\n function ($item) {\n return snake_case($item);\n }\n )->all();\n $trad_name = $pack.'::'.implode('.', $pieces);\n $trad = trans($trad_name);\n if (! \\is_array($trad)) {\n // dddx($trad_name.' is not an array');\n $trad = [];\n }\n $tradGeneric = trans('ui::generic'); // deve funzionare anche senza il pacchetto \"food\", invece \"extend\" e' un pacchetto primario\n if (! \\is_array($tradGeneric)) {\n $tradGeneric = [];\n }\n $trad = array_merge($tradGeneric, $trad);\n\n return $trad;\n }", "function GetLocalizedTextsByType($textTypes)\n\t{\n\t\t$result = $this->sendRequest(\"GetLocalizedTextsByType\", array(\"TextTypes\"=>$textTypes));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function i18n() {\n\tload_theme_textdomain( 'project', Project_PATH . '/languages' );\n }", "function i18n() {\n\tload_theme_textdomain( 'wpd', WPDOC_HLTR_PATH . '/languages' );\n}", "public function getTranslations()\n {\n }", "function getStrings() {\n\t\tglobal $app_strings;\n\n\t\t$ret = array(\n\t\t\t'strings' => array()\n\t\t);\n\n\t\tforeach($app_strings as $k => $v) {\n\t\t\tif(strpos($k, \"LBL_ROUTING_\") !== false) {\n\t\t\t\t$ret['strings'][$k] = $v;\n\t\t\t}\n\t\t}\n\n\t\t// matchDom\n\t\t$ret['matchDom'] = $this->getMatchDOM();\n\n\t\t// matchTypeDOM\n\t\t$ret['matchTypeDom'] = $this->getMatchTypeDOM();\n\n\t\t// get actions\n\t\t$ret['actions'] = $this->getActionsDOM();\n\n\t\treturn $ret;\n\t}", "function load_t2s_text(){\n\tglobal $config, $t2s_langfile, $t2s_text_stand, $templatepath;\n\t\n\tif (file_exists($templatepath.'/lang/'.$t2s_langfile)) {\n\t\t$TL = parse_ini_file($templatepath.'/lang/'.$t2s_langfile, true);\n\t} else {\n\t\tLOGGING(\"For selected T2S language no translation file still exist! Please go to LoxBerry Plugin translation and create a file for selected language \".substr($config['TTS']['messageLang'],0,2),3);\n\t\texit;\n\t}\n\treturn $TL;\n}", "public function redq_support_multilanguages()\n {\n load_plugin_textdomain('redq-rental', false, dirname(plugin_basename(__FILE__)) . '/languages/');\n }", "function positive_panels_lang(){\n\tload_textdomain('positive-panels', 'lang/positive-panels.mo');\n}", "function l(){\n\tglobal $_LOCALE;\n\t\n\t$entry = $_LOCALE;\n\t$args = func_get_args();\n\t\n\tfor($i = 0; $i < count($args); $i++){\n\t\t$key = $args[$i];\n\t\tif ( array_key_exists($key, $entry) ) {\n\t\t\t$entry = $entry[$key];\n\t\t\tif ( ! is_array($entry) )\n\t\t\t\tbreak;\n\t\t} else {\n\t\t\t$entry = 'Missing entry in language file: ' . join(' → ', array_slice($args, 0, $i + 1));\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t$format_args = array_slice($args, $i + 1);\n\treturn (is_string($entry) and count($format_args) > 0) ? vsprintf($entry, $format_args) : $entry;\n}", "function GetLocalizedTextList($localizedTextIds)\n\t{\n\t\t$result = $this->sendRequest(\"GetLocalizedTextList\", array(\"LocalizedTextIds\"=>$localizedTextIds));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function get_translatable_documents($icl_post_types)\n {\n }", "function translation() {\n\t\t\n\t\t// only use, if we have it...\n\t\tif( function_exists('load_plugin_textdomain') ) {\n\t\t\n\t\t\t// load it\n\t\t\tload_plugin_textdomain( \n\t\t\t\n\t\t\t\t// unique name\n\t\t\t\t'cp-multisite', \n\t\t\t\t\n\t\t\t\t// deprecated argument\n\t\t\t\tfalse,\n\t\t\t\t\n\t\t\t\t// path to directory containing translation files\n\t\t\t\tplugin_dir_path( CPMU_PLUGIN_FILE ) . 'languages/'\n\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static function get_strings($config_id = 'global')\n {\n\n $translation_strings = array(\n 'background-color' => esc_attr__('Background Color', 'materialis'),\n 'background-image' => esc_attr__('Background Image', 'materialis'),\n 'no-repeat' => esc_attr__('No Repeat', 'materialis'),\n 'repeat-all' => esc_attr__('Repeat All', 'materialis'),\n 'repeat-x' => esc_attr__('Repeat Horizontally', 'materialis'),\n 'repeat-y' => esc_attr__('Repeat Vertically', 'materialis'),\n 'inherit' => esc_attr__('Inherit', 'materialis'),\n 'background-repeat' => esc_attr__('Background Repeat', 'materialis'),\n 'cover' => esc_attr__('Cover', 'materialis'),\n 'contain' => esc_attr__('Contain', 'materialis'),\n 'background-size' => esc_attr__('Background Size', 'materialis'),\n 'fixed' => esc_attr__('Fixed', 'materialis'),\n 'scroll' => esc_attr__('Scroll', 'materialis'),\n 'background-attachment' => esc_attr__('Background Attachment', 'materialis'),\n 'left-top' => esc_attr__('Left Top', 'materialis'),\n 'left-center' => esc_attr__('Left Center', 'materialis'),\n 'left-bottom' => esc_attr__('Left Bottom', 'materialis'),\n 'right-top' => esc_attr__('Right Top', 'materialis'),\n 'right-center' => esc_attr__('Right Center', 'materialis'),\n 'right-bottom' => esc_attr__('Right Bottom', 'materialis'),\n 'center-top' => esc_attr__('Center Top', 'materialis'),\n 'center-center' => esc_attr__('Center Center', 'materialis'),\n 'center-bottom' => esc_attr__('Center Bottom', 'materialis'),\n 'background-position' => esc_attr__('Background Position', 'materialis'),\n 'background-opacity' => esc_attr__('Background Opacity', 'materialis'),\n 'on' => esc_attr__('ON', 'materialis'),\n 'off' => esc_attr__('OFF', 'materialis'),\n 'all' => esc_attr__('All', 'materialis'),\n 'cyrillic' => esc_attr__('Cyrillic', 'materialis'),\n 'cyrillic-ext' => esc_attr__('Cyrillic Extended', 'materialis'),\n 'devanagari' => esc_attr__('Devanagari', 'materialis'),\n 'greek' => esc_attr__('Greek', 'materialis'),\n 'greek-ext' => esc_attr__('Greek Extended', 'materialis'),\n 'khmer' => esc_attr__('Khmer', 'materialis'),\n 'latin' => esc_attr__('Latin', 'materialis'),\n 'latin-ext' => esc_attr__('Latin Extended', 'materialis'),\n 'vietnamese' => esc_attr__('Vietnamese', 'materialis'),\n 'hebrew' => esc_attr__('Hebrew', 'materialis'),\n 'arabic' => esc_attr__('Arabic', 'materialis'),\n 'bengali' => esc_attr__('Bengali', 'materialis'),\n 'gujarati' => esc_attr__('Gujarati', 'materialis'),\n 'tamil' => esc_attr__('Tamil', 'materialis'),\n 'telugu' => esc_attr__('Telugu', 'materialis'),\n 'thai' => esc_attr__('Thai', 'materialis'),\n 'serif' => _x('Serif', 'font style', 'materialis'),\n 'sans-serif' => _x('Sans Serif', 'font style', 'materialis'),\n 'monospace' => _x('Monospace', 'font style', 'materialis'),\n 'font-family' => esc_attr__('Font Family', 'materialis'),\n 'font-size' => esc_attr__('Font Size', 'materialis'),\n 'mobile-font-size' => esc_attr__('Mobile Font Size', 'materialis'),\n 'font-weight' => esc_attr__('Font Weight', 'materialis'),\n 'line-height' => esc_attr__('Line Height', 'materialis'),\n 'font-style' => esc_attr__('Font Style', 'materialis'),\n 'letter-spacing' => esc_attr__('Letter Spacing', 'materialis'),\n 'top' => esc_attr__('Top', 'materialis'),\n 'bottom' => esc_attr__('Bottom', 'materialis'),\n 'left' => esc_attr__('Left', 'materialis'),\n 'right' => esc_attr__('Right', 'materialis'),\n 'center' => esc_attr__('Center', 'materialis'),\n 'justify' => esc_attr__('Justify', 'materialis'),\n 'color' => esc_attr__('Color', 'materialis'),\n 'add-image' => esc_attr__('Add Image', 'materialis'),\n 'change-image' => esc_attr__('Change Image', 'materialis'),\n 'no-image-selected' => esc_attr__('No Image Selected', 'materialis'),\n 'add-file' => esc_attr__('Add File', 'materialis'),\n 'change-file' => esc_attr__('Change File', 'materialis'),\n 'no-file-selected' => esc_attr__('No File Selected', 'materialis'),\n 'remove' => esc_attr__('Remove', 'materialis'),\n 'select-font-family' => esc_attr__('Select a font-family', 'materialis'),\n 'variant' => esc_attr__('Variant', 'materialis'),\n 'subsets' => esc_attr__('Subset', 'materialis'),\n 'size' => esc_attr__('Size', 'materialis'),\n 'height' => esc_attr__('Height', 'materialis'),\n 'spacing' => esc_attr__('Spacing', 'materialis'),\n 'ultra-light' => esc_attr__('Thin (100)', 'materialis'),\n 'ultra-light-italic' => esc_attr__('Thin (100) Italic', 'materialis'),\n 'light' => esc_attr__('Extra light (200)', 'materialis'),\n 'light-italic' => esc_attr__('Extra light (200) Italic', 'materialis'),\n 'book' => esc_attr__('Light (300)', 'materialis'),\n 'book-italic' => esc_attr__('Light (300) Italic', 'materialis'),\n 'regular' => esc_attr__('Normal (400)', 'materialis'),\n 'italic' => esc_attr__('Normal (400) Italic', 'materialis'),\n 'medium' => esc_attr__('Medium (500)', 'materialis'),\n 'medium-italic' => esc_attr__('Medium (500) Italic', 'materialis'),\n 'semi-bold' => esc_attr__('Semi Bold (600)', 'materialis'),\n 'semi-bold-italic' => esc_attr__('Semi Bold (600) Italic', 'materialis'),\n 'bold' => esc_attr__('Bold (700)', 'materialis'),\n 'bold-italic' => esc_attr__('Bold (700) Italic', 'materialis'),\n 'extra-bold' => esc_attr__('Extra Bold (800)', 'materialis'),\n 'extra-bold-italic' => esc_attr__('Extra Bold (800) Italic', 'materialis'),\n 'ultra-bold' => esc_attr__('Black (900)', 'materialis'),\n 'ultra-bold-italic' => esc_attr__('Black (900) Italic', 'materialis'),\n 'invalid-value' => esc_attr__('Invalid Value', 'materialis'),\n 'add-new' => esc_attr__('Add new', 'materialis'),\n 'row' => esc_attr__('row', 'materialis'),\n 'limit-rows' => esc_attr__('Limit: %s rows', 'materialis'),\n 'open-section' => esc_attr__('Press return or enter to open this section', 'materialis'),\n 'back' => esc_attr__('Back', 'materialis'),\n 'reset-with-icon' => sprintf(esc_attr__('%s Reset', 'materialis'), '<span class=\"dashicons dashicons-image-rotate\"></span>'),\n 'text-align' => esc_attr__('Text Align', 'materialis'),\n 'text-transform' => esc_attr__('Text Transform', 'materialis'),\n 'none' => esc_attr__('None', 'materialis'),\n 'capitalize' => esc_attr__('Capitalize', 'materialis'),\n 'uppercase' => esc_attr__('Uppercase', 'materialis'),\n 'lowercase' => esc_attr__('Lowercase', 'materialis'),\n 'initial' => esc_attr__('Initial', 'materialis'),\n 'select-page' => esc_attr__('Select a Page', 'materialis'),\n 'open-editor' => esc_attr__('Open Editor', 'materialis'),\n 'close-editor' => esc_attr__('Close Editor', 'materialis'),\n 'switch-editor' => esc_attr__('Switch Editor', 'materialis'),\n 'hex-value' => esc_attr__('Hex Value', 'materialis'),\n 'addwebfont' => esc_attr__('Add Web Font', 'materialis'),\n );\n\n // Apply global changes from the kirki/config filter.\n // This is generally to be avoided.\n // It is ONLY provided here for backwards-compatibility reasons.\n // Please use the kirki/{$config_id}/l10n filter instead.\n $config = apply_filters('kirki/config', array());\n if (isset($config['i18n'])) {\n $translation_strings = wp_parse_args($config['i18n'], $translation_strings);\n }\n\n // Apply l10n changes using the kirki/{$config_id}/l10n filter.\n return apply_filters('kirki/' . $config_id . '/l10n', $translation_strings);\n\n }", "function load_textdomain(){\n\t\tload_theme_textdomain('wa_wcc_txt', get_template_directory() . '/lang/');\n\t}", "public function get_localization_strings() {\n\n return response()->json([\n 'file_type_error' => trans('asset_library_videospheres_controller.file_type_error'),\n 'file_size_error' => trans('asset_library_videospheres_controller.file_size_error'),\n 'file_ext_error' => trans('asset_library_videospheres_controller.file_ext_error'),\n 'vr_view' => trans('template_asset_library_videospheres.vr_view'),\n 'edit' => trans('template_asset_library_videospheres.edit'),\n 'insert' => trans('template_asset_library_videospheres.insert'),\n 'save' => trans('template_asset_library_videospheres.save'),\n 'saved' => trans('template_asset_library_videospheres.saved'),\n ]);\n }", "function includeLocalLang()\t{\n\t\t$llFile = t3lib_extMgm::extPath('f2contentce').'Resources/Private/Language/locallang.xml';\n\t\t$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);\n\t\treturn $LOCAL_LANG;\n\t}", "protected function getPreviewLanguages() {}", "public function getTranslationsForKey($key);", "function freeproduct_textdomain() {\n\tload_plugin_textdomain( 'woocommerce-freeproduct', false, basename( dirname( __FILE__ ) ) . '/lang' );\n}", "public function initLocalization() {\n $moFiles = scandir(trailingslashit($this->dir) . 'languages/');\n foreach ($moFiles as $moFile) {\n if (strlen($moFile) > 3 && substr($moFile, -3) == '.mo' && strpos($moFile, get_locale()) > -1) {\n load_textdomain('WP_Visual_Chat', trailingslashit($this->dir) . 'languages/' . $moFile);\n }\n }\n }", "function languages() {\n load_plugin_textdomain('wcpdomain', false, dirname(plugin_basename(__FILE__)) . '/languages');\n }", "public function getPageTexts($language);", "function kino_load_textdomain() {\n\t\t\t\t\t\t\n\t\t\t// BP group announcements\n\t\t\tload_plugin_textdomain( \n\t\t\t\t'bpga',\n\t\t\t\tfalse, \n\t\t\t\t'kinogeneva-translations/languages/'\n\t\t\t);\n\t\t\t\n\t\t\t// BP group calendar\n\t\t\tload_plugin_textdomain( \n\t\t\t\t'groupcalendar',\n\t\t\t\tfalse, \n\t\t\t\t'kinogeneva-translations/languages/'\n\t\t\t);\n\t\t\t\n\t\t\t// BuddyPress Group Email Subscription\n\t\t\tload_plugin_textdomain( \n\t\t\t\t'bp-ass',\n\t\t\t\tfalse, \n\t\t\t\t'kinogeneva-translations/languages/'\n\t\t\t);\n\t\t\t\n\n}", "function languages()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['languages'] == 1 ) ? 'Language String' : 'Language Strings';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t\n\t\t$api = $this->ipsclass->load_class( IPS_API_PATH.'/api_language.php', 'api_language' );\n\t\t$api->path_to_ipb = ROOT_PATH;\n\t\t$api->api_init();\n\t\t\n\t\tforeach ( $this->xml_array['languages_group']['language'] as $k => $v )\n\t\t{\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$api->lang_add_strings( array( $v['key']['VALUE'] => $v['text']['VALUE'] ), $v['file']['VALUE'] );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ( $this->ipsclass->cache['languages'] as $kk => $vv )\n\t\t\t\t{\n\t\t\t\t\t$lang = array();\n\t\t\t\t\trequire( CACHE_PATH.'cache/lang_cache/'.$vv['ldir'].'/'.$v['file']['VALUE'].'.php' );\n\t\t\t\t\t\n\t\t\t\t\tunset( $lang[ $v['key']['VALUE'] ] );\n\t\t\t\t\t\n\t\t\t\t\t$start = \"<?php\\n\\n\".'$lang = array('.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $lang as $kkk => $vvv )\n\t\t\t\t\t{\n\t\t\t\t\t\t$vvv = preg_replace( \"/\\n{1,}$/\", \"\", $vvv );\n\t\t\t\t\t\t$vvv \t= stripslashes( $vvv );\n\t\t\t\t\t\t$vvv\t= preg_replace( '/\"/', '\\\\\"', $vvv );\n\t\t\t\t\t\t$start .= \"\\n'\".$kkk.\"' => \\\"\".$vvv.\"\\\",\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$start .= \"\\n\\n);\\n\\n?\".\">\";\n\t\t\t\t\t\n\t\t\t\t\tif ( $fh = @fopen( CACHE_PATH.'cache/lang_cache/'.$vv['ldir'].'/'.$v['file']['VALUE'].'.php', 'w' ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t@fwrite( $fh, $start );\n\t\t\t\t\t\t@fclose( $fh );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tunset( $lang, $start, $fh );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['languages']} {$object} {$operation}....\" );\n\t}", "protected function extract_strings() {\n\t\t$translations = new Translations();\n\n\t\t// Add existing strings first but don't keep headers.\n\t\tif ( ! empty( $this->merge ) ) {\n\t\t\t$existing_translations = new Translations();\n\t\t\tPo::fromFile( $this->merge, $existing_translations );\n\t\t\t$translations->mergeWith( $existing_translations, Merge::ADD | Merge::REMOVE );\n\t\t}\n\n\t\tPotGenerator::setCommentBeforeHeaders( $this->get_file_comment() );\n\n\t\t$this->set_default_headers( $translations );\n\n\t\t// POT files have no Language header.\n\t\t$translations->deleteHeader( Translations::HEADER_LANGUAGE );\n\n\t\t// Only relevant for PO files, not POT files.\n\t\t$translations->setHeader( 'PO-Revision-Date', 'YEAR-MO-DA HO:MI+ZONE' );\n\n\t\tif ( $this->domain ) {\n\t\t\t$translations->setDomain( $this->domain );\n\t\t}\n\n\t\tunset( $this->main_file_data['Version'], $this->main_file_data['License'], $this->main_file_data['Domain Path'], $this->main_file_data['Text Domain'] );\n\n\t\t$is_theme = isset( $this->main_file_data['Theme Name'] );\n\n\t\t// Set entries from main file data.\n\t\tforeach ( $this->main_file_data as $header => $data ) {\n\t\t\tif ( empty( $data ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$translation = new Translation( '', $data );\n\n\t\t\tif ( $is_theme ) {\n\t\t\t\t$translation->addExtractedComment( sprintf( '%s of the theme', $header ) );\n\t\t\t} else {\n\t\t\t\t$translation->addExtractedComment( sprintf( '%s of the plugin', $header ) );\n\t\t\t}\n\n\t\t\t$translations[] = $translation;\n\t\t}\n\n\t\ttry {\n\t\t\tif ( ! $this->skip_php ) {\n\t\t\t\t$options = [\n\t\t\t\t\t// Extract 'Template Name' headers in theme files.\n\t\t\t\t\t'wpExtractTemplates' => $is_theme,\n\t\t\t\t\t// Extract 'Title' and 'Description' headers from pattern files.\n\t\t\t\t\t'wpExtractPatterns' => $is_theme,\n\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t'extensions' => [ 'php' ],\n\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t];\n\t\t\t\tPhpCodeExtractor::fromDirectory( $this->source, $translations, $options );\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_blade ) {\n\t\t\t\t$options = [\n\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t'extensions' => [ 'blade.php' ],\n\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t];\n\t\t\t\tBladeCodeExtractor::fromDirectory( $this->source, $translations, $options );\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_js ) {\n\t\t\t\tJsCodeExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'js', 'jsx' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\tMapCodeExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'map' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_block_json ) {\n\t\t\t\tBlockExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'schema' => JsonSchemaExtractor::BLOCK_JSON_SOURCE,\n\t\t\t\t\t\t'schemaFallback' => JsonSchemaExtractor::BLOCK_JSON_FALLBACK,\n\t\t\t\t\t\t// Only look for block.json files, nothing else.\n\t\t\t\t\t\t'restrictFileNames' => [ 'block.json' ],\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'json' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( ! $this->skip_theme_json ) {\n\t\t\t\t// This will look for the top-level theme.json file, as well as\n\t\t\t\t// any JSON file within the top-level styles/ directory.\n\t\t\t\tThemeJsonExtractor::fromDirectory(\n\t\t\t\t\t$this->source,\n\t\t\t\t\t$translations,\n\t\t\t\t\t[\n\t\t\t\t\t\t'schema' => JsonSchemaExtractor::THEME_JSON_SOURCE,\n\t\t\t\t\t\t'schemaFallback' => JsonSchemaExtractor::THEME_JSON_FALLBACK,\n\t\t\t\t\t\t'include' => $this->include,\n\t\t\t\t\t\t'exclude' => $this->exclude,\n\t\t\t\t\t\t'extensions' => [ 'json' ],\n\t\t\t\t\t\t'addReferences' => $this->location,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\tWP_CLI::error( $e->getMessage() );\n\t\t}\n\n\t\tforeach ( $this->exceptions as $file => $exception_translations ) {\n\t\t\t/** @var Translation $exception_translation */\n\t\t\tforeach ( $exception_translations as $exception_translation ) {\n\t\t\t\tif ( ! $translations->find( $exception_translation ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( $this->subtract_and_merge ) {\n\t\t\t\t\t$translation = $translations[ $exception_translation->getId() ];\n\t\t\t\t\t$exception_translation->mergeWith( $translation );\n\t\t\t\t}\n\n\t\t\t\tunset( $translations[ $exception_translation->getId() ] );\n\t\t\t}\n\n\t\t\tif ( $this->subtract_and_merge ) {\n\t\t\t\tPotGenerator::toFile( $exception_translations, $file );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $this->skip_audit ) {\n\t\t\t$this->audit_strings( $translations );\n\t\t}\n\n\t\treturn $translations;\n\t}", "public function getSystemLanguages() {}", "public function getLanguageList();", "public function getLanguages() {}", "public function getSystemLanguages() {}", "function yourls_load_custom_textdomain( $domain, $path ) {\n\t$locale = yourls_apply_filter( 'load_custom_textdomain', yourls_get_locale(), $domain );\n if( !empty( $locale ) ) {\n $mofile = rtrim( $path, '/' ) . '/'. $domain . '-' . $locale . '.mo';\n return yourls_load_textdomain( $domain, $mofile );\n }\n}", "public function getLanguages();", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "function wp_users_list_load_textdomain() {\n\t$plugin_path = plugin_basename( dirname( __FILE__ ) );\n\t$plugin_path .= '/languages';\n\n\tload_plugin_textdomain(\n\t\t'wp-users-list',\n\t\tfalse,\n\t\t$plugin_path\n\t);\n}", "public function getText($name, $language);", "function mbifthen_load_textdomain() {\r\n\tload_plugin_textdomain( 'multibanco-ifthen-software-gateway-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ).'/lang/' );\r\n}", "public function lang() {\n\t\t\tload_plugin_textdomain( 'cherry-site-shortcodes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}", "function yourextension_lang(){\n load_plugin_textdomain('yourextension', false, basename( dirname( __FILE__ ) ) . '/languages');\n}", "function yourls_translate( $text, $domain = 'default' ) {\n\t$translations = yourls_get_translations_for_domain( $domain );\n\treturn yourls_apply_filter( 'translate', $translations->translate( $text ), $text, $domain );\n}", "function sl_access_load_textdomain() {\n load_plugin_textdomain( 'sl-accessibility-button', false, dirname( plugin_basename( __FILE__ ) ) . '/language' );\n}", "function fg_load_textdomain()\n{\n load_plugin_textdomain('featured-gallery', false, dirname(plugin_basename(__FILE__)) . '/languages/');\n}", "public function i18n() {\n load_plugin_textdomain( 'elementor-hubspot-bulb' );\n }", "public function localeIndex();", "function retrieve_tags($data)\n\t {\n\t\t $text = $data['text'];\n\t\t $lang_code = $data['lang_code'] ? $data['lang_code']:$this->language_translate->check($text);\n\t\t $retArr = array(); \n\t\t \n\t\t switch($lang_code)\n\t\t {\n\t\t case 'zh':\n $retArr = $this->tag_extract->retrieve_zh($text);\n break;\n case 'en':\n $retArr = $this->tag_extract->retrieve_en($text);\n break;\n default:\n\t\t $retArr = $this->tag_extract->retrieve_en($text);\n break;\n\t\t }//switch\n\t\t return $retArr;\n\t }", "public function load_textdomain() {\n\n\t\t// load locale.\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), 'lifterlms' );\n\n\t\t// Load from the LifterLMS \"safe\" directory if it exists.\n\t\tload_textdomain( 'lifterlms', WP_LANG_DIR . '/lifterlms/lifterlms-blocks-' . $locale . '.mo' );\n\n\t\t// Load from the default plugins language file directory.\n\t\tload_textdomain( 'lifterlms', WP_LANG_DIR . '/plugins/lifterlms-blocks-' . $locale . '.mo' );\n\n\t\t// Load from the plugin's language file directory.\n\t\tload_textdomain( 'lifterlms', LLMS_BLOCKS_PLUGIN_DIR . '/i18n/lifterlms-blocks-' . $locale . '.mo' );\n\n\t}", "public function findlanguage_itemsById($id)\n\t{\n\t\treturn language_items::find($id);\n\t}", "public function getLocalizedUrls();", "public function i18n() {\n load_plugin_textdomain( 'elementor-lightx-widgets' );\n }", "public function textPlaceholders()\n {\n return [\n 'txt_download' => __('Download', 'rd-downloads'),\n 'txt_download_name' => __('Downloads name', 'rd-downloads'),\n 'txt_github_name' => __('GitHub repository name', 'rd-downloads'),\n 'txt_size' => __('Size', 'rd-downloads'),\n 'txt_file_name' => __('File name', 'rd-downloads'),\n 'txt_file_size' => __('File size', 'rd-downloads'),\n 'txt_create_on' => __('Create on', 'rd-downloads'),\n 'txt_last_update' => __('Last update', 'rd-downloads'),\n 'txt_total_download' => __('Total download', 'rd-downloads'),\n 'txt_version' => __('Version', 'rd-downloads'),\n ];\n }", "static function getList_languages(){\n \t$configFile = dirname ( __FILE__ ).'/../config/'.DIRECTORY_SEPARATOR.'config_languages.php';\n \t$tmp=require($configFile);\n \t foreach ($tmp as $code=>$item){\n \t$tmp[$code]=Language::t(Yii::app()->language,'Backend.Language.List',$item);\n }\n return $tmp;\n }", "function i18n() {\n\tload_theme_textdomain( 'playground-theme', PLAYGROUND_THEME_PATH . '/languages' );\n}", "public function getInfoText($languageCode);", "public function getLocalizedSlugs();", "function load_textdomain() {\r\n load_plugin_textdomain( WPC_CLIENT_TEXT_DOMAIN, false, dirname( 'wp-client-client-portals-file-upload-invoices-billing/wp-client-lite.php' ) . '/languages/' );\r\n }", "function yourls_x( $text, $context, $domain = 'default' ) {\n\treturn yourls_translate_with_context( $text, $context, $domain );\n}", "public function load_plugin_textdomain() {\n\n\t\t\t$domain = 'wolf-woocommerce-quickview';\n\t\t\t$locale = apply_filters( 'wolf-woocommerce-quickview', get_locale(), $domain );\n\t\t\tload_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t\t\tload_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}", "public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain( 'wc_name_your_price' , false , dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}", "function joe_uah_load_textdomain() {\n\tload_plugin_textdomain( 'ultimate-admin-helpers', false, basename( __DIR__ ) . '/languages/' );\n}" ]
[ "0.67095846", "0.65490705", "0.6363548", "0.6273364", "0.62680763", "0.6217451", "0.60456026", "0.60317934", "0.6016801", "0.5959253", "0.5863866", "0.5849095", "0.5803303", "0.57861483", "0.57666916", "0.57316357", "0.5703721", "0.5693391", "0.5686186", "0.5685548", "0.56775755", "0.5675031", "0.56655204", "0.566244", "0.5658419", "0.5631924", "0.5630102", "0.5593693", "0.5591939", "0.55906", "0.55906", "0.5588845", "0.5578757", "0.55646235", "0.55558234", "0.5550607", "0.5546972", "0.5536367", "0.5534814", "0.5522683", "0.55213183", "0.55142766", "0.5510425", "0.55059946", "0.55035937", "0.55020773", "0.5497938", "0.5496703", "0.5489955", "0.5484045", "0.5484", "0.54761153", "0.54700905", "0.54691803", "0.54601616", "0.54593045", "0.5459118", "0.54568183", "0.5456251", "0.545262", "0.54496443", "0.54405814", "0.5438247", "0.54327816", "0.54284614", "0.5427786", "0.54246897", "0.542451", "0.54244894", "0.5424125", "0.5422533", "0.54150635", "0.5413646", "0.5413646", "0.5413646", "0.5410988", "0.54094815", "0.54078263", "0.54045606", "0.5388299", "0.5386437", "0.5380846", "0.5376717", "0.53765726", "0.5375144", "0.53743625", "0.53710103", "0.53620505", "0.5360186", "0.5352181", "0.53491896", "0.5347676", "0.5344569", "0.5342577", "0.5338951", "0.53186476", "0.5318607", "0.53158355", "0.53110415", "0.53106827" ]
0.61017615
6
image_uploaded callback (txp_image.php) return JSON (imageid) and exit
function abl_droploader_image_uploaded($event, $step, $id) { if (ps('abl_droploader') == '') return; $response = array( 'status' => 1, 'image_id' => $id, ); echo json_encode($response); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _imgUpload(){\r\n\r\n\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n // Mime types of images allowed for upload\r\n $allowed_types = ['image/png', 'image/jpeg', 'image/gif'];\r\n\r\n\r\n\r\n // Something that will return the mime type\r\n $img = getimagesize($_FILES['image']['tmp_name']);\r\n\r\n\r\n\r\n // Get the extension\r\n $extension = pathinfo($_FILES['image']['tmp_name'],PATHINFO_EXTENSION);\r\n\r\n\r\n\r\n // Where is the image currently\r\n $sourcePath = $_FILES['image']['tmp_name'];\r\n\r\n\r\n\r\n // Potentially do a lookup on the mime type and set the extension ourselves\r\n $tmp_name = uniqid().'.'.$extension;\r\n\r\n // Move the image to a _tmp directory which will move again when saved\r\n $targetPath = ROOT.'/site/files/_tmp/'.$tmp_name;\r\n\r\n // This will be the path returned so the image can be displayed in the modal editor\r\n $webPath = WEBROOT.'/site/files/_tmp/'.$tmp_name;\r\n\r\n // Validate the mime type against the allowed array\r\n if(!in_array($img['mime'], $allowed_types)) {\r\n echo \"Only PNG, JPEG or GIF images are allowed!\";\r\n exit;\r\n } elseif(filesize($sourcePath) > 1000000) {\r\n echo \"You cannot upload an image larger that 1mb\";\r\n exit;\r\n }\r\n\r\n // Move the file to the _tmp directory for editing\r\n // return the weburl\r\n if(move_uploaded_file($sourcePath,$targetPath)){\r\n $result->url = $webPath;\r\n $response = 200;\r\n }\r\n\r\n }\r\n\r\n }\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }", "public function execute(){\n\n if(!(in_array($_FILES['file']['type'], \\Vegans\\Controllers\\Images\\Consts::FILETYPES))){\n throw new Error('ERROR during passing parameters');\n }\n\n $time = strtotime(\"now\");\n $fileName = $this->_storeImages($_FILES,$time);\n\n if(strlen($fileName) > 0){\n $vars = [\n 'filename' => $fileName,\n 'path' => \\Vegans\\Controllers\\Images\\Consts::IMAGEPATH . $fileName,\n 'created_at' => $time\n ];\n\n $id = $this->_saveData($vars);\n }\n\n echo json_encode(array_merge(['id' => $id], $vars));\n }", "private function _imgSave(){\r\n\r\n\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n $url = strtok($_POST['url'], '?');\r\n\r\n $sourcePath = ROOT.'/site/files/_tmp/'.basename($url);\r\n $img = getimagesize($sourcePath);\r\n $new_name = uniqid();\r\n\r\n switch($img['mime']){\r\n case 'image/png':\r\n $new_name .= '.png';\r\n break;\r\n case 'image/jpeg':\r\n $new_name .= '.jpg';\r\n break;\r\n case 'image/gif':\r\n $new_name .= '.gif';\r\n break;\r\n default:\r\n echo \"Only PNG, JPEG or GIF images are allowed!\";\r\n exit;\r\n }\r\n\r\n $targetPath = ROOT.'/site/files/'.$new_name;\r\n $webPath = WEBROOT.'/site/files/'.$new_name;\r\n\r\n if(rename($sourcePath, $targetPath)){\r\n $result->url = $webPath;\r\n $result->size = [$img[0],$img[1]];\r\n $result->alt = 'an image';\r\n $response = 200;\r\n } else {\r\n $response = 400;\r\n }\r\n\r\n }\r\n }\r\n\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }", "public function upload()\n {\n if(!Csrf::checkToken($this->_request->getInput('_CSRF')))\n {\n $response = [\n 'status' => 'error',\n 'message' => 'csrf'\n ];\n return $this->_response->returnJson($response);\n }\n\n $file = $this->_request->getUploadedFile('img');\n $uploader = new ImageUpload(new Imagick($file['tmp_name']));\n $uploadResult = $uploader->upload($file);\n\n return $this->_response->returnJson($uploadResult);\n }", "public function imageUploadNicEditor()\n {\nif(isset($_FILES['image'])){\n //Get the image array of details\n $img = $_FILES['image']; \n //The new path of the uploaded image, rand is just used for the sake of it\n \n \n $image_name= rand().$img[\"name\"];\n \n \n $path = \"contents/board/\" . $image_name;\n $path_image = \"contents/board/\" . $image_name;\n //Move the file to our new path\n move_uploaded_file($img['tmp_name'],$path);\n //Get image info, reuiqred to biuld the JSON object\n $data = getimagesize($path);\n //The direct link to the uploaded image, this might varyu depending on your script location \n\n \n $link = \"http://$_SERVER[HTTP_HOST]\".\"/\".$path_image;\n //Here we are constructing the JSON Object\n $res = array(\"upload\" => array(\n \"links\" => array(\"original\" => $link),\n \"image\" => array(\"width\" => $data[0],\n \"height\" => $data[1]\n ) \n ));\n //echo out the response :)\n echo json_encode($res);\n }\n }", "public function upload64() {\n $post = json_decode(file_get_contents('php://input'), true);\n\n $access = $this->_checkAccess($post['auth'],'shortLiveToken');\n\n if(!isset($access['shortLiveToken'])) {\n $result['err'] = 'Permission Denied';\n echo json_encode($result, true);\n die();\n }\n\n $imgName = md5('avatar.'.$access['shortLiveToken']);\n\n $options = array(\n 'path' => 'uploader/tmpImgStore/',\n 'width' => 300,\n 'height' => 300\n );\n\n require_once('photoProcess.php');\n $photo = new photoProcess();\n $photo->set($options);\n\n $upload = $photo->photo64($post['source'], $imgName);\n\n echo json_encode($upload, true);\n }", "function image_upload($img_path)\n{\n $pvars = array(\"content_type\" => 1, \"img\" => \"@\".$img_path);\n\n // initialize curl and set parameters\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, 'http://www.pixhost.org/api');\n curl_setopt($curl, CURLOPT_TIMEOUT, 30);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $pvars);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n // execute, get information and close connection\n $response = curl_exec($curl);\n $info = curl_getinfo($curl);\n curl_close ($curl);\n\n // check if the http-code is 200\n if($info['http_code'] != 200) {\n exit(\"OAuth error: \".$response);\n }\n\n // decode the json-encoded response\n $response_array = json_decode($response);\n\n return $response_array;\n}", "public function add_image_post() {\n $itemId = $this->input->post('item_id');\n $uploadResult= $this->upload();\n if ($uploadResult['upload'] === 'ok') {\n $fileData = $uploadResult['fileData'];\n $updatePayload = array(\n 'photo' => $fileData['file_name']\n );\n $res = $this->model->update($itemId, $updatePayload);\n return $this->response(\n array(\n \"status\" => \"ok\",\n \"result\" => $res\n ),\n parent::HTTP_ACCEPTED\n );\n\n }else{\n return $this->response(\n array( 'status' => 'UPLOADING FAILED', \n 'code' => '200', \n 'message' => $uploadResult['err']), \n parent::HTTP_BAD_GATEWAY );\n }\n }", "function upload()\n\t{\t\t\n\t\t$rfc1867 = function_exists('apc_fetch') && ini_get('apc.rfc1867');\n\n\t\tif(!function_exists('json_encode')) \n\t\t{\n\t\t\tdie('{\"error\" : \"Image upload host does not have the required dependicies (json_encode/decode)\"}');\n\t\t}\n\n\t\t$id = $_POST['APC_UPLOAD_PROGRESS'];\n\t\tif(empty($id)) \n\t\t{\n\t\t\t$id = $_GET['id'];\n\t\t}\n\n\t\tif($_SERVER['REQUEST_METHOD']=='POST') \n\t\t{ \n\t\t\t// Upload is complete\n\t\t\tif(empty($id) || !is_numeric($id)) \n\t\t\t{\n\t\t\t\t$this->_nicupload_error('Invalid Upload ID');\n\t\t\t}\n\t\t\tif(!is_dir($this->nicupload_path) || !is_writable($this->nicupload_path)) \n\t\t\t{\n\t\t\t\t$this->_nicupload_error('Upload directory '.$this->nicupload_path.' must exist and have write permissions on the server');\n\t\t\t}\n\t\t\n\t\t\t$file = $_FILES['nicImage'];\n\t\t\t$image = $file['tmp_name'];\n\t\t\n\t\t\t$max_upload_size = $this->_ini_max_upload_size();\n\t\t\tif(!$file) \n\t\t\t{\n\t\t\t\t$this->_nicupload_error('Must be less than '.$this->_bytes_to_readable($max_upload_size));\n\t\t\t}\n\t\t\n\t\t\t$ext = strtolower(substr(strrchr($file['name'], '.'), 1));\n\t\t\t@$size = getimagesize($image);\n\t\t\tif(!$size || !in_array($ext, $this->nicupload_allowed_extensions)) \n\t\t\t{\n\t\t\t\t$this->_nicupload_error('Invalid image file, must be a valid image less than '.$this->_bytes_to_readable($max_upload_size));\n\t\t\t}\n\t\t\n\t\t\t$filename = $id.'.'.$ext;\n\t\t\t$path = $this->nicupload_path.'/'.$filename;\n\t\t\n\t\t\tif(!move_uploaded_file($image, $path)) \n\t\t\t{\n\t\t\t\t$this->_nicupload_error('Server error, failed to move file');\n\t\t\t}\n\t\t\n\t\t\tif($rfc1867) \n\t\t\t{\n\t\t\t\t$status = apc_fetch('upload_'.$id);\n\t\t\t}\n\t\t\tif(!$status)\n\t\t\t{\n\t\t\t\t$status = array();\n\t\t\t}\n\t\t\t$status['done'] = 1;\n\t\t\t$status['width'] = $size[0];\n\t\t\t$status['url'] = $this->_nicupload_file_uri($filename);\n\t\t\n\t\t\tif($rfc1867) \n\t\t\t{\n\t\t\t\tapc_store('upload_'.$id, $status);\n\t\t\t}\n\n\t\t\t$this->_nicupload_output($status, $rfc1867);\n\t\t\texit;\n\t\t} \n\t\telse if(isset($_GET['check'])) \n\t\t{ \n\t\t\t// Upload progress check\n\t\t\t$check = $_GET['check'];\n\t\t\tif(!is_numeric($check)) \n\t\t\t{\n\t\t\t\t$this->_nicupload_error('Invalid upload progress id');\n\t\t\t}\n\t\t\n\t\t\tif($rfc1867) \n\t\t\t{\n\t\t\t\t$status = apc_fetch('upload_'.$check);\n\t\t\t\t\n\t\t\t\tif($status['total'] > 500000 && $status['current']/$status['total'] < 0.9 ) \n\t\t\t\t{ \n\t\t\t\t\t// Large file and we are < 90% complete\n\t\t\t\t\t$status['interval'] = 3000;\n\t\t\t\t} \n\t\t\t\telse if($status['total'] > 200000 && $status['current']/$status['total'] < 0.8 ) \n\t\t\t\t{ \n\t\t\t\t\t// Is this a largeish file and we are < 80% complete\n\t\t\t\t\t$status['interval'] = 2000;\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$status['interval'] = 1000;\n\t\t\t\t}\n\t\t\t\t$this->_nicupload_output($status);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$status = array();\n\t\t\t\t$status['noprogress'] = true;\n\t\t\t\tforeach($this->nicupload_allowed_extensions as $e) \n\t\t\t\t{\n\t\t\t\t if(file_exists($this->nicupload_path.'/'.$check.'.'.$e)) \n\t\t\t\t\t{\n\t\t\t\t $ext = $e;\n\t\t\t\t break;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tif($ext) \n\t\t\t\t{\n\t\t\t\t $status['url'] = $this->_nicupload_file_uri($check.'.'.$ext);\n\t\t\t\t}\n\t\t\t\t$this->_nicupload_output($status);\n\t\t\t}\n\t\t}\n\t}", "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'Recsite');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n }", "public function handleuploadAction() {\r\n $allowedExtensions = array(\"png\",\"jpg\",\"jpeg\",\"gif\",\"bmp\");\r\n // max file size in bytes\r\n $sizeLimit = 10 * 1024 * 1024;\r\n \r\n $uploader = new qqFileUploader($allowedExtensions, $sizeLimit);\r\n \r\n $dir = \"img/picture\";\r\n \r\n $result = $uploader->handleUpload($dir);\r\n \r\n $image = \\Nette\\Image::fromFile($dir . \"/\" . $result['filename']);\r\n $image->resize(269, 200, \\Nette\\Image::EXACT);\r\n $image->save($dir . \"/\" . $result['filename']);\r\n \r\n // to pass data through iframe you will need to encode all html tags\r\n echo htmlspecialchars(Zend_Json::encode($result), ENT_NOQUOTES);\r\n $this->_helper->layout->disableLayout();\r\n $this->_helper->viewRenderer->setNoRender(TRUE);\r\n }", "protected function processImage() {}", "public function upload()\n {\n $photoUpload = new PhotoUpload();\n $return = array(\"success\",false);\n if($photoUpload->execute()){\n $return['success'] = true;\n }\n echo json_encode($return);\n exit();\n }", "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'bestj');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "public function upload_image($filename){\n // post the picture\n $data = $this->prepareImageData($filename);\n if($data) {\n $post = $this->sendRequest('media/upload/', true, $data, $this->agent, true);\n if (is_array($post) && count($post) == 2 && $post[0] == 200 && is_object(json_decode($post[1]))) {\n $media = json_decode($post[1]);\n return $media->media_id;\n } else {\n $error = json_decode($post[1]);\n $this->log($error);\n }\n }\n }", "function imageUpload($args)\n{\n if (is_object($login_state = authorize($args))) {\n return $login_state;\n }\n $args = decode64($args);\n logger('uploadJSON', ($args['loglevel']));\n if (!($album = getItemByID('albums', $args['id']))) {\n return new ZEN_Error(-1, 'No folder with database ID '.$args['id'].' found!');\n }\n $filepath = getAlbumFolder().($args['parentFolder'] ? $args['parentFolder'].'/' : '').$args['folder'];\n $filename = $args['filename'];\n //$filepath = utf8_decode( $filepath );\n //$filename = utf8_decode( $filename );\n $filepath = $filepath;\n $filename = $filename;\n // save file\n $fp = fopen($filepath.'/'.$filename, 'wb');\n if (!$fp) {\n return new ZEN_Error(-1, 'Cannot open '.$filepath.'/'.$filename);\n }\n //fwrite( $fp, base64_decode( $args[ 'file' ] ) );\n if ($fw = fwrite($fp, base64_decode($args['file'])) === false) {\n return new ZEN_Error(-1, 'Cannot write to file '.$filename);\n }\n\n fclose($fp);\n $img = newImage($album, $filename);\n $img->setOwner($args['loginUsername']);\n //addZenPubData( $args[ 'id' ], $img->filename . '=' . $args[ $img->filename ] );\n return entitysave([\n 'status' => 'success',\n 'id' => $img->getID(),\n 'name' => $img->filename,\n 'url' => WEBPATH.'index.php?album='.urlencode($img->album->name).'&image='.urlencode($img->filename),\n ]);\n}", "public function uploadAjax(){\n if (!empty($_POST['img64'])){\n $_SESSION['countElemPrev'] = $_POST['countElem'];\n $this->loadModel('Photo');\n $this->loadModel('User');\n\n// recupere le tab avec path + id\n $imgPrev = $this->_getDataImg();\n $idMin = $imgPrev['idMin'];\n $idBig = $imgPrev['idBig'];\n $thumbnail = $imgPrev['path'];\n $_SESSION['tabImg'][$idMin]['idMin'] = $idMin;\n $_SESSION['tabImg'][$idMin]['idBig'] = $idBig;\n return $this->json(200, [\n \"thumbnail\" => $thumbnail,\n \"idMin\" => $idMin\n ]);\n }\n return $this->json(400);\n }", "function grabUserProfilePicture()\n{\n\n $con = connectToDatabase();\n\n $sql = \"SELECT profilephoto FROM users WHERE User_id = \" . $_SESSION['User_id'];\n\n $result = mysqli_query($con, $sql);\n\n $profilePhoto = mysqli_fetch_assoc($result);\n\n $profilePhoto = $profilePhoto['profilephoto'];\n\n // Close the connection to the database\n\n mysqli_close($con);\n\n\n\n if (!empty($profilePhoto)) {\n\n $arr = explode(\"/\", $profilePhoto);\n\n $uuid = $arr[0];\n $name = $arr[1];\n\n $thumbnailUrl = \"../vendor/fineuploader/php-traditional-server/files/\" .$uuid. \"/\" .$name;\n\n $post_data = json_encode([array('name' => $name, 'uuid'=>$uuid,'thumbnailUrl'=>$thumbnailUrl)]);\n\n return $post_data;\n\n } else {\n\n return json_encode([array('name' => null, 'uuid'=>null,'thumbnailUrl'=>null)]);\n }\n}", "private function _handle_uploaded_image(){\n\t\t\n \t\tglobal $mySession; \n\t\t\n\t\t$uploaded_image_names = array();\n\t \n\t\t$adapter = new Zend_File_Transfer_Adapter_Http();\n\t\n\t\t$files = $adapter->getFileInfo();\n \t\t \n\t\t$uploaded_image_names = array();\n\t\t\n\t\t$new_name = false; \n\t\t \n \t\t/*prd($adapter);*/\n\t\tforeach ($files as $file => $info) { /* Begin Foreach for handle multiple images */\n\t\t\n \t\t\t$name_old = $adapter->getFileName($file);\n\t\t\t\n\t\t\tif(empty($name_old)){\n\t\t\t\tcontinue ;\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$file_title = $adapter->getFileInfo($file);\n\t\t\t\n\t\t\t$file_title = $file_title[$file]['name']; \n\t\t\t\t\n \t\t\t$uploaded_image_extension = getFileExtension($name_old);\n\t\t\t\n \t\t\t$file_title = str_replace(\".\".$uploaded_image_extension,\"\",$file_title);\n\t\t\t\n\t\t\t$file_title = formatImageName($file_title);\n \n \t\t\t$new_name = $file_title.\"-\".time().\"-\".rand(1,100000).\".\".$uploaded_image_extension;\n \t\t\t\n \t\t\t$adapter->addFilter('Rename',array('target' => SLIDER_IMAGES_PATH.\"/\".$new_name));\n\t\t\n\t\t\ttry{\n\t\t\t\t$adapter->receive($file);\n\t\t\t}\n\t\t\tcatch(Zend_Exception $e){\n\t\t\t\treturn (object) array('success'=>false,\"error\"=>true,'exception'=>true,'message'=>$e->getMessage(),'exception_code'=>$e->getCode()) ;\n\t\t\t}\n\t\t\t\n\t\t\t$thumb_config = array(\"source_path\"=>SLIDER_IMAGES_PATH,\"name\"=> $new_name);\n\t\t\tApplication_Plugin_ImageCrop :: uploadThumb(array_merge($thumb_config,array(\"destination_path\"=>SLIDER_IMAGES_PATH.\"/300\",\"size\"=>300)));\n\t\t\t\t \n \t\t\t//$uploaded_image_names[]=array('media_path'=>$new_name); => For Multiple Images\n \t\t\n\t\t}/* End Foreach Loop for all images */\n\t\t\n\t\t\n\t\treturn (object)array(\"success\"=>true,'error'=>false,\"message\"=>\"Image(s) Successfully Uploaded\",\"media_path\"=>$new_name) ;\n \t\t\n \t \n \t}", "function image_record() {\n\t\t$picIMEI = $_POST['picIMEI'];\n\t\t$time_stamp = $_POST['time_stamp'];\n\t\t$piclat = $_POST['piclat'];\n\t\t$piclon = $_POST['piclon'];\n\t\t$image_name = $_POST['image_name'];\n\t\t$accel_x = $_POST['accel_x'];\n\t\t$accel_y = $_POST['accel_y'];\n\t\t$accel_z = $_POST['accel_z'];\n\n\t\t$insert = $this -> conn -> insertnewrecords('image_record', 'imei_number, reading_timesamp,lat,log,accel_x,accel_y,accel_z,image_filename', '\"' . $picIMEI . '\",\"' . $time_stamp . '\",\"' . $piclat . '\",\"' . $piclon . '\",\"' . $accel_x . '\",\"' . $accel_y . '\",\"' . $accel_z . '\",\"' . $image_name . '\"');\n\t\tif (!empty($insert)) {\n\t\t\t$post = array('status' => \"true\", \"message\" => \"Thanks for your feedback\");\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"error\");\n\t\t}\n\n\t\techo $this -> json($post);\n\t}", "public function saveimageAction()\n {\n $response = $this->getResponse();\n\n $userid= $this->params()->fromPost('userid');\n $createdTime= $this->params()->fromPost('createdtime');\n $imageType = $this->params()->fromPost('imagetype');\n $imageType = substr($imageType, -3, 3);\n $AVAorCOV = $this->params()->fromPost('albumtype');\n\n $documentService = $this->getDocumentService();\n\n $successModel = new SuccessModel();\n $result = $successModel->saveNewImageAvatar($userid, $createdTime,$documentService, $imageType, $AVAorCOV );\n\n if($result)\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 1,\n )));\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n }", "public function image()\n {\n header('Content-Type:', 'image/jpeg');\n // checks Image for UPLOAD\n $image = $_FILES['image']['name'];\n $tempImage = $_FILES['image']['tmp_name'];\n \n if(!empty($image))\n {\n // $img_size = $_FILES['image']['size'];\n $upload = move_uploaded_file($tempImage,'uploads/images/'.$image);\n \n // prepare array of user data\n $dataImage = array\n (\n 'complaint_type_id' => $this->input->post('complaint_type_id'),\n 'signup_id' => $this->input->post('signup_id'),\n 'complaints_status_id'=> 2,\n 'latitude' => $this->input->post('latitude'),\n 'longitude' => $this->input->post('longitude'),\n 'description' => $this->input->post('description'),\n 'image' => $image,\n 'dated' => date('Y-m-d')\n );\n //print_r($dataImage);die;\n $insert = $this->Complaintsmodel->InsertDB($dataImage);\n $lastId = $this->db->insert_id();\n if($insert)\n {\n $Response = array('message' => 'Complaint is done!', 'status' => true, 'data'=>$lastId); \n echo json_encode($Response);\n }\n else\n {\n $Response = array('message' => 'Sorry, Try again!', 'status' => false);\n echo json_encode($Response);\n }\n }\n else\n {\n //$image = '';\n $Response = array('message' => 'Choose an image to upload', 'status' => false);\n echo json_encode($Response);\n } \n }", "function image_record(){\n\t\t\t$picIMEI=$_POST['picIMEI'];\n\t\t\t$time_stamp=$_POST['time_stamp'];\n\t\t\t$piclat=$_POST['piclat'];\n\t\t\t$piclon=$_POST['piclon'];\n\t\t\t$image_name=$_POST['image_name'];\n\t\t\t$accel_x=$_POST['accel_x'];\n\t\t\t$accel_y=$_POST['accel_y'];\n\t\t\t$accel_z=$_POST['accel_z'];\n\t\t\n\t\t\t\t$insert = $this -> conn -> insertnewrecords('image_record','imei_number, reading_timesamp,lat,log,accel_x,accel_y,accel_z,image_filename', '\"' . $picIMEI . '\",\"' . $time_stamp . '\",\"' . $piclat . '\",\"' . $piclon . '\",\"' . $accel_x . '\",\"' . $accel_y . '\",\"' . $accel_z . '\",\"' . $image_name . '\"');\n\t\t\t\tif(!empty($insert)){\n\t\t\t\t\t$post = array('status' => \"true\",\"message\" => \"Thanks for your feedback\");\n\t\t\t\t}else{\n\t\t\t\t\t$post = array('status' => \"false\",\"message\" => \"error\");\n\t\t\t\t}\n\t\t\t\n\t\t\techo $this -> json($post);\n\t\t}", "function getImageId();", "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'qualification');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->assign('code', $ret['data']);\n\t\t$this->assign('msg', $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "public function upload_image(){\n\n // user user-id from session\n $encodedkey = $this->session->userdata('PariKey_session');\n $user_id='';\n $key=base64_decode($encodedkey);\n $keyarr=explode('|', $key);\n //session key format is $keyarr[0]=PARInaayKEY|$keyarr[1]=email_id|$keyarr[2]=user_id\n // print_r($_POST);die();\n extract($_FILES);\n extract($_POST);\n \n $data = $_POST;\n $filepath = '';\n\n // check image count\n $imgCount = $this->user_model->checkImageCount($keyarr[2]);\n if (!$imgCount) { //for prod images\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> You are allowed to upload only <b>3 Images</b> in Gallery!',\n 'field' => 'selected_image'\n );\n echo json_encode($response);\n die();\n }\n\n $file_name = $_FILES['selected_image']['name'];\n if (!empty(($_FILES['selected_image']['name']))) {\n //file validating---------------------------//\n if ($_FILES['selected_image']['size'] > 10485760) { //for prod images\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> Image size exceeds size limit of 10MB. Upload image file having size less than 10MB!',\n 'field' => 'selected_image'\n );\n echo json_encode($response);\n die();\n }\n\n $extension = pathinfo($_FILES['selected_image']['name'], PATHINFO_EXTENSION);\n $_FILES['userFile']['name'] = $img_title.'_0'.$keyarr[2].'_'.time().'.'.$extension;\n $_FILES['userFile']['type'] = $_FILES['selected_image']['type'];\n $_FILES['userFile']['tmp_name'] = $_FILES['selected_image']['tmp_name'];\n $_FILES['userFile']['error'] = $_FILES['selected_image']['error'];\n $_FILES['userFile']['size'] = $_FILES['selected_image']['size'];\n\n $uploadPath = 'assets/users/gallery/'; //upload images in images/desktop/ folder\n\n $config['upload_path'] = $uploadPath;\n $config['overwrite'] = TRUE;\n $config['allowed_types'] = 'gif|jpg|png'; //allowed types of files\n $this->load->library('upload', $config); //load upload file config.\n $this->upload->initialize($config);\n // print_r($config);die();\n $image_path = '';\n\n if ($this->upload->do_upload('userFile')) {\n $fileData = $this->upload->data();\n $filepath = 'assets/users/gallery/'.$fileData['file_name'];\n }\n else{\n $response=array(\n 'status' => 'validation',\n 'message' => $this->upload->display_errors('<p><b>Image upload Error: </b>', '</p>'),\n 'field' => 'selected_image'\n );\n echo json_encode($response);\n die();\n }\n // print_r($filepath);die();\n }\n\n $data['filepath'] = $filepath;\n if($filepath==''){\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> Image file not uploaded Successfully!',\n 'field' => 'document_file'\n );\n echo json_encode($response);\n die();\n}\n$result = $this->user_model->upload_image($data,$keyarr[2]);\n\nif($result){\n $response=array(\n 'status' => 'success',\n 'message' => '<b>Success:</b> You Have Successfully uploaded <b>'.$img_title.'</b> Image!'\n );\n}\nelse{\n $response=array(\n 'status' => 'error',\n 'message' => '<b>Error:</b> <b>'.$img_title.'</b> Image was not uploaded Successfully!'\n );\n} \necho json_encode($response);\n}", "function ajax_process_image() {\r\n\t\tif ( !current_user_can( 'manage_options' ) )\r\n\t\t\tdie('-1');\r\n\t\t$id = (int) $_REQUEST['id'];\r\n\t\tif ( empty($id) )\r\n\t\t\tdie('-1');\r\n\t\t$fullsizepath = get_attached_file( $id );\r\n\t\tif ( false === $fullsizepath || !file_exists($fullsizepath) )\r\n\t\t\tdie('-1');\r\n\t\tset_time_limit( 60 );\r\n\t\tif ( wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $fullsizepath ) ) )\r\n\t\t\tdie('1');\r\n\t\telse\r\n\t\t\tdie('-1');\r\n\t}", "public static function profileImageUpload($id) {\n global $lC_Database;\n \n require_once('includes/classes/ajax_upload.php');\n\n // list of valid extensions, ex. array(\"jpeg\", \"jpg\", \"gif\")\n $allowedExtensions = array('gif', 'jpg', 'jpeg', 'png');\n // max file size in bytes\n $sizeLimit = 10 * 1024 * 1024;\n\n $uploader = new qqFileUploader($allowedExtensions, $sizeLimit);\n \n $profile_image = $uploader->handleUpload('images/avatar/');\n \n /*$Qcheck = $lC_Database->query('select user_name from :table_administrators where id = ' . (int)$id);\n $Qcheck->bindTable(':table_administrators', TABLE_ADMINISTRATORS);\n $Qcheck->execute();\n \n if ($Qcheck->numberOfRows() > 0) { \n if (isset($profile_image['filename']) && $profile_image['filename'] != null) {\n $lC_Database->startTransaction();\n $Qimage = $lC_Database->query('update :table_administrators set image = \"' . $profile_image['pathinfo']['basename'] . '\" where id = ' . (int)$id);\n $Qimage->bindTable(':table_administrators', TABLE_ADMINISTRATORS);\n $Qimage->bindValue(':image', $profile_image['pathinfo']['basename']);\n $Qimage->execute();\n }\n } */\n \n $result = array('result' => 1,\n 'success' => true,\n 'rpcStatus' => RPC_STATUS_SUCCESS,\n 'filename' => $profile_image['pathinfo']['basename']);\n\n return $result;\n }", "function media_upload_image()\n {\n }", "public function save_card_photo($image_id = NULL) {\n \t$rawJson = file_get_contents(\"php://input\");\n \t$photo = json_decode($rawJson,true);\n \t$data['success'] = $this->photo_model->save_photo($photo);\n \t\n \t$card_id = intval($photo['card_id']);\n \t$data['photos'] = $this->photo_model->get_card_photos($card_id);\n \t\n \theader('Content-Type: application/json');\n \techo json_encode(array('item' => $data['photos'],'success' => $data['success']));\n }", "public function actionSaveOriginalImage() {\n if ($_REQUEST['imagePath'] == '') {\n $imagePath = Yii::app()->basePath . \"/../media/croppic/flyingimg/\";\n $imagePath2 = Yii::app()->request->baseUrl . \"/media/croppic/flyingimg/\";\n } else {\n $imagePath = Yii::app()->basePath . \"/../\" . $_REQUEST['imagePath'];\n $imagePath2 = Yii::app()->request->baseUrl . $_REQUEST['imagePath'];\n }\n\n $allowedExts = array(\"gif\", \"jpeg\", \"jpg\", \"png\", \"GIF\", \"JPEG\", \"JPG\", \"PNG\");\n $temp = explode(\".\", $_FILES[\"img\"][\"name\"]);\n $extension = end($temp);\n\n if (in_array($extension, $allowedExts)) {\n if ($_FILES[\"img\"][\"error\"] > 0) {\n $response = array(\n \"status\" => 'error',\n \"message\" => 'ERROR Return Code: ' . $_FILES[\"img\"][\"error\"],\n );\n echo \"Return Code: \" . $_FILES[\"img\"][\"error\"] . \"<br>\";\n } else {\n\n $filename = time().'-'.Yii::app()->user->id.'-'.$_FILES[\"img\"][\"name\"];\n list($width, $height) = getimagesize($_FILES[\"img\"][\"tmp_name\"]);\n\n move_uploaded_file($_FILES[\"img\"][\"tmp_name\"], $imagePath . $filename);\n\n $response = array(\n \"status\" => 'success',\n \"url\" => $imagePath2 . $filename,\n \"width\" => $width,\n \"height\" => $height\n );\n }\n } else {\n $response = array(\n \"status\" => 'error',\n \"message\" => 'something went wrong',\n );\n }\n\n print json_encode($response);\n }", "function save_camp_image(){\n\t\n\t\n\t$data = $_POST['data'];\n\tlist($type, $data) = explode(';', $data);\n\tlist(, $data) = explode(',', $data);\n\t$data = base64_decode($data);\t\t\n\t$img_name = 'tshirt'.time().'.png';\n\t\n\t$upload_dir = wp_upload_dir();\t\n\t\n\t$target_path_image = $upload_dir['path'].'/'.$img_name;\n\t\n\tfile_put_contents($target_path_image, $data);\n\t\n\techo json_encode(array('action'=>'done','img'=>$img_name));\t\n\tdie();\n}", "public function encodeImage()\r\n {\r\n if (!(($_FILES[\"file-select\"][\"type\"] == \"image/gif\")\r\n || ($_FILES[\"file-select\"][\"type\"] == \"image/jpeg\")\r\n || ($_FILES[\"file-select\"][\"type\"] == \"image/jpg\")\r\n || ($_FILES[\"file-select\"][\"type\"] == \"image/pjpeg\")\r\n || ($_FILES[\"file-select\"][\"type\"] == \"image/x-png\")\r\n || ($_FILES[\"file-select\"][\"type\"] == \"image/png\")))\r\n {\r\n $data['status'] = 'fail';\r\n $data['msg'] = lang('miiicloud-files-file_type_error');\r\n echo json_encode($data);\r\n return;\r\n }\r\n $size = $_FILES[\"file-select\"][\"size\"] / 1024;\r\n if ($_FILES[\"file-select\"][\"error\"] > 0)\r\n {\r\n $data['status'] = 'fail';\r\n $data['msg'] = $_FILES[\"file-select\"][\"error\"];\r\n }\r\n else if (intval($size)> 100000000)\r\n {\r\n $data['status'] = 'fail';\r\n $data['msg'] = lang('miiicloud-files-image_too_large');\r\n }\r\n else\r\n {\r\n $content = file_get_contents($_FILES[\"file-select\"][\"tmp_name\"]);\r\n $base64 = 'data:' . $_FILES[\"file-select\"][\"type\"] . ';base64,' . base64_encode($content);\r\n $data['status'] = 'ok';\r\n $data['type'] = $_FILES[\"file-select\"][\"type\"];\r\n $data['name'] = $_FILES[\"file-select\"][\"name\"];\r\n $data['base64'] = $base64;\r\n $data['size'] = $size;\r\n }\r\n echo json_encode($data);\r\n }", "public function uploadPhoto(){\n\t\t$db = $this->db;\n\t\t$allowedExtensions = array(\"jpeg\", \"png\", \"jpg\", \"gif\");\n\t\t$userid = $_SESSION[\"userid\"];\n\t\t$sizeLimit = 5 * 1024 * 1024;\n\t\t$uploader = new qqFileUploader($allowedExtensions,$sizeLimit);\n\t\t\n\t\t$name = $uploader->getName();\n\t\t$splitName = explode(\".\", $name);\n\t\t$uploader->handleUpload(getcwd().\"/../uploads/pics/\");\n\t\t$new = \"uploads/pics/\".$userid.\".\".$splitName[1];\n\t\tif (file_exists(getcwd().\"/../uploads/pics/\".$name)){\n\t\t\trename(getcwd().\"/../uploads/pics/\".$name, getcwd().\"/../\".$new);\n\t\t\t$db->update(\"personal\", array(\"image\"=>$new), $db->quoteInto(\"userid = ?\", $userid));\n\t\t\t$imageApi = new SimpleImage();\n\t\t\t$imageApi->load(getcwd().\"/../\".$new);\n\t\t\tif ($imageApi->getWidth()>320){\n\t\t\t\t$imageApi->resizeToWidth(320);\n\t\t\t\t$imageApi->save(getcwd().\"/../\".$new);\n\t\t\t}\n\t\t\t$data = array();\n\t\t\t$this->subtractRemoteReadyScore($userid, 1);\n\t\t\t\n//\t\t\t$db->delete(\"remote_ready_criteria_entries\", \"userid = \".$userid.\" AND remote_ready_criteria_id = 1\");\n\t\t\t$data[\"userid\"] = $userid;\n\t\t\t$data[\"remote_ready_criteria_id\"] = 1;\n\t\t\t$data[\"date_created\"] = date(\"Y-m-d h:i:s\");\n//\t\t\t$db->insert(\"remote_ready_criteria_entries\", $data);\n\t\t\t\n\t\t\tglobal $base_api_url;\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/mongo-index/sync-candidates-files/?userid=\" . $userid);\n\t\t\treturn array(\"success\"=>true);\n\t\t}else{\n\t\t\treturn array(\"success\"=>false);\n\t\t}\n\t\t\n\t}", "public function upload_img()\r\n {\r\n if(!is_dir('./uploads/groups'))mkdir(('./uploads/groups')); \r\n if (!empty($_FILES)) \r\n { \r\n $tempFile = $_FILES['file']['tmp_name']; \r\n\r\n $file_info = explode('.',$_FILES['file']['name']);\r\n $file_ext = $file_info[1];\r\n\r\n $targetPath = './uploads/groups'; \r\n\r\n $newFile = time().'.'.$file_ext;\r\n \r\n $targetFile = $targetPath.$newFile; \r\n \r\n move_uploaded_file($tempFile,$targetFile); \r\n\r\n $this->output->set_output(json_encode($newFile));\r\n }\r\n }", "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'Goods');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n }", "public function upload_images() {\n\n $this->load->library('MY_upload_handler');\n\n $upload_handler = new MY_upload_handler($this->c_user->id);\n\n header('Pragma: no-cache');\n\n header('Cache-Control: no-store, no-cache, must-revalidate');\n\n header('Content-Disposition: inline; filename=\"files.json\"');\n\n header('X-Content-Type-Options: nosniff');\n\n header('Access-Control-Allow-Origin: *');\n\n header('Access-Control-Allow-Methods: OPTIONS, HEAD, GET, POST, PUT, DELETE');\n\n header('Access-Control-Allow-Headers: X-File-Name, X-File-Type, X-File-Size');\n\n\n\n switch ($_SERVER['REQUEST_METHOD']) {\n\n case 'OPTIONS':\n\n break;\n\n case 'HEAD':\n\n case 'GET':\n\n if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') {\n\n $upload_handler->delete();\n\n } else {\n\n $upload_handler->get();\n\n }\n\n break;\n\n case 'DELETE':\n\n if ($postId = $this->getRequest()->query->get('post_id', '')) {\n\n $post = new Social_post($postId);\n\n $post->media->delete_all();\n\n }\n\n $upload_handler->delete();\n\n break;\n\n case 'POST':\n\n if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') {\n\n $upload_handler->delete();\n\n } else {\n\n $upload_handler->post();\n\n }\n\n break;\n\n\n\n default:\n\n header('HTTP/1.1 405 Method Not Allowed');\n\n }\n\n }", "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'ad');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n }", "public function postAvatar()\n {\n if (isset($_SERVER['HTTP_ORIGIN'])) {\n ImageUpload::enableCORS($_SERVER['HTTP_ORIGIN']);\n }\n\n if (Request::server('REQUEST_METHOD') == 'OPTIONS') {\n exit;\n }\n\n $json = ImageUpload::handle(Input::file('filedata'));\n\n if ($json !== false) {\n return Response::json($json, 200);\n }\n\n return Response::json('error', 400);\n }", "public function upload_postAction() {\r\n\t\t$ret = Common::upload('img', 'ad');\r\n\t\t$imgId = $this->getPost('imgId');\r\n\t\t$this->assign('code' , $ret['data']);\r\n\t\t$this->assign('msg' , $ret['msg']);\r\n\t\t$this->assign('data', $ret['data']);\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t//create webp image\r\n\t\tif ($ret['code'] == 0) {\r\n\t\t\t$attachPath = Common::getConfig('siteConfig', 'attachPath');\r\n\t\t\t$file = realpath($attachPath.$ret['data']);\r\n\t\t\timage2webp($file, $file.'.webp');\r\n\t\t}\r\n\t\t$this->getView()->display('common/upload.phtml');\r\n\t\texit;\r\n }", "function uploadImage(){\n $error = false;\n if(empty($_FILES)){\n return false;\n }\n $type = explode('/', $_FILES['file']['type']);\n if($type[0] != 'image'){\n $result = 'Not image!';\n $error = true;\n }\n if($_FILES['file']['size'] > 2000000){\n $result = 'Too large!';\n $error = true;\n }\n\n if(!$error){\n $uploadDir = 'uploads/_temp/';\n $uploadImageName = uniqid(true) .'.'. $type[1];\n $uploadImage = $uploadDir . $uploadImageName;\n //$result = array('tmp_name' => $_FILES['file']['tmp_name'], 'uploadDir' => $uploadDir, 'uploadImage' => $uploadImage);\n $success = is_uploaded_file($_FILES['file']['tmp_name']);\n\n /*print_arr($_FILES);\n var_dump($result);\n var_dump($success);\n die;*/\n\n\n if($success){\n move_uploaded_file($_FILES['file']['tmp_name'], $uploadImage);\n $result = '<head><script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"></script>\n <script>window.jQuery || document.write(\\'<script src=\"<?=VIEW?>js/jquery-1.11.1.min.js\">\\x3C/script>\\')</script>\n <script type=\"text/javascript\">\n $(document).ready(function(){\n $(\"body\").empty();\n var photo_name = \"' .$uploadImageName. '\";\n window.parent.$(\"#new_photo\").html(photo_name);\n });\n </script></head>';\n unset($_POST['uploadImage']);\n }else{\n $result = 'File not uploaded!';\n }\n\n }\n return $result;\n }", "function upload() {\n $this->autoRender = false;\n if (!$this->request->is('post')) {\n $this->response->statusCode(405);\n echo json_encode(array('status' => 'Failure', \"message\" => 'Get Not Allowed'));\n return;\n }\n\n try {\n $result = $this->Image->save_to_redis($this->request);\n } catch (Exception $e) {\n $this->response->statusCode($e->getCode());\n $result = array('status' => 'Failure', 'message' => $e->getMessage());\n }\n\n echo json_encode($result);\n }", "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'fanfan_topic');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "function files_post() {\n if (empty($_FILES) || empty($_FILES['file']['tmp_name'])) {\n return json_result(array('message' => 'BAD_REQUEST'), 400);\n }\n $from = $_FILES['file']['tmp_name'];\n $uuid = hash_file('md5', $from); // use checksum as uuid\n if (data_exists('.files', $uuid)) {\n $meta = data_read('.files_meta', $uuid);\n return json_result(array(\"files\" => $meta, 'count' => 1, 'message' => 'RESOURCE_CREATED'), 201);\n //return json_result(array(\"files\" => data_read(\".files_meta\", $uuid), 'count' => 1, 'message' => 'RESOURCE_EXISTS'), 409);\n }\n $dir = $GLOBALS['SYSTEM']['data_base'] . '/.files/';\n if (!file_exists($dir)) {\n @mkdir($dir, 0750, true);\n }\n $meta = array(\n \"name\" => $_FILES['file']['name'],\n \"uuid\" => $uuid,\n \"type\" => $_FILES['file']['type'],\n );\n if (exif_imagetype($from) === IMAGETYPE_JPEG) {\n load_library(\"exif\", \"images\");\n $exif_data = exif_get($from);\n $meta = array_merge($meta, $exif_data);\n }\n if (exif_imagetype($from) !== false) {\n list($width, $height) = getimagesize($from);\n $meta['width'] = $width;\n $meta['height'] = $height;\n $meta['orientation'] = $width >= $height ? 'landscape' : 'portrait';\n $meta['aspect_ratio'] = $width / $height;\n }\n if (data_create('.files_meta', $uuid, $meta) && move_uploaded_file($from, $dir . $uuid) === true) {\n return json_result(array(\"files\" => $meta, 'count' => 1, 'message' => 'RESOURCE_CREATED'), 201);\n }\n return json_result(array('message' => 'RESOURCE_CREATE_FAILED'), 500);\n}", "public function uploadImage(){\n\n $fileExt = explode('.', $this->fileName);\n $fileActualExt = strtolower(end($fileExt));\n $allowedExt = array('jpg', 'jpeg');\n\n if($this->fileError !== 0 && $this->fileSize > 8000 && !in_array($fileActualExt, $allowedExt)){\n return false;\n }\n $fileId = uniqid('', false).'.'.$fileActualExt;\n $fileDestination = '../api/image_entity/'.$fileId;\n\n $transfertDone = move_uploaded_file($this->fileTmp, $fileDestination);\n\n if($transfertDone){\n $app = App::getInstance();\n $systemManager = $app->getManager('System');\n $imageId = $systemManager->addImage($fileId);\n\n return $imageId;\n }\n\n }", "public function actionImageUpload()\n {\n $model = new WhateverYourModel();\n\n $imageFile = UploadedFile::getInstance($model, 'photo');\n\n $directory = Yii::getAlias('@common/upload') . DIRECTORY_SEPARATOR . Yii::$app->session->id . DIRECTORY_SEPARATOR;\n if (!is_dir($directory))\n {\n FileHelper::createDirectory($directory);\n }\n\n if ($imageFile)\n {\n $uid = uniqid(time(), true);\n $fileName = $uid . '.' . $imageFile->extension;\n $filePath = $directory . $fileName;\n if ($imageFile->saveAs($filePath))\n {\n $path = '/img/temp/' . Yii::$app->session->id . DIRECTORY_SEPARATOR . $fileName;\n return Json::encode([\n 'files' => [\n [\n 'name' => $fileName,\n 'size' => $imageFile->size,\n 'url' => $path,\n 'thumbnailUrl' => $path,\n 'deleteUrl' => 'image-delete?name=' . $fileName,\n 'deleteType' => 'POST',\n ],\n ],\n ]);\n }\n }\n\n return '';\n }", "public function upload_postAction() {\n $ret = Common::upload('img', 'bgimg');\n $imgId = $this->getPost('imgId');\n $this->assign('code', $ret['data']);\n $this->assign('msg', $ret['msg']);\n $this->assign('data', $ret['data']);\n $this->assign('imgId', $imgId);\n $this->getView()\n ->display('common/upload.phtml');\n exit();\n }", "public function processImages()\n \t{\n $this->save();\n if (! $this->errorMessage)\n \t\t parent::uploadImages('image', 'RecipeImage', \"recipeID\");\n \n \t}", "public function upload_profile_image() {\n\n // Verify Nonce\n $nonce = $_REQUEST['nonce'];\n if ( ! wp_verify_nonce( $nonce, 'em_allow_upload_profile_image' ) ) {\n $ajax_response = array(\n\t\t\t\t'success' => false ,\n\t\t\t\t'reason' => __( 'Security check failed!', 'EM' )\n );\n echo json_encode( $ajax_response );\n die;\n }\n\n $submitted_file = $_FILES['em_upload_file_name'];\n\n // Handle PHP uploads in WordPress, sanitizing file names, checking extensions for mime type,\n // and moving the file to the appropriate directory within the uploads directory.\n $uploaded_image = wp_handle_upload( $submitted_file, array( 'test_form' => false ) ); // TODO: What?\n\n if ( isset( $uploaded_image['file'] ) ) {\n\n \t// File's name.\n $file_name = basename( $submitted_file['name'] );\n\n // Retrieve the file type from the file name.\n $file_type = wp_check_filetype( $uploaded_image['file'] );\n\n // Prepare an array of post data for the attachment.\n $attachment_details = array(\n 'guid' => $uploaded_image['url'],\n 'post_mime_type' => $file_type['type'],\n 'post_title' => preg_replace( '/\\.[^.]+$/', '', basename( $file_name ) ), // TODO: What?\n 'post_content' => '',\n 'post_status' => 'inherit'\n );\n\n // This function inserts an attachment into the media library.\n $attach_id = wp_insert_attachment( $attachment_details, $uploaded_image['file'] );\n\n // This function generates metadata for an image attachment. It also creates a thumbnail\n // and other intermediate sizes of the image attachment based on the sizes defined.\n $attach_data = wp_generate_attachment_metadata( $attach_id, $uploaded_image['file'] );\n\n // Update metadata for an attachment.\n wp_update_attachment_metadata( $attach_id, $attach_data );\n\n // Returns escaped URL.\n $thumbnail_url = $this->get_profile_image_url( $attach_data );\n\n $ajax_response = array(\n\t\t\t\t'success' => true,\n\t\t\t\t'url' => $thumbnail_url,\n\t\t\t\t'attachment_id' => $attach_id\n );\n echo json_encode( $ajax_response );\n die;\n\n } else {\n $ajax_response = array(\n\t\t\t\t'success' => false,\n\t\t\t\t'reason' => __( 'Image upload failed!', 'EM' )\n );\n echo json_encode( $ajax_response );\n die;\n }\n\n\t}", "public function postPicture(){\r\n if(!$this->hasLoginCheck())\r\n return;\r\n $blogItem = new BlogItemModel();\r\n// $path,$desc,$tag\r\n $path=$_POST['path'];\r\n $desc=$_POST['content'];\r\n $tag=$_POST['tag'];\r\n $blogItem->addPicture($path,$desc,$tag);\r\n echo json_encode(array('status'=>'true'));\r\n }", "public function uploadImage()\n {\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Checking if user is online */\n if ($user) {\n\n /* Checking if image was upload */\n if (is_uploaded_file($_FILES['image']['tmp_name'])) {\n\n /* Creating new Upload's object */\n $upload = new Upload([\n 'subfolder' => 'answers/',\n 'name' => $_FILES['image']['name'],\n 'type' => $_FILES['image']['type'],\n 'tmp_name' => $_FILES['image']['tmp_name'],\n 'error' => $_FILES['image']['error'],\n 'size' => $_FILES['image']['size'],\n ]);\n\n /* Setting new random title for image */\n $upload->name = $upload->getRandomFilename(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION));\n\n /* Uploading image */\n if ($upload->upload()) {\n\n /* Return response */\n header('Content-Type: application/json');\n echo json_encode('/media/images/answers/'.$upload->name);\n }\n }\n }\n\n return false;\n }", "public function savenormalimageAction()\n {\n $response = $this->getResponse();\n $data = $this->params()->fromPost();\n\n $dm = $this->getDocumentService();\n $userid = $data['userid'];\n if(substr($data['imageType'],-4, 1) == \".\")\n {\n $imageType = substr($data['imageType'], -3,3);\n }\n else\n {\n $imageType = substr($data['imageType'], -4,4);\n }\n $createdTime = $data['createdTime'];\n $descript = $data['descript'];\n\n $successModel = new SuccessModel();\n $result = $successModel->saveNewImageNormal($userid,$createdTime, $descript, $imageType, $dm);\n\n if($result!=null)\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => $result,\n )));\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n\n\n }", "public function invtZoneImgUplaod_post()\n {\n $data = $this->post();\n //print_r($data);\n //echo $data['kp_InventoryZoneID'];\n $inventoryZoneID = $data['kp_InventoryZoneID'];\n\n if(!empty($_FILES['file']['name']))\n {\n //echo \"not empty\";\n $msg = $this->inventoryzonemodel->doInvtZoneCustomUpload($inventoryZoneID);\n\n if($msg)\n {\n $this->response($msg, 200); // 200 being the HTTP response code\n }\n else\n {\n $this->response($msg, 404);\n }\n\n }\n\n\n\n }", "public function StaticImageUpload(){\n $design_id = $_POST['new_filename'];\n $uid = $_POST['uid'];\n $uid = empty($uid) ? 0 : $uid;\n $exp = explode(\".\", $_FILES[\"file\"][\"name\"])[1];\n $filename = $design_id.'.'.$exp;\n $new_file = 'public://files/'.$uid.'/kmds/images/static_image/' . $filename;\n $uploaded_image = file_get_contents($_FILES[\"file\"][\"tmp_name\"]);\n file_put_contents($new_file, $uploaded_image);\n $source_original = array(\"src\" => file_create_url($new_file));\n return new JsonResponse($source_original);\n }", "function ajax()\n\t{\n\t\t$method = $this->input->post('method');\n\t\t$CFG = $this->config->item('image_configure');\n\t\tswitch( $method )\n\t\t{\n\t\t\tcase \"add\" :\n\t\t\t $this->form_validation->set_rules($this->config->item('insert', 'image_validation'));\n\t\t\t\tif($this->form_validation->run($this, 'insert') == FALSE)\n\t\t\t\t\techo json_encode( array(\"event\" => \"error\", \"msg\" => validation_errors() ), JSON_HEX_QUOT | JSON_HEX_TAG );\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$post_data = $this->input->post();\n\t\t\t\t\t$where[] = array($CFG['table_name'].'.'.$CFG['possible_where']['context_id'], $post_data[\"context_id\"]);\n\t\t\t\t\t$where[] = array($CFG['table_name'].'.'.$CFG['possible_where']['relation_id'], $post_data[\"relation_id\"]);\n\t\t\t\t\t$records = $this->image->getRecords($where);\n\t\t\t\t\tforeach($records as $record)\n\t\t\t\t\t{\n\t\t\t\t\t\t$update_main = array('is_main' => 0,'row_id' => $record -> ai_image_id);\n\t\t\t\t\t\tdoAction('image', 'update', '', false, $update_main);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->input->post('is_main'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$is_main['is_main'][0] = '1';\n\t\t\t\t\t\t$post_data = array_merge($is_main, $post_data);\n\t\t\t\t\t}\n\t\t\t\t\t$image_data = $this->upload->get_multi_upload_data();\n\t\t\t\t\t$insert = array();\n\t\t\t\t\t$insert[\"context_id\"] = array();\n\t\t\t\t\t$insert[\"relation_id\"] = array();\n\t\t\t\t\t$insert[\"caption\"] = array();\n\t\t\t\t\t$insert[\"alt\"] = array();\n\t\t\t\t\t$insert[\"is_main\"] = array();\n\t\t\t\t\t$insert[\"image_url\"] = array();\n\t\t\t\t\tforeach($image_data as $key => $value)\n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t$insert[\"context_id\"][$key] = (int)$post_data[\"context_id\"];\n\t\t\t\t\t\t$insert[\"relation_id\"][$key] = (int)$post_data[\"relation_id\"];\t\t\t\t\t\t\n\t\t\t\t\t\t$insert[\"caption\"][$key] = $post_data[\"caption\"][$key];\t\t\t\t\t\t\n\t\t\t\t\t\t$insert[\"alt\"][$key] = $post_data[\"alt\"][$key];\t\t\t\t\t\t\n\t\t\t\t\t\t$insert[\"is_main\"][$key] = $post_data[\"is_main\"][$key];\n\t\t\t\t\t\t$image_path = explode('images/', $value['file_path']);\t\t\t\t\t\t\n\t\t\t\t\t\t$insert[\"image_url\"][$key] = $image_path[1].$value[\"file_name\"];\t\t\t\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\t\t$insertedrows = $this->image->insertInto($insert);\n\t\t\t\t\tif($insertedrows)\n\t\t\t\t\t\techo json_encode( array(\"event\" => \"success\", \"msg\" => _e('image added')) );\n\t\t\t\t\telse\n\t\t\t\t\t\techo json_encode( array(\"event\" => \"error\", \"msg\" => _e('image add fail')) );\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\n\t\t\t\t\n\t\t\tcase \"edit\" :\n\t\t\t\t$CFG = $this->config->item('image_configure');\n\t\t\t\t$this->form_validation->set_rules($this->config->item('update', 'image_validation'));\n\t\t\t\tif($this->form_validation->run($this, 'update') == FALSE)\n\t\t\t\t\techo json_encode( array(\"event\" => \"error\", \"msg\" => validation_errors() ), JSON_HEX_QUOT | JSON_HEX_TAG );\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$row_id = $this->input->post('row_id');\n\t\t\t\t\t$context_id = $this->input->post('context_id');\n\t\t\t\t\t$relation_id = $this->input->post('relation_id');\n\t\t\t\t\t$caption = $this->input->post('caption');\n\t\t\t\t\t$alt = $this->input->post('alt');\n\t\t\t\t\t$is_main = $this->input->post('is_main');\n\t\t\t\t\t\n\t\t\t\t\t$image_data = $this->upload->get_multi_upload_data();\n\t\t\t\t\t$image_path = explode('images/', $image_data[0]['file_path']);\t\n\t\t\t\t\t\n\t\t\t\t\tif(empty($image_data))\n\t\t\t\t\t{\n\t\t\t\t\t\t$where_cls[] = array($CFG['table_name'].'.'.$CFG['possible_where']['edit_id'], $row_id);\n\t\t\t\t\t\t$records_data = $this->image->getRecords($where_cls);\n\t\t\t\t\t\t$img = $records_data[0]->image_url;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$img = $image_path[1].$image_data[0][\"file_name\"];\n\t\t\t\t\t\n\t\t\t\t\t$where[] = array($CFG['table_name'].'.'.$CFG['possible_where']['context_id'], $context_id);\n\t\t\t\t\t$where[] = array($CFG['table_name'].'.'.$CFG['possible_where']['relation_id'], $relation_id);\n\t\t\t\t\t$records = $this->image->getRecords($where);\n\t\t\t\t\tforeach($records as $record)\n\t\t\t\t\t{\n\t\t\t\t\t\t$update_main = array('is_main' => 0,'row_id' => $record -> ai_image_id);\n\t\t\t\t\t\tdoAction('image', 'update', '', false, $update_main);\n\t\t\t\t\t}\n\t\t\t\t\t$update_value = array('context_id' => $context_id, 'relation_id' => $relation_id, 'caption' => $caption, 'alt' => $alt, 'is_main' => $is_main, 'image_url' => $img, 'row_id' => $row_id);\n\t\t\t\t\techo json_encode( doAction('image', 'update', '', false, $update_value) );\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t}\n\t}", "public function upfile()\n {\n $accepted_origins = array(\"http://localhost\", \"http://192.168.82.130\", \"\");\n\n // Images upload path\n $imageFolder = \"./upload/image/\";\n\n reset($_FILES);\n $temp = current($_FILES);\n if (is_uploaded_file($temp['tmp_name'])) {\n if (isset($_SERVER['HTTP_ORIGIN'])) {\n // Same-origin requests won't set an origin. If the origin is set, it must be valid.\n if (in_array($_SERVER['HTTP_ORIGIN'], $accepted_origins)) {\n header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);\n } else {\n header(\"HTTP/1.1 403 Origin Denied\");\n return;\n }\n }\n\n $temp['name'] = str_replace(' ','',$temp['name']);\n $temp['name'] = str_replace('(','',$temp['name']);\n $temp['name'] = str_replace(')','',$temp['name']);\n\n // Sanitize input\n if (preg_match(\"/([^\\w\\s\\d\\-_~,;:\\[\\]\\(\\).])|([\\.]{2,})/\", $temp['name'])) {\n header(\"HTTP/1.1 400 Invalid file name.\");\n return;\n }\n\n // Verify extension\n if (!in_array(strtolower(pathinfo($temp['name'], PATHINFO_EXTENSION)), array(\"gif\", \"jpg\", \"png\"))) {\n header(\"HTTP/1.1 400 Invalid extension.\");\n return;\n }\n\n // Accept upload if there was no origin, or if it is an accepted origin\n $filetowrite = $imageFolder . $temp['name'];\n move_uploaded_file($temp['tmp_name'], $filetowrite);\n\n $link = base_url('upload/image/'.$temp['name']);\n // Respond to the successful upload with JSON.\n echo json_encode(array('location' => $link));\n } else {\n // Notify editor that the upload failed\n header(\"HTTP/1.1 500 Server Error\");\n }\n }", "function process_image_attach($type, $id)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $images, $phpEx, $phpbb_root_path, $garage_config, $board_config, $HTTP_POST_FILES, $HTTP_POST_VARS;\n\t\n\t\tif (!$this->check_permissions('UPLOAD',''))\n\t\t{\n\t\t\treturn ;\n\t\t}\n\n\t\tif ($gd_version = $this->gd_version_check())\n\t \t{\n\t \t\tif ($gd_version == 2) \n\t\t\t{\n\t\t\t\t$garage_config['gd_version'] = 2;\n\t \t\t}\n\t\t\telse if ( $gd_version == 1 )\n\t\t\t{\n\t\t\t\t$garage_config['gd_version'] = 1;\n\t\t\t}\n\t \t\telse\n\t\t\t{\n\t\t\t\t$garage_config['gd_version'] = 0;\n\t\t\t\t//redirect(append_sid(\"garage.$phpEx?mode=error&EID=20\", true));\n\t\t\t}\n\t\t}\n\t \telse\n\t \t{\n\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=19\", true));\n\t\t}\n\n\t\t//Lets make sure it is not just a default http://\n\t\t$url_image = str_replace(\"\\'\", \"''\", trim($HTTP_POST_VARS['url_image']));\n\t\tif ( preg_match( \"/^http:\\/\\/$/i\", $url_image ) )\n\t\t{\n\t\t\t$url_image = \"\";\n\t\t}\n\n\t\t//Check For Both A Remote Image & Image Upload\n\t\tif ( (!empty($url_image)) AND (!empty($HTTP_POST_FILES['FILE_UPLOAD']['name'])) )\n\t\t{\n\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=11\", true));\n\t\t}\n\t\t//Handle Remote Images\n\t\telse if ( (!empty($url_image)) AND ( $HTTP_POST_FILES['FILE_UPLOAD']['name'] == \"\" OR !$HTTP_POST_FILES['FILE_UPLOAD']['name'] OR ($HTTP_POST_FILES['FILE_UPLOAD']['name'] == \"none\") ) )\n\t\t{\n\t\t\t//Stop dynamic images and display correct error message\n\t\t\tif ( preg_match( \"/[?&;]/\", $url_image ) )\n\t\t\t{\n\t\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=9\", true));\n\t\t\t}\n\t\n\t\t\t$url_image_date = time();\n\t\t\t$url_image_ext = strtolower( preg_replace( \"/^.*\\.(\\S+)$/\", \"\\\\1\", $url_image ) );\n\t\t\t$url_image_name = preg_replace( \"/^.*\\/(.*\\.\\S+)$/\", \"\\\\1\", $url_image );\n\t\t\t\n\t\t\tswitch ($url_image_ext)\n\t\t\t{\n\t\t\t\tcase 'jpeg':\n\t\t\t\t\t$url_image_ext = '.jpg';\n\t\t\t\t\t$attach_is_image = '1';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jpg':\n\t\t\t\t\t$url_image_ext = '.jpg';\n\t\t\t\t\t$attach_is_image = '1';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'png':\n\t\t\t\t\t$url_image_ext = '.png';\n\t\t\t\t\t$attach_is_image = '1';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'gif':\n\t\t\t\t\t$url_image_ext = '.gif';\n\t\t\t\t\t$attach_is_image = '1';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=12\", true));\n\t\t\t}\n\t\n\t\t\t// Does it exist?\n\t\t\tif ( !$this->remote_file_exists($url_image) ) \n\t\t\t{\n\t\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=10\", true));\n\t\t\t}\n\t\n\t\t\tif ( $type == 'vehicle')\n\t\t\t{\n\t\t\t\t$tmp_file_name = 'garage_gallery-' . $id . '-' . $url_image_date;\n\t\t\t}\n\t\t\tif ( $type == 'modification')\n\t\t\t{\n\t\t\t\t$tmp_file_name = 'garage_mod-' . $id . '-' . $url_image_date;\n\t\t\t}\n\t\t\tif ( $type == 'quartermile')\n\t\t\t{\n\t\t\t\t$tmp_file_name = 'garage_quartermile-' . $id . '-' . $url_image_date;\n\t\t\t}\n\t\t\tif ( $type == 'rollingroad')\n\t\t\t{\n\t\t\t\t$tmp_file_name = 'garage_rollingroad-' . $id . '-' . $url_image_date;\n\t\t\t}\n\t\n\t\t\t$thumb_file_name = $tmp_file_name . '_thumb';\n\n\t\t\t// Append our file extension to both\n\t\t\t$tmp_file_name .= $url_image_ext;\n\t\t\t$thumb_file_name .= $url_image_ext;\n\t\n\t\t\t// Download the remote image to our temporary file\n\t\t\t$infile = @fopen ($url_image, \"rb\");\n\t\t\t$outfile = @fopen ($phpbb_root_path. GARAGE_UPLOAD_PATH . $tmp_file_name, \"wb\");\n\t\n\t\t\t// Set our custom timeout\n\t\t\tsocket_set_timeout($infile, $garage_config['remote_timeout']);\n\t\n\t\t\twhile (!@feof ($infile)) \n\t\t\t{\n\t\t\t\t@fwrite($outfile, @fread ($infile, 4096));\n\t\t\t}\n\t\t\t@fclose($outfile);\n\t\t\t@fclose($infile);\n\n\t\t\t@chmod($phpbb_root_path . GARAGE_UPLOAD_PATH . $tmp_file_name, 0777);\n\n\t\t\t//Create The Thumbnail\n\t\t\tif ( $garage_config['gd_version'] > 0 )\n\t\t\t{\n\t\t\t\t$this->create_garage_thumbnail($tmp_file_name, $thumb_file_name, $url_image_ext);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$thumb_file_name = $phpbb_root_path . $images['garage_no_thumb'];\n\t\t\t\t$thumb_width = '145';\n\t\t\t\t$thumb_height = '35';\n\t\t\t}\n\t\n\t\t\t@unlink($phpbb_root_path . GARAGE_UPLOAD_PATH . $tmp_file_name);\n\t\n\t\t\t// Handle All The DB Stuff Now\n\t\t\t$sql = \"INSERT INTO \". GARAGE_IMAGES_TABLE .\" (attach_location, attach_hits, attach_ext, attach_file, attach_thumb_location, attach_thumb_width, attach_thumb_height, attach_is_image, attach_date, attach_filesize)\n\t\t\t\tVALUES ('$url_image', '0', '$url_image_ext', '$url_image_name', '$thumb_file_name', '$thumb_width', '$thumb_height', '$attach_is_image', '$url_image_date', '0')\";\n\t\t\tif( !$result = $db->sql_query($sql) )\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not insert new entry', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\t\n\t\t\t$image_id = $db->sql_nextid();\n\t\n\t\t\treturn $image_id;\n\t\t}\n\t\t// Uploaded Image Not Remote Image\n\t\telse if( (isset($HTTP_POST_FILES['FILE_UPLOAD'])) AND (!empty($HTTP_POST_FILES['FILE_UPLOAD']['name'])) )\n\t\t{\n\t\t\t$imagesize = getimagesize($HTTP_POST_FILES['FILE_UPLOAD']['tmp_name']);\n\t\t\t$attach_filetype = $imagesize[2];\n\t\t\t$attach_filesize = $HTTP_POST_FILES['FILE_UPLOAD']['size'];\n\t\t\t$attach_tmp = $HTTP_POST_FILES['FILE_UPLOAD']['tmp_name'];\n\t\t\t$attach_file = trim(str_replace(\"\\'\", \"''\", trim(htmlspecialchars($HTTP_POST_FILES['FILE_UPLOAD']['name']))));\n\t\t\t$attach_date = time();\n\t\n\t\t\tif ($attach_filesize == 0) \n\t\t\t{\n\t\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=6\", true));\n\t\t\t}\n\t\n\t\t\tif ($attach_filesize / 1024 > $garage_config['max_image_kbytes'])\n\t\t\t{\n\t\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=7\", true));\n\t\t\t}\n\t\n\t\t\t// Check File Type \n\t\t\tswitch ($attach_filetype)\n\t\t\t{\n\t\t\t\tcase '1':\n\t\t\t\t\t$attach_ext = '.gif';\n\t\t\t\t\t$attach_is_image = '1';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '2':\n\t\t\t\t\t$attach_ext = '.jpg';\n\t\t\t\t\t$attach_is_image = '1';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '3':\n\t\t\t\t\t$attach_ext = '.png';\n\t\t\t\t\t$attach_is_image = '1';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tmessage_die(GENERAL_ERROR, $lang['Not_Allowed_File_Type_Vehicle_Created_No_Image'] . \"<br />\". $lang['Your_File_Type_Was'] .\" $attach_filetype\");\n\t\t\t}\n\t\n\t\t\t// Generate filename\n\t\t\tif ( $type == 'vehicle')\n\t\t\t{\n\t\t\t\t$prefix = 'garage_gallery-' . $id . '-' . $attach_date;\n\t\t\t}\n\t\t\telse if ( $type == 'modification')\n\t\t\t{\n\t\t\t\t$prefix = 'garage_mod-' . $id . '-' . $attach_date;\n\t\t\t}\n\t\t\telse if ( $type == 'quartermile')\n\t\t\t{\n\t\t\t\t$prefix = 'garage_quartermile-' . $id . '-' . $attach_date;\n\t\t\t}\n\t\t\telse if ( $type == 'rollingroad')\n\t\t\t{\n\t\t\t\t$prefix = 'garage_rollingroad-' . $id . '-' . $attach_date;\n\t\t\t}\n\t\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$attach_location = $prefix . $attach_ext;\n\t\t\t}\n\t\t\twhile( file_exists($phpbb_root_path . GARAGE_UPLOAD_PATH . $attach_location) );\n\t\n\t\t\t$attach_thumb_location = $prefix . '_thumb' . $attach_ext;\n\t\n\t\t\t// Move this file to upload directory\n\t\t\t$ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';\n\t\n\t\t\tif ( @$ini_val('open_basedir') != '' )\n\t\t\t{\n\t\t\t\tif ( @phpversion() < '4.0.3' )\n\t\t\t\t{\n\t\t\t\t\tmessage_die(GENERAL_ERROR, $lang['Move_Uploaded_File_Disallowed'], '', __LINE__, __FILE__);\n\t\t\t\t}\n\t\n\t\t\t\t$move_file = 'move_uploaded_file';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$move_file = 'copy';\n\t\t\t}\n\t\n\t\t\t$move_file($attach_tmp, $phpbb_root_path . GARAGE_UPLOAD_PATH . $attach_location);\n\t\t\t@chmod($phpbb_root_path . GARAGE_UPLOAD_PATH . $attach_location, 0777);\n\t\n\t\t\t// Well, it's an image. Check its image size\n\t\t\t$attach_imagesize = getimagesize($phpbb_root_path . GARAGE_UPLOAD_PATH . $attach_location);\n\t\t\t$attach_width = $attach_imagesize[0];\n\t\t\t$attach_height = $attach_imagesize[1];\n\t\n\t\t\tif ( ($attach_width > $garage_config['max_image_resolution']) or ($attach_height > $garage_config['max_image_resolution']) )\n\t\t\t{\n\t\t\t\t@unlink($phpbb_root_path . GARAGE_UPLOAD_PATH . $attach_location);\n\t\t\t\tredirect(append_sid(\"garage.$phpEx?mode=error&EID=8\", true));\n\t\t\t}\n\n\t\t\t//Create The Thumbnail For This Image\n\t\t\tif ( $garage_config['gd_version'] > 0 )\n\t\t\t{\n\t\t\t\t$this->create_garage_thumbnail($attach_location, $attach_thumb_location, $attach_ext);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$attach_thumb_location = $phpbb_root_path . $images['garage_no_thumb'];\n\t\t\t\t$thumb_width = '145';\n\t\t\t\t$thumb_height = '35';\n\t\t\t}\n\t\n\t\t\t// Handle All The DB Stuff Now\n\t\t\t$sql = \"INSERT INTO \". GARAGE_IMAGES_TABLE .\" (attach_location, attach_hits, attach_ext, attach_file, attach_thumb_location, attach_thumb_width, attach_thumb_height, attach_is_image, attach_date, attach_filesize)\n\t\t\t\tVALUES ('$attach_location', '0', '$attach_ext', '$attach_file', '$attach_thumb_location', '$thumb_width', '$thumb_height', '$attach_is_image', '$attach_date', '$attach_filesize')\";\n\t\t\tif( !$result = $db->sql_query($sql) )\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not insert new entry', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\t\n\t\t\t$image_id = $db->sql_nextid();\n\t\n\t\t\treturn $image_id;\n\t\t}\n\t\t//We really should not end up here...but lets return as we check for a empty $image_id\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\treturn;\n\t}", "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'gou_brand');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "function sb_test_ajax() {\n\n\techo json_encode( array('thumb' => 'thumb', 'full' => 'full', 'error' => '') );\n\tdie();\n\n\t// check_ajax_referer('sb'); // security\n\t$thumb = $full = array();\n\t$error = '';\n\tif( !isset($_REQUEST['file_id']) )\n\t\t$error = htmlentities( sb_error(7, array(), false) ); // no $file_id found, error out (with no html formatting)\n\tif($error == '')\n\t{\n\t\t$id = sb_handle_upload($_REQUEST['file_id']);\n\t\tif(is_numeric($id))\n\t\t{\n\t\t\t$thumb = wp_get_attachment_image_src($id, 'thumbnail');\n\t\t\t$full = wp_get_attachment_image_src($id, 'full');\n\t\t\tif($thumb[0] == '' || $full[0] == '')\n\t\t\t\t$error = 'Error: Could not retrieve uploaded image.';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$error = $id;\n\t\t}\n\t}\n\techo json_encode( array('thumb' => $thumb[0], 'full' => $full[0], 'error' => $error) );\n\tdie();\n}", "private function _saveUploadedImage($id)\n {\n $uploads = $this->request->getUploadedFiles();\n $images = array();\n\n foreach ($uploads as $file) {\n $uniqueName = $file->getKey() . '-' . $id;\n $key = 'events/' . $uniqueName;\n\n switch ($file->getRealType()) {\n case 'image/jpeg':\n $image = imagecreatefromjpeg($file->getRealPath());\n break;\n case 'image/png':\n $image = imagecreatefrompng($file->getRealPath());\n break;\n default:\n $image = null;\n }\n\n if ($image) {\n $tmp = tempnam(null, null);\n imagejpeg($image, $tmp, 75);\n imagedestroy($image);\n\n $client = S3Client::factory(array(\n 'key' => $this->config->amazon->AWSAccessKeyId,\n 'secret' => $this->config->amazon->AWSSecretKey,\n 'region' => 'us-west-2'\n ));\n $bucket = 'findmyrice';\n\n $result = $client->putObject(array(\n 'Bucket' => $bucket,\n 'Key' => $key,\n 'ACL'=> 'public-read',\n 'SourceFile' => $tmp,\n 'ContentType' => 'image/jpeg'\n ));\n\n unlink($tmp);\n\n if ($result) {\n $images[$file->getKey()] = $result['ObjectURL'];\n }\n }\n }\n return $images;\n }", "function m_uploadImage()\n\t{\n\t\t$fileUpload = new FileUpload();\n\t\t$name=$this->request['img'];\n\t\tif($this->libFunc->checkImageUpload(\"image\"))\n\t\t{\n\t\t\t\t$fileUpload->source = $_FILES[\"image\"][\"tmp_name\"];\n\t\t\t\t$fileUpload->target = $this->imagePath.\"giftwrap/\".$_FILES[\"image\"][\"name\"];\n\t\t\t\t$newName1 = $fileUpload->upload();\n\t\t\t\t$this->obDb->query=\"UPDATE \".GIFTWRAPS.\" set\n\t\t\t\t $name='$newName1' where iGiftwrapid_PK='\".$this->request['id'].\"'\";\n\t\t\t\t$this->obDb->updateQuery();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"sales/adminindex.php?action=promotions.giftwrap.uploadForm&msg=2&img=\".$this->request['img'].\"&id=\".$this->request['id']);\n\t\t}\n\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"sales/adminindex.php?action=promotions.giftwrap.uploadForm&msg=1&img=\".$this->request['img'].\"&id=\".$this->request['id']);\n\t}", "function Trigger_ImageUpload(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo1\");\r\r\n $uploadObj->setDbFieldName(\"photo1\");\r\r\n $uploadObj->setFolder(\"../assets/images/magasins/\");\r\r\n $uploadObj->setMaxSize(1000);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "public function uploader(){\n\n // Recuperando imagem em base64\n // Exemplo: data:image/png;base64,AAAFBfj42Pj4\n $imagen = $_POST['imagen'];\n\n // Separando tipo dos datos da imagen\n // $tipo: data:image/png\n // $datos: base64,AAAFBfj42Pj4\n list($tipo, $datos) = explode(';', $imagen);\n\n // Isolando apenas o tipo da imagen\n // $tipo: image/png\n list(, $tipo) = explode(':', $tipo);\n\n\n // Isolando apenas os datos da imagen\n // $datos: AAAFBfj42Pj4\n list(, $datos) = explode(',', $datos);\n\n //Convertendo base64 para imagen\n $datos = base64_decode($datos);\n\n //Gerando nombre aleatório para a imagen\n $nombre = 'upl_' . $_POST['nombre'];\n\n //Controlador\n $controlador = $_POST['controlador'];\n $modelo = $this->getModel($controlador);\n\n //Ruta\n $ruta = ROOT . 'public' . DS . 'img' . DS . $controlador . DS;\n\n\n // Salvando imagen em disco\n if (file_put_contents($ruta.\"{$nombre}.jpg\", $datos)){\n\n //$parametro = json_decode(stripslashes($_POST['datos']),true);\n $parametro = $_POST['datos'];\n\n if($modelo->modificarImagen($nombre.\".jpg\",$parametro)){\n //$modelo->modificarImagen($parametro[0],array(1));\n // El modelo debe contener este metodo en el cual recibe el nombre de la imagen y un Array de datos auxiliares\n\n $thumb = new upload($ruta.\"{$nombre}.jpg\");\n $thumb->image_resize = true;\n $thumb->image_y = $thumb->image_dst_y / 2;\n $thumb->image_x = $thumb->image_dst_x / 2;\n $thumb->file_name_body_pre = 'thumb_';\n $thumb->process($ruta . 'thumb' . DS);\n }\n\n }\n }", "public function getImageId()\n {\n return $this->imageid;\n }", "public function upload_image()\n {\n $obj = json_decode(file_get_contents(\"php://input\"));\n //$obj->file;\n return ;\n // var_dump(request()->get('file'));\n $retjson['errno'] = 0;\n $file = request()->file(\"file\");\n if ($file)\n {\n $info = $file->move(ROOT_PATH . 'public' . DS .\"uploads/mail_img\");\n if ($info)\n {\n $imgurl = Request::domain(). DS . 'public' . DS . 'uploads/mail_img' . DS . $info->getSaveName();\n $retjson['errno'] = 0;\n $retjson['data']['url'] = $imgurl;\n }\n else\n {\n $retjson['errno'] = 3000;\n $retjson['errmsg'] = $file->getError();\n }\n }\n return json($retjson);\n }", "public function get_image_id() {\r\n return $this->image_id;\r\n }", "public function getImageid()\n {\n return $this->imageid;\n }", "public static function onUploadComplete( $image ) {\n global $wgWebhooksFileUpload;\n if (!$wgWebhooksFileUpload) {\n return;\n }\n\n self::sendMessage('FileUpload', [\n 'name' => (string) ($image->getLocalFile()->getTitle()),\n 'mimeType' => $image->getLocalFile()->getMimeType(),\n 'size' => $image->getLocalFile()->getSize(),\n 'description' => $image->getLocalFile()->getDescription(),\n 'user' => $image->getLocalFile()->getUser(),\n 'width' => $image->getLocalFile()->getWidth(),\n 'height' => $image->getLocalFile()->getHeight()\n ]);\n }", "public function img(){\n\t\t$ret = array('img'=>'','thumb'=>'','msg'=>'');\n\t\tdo{\n\t\t\t//get parameters\n\t\t\t$must = array();\n\t\t\t$fields = array('is_thumb','thumb_width','thumb_height','is_resize','resize_width','resize_height');\n\t\t\t$params = array();\n\t\t\tforeach ( $fields as $v ){\n\t\t\t\t$params[$v] = intval($this->input->post($v));\n\t\t\t}\n\t\t\tunset($v);\n\t\t\t//check request\n\t\t\t/**\n\t\t\tif( !self::$user ){\n\t\t\t\t$ret['msg'] = 'user is not login';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t*/\n\t\t\t$img = uploadFile('img');\n\t\t\tif( !($img && file_exists($img['file'])) ){\n\t\t\t\t$ret['msg'] = 'image upload failure';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$imgInfo = getImageInfo($img['file']);\n\t\t\tif( !($imgInfo && isset($imgInfo['type']) && in_array($imgInfo['type'], array('jpeg','png','gif','bmp'))) ){\n\t\t\t\t$ret['msg'] = 'image type is not allowed';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$ret = array(\n\t\t\t\t'msg'\t=> 'success',\n\t\t\t\t'img'\t=> $img['url'],\n\t\t\t\t'thumb'\t=> '',\n\t\t\t);\n\t\t\t//create thumb\t\t\t\n\t\t\tif( $params['is_thumb']==1 ){\n\t\t\t\t$config = array();\n\t\t\t\t$config['image_library'] = 'gd2';\n\t\t\t\t$config['source_image'] = $img['file'];\n\t\t\t\t$config['quality'] = 100;\n\t\t\t\t$config['create_thumb'] = TRUE;\n\t\t\t\t$config['width'] = $params['thumb_width'];\n\t\t\t\t$config['height'] = $params['thumb_height'];\n\t\t\t\t$this->load->library('image_lib', $config);\n\t\t\t\t$this->image_lib->resize();\n\t\t\t\t$this->image_lib->clear();\n\t\t\t\t$ext = strrchr($img['url'], '.');\n\t\t\t\t$ret['thumb']\t= str_replace($ext, '_thumb'.$ext, $img['url']);\n\t\t\t}\n\t\t\t//resize\n\t\t\tif( $params['is_resize']==1 ){\n\t\t\t\t$config = array();\n\t\t\t\t$config['image_library'] = 'gd2';\n\t\t\t\t$config['source_image'] = $img['file'];\n\t\t\t\t$config['quality'] = 100;\n\t\t\t\t$config['width'] = $params['resize_width'];\n\t\t\t\t$config['height'] = $params['resize_height'];\n\t\t\t\t$this->load->library('image_lib', $config);\n\t\t\t\t$this->image_lib->resize();\n\t\t\t\t$this->image_lib->clear();\n\t\t\t}\n\t\t} while (false);\n\t\techo json_encode($ret);\n\t\texit;\t}", "function Trigger_ImageUpload2(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo3\");\r\r\n $uploadObj->setDbFieldName(\"photo3\");\r\r\n $uploadObj->setFolder(\"../assets/images/magasins/\");\r\r\n $uploadObj->setMaxSize(1000);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "function upload_image($parent_id){\n\t\tif(!is_numeric($parent_id)){\n\t\t\tredirect('site_security/not_allowed');\n\t\t}\n\t\t$this->load->library('session');\n // security form\n\t\t$this->load->module('site_security');\n\t\t$this->site_security->_make_sure_is_admin();\n // get id\n\n\t\t$data['parent_id'] = $parent_id;\n\t\t$data['flash'] = $this->session->flashdata('item');\n\n\t // submit handler\n\n\t\t$data['headline'] = 'upload image';\n //$data['stor_items'] = 'stor_items';\n\t\t$data['view_file'] = 'upload_image';\n\t\t$this->load->module('templates');\n\t\t$this->templates->admin($data);\n\t}", "public function isGetImgResourceHookCalledCallback() {}", "function Trigger_ImageUpload1(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo2\");\r\r\n $uploadObj->setDbFieldName(\"photo2\");\r\r\n $uploadObj->setFolder(\"../assets/images/magasins/\");\r\r\n $uploadObj->setMaxSize(1000);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "function build_post()\n{\n $user_id = $_SESSION['id'];\n $body = $_POST['file'];\n $sticker_id = $_POST['sticker_id'];\n $sticker_coord_x = $_POST['sticker_coord_x'];\n $sticker_coord_y = $_POST['sticker_coord_y'];\n $description = $_POST['description'];\n\n if (empty($body) || empty($user_id))\n {\n echo \"oooops\";\n return FALSE;\n }\n\n // Trim off encoding string\n $prefix = strpos($body, ',') + strlen(',');\n $data = substr($body, $prefix);\n\n // Decode into binary image\n $selected_photo = base64_decode($data);\n\n // Call file name function and render image function\n $filename = generate_filename($user_id);\n// error_log(\"!!!!!\");\n// error_log($sticker_id);\n// error_log(empty($sticker_coord_x));\n// error_log($sticker_coord_y);\n// error_log(\"Tuta:\". boolval(empty($selected_photo)));\n// error_log($filename);\n $result = render_image($sticker_id, $sticker_coord_x, $sticker_coord_y, $selected_photo, $filename);\n\n if (!$result)\n {\n echo 'error';\n return FALSE;\n }\n\n if (!add_post($user_id, $filename, $description))\n {\n echo '<p class=\"error\"> Could not upload :( </p>';\n return FALSE;\n }\n echo $filename;\n return TRUE;\n}", "public function image_upload_post()\n {\n \n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n\n $required_parameter = array('product_id','product_image');\n $chk_error = $this->controller->check_required_value($required_parameter, $data);\n if ($chk_error) \n {\n $resp = array('code' => 'MISSING_PARAM', 'message' => 'Missing ' . strtoupper($chk_error['param']));\n @$this->response($resp);\n }\n $product_id = $data['product_id'];\n //$image = $data['product_image'];\n \n $product_image = array(); \n if(!empty($product_id)){\n $p_img = $this->model->getAllwhere('product',array('id'=> $product_id),'product_image');\n \n if(!empty($p_img)){\n $product_image = @unserialize($p_img[0]->product_image);\n }\n }\n\n \n \n define('UPLOAD_DIR', 'asset/uploads/');\n $img = $data['product_image']; \n \n \n// $img = str_replace('data:image/jpeg;base64,', '', $img);\n //$img = str_replace(' ', '+', $img);\n $msg = '';\n if(!empty($img)){\n $image_parts = explode(\";base64,\", $img);\n $data1 = base64_decode($image_parts[1]);\n $file = UPLOAD_DIR . uniqid() . '.png';\n $success = file_put_contents($file, $data1);\n\n $image = substr($file,14);\n\n $product_image[] = $image;\n //$data['product_image'] = serialize($image);\n $insert_data = array('product_image' => serialize($product_image));\n \n }\n$where = array('id'=> $product_id);\n $result = $this->model->updateFields('product', $insert_data, $where);\n $resp = array('rccode' => 200,'message' =>\"image upload succesfully\");\n $this->response($resp);\n}", "public function photorequest($data) {\n\n $this->db->insert($this->_imgrequest, $data);\n return $this->db->insert_id();\n }", "public function uploadImage()\r\n {\r\n /*\r\n * Response codes\r\n * 000 - Нет ошибок\r\n * 001 - Нет данных\r\n * 002 - Ошибка получения параметров файла\r\n * 003 - Ошибка получения пути файла\r\n * 004 - Ошибка перемещения файла\r\n * 005 - Требования не соблюдены\r\n * 006 - Нет папки салона\r\n */\r\n if (isset($_POST) &&\r\n isset($_FILES) &&\r\n array_key_exists('upload', $_FILES) &&\r\n count($_FILES['upload']) > 0 &&\r\n array_key_exists('slug', $_POST) &&\r\n array_key_exists('img_name', $_POST) &&\r\n array_key_exists('type', $_POST)\r\n ) {\r\n $type = $_POST['type'];\r\n if ($this->authentication->has_permission($type . '_upload')) {\r\n $img_name = $_POST['img_name'];\r\n $tmpFilePath = $_FILES['upload']['tmp_name'][0];\r\n $tmpFileType = $_FILES['upload']['type'][0];\r\n $tmpFileExtension = pathinfo($_FILES['upload']['name'][0], PATHINFO_EXTENSION);\r\n $tmpFileSize = $_FILES['upload']['size'][0];\r\n $tmpImageInfo = getimagesize($_FILES['upload']['tmp_name'][0]);\r\n if (array_key_exists('img_slug', $_POST)) {\r\n $fileParams = $this->FieldsModel->getFile($_POST['img_slug'], $_POST['img_slug']);\r\n } else {\r\n $fileParams = $this->FieldsModel->getFile($type, $img_name);\r\n }\r\n if ($fileParams) {\r\n if (\r\n $tmpFileType != $fileParams['mime'] ||\r\n $tmpImageInfo['mime'] != $fileParams['mime'] ||\r\n $tmpFileExtension != $fileParams['ext'] ||\r\n $tmpFileSize > $fileParams['max_size'] ||\r\n $tmpImageInfo[0] > $fileParams['max_width'] ||\r\n $tmpImageInfo[0] < $fileParams['min_width'] ||\r\n $tmpImageInfo[1] > $fileParams['max_height'] ||\r\n $tmpImageInfo[1] < $fileParams['min_height']\r\n ) {\r\n if ($tmpFileExtension === 'svg') {\r\n //Do nothing\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не удовлетворяет требованиям.', 'code' => '005', 'fileparams' => $fileParams));\r\n return;\r\n }\r\n }\r\n // Make sure we have a file path\r\n if ($tmpFilePath != '') {\r\n // Setup new file path\r\n if (!file_exists('./media/' . $_POST['type'] . '/' . $_POST['slug'] . '/')) {\r\n mkdir('./media/' . $_POST['type'] . '/' . $_POST['slug']);\r\n //echo json_encode(array('status' => 'fail', 'message' => 'Салон не сконфигурирован. Обратитесь к поставщику услуг.', 'code' => '006'));\r\n //return;\r\n }\r\n $newFilePath = './media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n // Upload the file into the temp dir\r\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\r\n // Create path to update image in frontend\r\n $path = base_url() . 'media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n echo json_encode(array('status' => 'ok', 'message' => 'Изображение загружено.', 'code' => '000', 'path' => $path));\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '004'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '003'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '002'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, у вас нет прав!', 'code' => '999'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '001'));\r\n }\r\n }", "function uploadProfileImage($filename, $tmpLocation, $type) {\n\n global $userObj;\n global $imageObj;\n\n if($type === 'own') {\n $imageObj->load($tmpLocation);\n $width = $imageObj->getWidth();\n $height = $imageObj->getHeight();\n\n if($width < $height) {\n $imageObj->resizeToWidth(400);\n } else {\n $imageObj->resizeToHeight(400);\n }\n\n $imageObj->crop(400);\n }\n\n $imgName = time() . '_' . $filename;\n $newLocation = \"../../public/images/upload/\" . $imgName;\n\n $loggedUser = $userObj->loggedUser($_SESSION[\"user\"][\"userID\"]);\n\n //if the user had own profile image we delete it from storage\n if($loggedUser[\"profileImage\"] != \"defaultAvatar.png\") {\n $previousLocation = \"../../public/images/upload/\" . $loggedUser[\"profileImage\"];\n }\n\n if($userObj->uploadProfileImage($imgName, $_SESSION[\"user\"][\"userID\"])) {\n \n if($type === 'own') {\n $imageObj->save($newLocation, 100);\n } else {\n copy($tmpLocation, $newLocation);\n }\n\n if(isset($previousLocation)) {\n unlink($previousLocation);\n }\n\n $result[\"data_type\"] = 1;\n $result[\"data_value\"] = $imgName;\n\n echo json_encode($result);\n exit;\n } else {\n $result[\"data_type\"] = 0;\n $result[\"data_value\"] = \"An error occured\";\n\n echo json_encode($result);\n exit;\n }\n\n}", "public function gavias_sliderlayer_upload_file(){\n global $base_url;\n $allowed = array('png', 'jpg', 'gif','zip');\n $_id = gavias_sliderlayer_makeid(6);\n if(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0){\n\n $extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION);\n\n if(!in_array(strtolower($extension), $allowed)){\n echo '{\"status\":\"error extension\"}';\n exit;\n } \n $path_folder = \\Drupal::service('file_system')->realpath(gva_file_default_scheme(). \"://gva-sliderlayer-upload\");\n \n //$file_path = $path_folder . '/' . $_id . '-' . $_FILES['upl']['name'];\n //$file_url = str_replace($base_url, '',file_create_url(gva_file_default_scheme(). \"://gva-sliderlayer-upload\") . '/' . $_id .'-'. $_FILES['upl']['name']); \n \n $ext = end(explode('.', $_FILES['upl']['name']));\n $image_name = basename($_FILES['upl']['name'], \".{$ext}\");\n\n $file_path = $path_folder . '/' . $image_name . \"-{$_id}\" . \".{$ext}\";\n $file_url = str_replace($base_url, '',file_create_url(gva_file_default_scheme(). \"://gva-sliderlayer-upload\"). '/' . $image_name . \"-{$_id}\" . \".{$ext}\"); \n\n if (!is_dir($path_folder)) {\n @mkdir($path_folder); \n }\n if(move_uploaded_file($_FILES['upl']['tmp_name'], $file_path)){\n $result = array(\n 'file_url' => $file_url,\n 'file_url_full' => $base_url . $file_url\n );\n print json_encode($result);\n exit;\n }\n }\n\n echo '{\"status\":\"error\"}';\n exit;\n\n }", "function set_main_image($post_id, $file_id)\n {\n $data = $this->Post_model->set_main_image($post_id, $file_id);\n //Salida JSON\n $this->output->set_content_type('application/json')->set_output(json_encode($data));\n }", "public function iN_GetUploadedFileDetails($imageID) {\n\t\tif ($imageID) {\n\t\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_user_uploads WHERE upload_id='$imageID'\") or die(mysqli_error($this->db));\n\t\t\t$result = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function uploadify()\n\t{\n\t\t\n\t\t//Decode JSON returned by /js/uploadify/upload.php\n\t\t$file = $this->input->post('filearray');\n\t\t$data['json'] = json_decode($file);\n\t\t\n\t\t$this->load->view('default/template/photo/ajax/uploadify',$data);\n\t}", "function wyz_upload_business_gallery_ajax() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\tif ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\t$bus_id = filter_input( INPUT_POST, 'bus_id' );\n\t$img_ids = explode( ',', filter_input( INPUT_POST, 'imgs_ids' ) );\n\t$gallery = array();\n\tforeach ( $img_ids as $img_id ) {\n\t\t$url = wp_get_attachment_url( $img_id );\n\t\tif ( $url )\n\t\t\t$gallery[ $img_id ] = $url;\n\t}\n\tupdate_post_meta( $bus_id, 'business_gallery_image', $gallery );\n\twp_die( $array[0] );\n}", "public function actionUpload()\n\t{\n\t\t$allowedExtensions = array('jpeg','jpg','bmp','png','tif','tiff');\n\t\t// max file size in bytes\n\t\t// this requires server settings as well: post_max_size, upload_max_filesize\n\t\t$sizeLimit = 20 * 1024 * 1024;\n\t\t\n\t\t$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);\n\t\t\n\t\t// the temporary filename is based on uniqiq() which generates unique strings based on the time in microseconds\n\t\t$temporaryFileName = uniqid();\n\t\t$ext = pathinfo($_GET['qqfile'],PATHINFO_EXTENSION);\n\t\t$originalFilename = pathinfo($_GET['qqfile'],PATHINFO_BASENAME);\n\t\t\n\t\t$result = $uploader->handleUpload(Image::FULLIMAGETEMPPATH,$temporaryFileName, $ext);\n\t\t// to pass data through iframe you will need to encode all html tags\n\t\t\n\t\t/*\n\t\t * If the qqFileUploader in extensions is OK with the file, it will return a 'success' = true\n\t\t * this checks the result of the qqFileUploader, which means that the file was correctly uploaded\n\t\t * Else an error is printed.\n\t\t */\n\t\tif(isset($result[\"success\"]))\n\t\t{\n\t\t\t// if the cdbox value is defined, the highest CD will not be evaluated, but rather the user defined is used\n\t\t\t// allowes the user to override the CD where images are placed, should the user know how to use the _GET cdbox\n\t\t\tif(isset($_GET['cdbox']))\n\t\t\t{\n\t\t\t\t// the next cd and id values are created based on the function in the model\n\t\t\t\t// the CD and ID values are the next highest, eg id1000->id1001, on the highest cd value\n\t\t\t\t$nextCdId = Image::model()->nextCdId($_GET['cdbox']);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$nextCdId = Image::model()->nextCdId(false);\n\t\t\t}\n\t\t\t\n\t\t\t// new Image object\n\t\t\t$insertImage = new Image;\n\t\t\t// temporary image description to make it easy to find images with missing metadata\n\t\t\t// removed, users did not understand what it was.\n\t\t\t// $insertImage->kuvateksti = 'täydentämätön lisätty ' . date('r') . ' alkuperäinen tiedostonimi ' . $originalFilename;\n\t\t\t$insertImage->cd = $nextCdId['cd'];\t\t\t\n\t\t\t$insertImage->id = $nextCdId['id'];\n\t\t\t\n\t\t\t// inserts 'e' \"boolean\" value to all the tag fields\n\t\t\t$tags=Image::model()->tags();\n\t\t\tforeach($tags as $tag)\n\t\t\t{\n\t\t\t\t$insertImage->$tag='e';\n\t\t\t}\n\t\t\t// saves the file extension, based on the $_GET['qqfile']\n\t\t\t$insertImage->tiedostotyyppi=strtolower($ext);\n\n\t\t\t$exif = exif_read_data(Image::FULLIMAGETEMPPATH . $temporaryFileName . '.' . $ext, 'IFD0');\n\t\t\t// echo('{error:\"Exif komponenttia ei voitu lukea:\"}');\t\t\n\t\t\t\t\t\n\t\t\tif (isset($exif['DateTimeOriginal']))\n\t\t\t{\n\t\t\t\t// quick parse so it fits the database\n\t\t\t\t$exifDate = $exif['DateTimeOriginal'];\n \t\t$insertImage->pvm = substr($exifDate,0,4) . substr($exifDate,5,2) . substr($exifDate,8,2);\n \t\t$insertImage->aikavarma = 'k';\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\t// blank date is needed so the image is not filtered out as deleted\n\t\t\t\t$insertImage->pvm = '00000000';\n\t\t\t}\n\t\t\t\n\t\t\t// saves the metadata to the database\n\t\t\t$insertImage->save();\n\t\t\t\n\t\t\t/*\n\t\t\t * for some reason this doesn't work;\n\t\t\t * $imageid = $insertImage->imageid; so this is a workaround.\n\t\t\t * It's probably a bug it doesn't work so if there's a later version, it's worth trying if it works.\n\t\t\t */\n\t\t\t$temp = Image::model()->findBySql(\"SELECT * FROM diat WHERE id = '\" . $nextCdId['id'] . \"' AND cd = '\" . $nextCdId['cd'] . \"';\");\n\t\t\t$this->actionAddToBasket($temp->imageid);\n\t\t\tunset($temp);\n\n\t\t\t// if the directory doesn't exist, it's created, the first '' is the cd base directory, eg /kuvat/9006/\n\t\t\t$subdirs = array('', '/96x64', '/192x128', '/384x256', '/768x512');\n\t\t\tforeach ($subdirs as $subdir)\n\t\t\t{\n\t\t\t\tif(!file_exists(Image::FULLIMAGEPATH . $nextCdId['cd'] . $subdir))\n\t\t\t\t{\n\t\t\t\t\tmkdir(Image::FULLIMAGEPATH . $nextCdId['cd'] . $subdir);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Moves the image to the proper location. \n\t\t\trename(\n\t\t\t\tImage::FULLIMAGETEMPPATH . $temporaryFileName . '.' . $ext, \n\t\t\t\t$insertImage->getImageFile('full', false, Image::FULLIMAGEPATH)\n\t\t\t);\n\t\t\t\n\t\t\t$insertImage->generateThumbnails();\n\t\t\t\t\n\t\t\t// success true JSON for the javascript upload plugin so it can se it's css correctly\n\t\t\techo('{success:true}');\n\t\t}\n\t\telse \n\t\t{\n\t\t\techo('{error:\"' . $result[\"error\"] . '\"}');\n\t\t}\n\t}", "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto1\");\n $uploadObj->setDbFieldName(\"foto1\");\n $uploadObj->setFolder(\"uploads/fotos/\");\n $uploadObj->setResize(\"true\", 100, 100);\n $uploadObj->setMaxSize(1000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "public function actionUploadImage()\n {\n\n $imageFile = UploadedFile::getInstanceByName(\"file\");\n $error = null;\n $success = false;\n $imageName = null;\n $width = 0;\n $height = 0;\n\n if ( !$imageFile ) {\n\n $error = \"Please choose image for uploading\";\n\n } elseif ($imageFile->error == UPLOAD_ERR_FORM_SIZE || $imageFile->error == UPLOAD_ERR_INI_SIZE)\n {\n\n $error = \"Image is too big, max file size is \" . ini_get(\"upload_max_filesize\");\n\n }\n elseif (!in_array($imageFile->getExtension(), ['jpg', 'jpeg', 'png', 'gif']) ) {\n\n $error = \"Image file has a wrong format. Allowed formats are: jpg, jpeg, png, gif\";\n\n }\n elseif ( !($sizes = @getimagesize( $imageFile->tempName ) ) ||\n ( $sizes[0] < Story::THUMB_WIDTH || $sizes[1] < Story::THUMB_HEIGHT)\n )\n {\n $error = \"Image should not be smaller than \".Story::THUMB_WIDTH.\"x\".Story::THUMB_HEIGHT;\n }\n // if image os to big. larger then 3mb\n elseif($imageFile->size > Story::MAX_IMAGE_SIZE)\n {\n $image_size=Story::MAX_IMAGE_SIZE/1024/1024;\n $error = \"Image should not be larger than \".round($image_size,2).\"mb\";\n }\n else\n {\n\n //Save to the temp folder\n $ext = pathinfo($imageFile->name, PATHINFO_EXTENSION);\n $imageName = time() . \"_\" . rand(0, 100) . \".\" . $ext;\n $imagePath = Yii::getAlias('@webroot'). Story::PATH_TEMP_IMAGE . $imageName;\n $imageFile->saveAs($imagePath);\n $success = true;\n $imageName = Story::PATH_TEMP_IMAGE . $imageName;\n $width = $sizes[0];\n $height = $sizes[1];\n\n }\n return json_encode(array(\n 'success' => $success,\n 'error' => $error,\n 'fileName' => $imageName,\n 'width' => $width,\n 'height' => $height\n ));\n }", "public function Do_Upload_images($image, $path, $date_added, $page_uid, $page_type = NULL) {\n\n $this->_queries->_res = NULL;\n $get_number_of_images = $this->_queries->GetData(\"promotional_images\", \"page_id\", $page_uid, $option = \"6\");\n\n\n $number = $get_number_of_images['row_count'];\n if ($number < \"1\") {\n var_dump($number);\n $dir = ABSOLUTH_PATH_IMAGES;\n\n foreach ($_FILES as $k => $file) {\n // Create directory if it does not exist\n if (!is_dir(ABSOLUTH_PATH_IMAGE_FRONT_END . \"page_id_\" . $page_uid . \"_images/\")) {\n mkdir(ABSOLUTH_PATH_IMAGE_FRONT_END . \"page_id_\" . $page_uid . \"_images/\");\n }\n\n\n $upload_file_new_name = preg_replace('/^.*\\.([^.]+)$/D', \"image_\" . $page_uid . \"_\" . ((int) $number + 1) . \".$1\", basename($file['name'][\"promo\"][\"uploadimage\"]));\n\n\n $upload_file = ABSOLUTH_PATH_IMAGE_FRONT_END . \"page_id_\" . $page_uid . \"_images/\" . $upload_file_new_name;\n\n\n $path = \"/r.frontend/images/page_id_\" . $page_uid . \"_images/\";\n $uploadOk = 1;\n\n $imageFileType = pathinfo($upload_file, PATHINFO_EXTENSION);\n }\n\n if (isset($_POST['form']['promo']['douploadimage'])) {\n\n $check = getimagesize($file[\"tmp_name\"]['promo']['uploadimage']);\n\n if ($check !== FALSE) {\n $uploadOk = 1;\n } else {\n $uploadOk = 0;\n }\n }\n if (file_exists($upload_file)) {\n $uploadOk = 0;\n }\n if ($file[\"size\"]['promo']['uploadimage'] > 5000000) {\n \n }\n if ($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\" && $imageFileType != \"gif\") {\n $uploadOk = 0;\n }\n if ($uploadOk == 0) {\n \n } else {\n\n if (move_uploaded_file($file[\"tmp_name\"]['promo']['uploadimage'], $upload_file)) {\n\n $image_name = preg_replace('/^.*\\.([^.]+)$/D', \"image_\" . $page_uid . \"_\" . ((int) $number + 1) . \".$1\", basename($file['name'][\"promo\"][\"uploadimage\"]));\n\n $table = array(\"table1\" => \"promotional_images\");\n $columns = array(\"`page_id`\", \"`image_name`\", \"`image_path`\", \"`date_added`\");\n\n $values = array(\"'\" . $page_uid . \"'\", \"'\" . $image_name . \"'\", \"'\" . $path . \"'\", \"'\" . DATE_ADDED . \"'\");\n $values_to_insert = array(\n \"tables\" => $table,\n \"columns\" => $columns,\n \"values\" => $values\n );\n $insert_images_into = $this->_queries->Insertvalues($values_to_insert, $option = \"1\");\n return true;\n } else {\n return false;\n }\n }\n } else {\n $flag = 1;\n if ($flag == 1) {\n $message = \"<li class='list-group-item list-group-item-warning'><i class='glyphicon glyphicon-info-sign'></i>&nbsp;\"\n . \"Only one image per page is allowed. Please delete the previous image.</li>\";\n echo $message;\n }\n }\n }", "private function uploadImage(){\n\t\treturn response(view('partials.templates.upload')->render(), 200);\n\t}", "public function setProfilePicture(){\n // user user-id from session\n $encodedkey = $this->session->userdata('PariKey_session');\n $user_id='';\n $key=base64_decode($encodedkey);\n $keyarr=explode('|', $key);\n\n if(!empty($_POST['img_path'])){\n $result = $this->user_model->setProfilePicture($_POST['img_path'],$keyarr[2]);\n\n if($result){\n $response=array(\n 'status' => 'success',\n 'message' => '<b>Success:</b> You Have Successfully updated Profile Image!'\n );\n }\n else{\n $response=array(\n 'status' => 'error',\n 'message' => '<b>Error:</b> Profile Image was not updated Successfully!'\n );\n } \n}\nelse{\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> Image not found!'\n );\n}\n\necho json_encode($response);\n}", "public function handleImage() {\n if ($this->imageData['error'] != 0) {\n return false;\n }\n\n // citanje ekstenzije\n $ext = pathinfo($this->imageData['name'], PATHINFO_EXTENSION);\n // kreiranje novog imena za fajl\n $filename = $this->id . '.' . $ext;\n // premestanje slike iz tmp foldera u ./img/products/\n\n // ToDo: provere slike\n\n move_uploaded_file(\n $this->imageData['tmp_name'],\n $this->productImgPath . $filename\n );\n // cuvanje putanje do slike u bazi\n $this->img = $this->productImgPath . $filename;\n $this->save();\n }", "function getPhoto()\n\t{\n\t\t$id = $this->input->post('id');\n\t\t$response = $this->mapi->getPhoto($id);\n\n\t\techo json_encode($response);\n\t}", "public function execute()\n {\n try {\n $result = $this->imageUploader->saveFileToTmpDir('image_thumbnail');\n $result['cookie'] = [\n 'name' => $this->_getSession()->getName(),\n 'value' => $this->_getSession()->getSessionId(),\n 'lifetime' => $this->_getSession()->getCookieLifetime(),\n 'path' => $this->_getSession()->getCookiePath(),\n 'domain' => $this->_getSession()->getCookieDomain(),\n ];\n } catch (\\Exception $e) {\n $result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];\n }\n return $this->resultFactory->create(ResultFactory::TYPE_JSON)->setData($result);\n }", "function add_img(){\n\t\t/*if ($ext==\"jpg\" || $ext==\"png\" || $ext=\"gif\"){*/\n\t\t$data = array();\n\t\t$filePath=\"data/upload/\";\n\n\t\tif (!file_exists($filePath)){//如果指定文件夹不存在,则创建文件夹\n\t\t\tmkdir($filePath, 0777, true);\n\t\t}\n\n\t\t/*if(move_uploaded_file($_FILES['file1']['tmp_name'],$name))\n\t\t{\n\t\t\t$is_success=1;\n\t\t\t$reason=$name;\n\t\t}*/\n\t\t$image_data = $_POST['data'];\n\t\t$index = 0;\n\t\tforeach ($image_data as $image) {\n\t\t\t$newfile = microtime().\".jpg\";\n\t\t\t$name=$filePath.$newfile;\n\t\t\tif (preg_match('/^(data:\\s*image\\/(\\w+);base64,)/', $image['src'], $result)){\n\t\t\t\t$type = $result[2];\n\t\t\t\tif (file_put_contents($name, base64_decode(str_replace($result[1], '', $image['src'])))){\n\t\t\t\t\t$data[$index]['sort'] = $image['sort'];\n\t\t\t\t\t$data[$index]['src'] = $name;\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo $data=$this->JSON($data);\n\t\t/*}else {\n\t\t\techo 'error';\n\t\t}*/\n\t}", "public function uploadImage()\n {\n return ImgUpload::uploadImage($this);\n }", "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto_img\");\n $uploadObj->setDbFieldName(\"foto_img\");\n $uploadObj->setFolder(\"../dados/fotos/\");\n $uploadObj->setResize(\"true\", 640, 0);\n $uploadObj->setMaxSize(2048);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"custom\");\n $uploadObj->setRenameRule(\"foto{foto_id}_{rs_upload.arquivo}.{KT_ext}\");\n return $uploadObj->Execute();\n}", "function upload_error($error)\n{\n echo json_encode(array(\"error\"=>$error));\n}", "public function tempfiles()\n {\n $dir = \"img/tmp/\";\n $name = array();\n if (isset($_FILES['file']) && !empty($_FILES['file'])) {\n if (!file_exists($dir)) {\n mkdir($dir, 0777, true);\n }\n\n $ext = pathinfo($_FILES['file'][\"name\"], PATHINFO_EXTENSION);\n $allowed = array('jpg', 'jpeg', 'png', 'gif');\n if (in_array(strtolower($ext), $allowed)) {\n $ran = time();\n $upload_img = $ran . \"_\" . $_FILES['file'][\"name\"];\n if (strlen($upload_img) > 80) {\n $upload_img = $ran . \"_\" . rand() . \".\" . $ext;\n }\n $upload_img = str_replace(' ', '_', $upload_img);\n if (move_uploaded_file($_FILES['file'][\"tmp_name\"], $dir . $upload_img)) {\n if (file_exists($dir . $upload_img) && $upload_img != \"\") {\n $image = Router::url(\"/\", true) . 'tim-thumb/timthumb.php?src=' . $this->request->webroot . \"webroot/\" . $dir . $upload_img . '&w=100&h=100&a=t&q=100';\n } else {\n $image = Router::url(\"/\", true) . 'tim-thumb/timthumb.php?src=' . $this->request->webroot . \"webroot/\" . 'img/noimage.jpg&w=100&h=100&iar=1';\n }\n $imagepath = \"\";\n $name = array(\"success\" => true, \"data\" => array(\"imagepath\" => $image, \"name\" => $upload_img));\n } else {\n $name = array(\"success\" => false, \"data\" => array($_FILES['file'][\"name\"] . \" Invalid File Please upload another image file.\"));\n }\n } else {\n $name = array(\"success\" => false, \"data\" => array($_FILES['file'][\"name\"] . \" Invalid file Only JPG, GIF, PNG file type are allowed.\"));\n }\n }\n die(json_encode($name));\n }", "function imageID( )\r\n {\r\n return $this->ImageID;\r\n }", "function imageUpload($img_file, $ext, $userid)\n{\n\n $picext = strtolower($ext[1]);\n\n if( $picext == 'pjpeg' || $picext == 'jpeg'){\n\n $picext = 'jpg';\n }\n\n if( $picext == 'x-png' ) {\n $picext= 'png';\n }\n $ext_ok = '1';\n\n\n $fileE = explode(',', FILEEXT);\n foreach ($fileE as $ex) {\n\n\n if ( $ex == $picext ) $ext_ok++;\n\n }\n\n/* bmp is removed as valid source time being */\n if ( $ext_ok <= '0' or $picext == 'bmp') {\n\n\n return 1; //wrong file type\n\n }\n\n clearstatcache();\n\n $fstats= stat($img_file);\n\n $picsize = $fstats[7];\n\n $handle = fopen ($img_file, 'rb');\n\n /* Get current picture size and allowed size. If pic size is more than the allowed size, flag error.. */\n\n\n if ($picsize > ALLWDSIZE) {\n\n return 2; //file size exceeded\n\n }\n\n $orgimg = fread($handle, $picsize);\n\n fclose ($handle);\n\n\n if ( $picext != 'jpg' ) {\n /* convert the picture to jpg. This is to enable picture editing */\n\n\n //$jpgfile = createThumb($orgimg, 'N');\n $img_tmp=createImg($picext,$img_file);\n $jpgfile = createJpeg($img_tmp, 'N');\n $newimg = file_get_contents($jpgfile);\n\n } else {\n\n $newimg = $orgimg;\n }\n\n $img_tmp=createImg($picext,$img_file);\n\n $tnimg_file = createJpeg($img_tmp,'Y');\n\n $tnimg = file_get_contents($tnimg_file);\n\n $tnext = 'jpg';\n\n $picext = 'jpg';\n\n if (1) {\n\n $imgfile = writeImageToFile($newimg, $userid, '','');\n\n $newimg = 'file:'.$imgfile;\n sleep(5);\n\n $tnimgfile = writeImageToFile($tnimg, $userid, 'tn','');\n\n $tnimg = 'file:'.$tnimgfile;\n\n\n } else {\n\n $newimg = base64_encode($newimg);\n\n $tnimg = base64_encode($tnimg);\n //save in DB\n }\n\n return 0;\n}", "public function getImageId()\n {\n return $this->_imageId;\n }" ]
[ "0.6914485", "0.65540594", "0.64273363", "0.633404", "0.62768304", "0.62700474", "0.6246787", "0.6237996", "0.6179238", "0.6125587", "0.61215407", "0.60871947", "0.6084634", "0.6075415", "0.60514855", "0.6032719", "0.6007915", "0.6007191", "0.5999424", "0.5979448", "0.59611624", "0.59583765", "0.5945901", "0.5927944", "0.59165245", "0.59160644", "0.5908076", "0.59061956", "0.59048194", "0.59042823", "0.5876504", "0.5871808", "0.5871427", "0.58578193", "0.58570117", "0.58387405", "0.58351254", "0.5826583", "0.5823213", "0.5808363", "0.5796785", "0.5791346", "0.57876366", "0.5768807", "0.576866", "0.57631165", "0.57618815", "0.575666", "0.57523954", "0.57523423", "0.57496727", "0.5746367", "0.57461107", "0.57428396", "0.5732597", "0.57199687", "0.57186204", "0.5707782", "0.5707665", "0.5703979", "0.57037336", "0.5699092", "0.56920516", "0.5673937", "0.56678766", "0.56665283", "0.5659129", "0.56580347", "0.56561", "0.5655885", "0.56508815", "0.5646975", "0.5642517", "0.56380165", "0.5637551", "0.5636804", "0.5634278", "0.562743", "0.5623653", "0.5619775", "0.56153715", "0.5613313", "0.56109107", "0.5603453", "0.56028587", "0.5600791", "0.55970955", "0.55928785", "0.55838805", "0.55832386", "0.55790424", "0.5574265", "0.557239", "0.5570784", "0.5569059", "0.5556468", "0.555501", "0.5554259", "0.5552568", "0.5545855" ]
0.67073905
1
============================= All magic functions starts =============================
public function __construct($objs) { if($objs !== null){ //store the `config` class from $objs variable $this->config=$objs["config"]; //store the `functions` class from $objs variable $this->functions=$objs["functions"]; //store the `model_objs` class from $objs variable $this->model_objs=$objs["model_objs"]; //store the `mail class from $thie variable $this->mail=$objs["mail"]; //store the `mail class from $thie variable $this->user_info = $this->logged_user_info($_SESSION["user_id"]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function init()\n\t{\n\t\treturn;\n\t}", "protected function init()\n\t{\n\t\t\n\t}", "public function helper()\n\t{\n\t\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function _init()\r\n\t{\r\n\t}", "protected function init() {return;}", "private function __() {\n }", "private function setup()\r\n\t{ }", "public function init()\n {\n \treturn;\n }", "protected function _init()\n {\n }", "public function init() {\t\t\n\n }", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "public function init() {\n\t\t\n\t}", "abstract protected function bootstrap();", "function initialize() ;", "public function _init() {\r\n\r\n }", "protected function _afterInit() {\n\t}", "protected function _init()\n {\n }", "abstract protected function setup();", "protected function preProcess() {}", "protected function init() {\n\t}", "protected function init() {\n\t}", "public function __init(){}", "public function init(){\n\t\t\n\t}", "public static function init(){\n \n }", "public function init()\n {\t\t\t\n }", "public function init()\n {\t\t\t\n }", "protected function init()\n {\n\n }", "public function init()\n\t\t{\n\t\n\t\t}", "private function public_hooks()\n\t{\n\t}", "public function _init() {}", "final private function __construct(){\r\r\n\t}", "public function init()\n { \t\n }", "protected static function booting()\n {\n //\n }", "protected function __init__() { }", "protected function __onInit()\n\t{\n\t}", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "public function init()\n {\n \t\n }", "public function init()\n {\n \t\n }", "public function init ()\r\n {\r\n }", "private function __construct() {\r\n\t\t\r\n\t}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function initialize() {\n\t\t\n\t}", "public function init() {\r\n\t}", "public function init() {\r\n\r\n\t\t}", "protected function init()\n\t{\n\t\t// Override this method as required.\n\t}", "private function _i() {\n }", "public function init()\n {\n \n \n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "public function init()\n\t{\n\n\t}", "private function __construct() {\r\n\t\r\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "public function init()\n\t{\n\t}", "protected function setup(){\n }" ]
[ "0.6815809", "0.67971253", "0.67480445", "0.6714164", "0.6714164", "0.6714164", "0.6714164", "0.67141354", "0.67141354", "0.67141354", "0.67141354", "0.67141354", "0.67141354", "0.67132974", "0.67132974", "0.6704632", "0.6675079", "0.6666745", "0.65934384", "0.6540716", "0.64847445", "0.6471901", "0.6469003", "0.6469003", "0.6469003", "0.6469003", "0.6431166", "0.64102256", "0.6378006", "0.63717866", "0.6365091", "0.6354209", "0.63468146", "0.6341493", "0.63307583", "0.63307583", "0.6326437", "0.63211554", "0.62975", "0.62847084", "0.62847084", "0.62807953", "0.62798715", "0.62714416", "0.62682843", "0.6263913", "0.6261056", "0.6260899", "0.6257848", "0.62471896", "0.6239689", "0.6236976", "0.62323004", "0.62323004", "0.62292963", "0.6224325", "0.6217349", "0.6217349", "0.6217349", "0.6217349", "0.6217349", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.6216525", "0.621405", "0.621405", "0.621405", "0.621405", "0.62125605", "0.6211824", "0.6206319", "0.6197505", "0.61890334", "0.6179859", "0.6179294", "0.6179294", "0.6179294", "0.6168693", "0.61649716", "0.61583656", "0.61583656", "0.61583656", "0.61583656", "0.61583656", "0.61583656", "0.61583656", "0.61583656", "0.61583656", "0.61545545" ]
0.0
-1
============================= All private functions starts ============================= =========================== All private functions ends =========================== =========================== All Public functions starts ===========================
public function ab(){ echo "I am ab from from ajax_users notifications"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __() {\n }", "private function init()\n\t{\n\t\treturn;\n\t}", "final private function __construct(){\r\r\n\t}", "private function __construct()\t{}", "private function _i() {\n }", "private function __construct() {\r\n\t\t\r\n\t}", "protected function _init()\r\n\t{\r\n\t}", "private function __construct() {\r\n\t\r\n\t}", "protected function init() {return;}", "protected function init()\n\t{\n\t\t\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "public function helper()\n\t{\n\t\n\t}", "protected function _init()\n {\n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() { \n\t\t\n\n\t}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "public function _init() {\r\n\r\n }", "public function init() {\t\t\n\n }", "private function __construct()\n\t{\n\t\t\n\t}", "private function __construct () {}", "public function init() {\n\t\t\n\t}", "private function __construct () \n\t{\n\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "private function __construct()\r\n {\r\n }", "private function __construct()\r\n {\r\n }", "private function __construct()\r\n\t{\r\n\t}", "private function __construct( )\n {\n\t}", "public function init()\n {\n \treturn;\n }", "final private function __construct() {\n\t\t\t}", "private function __construct()\r\r\n\t{\r\r\n\t}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function _init()\n {\n }", "function _construct() {\n \t\n\t\t\n\t}", "private function __construct() {\r\n }", "private function setup()\r\n\t{ }", "final private function __construct()\n\t{\n\t}", "private function __construct()\r\n {}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {;}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "final private function __construct() {}", "final private function __construct() {}", "protected function __init__() { }", "private function __construct() \n {\n\t\t\n }", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.69753575", "0.6578391", "0.65743583", "0.65480506", "0.6542085", "0.6519029", "0.65185887", "0.6492093", "0.6474334", "0.645033", "0.64163107", "0.64163107", "0.64163107", "0.64163107", "0.64163107", "0.64163107", "0.6415487", "0.6415487", "0.6415487", "0.6415487", "0.6415065", "0.6415065", "0.6374128", "0.6359278", "0.6337197", "0.6337197", "0.6337197", "0.6335383", "0.6333719", "0.6333673", "0.63335824", "0.6318142", "0.63099", "0.63093185", "0.6299699", "0.6299365", "0.6299365", "0.6298146", "0.6298146", "0.6280555", "0.6279792", "0.627584", "0.6260376", "0.6251522", "0.6242075", "0.6242075", "0.6242075", "0.6242075", "0.6223231", "0.6219451", "0.6207737", "0.61994904", "0.619429", "0.61874086", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.6181423", "0.61750746", "0.61717516", "0.61717516", "0.61717516", "0.61717516", "0.61717516", "0.61717516", "0.61717516", "0.61717516", "0.61717516", "0.6171543", "0.6171543", "0.6170845", "0.6170792", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491", "0.6163491" ]
0.0
-1
Filter the HTML script tag of `fontawesome` script to add `defer` attribute.
function add_defer_attribute( $tag, $handle ) { if ( 'font-awesome' === $handle ) { $tag = str_replace( ' src', ' defer src', $tag ); } return $tag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_script_loader_tag( $tag, $handle ) {\n foreach ( [ 'async', 'defer' ] as $attr ) {\n if ( ! wp_scripts()->get_data( $handle, $attr ) ) {\n continue;\n }\n // Prevent adding attribute when already added in #12009.\n if ( ! preg_match( \":\\s$attr(=|>|\\s):\", $tag ) ) {\n $tag = preg_replace( ':(?=></script>):', \" $attr\", $tag, 1 );\n }\n // Only allow async or defer, not both.\n break;\n }\n return $tag;\n}", "function ic_add_scripts_attribute( $tag, $handle ) {\n\t$handles = array(\n\t\t'main_scripts',\n\t);\n\tforeach( $handles as $defer_script) :\n\t\tif ( $defer_script === $handle ) {\n\t\t\treturn str_replace( ' src', ' defer rel=\"preload\" as=\"script\" src', $tag );\n\t\t}\n\tendforeach;\n\treturn $tag;\n}", "function wsds_defer_scripts( $tag, $handle, $src ) {\n $defer_scripts = array( \n 'autocompletejs',\n 'admin-bar',\n 'ala_custom_js',\n 'jquery-migrate',\n 'child-pages-shortcode',\n );\n\n if ( in_array( $handle, $defer_scripts ) ) {\n return '<script src=\"' . $src . '\" defer=\"defer\" type=\"text/javascript\"></script>' . \"\\n\";\n }\n \n return $tag;\n}", "public static function add_defer_attribute($tag, $handle) {\n $scripts_to_defer = array( \n 'tether-js',\n //'vue-js',\n 'bootstrap-js',\n 'jquery-ui-js'\n );\n \n foreach($scripts_to_defer as $defer_script) {\n if ($defer_script === $handle) {\n return str_replace(' src', ' defer=\"defer\" src', $tag);\n }\n }\n return $tag;\n }", "function defer_js_async($tag){\n\t\n\t// list of scripts to defer\n $scripts_to_defer = array('');\n\n\t// list of scripts to async\n\t$scripts_to_async = array('/src/js/nav.js', 'https://fonts.googleapis.com/css?family=Julius+Sans+One', 'https://fonts.googleapis.com/css?family=Raleway');\n\t \n\t// defer scripts\n\tforeach($scripts_to_defer as $defer_script){\n\t\tif(true == strpos($tag, $defer_script ) )\n\t\treturn str_replace( ' src', ' defer=\"defer\" src', $tag );\t\n\t}\n\n\t// async scripts\n\tforeach($scripts_to_async as $async_script){\n\t\tif(true == strpos($tag, $async_script ) )\n\t\treturn str_replace( ' src', ' async=\"async\" src', $tag );\t\n\t}\n\treturn $tag;\n\t}", "function add_asyncdefer_attribute($tag, $handle) {\n if (strpos($handle, 'async') !== false) {\n // return the tag with the async attribute\n return str_replace( '<script ', '<script async ', $tag );\n }\n // if the unique handle/name of the registered script has 'defer' in it\n else if (strpos($handle, 'defer') !== false) {\n // return the tag with the defer attribute\n return str_replace( '<script ', '<script defer ', $tag );\n }\n // otherwise skip\n else {\n return $tag;\n }\n }", "function script_loader_tag( $tag, $handle ) {\n\t$script_execution = wp_scripts()->get_data( $handle, 'script_execution' );\n\n\tif ( ! $script_execution ) {\n\t\treturn $tag;\n\t}\n\n\tif ( 'async' !== $script_execution && 'defer' !== $script_execution ) {\n\t\treturn $tag;\n\t}\n\n\t// Abort adding async/defer for scripts that have this script as a dependency. _doing_it_wrong()?\n\tforeach ( wp_scripts()->registered as $script ) {\n\t\tif ( in_array( $handle, $script->deps, true ) ) {\n\t\t\treturn $tag;\n\t\t}\n\t}\n\n\t// Add the attribute if it hasn't already been added.\n\tif ( ! preg_match( \":\\s$script_execution(=|>|\\s):\", $tag ) ) {\n\t\t$tag = preg_replace( ':(?=></script>):', \" $script_execution\", $tag, 1 );\n\t}\n\n\treturn $tag;\n}", "function fa_load_script( $script, $dependency = array( 'jquery' ) ){\t\n\t\n\tif( defined('FA_SCRIPT_DEBUG') && FA_SCRIPT_DEBUG ){\n\t\t$script .= '.dev';\n\t}\n\t\n\t$url = fa_get_uri( 'assets/front/js/' . $script . '.js' );\n\twp_enqueue_script(\n\t\t'fa-script-' . $script,\n\t\t$url,\n\t\t$dependency,\n\t\tfalse\t\t\n\t);\t\n\treturn 'fa-script-' . $script;\n}", "function maybe_enqueue_font_awesome( $field )\n\t{\n\t\tif( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {\n\t\t\tadd_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );\n\t\t}\n\n\t\treturn $field;\n\t}", "function profbud_script_loader_tag( $tag, $handle ) {\r\n\t$scripts_to_load = array(\r\n\t\tarray(\r\n\t\t\t( 'name' ) => 'jquery',\r\n\t\t\t( 'integrity' ) => 'sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=',\r\n\t\t)\r\n\t);\r\n\t$key = array_search( $handle, array_column( $scripts_to_load, 'name' ) );\r\n\tif ( $key !== false ) {\r\n\t\t$tag = str_replace( '></script>', ' integrity=\\'' . $scripts_to_load[$key]['integrity'] . '\\' crossorigin=\\'anonymous\\'></script>', $tag );\r\n\t}\r\n\treturn $tag;\r\n}", "function addJS($src, $async, $defer){\n echo '<script src=\"'. $src .'\"'. ($async? \" async\":\"\") . ($defer? \" defer\":\"\") .'> </script>';\n}", "public function add_script_tag_attributes($tag, $handle) {\n switch ($handle) {\n // adding async to main js bundle\n // for defer, replace async=\"async\" with defer=\"defer\"\n case ('pan_bootstrap_scripts'):\n return str_replace( ' src', ' async=\"async\" src', $tag );\n break;\n\n // example adding CDN integrity and crossorigin attributes\n // Note: popper.js is loaded into the main.bundle.js from npm\n // This is just an example\n case ('popper-js'):\n return str_replace( ' min.js', 'min.js\" integrity=\"sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q\" crossorigin=\"anonymous\"', $tag );\n break;\n\n // example adding CDN integrity and crossorigin attributes\n // Note: bootstrap.js is loaded into the main.bundle.js from npm\n // This is just an example\n case ('bootstrap-js'):\n return str_replace( ' min.js', 'min.js\" integrity=\"sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4\" crossorigin=\"anonymous\"', $tag );\n break;\n\n default:\n return $tag;\n\n } // /switch\n }", "function font_awesome()\n{\n wp_enqueue_style(\"font_awesome\", \"//use.fontawesome.com/releases/v5.6.3/css/all.css\");\n}", "public function testAttributes() {\n $build['#attached']['library'][] = 'common_test/js-attributes';\n $assets = AttachedAssets::createFromRenderArray($build);\n\n $js = $this->assetResolver->getJsAssets($assets, FALSE)[1];\n $js_render_array = \\Drupal::service('asset.js.collection_renderer')->render($js);\n $rendered_js = $this->renderer->renderPlain($js_render_array);\n $expected_1 = '<script src=\"http://example.com/deferred-external.js\" foo=\"bar\" defer></script>';\n $expected_2 = '<script src=\"' . $this->fileUrlGenerator->generateString('core/modules/system/tests/modules/common_test/deferred-internal.js') . '?v=1\" defer bar=\"foo\"></script>';\n $this->assertStringContainsString($expected_1, $rendered_js, 'Rendered external JavaScript with correct defer and random attributes.');\n $this->assertStringContainsString($expected_2, $rendered_js, 'Rendered internal JavaScript with correct defer and random attributes.');\n }", "function add_extra_attributes_to_enqueued_js( $tag, $handle ) {\n\n\t$search = '></script>';\n\n\tif ( 'jquery' === $handle ) {\n\t\treturn str_replace( $search, \" integrity='sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj' crossorigin='anonymous'\" . $search, $tag );\n\t}\n\n\tif ( 'bootstrap-bundle' === $handle ) {\n\t\treturn str_replace( $search, \" integrity='sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx' crossorigin='anonymous'\" . $search, $tag );\n\t}\n\n\tif ( 'font-awesome' === $handle ) {\n\t\treturn str_replace( $search, \" integrity='sha512-UwcC/iaz5ziHX7V6LjSKaXgCuRRqbTp1QHpbOJ4l1nw2/boCfZ2KlFIqBUA/uRVF0onbREnY9do8rM/uT/ilqw==' crossorigin='anonymous'\" . $search, $tag );\n\t}\n\n\treturn $tag;\n\n}", "public function enqueue_font_awesome() {\n\t\tglobal $hestia_load_fa;\n\n\t\tif ( $hestia_load_fa !== true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\twp_enqueue_style( 'font-awesome-5-all', get_template_directory_uri() . '/assets/font-awesome/css/all.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\tif ( $this->should_load_shim() ) {\n\t\t\twp_enqueue_style( 'font-awesome-4-shim', get_template_directory_uri() . '/assets/font-awesome/css/v4-shims.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\t}\n\n\t\treturn true;\n\t}", "function register_scripts_admin() {\n\twp_enqueue_style('font-awesome', 'http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css');\n}", "static public function deregister_scripts() {\n wp_dequeue_script( 'filterable-portfolio' );\n wp_deregister_script( 'filterable-portfolio' );\n }", "function demo_plugin_font_awesome() {\n\t\twp_enqueue_style( 'load-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'load-select2-css', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css' );\n\t\twp_enqueue_script( 'load-select2-js', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js' );\n\t\twp_enqueue_style( 'load-datatables-css', 'https://cdn.datatables.net/1.10.16/css/jquery.dataTables.css' );\n\t\twp_enqueue_script( 'load-datatables-js', 'https://cdn.datatables.net/1.10.16/js/jquery.dataTables.js' );\n\t\twp_enqueue_script( 'load-datepicker-js', 'https://code.jquery.com/ui/1.12.1/jquery-ui.js' );\n\t\twp_enqueue_style( 'load-datepicker-css', 'https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css' );\n\t}", "function theme_add_bootstrap_fontawesome() {\n\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() . '/css/bootstrap.min.css' );\n\twp_enqueue_style( 'style-css', get_stylesheet_directory_uri() . '/style.css' );\n\twp_enqueue_style( 'fontawesome-css', get_stylesheet_directory_uri() . '/css/font-awesome.min.css' );\n\twp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array(), '3.0.0', true );\n}", "function pagely_load_font_awesome() {\n\t\n\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', false, false, false ); \n}", "function defer_parsing_of_js( $url ) {\r\n if ( is_user_logged_in() ) return $url; //don't break WP Admin\r\n if ( FALSE === strpos( $url, '.js' ) ) return $url;\r\n if ( strpos( $url, 'jquery.js' ) ) return $url;\r\n return str_replace( ' src', ' defer src', $url );\r\n}", "public function input_admin_enqueue_scripts() {\n\t\t// Min version ?\n\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ? '' : '.min';\n\n\t\twp_localize_script( 'acf-input-svg-icon', 'svg_icon_format_data', $this->parse_svg() );\n\t\twp_register_style( 'acf-input-svg-icon', ACF_SVG_ICON_URL . 'assets/css/style' . $suffix . '.css', array( 'select2' ), ACF_SVG_ICON_VER );\n\n\t\twp_enqueue_script( 'acf-input-svg-icon' );\n\t\twp_enqueue_style( 'acf-input-svg-icon' );\n\t}", "public function loadAssets()\n {\n add_action('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n add_filter('script_loader_tag', [$this, 'addAssetAttribute'], 10, 3);\n }", "public function getScriptAttributes() {\n\t\treturn ' ' . trim( preg_replace( '/\\s+/', ' ', apply_filters( 'aioseo_ga_attributes', '' ) ) );\n\t}", "function harvest_deregister_scripts() {\n\tglobal $wp_query, $post;\n\t\n\tif( ! ( strpos( json_encode( $wp_query ), '[contact-form-7' ) || strpos( json_encode( $post ), '[contact-form-7' ) ) ) {\n\t\t\twp_deregister_script( 'contact-form-7' );\n\t\t\twp_deregister_style( 'contact-form-7' );\n\t}\n\n}", "public function scripts_styles_footer() {\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$fa_ver = '4.7.0';\n\t\t$fa_url = \"//maxcdn.bootstrapcdn.com/font-awesome/$fa_ver/css/font-awesome.min.css\";\n\t\t$main_js_url = $theme_url . '/js/main.min.js';\n\t\t$main_js_path = get_template_directory() . '/js/main.min.js';\n\t\t$main_js_ver = file_exists( $main_js_path ) ? filemtime( $main_js_path ) : '';\n\n\t\twp_enqueue_style( 'fa-style', $fa_url, null, $fa_ver );\n\t\twp_enqueue_style( 'gfont', 'https://fonts.googleapis.com/css?family=Handlee' );\n\t\twp_enqueue_script( 'superiocity-script', $main_js_url, null, $main_js_ver, true );\n\t}", "public function remove_conflicting_asset_files() {\n\t\t$scripts = array(\n\t\t\t'jetpack-onboarding-vendor', // Jetpack Onboarding Bluehost.\n\t\t);\n\n\t\tif ( ! empty( $scripts ) ) {\n\t\t\tforeach ( $scripts as $script ) {\n\t\t\t\twp_dequeue_script( $script ); // Remove JS file.\n\t\t\t\twp_deregister_script( $script );\n\t\t\t}\n\t\t}\n\t}", "function script_loader_filter ($src) {\n if (FALSE === strpos ($src, 'ajax.googleapis.com')) {\n\treturn $src;\n }\n\n $new_src = explode('?', $src);\n return $new_src[0];\n\n}", "private function prepare_allowed_scripts_regex() {\n\t\t$delay_js_scripts = $this->options->get( 'delay_js_scripts', [] );\n\n\t\t/**\n\t\t * Filters JS files to included into delay JS.\n\t\t *\n\t\t * @since 3.7\n\t\t *\n\t\t * @param array $delay_js_scripts List of allowed JS files.\n\t\t */\n\t\t$delay_js_scripts = (array) apply_filters( 'rocket_delay_js_scripts', $delay_js_scripts );\n\n\t\tif ( empty( $delay_js_scripts ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tforeach ( $delay_js_scripts as $i => $delay_js_script ) {\n\t\t\t$delay_js_scripts[ $i ] = preg_quote( str_replace( '#', '\\#', $delay_js_script ), '#' );\n\t\t}\n\n\t\treturn implode( '|', $delay_js_scripts );\n\n\t}", "function wp_add_inline_script($handle, $data, $position = 'after')\n {\n }", "function ahla_register_assets()\n{\n\t$assets = AHLAURL . '/assets';\n\t$ver \t = AHLAVER;\n\n\t// theme style.css\n\twp_register_style( 'theme-style' , get_stylesheet_uri() );\n\n\t// others\n\t$file = $assets.'/js/skip-link-focus-fix.js';\n\twp_register_script( 'skip-link-focus-fix', $file, array(), $ver, true );\n\n\tdo_action('ahla_register_assets');\n}", "function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool additive_script_debug\n\t */\n\t$debug = apply_filters( 'additive_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'additive',\n\t\tADDITIVE_TEMPLATE_URL . \"/assets/js/additive{$min}.js\",\n\t\tarray(),\n\t\tADDITIVE_VERSION,\n\t\ttrue\n\t);\n}", "function jngfa_scripts() {\n\twp_enqueue_style('icons', 'https://use.fontawesome.com/releases/v5.0.9/css/all.css');\n\twp_enqueue_style('slick', get_theme_file_uri('/assets/js/slick/slick.css'));\n\twp_enqueue_style('slick-theme', get_theme_file_uri('/assets/js/slick/slick-theme.css'));\n\twp_enqueue_style('fancybox', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.css');\n\twp_enqueue_style('datepicker', get_theme_file_uri('/assets/js/datepicker/datepicker.min.css'));\n\twp_enqueue_style('jngfa-style', get_stylesheet_uri());\n\n\tif(ar()){\n\t\twp_enqueue_style('jngfa-style-ar', get_theme_file_uri('/rtl.css'));\n\t}\n\n\twp_enqueue_script('slick', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js', array('jquery'), '1.0.0', true);\n\twp_enqueue_script('fancybox', get_theme_file_uri('/assets/js/slick/slick.min.js'), array('jquery'), '1.0.0', true);\n\twp_enqueue_script('moment', get_theme_file_uri('/assets/js/moment.min.js'), array('jquery'), '1.0.0', true);\n\twp_enqueue_script('datepicker', get_theme_file_uri('/assets/js/datepicker/datepicker.min.js'), array('jquery'), '1.0.0', true);\n\twp_enqueue_script('mainjs', get_theme_file_uri('/assets/js/main.js'), array('jquery', 'moment', 'datepicker'), '1.0.0', true);\n}", "public static function wcap_dequeue_scripts_atc_modal() {\n\n $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\n wp_dequeue_script('wc-add-to-cart');\n\n wp_register_script( \n 'wc-add-to-cart', \n WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_modal' . $suffix . '.js', \n '', \n '', \n true );\n wp_enqueue_script( 'wc-add-to-cart' );\n }", "function fdcw52_assets() {\n\twp_enqueue_script(\n\t\t'fdcw52-find-css-deprecations',\n\t\tplugins_url( 'find-deprecated-css-in-wp52.js', __FILE__ ),\n\t\tarray( 'wp-data' )\n\t);\n}", "function frontend_enqueue_scripts()\n\t{\n\t\twp_register_style('font-awesome', $this->stylesheet, array(), $this->version);\n\n\t\twp_enqueue_style( array( 'font-awesome' ) );\n\t}", "function textdomain_scripts_styles() {\n\t\t// We're using the awesome Font Awesome icon font. http://fortawesome.github.io/Font-Awesome\n\t\twp_register_style( 'fontawesome', trailingslashit( get_template_directory_uri() ) . '/inc/assets/css/fontawesome-all.min.css' , array(), '5.8.2', 'all' );\n\t\twp_enqueue_style( 'fontawesome' );\n\t}", "function defer_parsing_of_js ( $url ) {\nif ( FALSE === strpos( $url, '.js' ) ) return $url;\nif ( strpos( $url, 'jquery.js' ) ) return $url;\nreturn \"$url' defer\";\n}", "function wp_add_inline_script( $handle, $data, $position = 'after' ) {\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\tif ( false !== stripos( $data, '</script>' ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, sprintf(\n\t\t\t/* translators: 1: <script>, 2: wp_add_inline_script() */\n\t\t\t__( 'Do not pass %1$s tags to %2$s.' ),\n\t\t\t'<code>&lt;script&gt;</code>',\n\t\t\t'<code>wp_add_inline_script()</code>'\n\t\t), '4.5.0' );\n\t\t$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );\n\t}\n\n\treturn wp_scripts()->add_inline_script( $handle, $data, $position );\n}", "function ccac_2020_new_enqueue_scripts() {\n\n wp_deregister_script( 'webfont' );\n wp_enqueue_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', false, null, false);\n\n wp_register_script( 'inline-script-1', '', [], '', false );\n wp_enqueue_script( 'inline-script-1' );\n wp_add_inline_script( 'inline-script-1', 'WebFont.load({ google: { families: [\"Lato:100,100italic,300,300italic,400,400italic,700,700italic,900,900italic\",\"Montserrat:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic\",\"Roboto:100,300,300italic,regular,italic,500,700,900\",\"Poppins:regular,500,600,700,800\",\"Work Sans:regular,600,700,800\"] }});');\n\n wp_register_script( 'inline-script-2', '', [], '', false );\n wp_enqueue_script( 'inline-script-2' );\n wp_add_inline_script( 'inline-script-2', '!function(o,c){var n=c.documentElement,t=\" w-mod-\";n.className+=t+\"js\",(\"ontouchstart\"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+\"touch\")}(window,document);');\n\n wp_register_script( 'inline-script-3', '', [], '', false );\n wp_enqueue_script( 'inline-script-3' );\n wp_add_inline_script( 'inline-script-3', '(function(i,s,o,g,r,a,m){i[\\'GoogleAnalyticsObject\\']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,\\'script\\',\\'https://www.google-analytics.com/analytics.js\\',\\'ga\\');\n ga(\\'create\\', \\'UA-91610200-1\\', \\'auto\\');\n ga(\\'send\\', \\'pageview\\');');\n\n wp_deregister_script( 'installpopupbutton' );\n wp_enqueue_script( 'installpopupbutton', 'https://donorbox.org/install-popup-button.js', false, null, false);\n\n wp_register_script( 'inline-script-4', '', [], '', false );\n wp_enqueue_script( 'inline-script-4' );\n wp_add_inline_script( 'inline-script-4', 'window.DonorBox = { widgetLinkClassName: \\'custom-dbox-popup\\' }');\n\n wp_deregister_script( 'jqueryafdd' );\n wp_enqueue_script( 'jqueryafdd', 'https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.4.1.min.220afd743d.js?site=5e7694e31a5b6b0c04a48342', false, null, true);\n\n wp_deregister_script( 'webflow' );\n wp_enqueue_script( 'webflow', get_template_directory_uri() . '/js/webflow.js', false, null, true);\n\n /* Pinegrow generated Enqueue Scripts End */\n\n /* Pinegrow generated Enqueue Styles Begin */\n wp_enqueue_style( 'wp-webflow-compatibility', get_template_directory_uri().'/css/wp-webflow.css', false, null);\n\n wp_deregister_style( 'normalize' );\n wp_enqueue_style( 'normalize', get_template_directory_uri() . '/css/normalize.css', false, null, 'all');\n\n wp_deregister_style( 'webflow' );\n wp_enqueue_style( 'webflow', get_template_directory_uri() . '/css/webflow.css', false, null, 'all');\n\n wp_deregister_style( 'ccacwebflow' );\n wp_enqueue_style( 'ccacwebflow', get_template_directory_uri() . '/css/ccac-2020.webflow.css', false, null, 'all');\n\n wp_deregister_style( 'style' );\n wp_enqueue_style( 'style', get_bloginfo('stylesheet_url'), false, null, 'all');\n\n /* Pinegrow generated Enqueue Styles End */\n\n }", "function _h_remove_jetpack_footer_assets() {\n wp_deregister_script('sharing-js');\n\n // disable spinner when infinite loading is enabled\n wp_deregister_script('jquery.spin');\n wp_deregister_script('spin');\n}", "public function admin_scripts() {\n\t\twp_enqueue_style( 'wpex-font-awesome', WPEX_CSS_DIR_URI .'font-awesome.min.css' );\n\t}", "function check_fa4_styles() {\n\n\t\tglobal $wp_styles;\n\t\tforeach ( $wp_styles->queue as $style ) {\n\t\t\tif ( strstr( $wp_styles->registered[ $style ]->src, 'font-awesome.min.css' ) ) {\n\t\t\t\tupdate_option( 'hestia_load_shim', 'yes' );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function prefix_enqueue_awesome() {\n\twp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );\n}", "function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}", "function wp_default_packages_inline_scripts($scripts)\n {\n }", "public function testAggregatedAttributes() {\n $build['#attached']['library'][] = 'common_test/js-attributes';\n $assets = AttachedAssets::createFromRenderArray($build);\n\n $js = $this->assetResolver->getJsAssets($assets, TRUE)[1];\n $js_render_array = \\Drupal::service('asset.js.collection_renderer')->render($js);\n $rendered_js = $this->renderer->renderPlain($js_render_array);\n $expected_1 = '<script src=\"http://example.com/deferred-external.js\" foo=\"bar\" defer></script>';\n $expected_2 = '<script src=\"' . $this->fileUrlGenerator->generateString('core/modules/system/tests/modules/common_test/deferred-internal.js') . '?v=1\" defer bar=\"foo\"></script>';\n $this->assertStringContainsString($expected_1, $rendered_js, 'Rendered external JavaScript with correct defer and random attributes.');\n $this->assertStringContainsString($expected_2, $rendered_js, 'Rendered internal JavaScript with correct defer and random attributes.');\n }", "function enqueue_font_awesome(){\n\twp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/library/css/font-awesome.css');\n}", "function ajax_filter_posts_scripts() {\n // Enqueue script\n //wp_register_script('afp_script', 'get_template_directory_uri() . '/js-folder/'ajax-filter-posts.js', false, null, false);\n wp_register_script('afp_script', get_template_directory_uri().'/assets/ajax-filter-posts.js', false, null, false);\n wp_enqueue_script('afp_script');\n\n wp_localize_script( 'afp_script', 'afp_vars', array(\n 'afp_nonce' => wp_create_nonce( 'afp_nonce' ), // Create nonce which we later will use to verify AJAX request\n 'afp_ajax_url' => admin_url( 'admin-ajax.php' ),\n )\n );\n}", "function prepare_scripts() {\n\twp_register_script('ajax_autofill', plugin_dir_url(__FILE__) . \"js/autofill_ajax.js\", array('jquery'));\n\twp_enqueue_script('ajax_autofill');\n}", "function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}", "protected function addFilteringJsAndCss()\n {\n $this->setStylesheets('');\n $this->setJavascripts('');\n }", "function wordpressboilerplate_scripts (){\n wp_enqueue_style( 'wordpressboilerplate-style', get_stylesheet_uri() );\n wp_enqueue_script( 'wordpressboilerplate-script', get_template_directory_uri() . 'js/main.js', array( 'jquery' ) );\n\n wp_register_style('animate.css', get_stylesheet_uri() . 'assets/vendor/font-awesome/css/font-awesome.min.css');\n}", "function acf_enqueue_scripts($args = array())\n{\n}", "function wp_get_loading_optimization_attributes($tag_name, $attr, $context)\n {\n }", "function blur_header_scripts()\n {\n if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {\n\n wp_register_script('conditionizr', get_template_directory_uri() . '/js/lib/conditionizr-4.3.0.min.js', array(), '4.3.0'); // Conditionizr\n wp_enqueue_script('conditionizr'); // Enqueue it!\n\n wp_register_script('modernizr', get_template_directory_uri() . '/js/lib/modernizr-2.7.1.min.js', array(), '2.7.1'); // Modernizr\n wp_enqueue_script('modernizr'); // Enqueue it!\n\n wp_register_script('blur', get_template_directory_uri() . '/js/scripts.js', array('jquery'), '1.0.0'); // Custom scripts\n wp_enqueue_script('blur'); // Enqueue it!\n }\n }", "public function addScript(string $name, string $src, array $attributes = [], string $placement = Meta::PLACEMENT_FOOTER);", "private function register_script() {\n\n\t\tif ( $this->inline ) {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t'',\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t\twp_add_inline_script( $this->handle, file_get_contents( $this->src ) );\n\t\t\t}\n\t\t} else {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t$this->src,\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->localize ) ) {\n\t\t\twp_localize_script( $this->handle, $this->handle, $this->localize );\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t}", "public static function _wp_enqueue_scripts()\n\t{\n\t\tstatic::$has_run = true;\n\n\t\tforeach (static::$scripts as $name => $params) {\n\t\t\tif (!isset($params['url'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!isset($params['deps'])) $params['deps'] = array();\n\t\t\tif (!isset($params['footer'])) $params['footer'] = true;\n\n\t\t\twp_register_script($name, $params['url'], $params['deps'], $params['version'], $params['footer']);\n\n\t\t\tif (isset($params['localize'])) {\n\t\t\t\twp_localize_script($name, $params['localize']['name'], $params['localize']['data']);\n\t\t\t}\n\n\t\t\tif (isset($params['register_only']) && $params['register_only']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\twp_enqueue_script($name);\n\t\t}\n\t}", "function add_late_scripts()\n\t{\n\t\t// only procceed if we have finished printing footer scripts\n\t\tif (did_action('bwp_minify_after_footer_scripts'))\n\t\t\t$this->todo_late_scripts = 'footer' . $this->late_script_order;\n\t}", "function cultiv8_deregister_scripts() {\n\tglobal $wp_query, $post;\n\t\n\tif( ! ( strpos( json_encode( $wp_query ), '[contact-form-7' ) || strpos( json_encode( $post ), '[contact-form-7' ) ) ) {\n\t\t\twp_deregister_script( 'contact-form-7' );\n\t\t\twp_deregister_style( 'contact-form-7' );\n\t}\n\n}", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "function smash_filter_script_loader_src( $src, $handle ) {\n\n\t$scripts = wp_scripts();\n\n\tif ( $handle === 'comment-reply' ) {\n\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t'loadjs' => array(\n\t\t\t\t'async' => TRUE,\n\t\t\t\t'onLoad' => TRUE\n\t\t\t)\n\t\t);\n\t} else if ( $handle === 'wp-embed' ) {\n\t\t// @issue https://github.com/inpsyde/smashing-magazin/issues/440\n\t\t// Adding ABSPATH to src, otherwhise the file_get_contents will fail.\n\t\t$scripts->registered[ $handle ]->src = ABSPATH . $scripts->registered[ $handle ]->src;\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array( 'inlinejs' => TRUE );\n\t} else if ( function_exists( '\\CloudFour\\ServiceWorkerManager\\get_config' ) ) {\n\t\t$config = \\CloudFour\\ServiceWorkerManager\\get_config();\n\t\tif ( $handle === $config[ 'serviceWorkerRegistrationHandle' ] ) {\n\t\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t\t'inlinejs' => TRUE\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $src;\n}", "function debuggify_enqueue_script() {\n global $debuggify_options;\n if($debuggify_options['enabled'] == '1') {\n wp_enqueue_script('debuggify-logger-http-js', 'https://cdn.debuggify.net/js/'.$debuggify_options['apikey'].'/debuggify.logger.http.js', null, DEBUGGIFY_VERSION.'&platform=wordpress', false);\n }\n }", "private function \t\t\t\tbuild_script_tags() {\n\t\t$load=array(\n\t\t\t\"assets/js/jquery/jquery-3.3.1.min.js\",\n\t\t\t\"assets/js/bootstrap/bootstrap.min.js\",\n\t\t\t// \"assets/js/fontawesome/all.min.js\",\n\t\t\t\"assets/js/app/fetch.js\",\n\t\t\t\"assets/js/app/modal.js\",\n\t\t\t\"assets/js/app/common.js\"\n\t\t);\n\n\t\treturn array_reduce(array_unique(array_merge($load, $this->section_js)), function($_acum, $_item) {\n\t\t\t$_acum.=<<<R\n\n\t\t<script type=\"text/javascript\" src=\"{$_item}\"></script>\nR;\n\t\t\treturn $_acum;\n\t\t}, '');\n\t}", "function plugin_frontend_scripts_styles()\r\r\n{\r\r\n $options = get_option('oneclick');\r\r\n $gmap_iconizer_apikey = $options['gmap_iconizer_apikey'];\r\r\n if ($gmap_iconizer_apikey != \"\") {\r\r\n wp_enqueue_script('gmap_main_js', 'https://maps.googleapis.com/maps/api/js?v=3key=' . $gmap_iconizer_apikey, '', '', false);\r\r\n }\r\r\n else {\r\r\n wp_enqueue_script('sensor_js', 'http://maps.googleapis.com/maps/api/js?sensor=false', '', false);\r\r\n }\r\r\n}", "function acf_enqueue_script($name)\n{\n}", "public static function callback( $attrs, $content = '' ) {\n\t\treturn '<script async src=\"https://genius.codes\"></script>';\n\t}", "function et_extra_builder_get_minified_scripts( $scripts ) {\n\treturn array_merge( $scripts, array(\n\t\t'hash-persistance', // Internally made by ET\n\t\t'imagesloaded',\n\t\t'jquery-imagesloaded', // Possible alternative name\n\t\t'raty',\n\t\t'jquery-raty', // Possible alternative name\n\t\t'validation',\n\t\t'jquery-validation', // Possible alternative name\n\t\t'smooth-scroll',\n\t) );\n}", "public function theme_scripts() {\n\t\t$suffix = !TALEMY_DEV_MODE ? '.min' : '';\n\n\t\t// stylesheets\n\t\twp_register_style(\n\t\t\t'font-awesome-5-all',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/all.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'font-awesome-5-shim',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/v4-shims.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\t\t\n\t\twp_register_style(\n\t\t\t'fancybox',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/css/fancybox.min.css'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/css/style'. $suffix . '.css',\n\t\t\tfalse,\n\t\t\tTALEMY_THEME_VERSION\n\t\t);\n\n\t\twp_enqueue_style( 'font-awesome-5-all' );\n\t\twp_enqueue_style( 'font-awesome-5-shim' );\n\t\twp_enqueue_style( 'talemy' );\n\t\twp_style_add_data( 'talemy', 'rtl', 'replace' );\n\n\t\t// scripts\n\n \twp_register_script(\n \t\t'fancybox',\n \t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fancybox.min.js',\n \t\tarray( 'jquery' ),\n \t\tTALEMY_THEME_VERSION,\n \t\ttrue\n \t);\n\n\t\twp_register_script(\n\t\t\t'jquery-fitvids',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fitvids.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-matchheight',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.matchHeight.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-placeholder',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.placeholder.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'2.3.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-requestanimationframe',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.requestanimationframe.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.2.3',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-selectric',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.selectric.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.13.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-superfish',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.superfish.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.7.10',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-throttle-debounce',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.throttle-debounce.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'resize-sensor',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/ResizeSensor.min.js',\n\t\t\tarray(),\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'theia-sticky-sidebar',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/theia-sticky-sidebar.min.js',\n\t\t\tarray( 'jquery', 'resize-sensor' ),\n\t\t\t'1.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-modernizr',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/modernizr.js',\n\t\t\tarray(),\n\t\t\t'3.6.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-block',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy-block.min.js',\n\t\t\tarray( 'jquery', 'imagesloaded', 'jquery-matchheight' ),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy' . $suffix . '.js',\n\t\t\tarray(\n\t\t\t\t'jquery',\n\t\t\t\t'imagesloaded',\n\t\t\t\t'jquery-fitvids',\n\t\t\t\t'jquery-superfish',\n\t\t\t\t'jquery-selectric',\n\t\t\t\t'jquery-throttle-debounce',\n\t\t\t\t'jquery-requestanimationframe',\n\t\t\t\t'jquery-matchheight',\n\t\t\t\t'jquery-placeholder',\n\t\t\t\t'theia-sticky-sidebar',\n\t\t\t\t'talemy-modernizr'\n\t\t\t),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script( 'jquery-fitvids' );\n\t\twp_enqueue_script( 'jquery-superfish' );\n\t\twp_enqueue_script( 'jquery-selectric' );\n\t\twp_enqueue_script( 'jquery-throttle-debounce' );\n\t\twp_enqueue_script( 'jquery-requestanimationframe' );\n\t\twp_enqueue_script( 'jquery-matchheight' );\n\t\twp_enqueue_script( 'jquery-placeholder' );\n\t\twp_enqueue_script( 'theia-sticky-sidebar' );\n\t\twp_enqueue_script( 'talemy-modernizr' );\n\t\twp_enqueue_script( 'talemy' );\n\t\twp_localize_script( 'talemy', 'talemy_js_data', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\tif ( is_single() ) {\n\t\t\tif ( talemy_get_option( 'post_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t\tif ( is_singular( 'sfwd-courses' ) ) {\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t} else {\n\t\t\t\t$in_focus_mode = false;\n\t\t\t\tif ( class_exists( 'LearnDash_Settings_Section' ) ) {\n\t\t\t\t\t$in_focus_mode = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Theme_LD30', 'focus_mode_enabled' );\n\t\t\t\t}\n\t\t\t\tif ( !$in_focus_mode && in_array( get_post_type(), array( 'sfwd-lessons', 'sfwd-topic' ) ) ) {\n\t\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( is_page() && !is_front_page() ) {\n\t\t\tif ( talemy_get_option( 'page_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t}\n\t}", "public function replace_scripts( $matches ) {\n\t\tif (\n\t\t\tempty( $this->allowed_scripts )\n\t\t\t||\n\t\t\t(\n\t\t\t\t! empty( $this->allowed_scripts )\n\t\t\t\t&&\n\t\t\t\t! preg_match( '#(' . $this->allowed_scripts . ')#', $matches[0] )\n\t\t\t)\n\t\t) {\n\t\t\treturn $matches[0];\n\t\t}\n\n\t\t$src = '';\n\t\t$matches['attr'] = trim( $matches['attr'] );\n\n\t\tif ( ! empty( $matches['attr'] ) ) {\n\t\t\tif ( preg_match( '/src=([\"\\'])(.*?)\\1/', $matches['attr'], $src_matches ) ) {\n\t\t\t\t$src = $src_matches[2];\n\n\t\t\t\t// Remove the src attribute.\n\t\t\t\t$matches['attr'] = str_replace( $src_matches[0], '', $matches['attr'] );\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $src ) ) {\n\t\t\t// Get the JS content.\n\t\t\tif ( ! empty( $matches['content'] ) ) {\n\t\t\t\t$src = 'data:text/javascript;base64,' . base64_encode( $matches['content'] );// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $src ) ) {\n\t\t\treturn $matches[0];\n\t\t}\n\n\t\treturn \"<script data-rocketlazyloadscript='{$src}' {$matches['attr']}></script>\";\n\t}", "public static function _script_loader_tag(string $tag, string $handle): string\n\t{\n\t\t$attrs = array();\n\n\t\tif (isset(static::$scripts[$handle]['async']) && static::$scripts[$handle]['async']) {\n\t\t\t$attrs[] = 'async';\n\t\t}\n\n\t\tif (isset(static::$scripts[$handle]['defer']) && static::$scripts[$handle]['defer']) {\n\t\t\t$attrs[] = 'defer';\n\t\t}\n\n\t\tif ($attrs) {\n\t\t\t$tag = str_replace(' src', ' '.implode(' ', $attrs).' src', $tag);\n\t\t}\n\n\t\treturn $tag;\n\t}", "public function alm_filters_enqueue_scripts(){\n\n \t// Get ALM Options\n \t\t$options = get_option( 'alm_settings' );\n\n \t\t// JS and Localization\n \t\t$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off\n \t\twp_register_script( 'ajax-load-more-filters', plugins_url( '/dist/js/filters'. $suffix .'.js', __FILE__ ), 'ajax-load-more', ALM_FILTERS_VERSION, true );\n\n \t\t// Enqueue CSS\n \t\tif(!alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_filters_disable_css')){ // Not inline or disabled\n\n \t\t$file = ALM_FILTERS_URL.'/dist/css/styles.css';\n \tif(class_exists('ALM_ENQUEUE')){\n \tALM_ENQUEUE::alm_enqueue_css(ALM_FILTERS_SLUG, $file);\n \t}\n\n \t\t}\n\n \t\t// Datepickr Themes\n \t\twp_register_style( 'alm-flatpickr-default', ALM_FILTERS_URL . '/vendor/flatpickr/flatpickr.css' );\n \t\twp_register_style( 'alm-flatpickr-airbnb', ALM_FILTERS_URL . '/vendor/flatpickr/themes/airbnb.css' );\n \t\twp_register_style( 'alm-flatpickr-confetti', ALM_FILTERS_URL . '/vendor/flatpickr/themes/confetti.css' );\n \t\twp_register_style( 'alm-flatpickr-dark', ALM_FILTERS_URL . '/vendor/flatpickr/themes/dark.css' );\n \t\twp_register_style( 'alm-flatpickr-light', ALM_FILTERS_URL . '/vendor/flatpickr/themes/light.css' );\n \t\twp_register_style( 'alm-flatpickr-material_blue', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_blue.css' );\n \t\twp_register_style( 'alm-flatpickr-material_green', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_green.css' );\n \t\twp_register_style( 'alm-flatpickr-material_orange', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_orange.css' );\n \t\twp_register_style( 'alm-flatpickr-material_red', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_red.css' );\n\n \t}", "public function add_async_attribute( $tag, $handle ) {\n if(is_admin() || is_customize_preview()) return $tag;\n\n do_action('before_add_async_attribute', $tag ,$handle);\n\n if(isset($_GET['action'])) return $tag;\n\n if('jquery' === $handle || 'jquery-core' === $handle){\n return $tag;\n }\n\n if(function_exists('wc') && (is_woocommerce())){return $tag;}\n\n if(function_exists('is_checkout') && is_checkout()){\n return $tag;\n }\n return str_replace( ' src', ' defer src', $tag );\n }", "function uni_files(){\n // wp_enqueue_script('uni-main-js', get_theme_file_uri('/js/scripts-bundled.js'), NULL, '1.0', true);\n wp_enqueue_script('uni-main-js', get_theme_file_uri('/js/scripts-bundled.js'), NULL, microtime(), true);\n // wp_enqueue_style('uni_main_styles', get_stylesheet_uri());\n wp_enqueue_style('uni_main_styles', get_stylesheet_uri(), NULL, microtime());\n wp_enqueue_style('custom_google_font','//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i');\n wp_enqueue_style('font-awesome','//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\n }", "function smash_get_scripts() {\n\n\t$asset_uri = get_template_directory_uri();\n\t$js_uri = $asset_uri . '/assets/js/';\n\t$suffix = smash_get_script_suffix();\n\n\t$version = smash_get_script_version();\n\n\t$js_assets = array(\n\t\t'html5shiv' => array(\n\t\t\t'file' => $js_uri . 'html5shiv' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => FALSE,\n\t\t\t'data' => array(\n\t\t\t\t'conditional' => 'IE 8',\n\t\t\t)\n\t\t),\n\t\t'smash-onload' => array(\n\t\t\t'file' => $js_uri . 'onload' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'smash-fastclick' => array(\n\t\t\t'file' => $js_uri . 'fastclick' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'smash-lazy-images' => array(\n\t\t\t'file' => $js_uri . 'lazy-images' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'smash-blocked' => array(\n\t\t\t'file' => $js_uri . 'blocked' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t);\n\n\tif ( is_singular() ) {\n\n\t\t// enqueue comments-reply script\n\t\t//if ( comments_open() ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t\t//}\n\n\t\t// codepen embed\n\t\t$js_assets[ 'codepen' ] = array(\n\t\t\t'file' => $js_uri . 'codepen.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// prism\n\t\t$js_assets[ 'prism' ] = array(\n\t\t\t'file' => $js_uri . 'prism.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// tablesaw - only when enabled via PostMeta in Backend.\n\t\t$meta = (bool) get_post_meta( get_the_ID(), 'enable_tablesaw', TRUE );\n\t\tif ( $meta ) {\n\t\t\t$js_assets[ 'tablesaw' ] = array(\n\t\t\t\t'file' => $js_uri . 'tablesaw' . $suffix . '.js',\n\t\t\t\t'deps' => array( 'jquery-core' ),\n\t\t\t\t'ver' => $version,\n\t\t\t\t'in_footer' => TRUE,\n\t\t\t);\n\t\t}\n\t}\n\n\t// check if the current post/page has ads deactivated\n\t$disable_ads = FALSE;\n\tif ( is_single() ) {\n\t\t$disable_ads = (bool) get_post_meta( get_the_ID(), 'disable_wholeads', TRUE );\n\t}\n\n\tif ( ! $disable_ads ) {\n\t\t$js_assets[ 'smash-ads' ] = array(\n\t\t\t'file' => $js_uri . 'ads' . $suffix . '.js',\n\t\t\t'deps' => '',\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'localize' => array(\n\t\t\t\t'AdsI18N' => array(\n\t\t\t\t\t'Advertisement' => __( 'Advertisement', 'smashing' )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}\n\n\treturn $js_assets;\n}", "function input_admin_enqueue_scripts()\n\t{\n\t\t// register acf scripts\n\t\twp_enqueue_script('acf-input-font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);\n\t\twp_enqueue_script('acf-input-font-awesome-edit-input', $this->settings['dir'] . 'js/edit_input.js', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-fa', $this->stylesheet, array(), $this->version);\n\t\twp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);\n\t}", "function input_admin_enqueue_scripts() {\n\n\t\t$dir = plugin_dir_url( __FILE__ );\n\n\t\t// register & include JS\n//\t\twp_register_script( 'acf-address-render-field', \"{$dir}js/render_field.js\" );\n\t\twp_register_script( 'acf-address-render-field', \"{$dir}js/min/render_field-min.js\" );\n\t\twp_enqueue_script( 'acf-address-render-field' );\n\n\t\t// Adicionando o script personalizado para PT-BR\n\t\twp_register_script( 'acf-address-pt-br', \"{$dir}js/pt-br.js\" );\n\t\twp_enqueue_script( 'acf-address-pt-br' );\n\n\n\n\t\t// register & include CSS\n\t\twp_register_style( 'acf-input-address', \"{$dir}css/render_field.css\" );\n\t\twp_enqueue_style( 'acf-input-address' );\n\n\t}", "public static function use_inline_scripts(){\n return false;\n }", "function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {\n\t$wp_scripts = wp_scripts();\n\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\n\tif ( $src || $in_footer ) {\n\t\t$_handle = explode( '?', $handle );\n\n\t\tif ( $src ) {\n\t\t\t$wp_scripts->add( $_handle[0], $src, $deps, $ver );\n\t\t}\n\n\t\tif ( $in_footer ) {\n\t\t\t$wp_scripts->add_data( $_handle[0], 'group', 1 );\n\t\t}\n\t}\n\n\t$wp_scripts->enqueue( $handle );\n}", "public function jsFileBundler()\n {\n return $this->fileFilter(\n 'scripts.js',\n $this->createPath('public/js'),\n new GlobAsset($this->createPath('assets/js/*')),\n $this->filters['js']\n );\n }", "function mila_scripts() {\n\twp_enqueue_style('font-awesome', get_template_directory_uri() . '/fontawesome-free-5.8.1-web/css/all.css' );\n\twp_enqueue_style('font-roboto', get_template_directory_uri() . '/font/fonts.css' );\n\twp_enqueue_style( 'mila-style', get_stylesheet_uri() );\n\n\t// add print JS only to Posts \n\t//https://developer.wordpress.org/reference/functions/wp_enqueue_script/\n\tif ( is_single() ) {\n wp_enqueue_script('my-script', get_template_directory_uri() . '/js/print.js', array(), 'null', true );\n } \n\n}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function filterLoad($asset) {}", "function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {\r\n\tglobal $wp_scripts;\r\n\tif ( !is_a($wp_scripts, 'WP_Scripts') )\r\n\t\t$wp_scripts = new WP_Scripts();\r\n\r\n\tif ( $src ) {\r\n\t\t$_handle = explode('?', $handle);\r\n\t\t$wp_scripts->add( $_handle[0], $src, $deps, $ver );\r\n\t\tif ( $in_footer )\r\n\t\t\t$wp_scripts->add_data( $_handle[0], 'group', 1 );\r\n\t}\r\n\t$wp_scripts->enqueue( $handle );\r\n}", "function enqueue_font_awesome_stylesheets(){\n wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\n}", "public function get_script_depends() {\n\t\treturn array( 'uael-social-share' );\n\t}", "public function boot()\n {\n Blade::directive('fa', function ($arguments) {\n list($icon, $attributes) = explode(',', str_replace(['(', ')', ' ', \"'\"], '', $arguments), 2);\n\n $options = [];\n\n if ($attributes != '') {\n $rawAttributes = str_replace(['array(', '[', ']', ')'], '', $attributes);\n $arrAttributes = explode(',', $rawAttributes);\n\n if (count($arrAttributes) > 0) {\n foreach ($arrAttributes as $string) {\n $attr = explode('=>', $string);\n $options[$attr[0]] = $attr[1];\n }\n }\n }\n\n return (new LaravelFontAwesome())->icon($icon, $options);\n });\n }", "function ct_remove_assets() {\n wp_dequeue_style( 'bigcommerce-styles' );\n\n if ( ct_is_pagespeed() ) {\n wp_dequeue_script( 'bigcommerce-manifest' );\n wp_dequeue_script( 'bigcommerce-vendors' );\n wp_dequeue_script( 'bigcommerce-scripts' );\n } else {\n wp_enqueue_script( 'smile.io', 'https://cdn.sweettooth.io/assets/storefront.js', array(), '1.0', true );\n }\n}", "function limpiahtml($salida){\n $regex = \"/<script.*?>.*?<\\/script>/ims\";\n preg_match_all($regex, $salida, $matches, null, 0);\n if(count($matches)>0){\n $tags2add = \"\"; \n foreach($matches[0] as $tag){\n if(!strstr($tag, \"inmovil\")){\n $retag = $tag;\n $tag = JSMin::minify($tag);\n $tags2add .= $tag;\n $salida = str_replace($retag, \"\", $salida);\n }\n }\n } \n $salida = minify_html($salida);\n\n\n $salida = str_replace(array(\"</body>\"),array($tags2add.\"</body>\"),$salida);\n return $salida;\n echo preg_last_error();\n}", "function field_group_admin_enqueue_scripts()\n\t{\n\t\t// register acf scripts\n\t\twp_enqueue_script('font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);\n\t\twp_enqueue_script('font-awesome-create-input', $this->settings['dir'] . 'js/create_input.js', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-fa', $this->stylesheet, array(), $this->version);\n\t\twp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);\n\t}", "public function withScript(ScriptElement $script, $scope = 'header');", "function debounce_activate_third_party() {\r\r\n\r\r\n\t// The ajax request endpoint is public now.\r\r\n\tadd_filter( 'debounce_api_is_private', '__return_false' );\r\r\n\tadd_action( 'wp_enqueue_scripts', array( DEBOUNCE_Plugin::get_instance(), 'enqueue_frontend' ), 11 );\r\r\n\tadd_action( 'wp_footer', array( DEBOUNCE_Plugin::get_instance(), 'footer_styles' ) );\r\r\n}", "public static function maybe_enqueue_scripts() {\n\n\t\tif ( self::contains_grunion_shortcode() ){\n\t\t\t$grunion_handle = 'grunion-ajax';\n\n\t\t\twp_enqueue_script( $grunion_handle, self::$grunion_dir_url . '/grunion-ajax.js', array( 'jquery' ) );\n\t\t\t$object_name = 'grunionAjax';\n\t\t\t$script_data = array( \n\t\t\t\t'loadingImageUri' => self::$grunion_dir_url . '/loader.gif',\n\t\t\t\t'ajaxUri' => admin_url( 'admin-ajax.php' )\n\t\t\t);\n\n\t\t\twp_localize_script( $grunion_handle, $object_name, $script_data );\n\t\t}\n\t}", "function ka_enqueue_scripts() {\n\n /* Adiciona o script principal do tema */\n wp_enqueue_script( 'main', get_bundle_file( 'assets/js/dist/', 'index.*.js' ) , null, null, true );\n }", "function feistner_scripts() {\n\n\twp_enqueue_style( 'feistner-style', get_stylesheet_uri() );\n\twp_enqueue_style( 'feistner-body-font', 'https://fonts.googleapis.com/css?family=Raleway:300,400,400i,700' );\n\twp_enqueue_style( 'feistner-headline-font', 'https://fonts.googleapis.com/css?family=Arvo:400,700' );\n\n\twp_enqueue_style( 'font-awesome-cdn' , 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), '4.4.0');\n\n\twp_enqueue_script( 'feistner-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );\n\n\twp_enqueue_script( 'feistner-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "public function autocomplete_enqueue_scripts() {\n\t\twp_enqueue_script( 'jquery-ui-autocomplete' );\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script('autocomplete-js-2', plugin_dir_url( __FILE__ ).'js/wp6.js', array('jquery'));\n\t\twp_localize_script('autocomplete-js-2', 'autojs', array('ajax_url'=>admin_url('admin-ajax.php')));\n\t}", "function asc_deregister_script( $handle ) {\n\tglobal $asc_scripts;\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\t/**\n\t * Do not allow accidental or negligent de-registering of critical scripts in the admin.\n\t * Show minimal remorse if the correct hook is used.\n\t */\n\t$current_filter = current_filter();\n\tif ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) ||\n\t\t( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter )\n\t) {\n\t\t$no = array(\n\t\t\t'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion',\n\t\t\t'jquery-ui-autocomplete', 'jquery-ui-button', 'jquery-ui-datepicker', 'jquery-ui-dialog',\n\t\t\t'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-menu', 'jquery-ui-mouse',\n\t\t\t'jquery-ui-position', 'jquery-ui-progressbar', 'jquery-ui-resizable', 'jquery-ui-selectable',\n\t\t\t'jquery-ui-slider', 'jquery-ui-sortable', 'jquery-ui-spinner', 'jquery-ui-tabs',\n\t\t\t'jquery-ui-tooltip', 'jquery-ui-widget', 'underscore', 'backbone',\n\t\t);\n\n\t\tif ( in_array( $handle, $no ) ) {\n\t\t\t$message = sprintf( __( 'Do not deregister the %1$s script in the administration area. To target the frontend theme, use the %2$s hook.' ),\n\t\t\t\t\"<code>$handle</code>\", '<code>asc_enqueue_scripts</code>' );\n\t\t\t_doing_it_wrong( __FUNCTION__, $message, '3.6' );\n\t\t\treturn;\n\t\t}\n\t}\n\n\t$asc_scripts->remove( $handle );\n}", "function smash_enqueue_scripts() {\n\n\tglobal $wp_scripts;\n\n\t$js_assets = smash_get_scripts();\n\n\tforeach ( $js_assets AS $handle => $asset ) {\n\n\t\twp_enqueue_script( $handle, $asset[ 'file' ], $asset[ 'deps' ], $asset[ 'ver' ], $asset[ 'in_footer' ] );\n\n\t\t// checking for localize script args\n\t\tif ( array_key_exists( 'localize', $asset ) && ! empty( $asset[ 'localize' ] ) ) {\n\t\t\tforeach ( $asset[ 'localize' ] as $name => $args ) {\n\t\t\t\twp_localize_script( $handle, $name, $args );\n\t\t\t}\n\t\t}\n\n\t\tif ( array_key_exists( 'data', $asset ) ) {\n\t\t\tforeach ( $asset[ 'data' ] as $key => $value ) {\n\t\t\t\t$wp_scripts->add_data( $handle, $key, $value );\n\t\t\t}\n\t\t}\n\n\t}\n}" ]
[ "0.7237725", "0.6505373", "0.6418179", "0.6246111", "0.59877104", "0.59083897", "0.5795956", "0.5675229", "0.5587274", "0.54035765", "0.53767705", "0.53493905", "0.5349385", "0.5293278", "0.52620023", "0.52599305", "0.5229869", "0.5225538", "0.52089006", "0.5190596", "0.5188605", "0.51255214", "0.50795376", "0.5071968", "0.5063119", "0.50477403", "0.5018843", "0.5018157", "0.50087327", "0.50084317", "0.5001649", "0.49524727", "0.49278435", "0.49274188", "0.49224377", "0.49127543", "0.49080282", "0.49071765", "0.4896563", "0.48835486", "0.48722875", "0.48697418", "0.48403957", "0.48387486", "0.48303965", "0.48216188", "0.48189938", "0.4809049", "0.48077717", "0.4804979", "0.47959232", "0.4789189", "0.47798377", "0.47750342", "0.4774464", "0.477428", "0.47697866", "0.47605333", "0.47603408", "0.47544298", "0.47339702", "0.47257754", "0.47143313", "0.47060585", "0.47026983", "0.4699728", "0.46953952", "0.4678688", "0.46756494", "0.46749392", "0.46696982", "0.4661001", "0.46556735", "0.46554196", "0.4650977", "0.46509007", "0.46492505", "0.46395507", "0.4632077", "0.46304482", "0.46277428", "0.46276733", "0.46217772", "0.462013", "0.46182576", "0.4606974", "0.4594218", "0.45894578", "0.45868385", "0.4582342", "0.45774347", "0.45690134", "0.45666668", "0.45562962", "0.45544517", "0.4548287", "0.454608", "0.45453715", "0.454512", "0.4536389" ]
0.7009983
1
Adds a custom read more link to all excerpts, manually or automatically generated
function understrap_all_excerpts_get_more_link( $post_excerpt ) { return $post_excerpt . '<br><a class="badge badge-primary" href="' . esc_url( get_permalink( get_the_ID() )) . '">' . __( 'Read More', 'understrap' ) . ' <i class="fas fa-angle-double-right"></i></a>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dh_modify_read_more_link() {\r\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">Click to Read!</a>';\r\n}", "function modify_read_more_link() {\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">View list..</a>';\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\t\treturn $post_excerpt . ' [...]<p><a class = \"read-more-link\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">Read Full Post</a></p>';\n\t}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\"><em>(Continue Reading...)</em></a>';\n}", "function new_excerpt_more($more) {\n global $post, $wpak_options;\n\n\treturn '<p class=\"readmore\"><a title=\"' . $wpak_options['linkto'] . $post->post_title.'\" href=\"'. get_permalink($post->ID) . '\">' . $wpak_options['readmore'] . '</a></p>';\n}", "function new_excerpt_more($more) {\n global $post;\n return ' <a class=\"read_more\" href=\"' . get_permalink($post->ID) . '\">[...]</a>';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a><br/>',\n get_permalink( get_the_ID() ),\n __( '<i class=\"fa fa-book\"></i> Read More...', 'textdomain' )\n );\n}", "function modify_read_more_link() {\n $post_slug = get_post_field( 'post_name', get_post() );\n return '<a href=\"/'. $post_slug .'\" class=\"btn btn-info btn-sm mb-3\">Detail</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return ' [...] <a href=\"' . get_permalink($post->ID) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentytwelve') . '</a>';\n }", "function wpdocs_excerpt_more( $more ) {\n return ' <a href=\"' . get_the_permalink() . '\" rel=\"nofollow\">[Read More...]</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<p><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More</a></p>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<div class=\"readmore\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More <i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i></a></div>';\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">' . __('Read More', 'your-text-domain') . '</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading...</a>';\n}", "function voyage_mikado_modify_read_more_link() {\n $link = '<div class=\"mkdf-more-link-container\">';\n $link .= voyage_mikado_get_button_html(array(\n 'link' => get_permalink().'#more-'.get_the_ID(),\n 'text' => esc_html__('Continue reading', 'voyage'),\n 'size' => 'small'\n ));\n\n $link .= '</div>';\n\n return $link;\n }", "function medigroup_mikado_modify_read_more_link() {\n $link = '<div class=\"mkd-more-link-container\">';\n $link .= medigroup_mikado_get_button_html(array(\n 'link' => get_permalink().'#more-'.get_the_ID(),\n 'text' => esc_html__('Continue reading', 'medigroup'),\n 'size' => 'small'\n ));\n\n $link .= '</div>';\n\n return $link;\n }", "function excerpt_read_more_link($output) {\r\n global $post;\r\n return $output . '<a class=\"more-link\" href=\"'. get_permalink($post->ID) . '\">'.__(\"Keep Reading\",TEXTDOMAIN ).'<span class=\"icon-arrow-right5\"></span></a>';\r\n}", "function lightseek_read_more_link() {\n\treturn '<p><a class=\"btn btn-primary\" href=\"' . get_permalink() . '\">Read More</a></p>';\n}", "function new_excerpt_more( $more ) {\n\tglobal $post;\n\treturn '... <div class=\"button small text-center\"><a href=\"'. get_permalink($post->ID) . '\">Continue Reading</a></div>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '... (<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>)';\n}", "function custom_excerpt_more($more) {\n\t\treturn 'Read More &raquo;';\n\t}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> read more...</a>';\n}", "function new_excerpt_more( $more ) {\r\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading &#8594;</a>';\r\n}", "function new_excerpt_more( $more ) {\n return ' <a class=\"read-more\" href=\"' . get_permalink( get_the_ID() ) . '\">' . __( 'Read More...', 'your-text-domain' ) . '</a>';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( '...', 'textdomain' )\n );\n}", "function new_excerpt_more($more) {\n global $post;\n // return '<a class=\"read_more\" href=\"'. get_permalink($post->ID) . '\">'.__('Read More','textdomain').'</a>';\n return '';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"understrap-read-more-link goodswave-read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function new_excerpt_more($more)\r\n{\r\n\tglobal $post;\r\n\treturn '<a class=\"moretag\" href=\"' . get_permalink($post->ID) . '\"> Read the full article...</a>';\r\n}", "function linolakestheme_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( ' Read more', 'textdomain' )\n );\n}", "function mintshow_excerpt_more( $more ) {\n return sprintf( '<a class=\"ms-read-more\" href=\"%1$s\">%2$s <i class=\"fa fa-long-arrow-right\"></i></a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function new_excerpt_more($more) {\n\n\tglobal $post;\n\n\treturn '...&nbsp; <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"><br/>read&nbsp;more</a>';\n\n}", "function rw_custom_excerpt_more( $output )\n{\n if( has_excerpt() && !is_attachment() )\n {\n $output .= rw_continue_reading_link();\n }\n return $output;\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">[ more ]</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn '...<br/>'.'<a href=\"'. get_permalink( get_the_ID() ) . '\" class=\"more\">Read More</a>';\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Leia o artigo completo...</a>';\n}", "function quasar_read_more($target='_self'){\n\tglobal $post;\n\n\tif(!$post || (!$post->ID)) return;\n\t\n\t$return = ' <a href=\"'.get_permalink().'\" target=\"'.$target.'\">'.__('read more','quasar').' <i class=\"fa-angle-double-right\"></i></a>';\n\t\n\treturn $return;\n}", "function nightsky_excerpt_more( $more ) {\n global $post;\n return ' <p class=\"readmore\"><a href=\"' . get_permalink( $post->ID ) . '\">Continue reading ' . $post->post_title . '</a></p>';\n}", "function new_excerpt_more( $more ) {\n return '&hellip; <span class=\"read-more\"><a href=\"'.get_permalink().'\" rel=\"bookmark\">continue reading</a></span>';\n}", "function new_excerpt_more( $more ) {\n\treturn '[...]<div class=\"read-more\"><a href=\"'. get_permalink( get_the_ID() ) . '\">Lire la suite</a></div>';\n}", "function new_excerpt_more($more) {\n global $post;\n return '<a class=\"post-link\" href=\"'. get_permalink($post->ID) . '\"> ...Read the full article</a>';\n}", "function rls_read_more_button($more) {\n global $post;\n return '<div class=\"center-align read-more\"><a class=\" gray view-article button\" href=\"'.get_permalink($post->ID).'\">'\n .__('Read More', 'rls')\n .'</a></div>';\n}", "function <%= functionPrefix %>_custom_post_more($more) {\n global $post;\n return '... <a class=\"article-more\" href=\"' . get_permalink($post->ID) . '\">' . __('Read More', '<%= projectName %>') . '</a>';\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '&hellip; </br> <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>';\n}", "function labs_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . labs_continue_reading_link();\n}", "function twentyten_auto_excerpt_more( $more ) {\n\tif ( ! is_admin() ) {\n\t\treturn ' &hellip;' . twentyten_continue_reading_link();\n\t}\n\treturn $more;\n}", "function wpdocs_excerpt_more( $more ) {\n return '<a href=\"'.get_the_permalink().'\" rel=\"nofollow\">...</a>';\n}", "function swbtheme_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function mila_custom_excerpt_more($more) {\n global $post;\n return '&nbsp;<div class=\"more-link\"><a href=\"'. get_permalink($post->ID) . '\">'. __('<i title=\"Läs mer\" class=\"fa fa-arrow-circle-right\"></i>', 'mila') .'</a></div>';\n }", "function new_excerpt_more($more) {\r\n global $post;\r\n return '<button class=\"btn btn-primary hvr-grow clearfix\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a></button>';\r\n}", "function generate_excerpt_more($more)\n {\n return apply_filters('generate_excerpt_more_output', sprintf(' ... <a title=\"%1$s\" class=\"read-more text-primary\" href=\"%2$s\">%3$s %4$s</a>',\n the_title_attribute('echo=0'),\n esc_url(get_permalink(get_the_ID())),\n __('Read more', 'generatepress'),\n '<span class=\"screen-reader-text\">' . get_the_title() . '</span>'\n ));\n }", "function clrfl_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function minorite_more_link($variables) {\n return '<p class=\"readmore\">' . l($variables['title'], $variables['url'], array('attributes' => array('title' => $variables['title']), 'query' => $variables['query'])) . '</p>';\n}", "function mt_filter_excerpt_more_link($excerpt) {\n\t$post = get_post();\n\t$excerpt .= '<a href=\"'. get_permalink($post->ID) .'\" class=\"btn btn-primary float-right\"> Läs mer &raquo; </a>';\n\t\n\treturn $excerpt;\n }", "function mithpress_auto_excerpt_more( $more ) {\n\treturn ' . . . ' . mithpress_continue_reading_link();\n}", "function more_link() {\n\tglobal $post;\t\n\tif (strpos($post->post_content, '<!--more-->')) :\n\t\t$more_link = '<p><a href=\"'.get_permalink().'\" class=\"'.$size.'\" title=\"'.get_the_title().'\">';\n\t\t$more_link .= '<span>Read More...</span>';\n\t\t$more_link .= '</a></p>';\n\t\techo $more_link;\n\tendif;\n}", "function twentyten_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() && ! is_admin() ) {\n\t\t$output .= twentyten_continue_reading_link();\n\t}\n\treturn $output;\n}", "function echotheme_custom_excerpt_more($output) {\n\tif (has_excerpt() && ! is_attachment()) {\n\t\t$output .= echotheme_continue_reading_link();\n\t}\n\treturn $output;\n}", "public static function excerpt_read_more( $more ) {\n global $post;\n // Defining the $output (read more link)\n $output = '...<br><p><a class=\"read-more more-link\" href=\"'. get_permalink( $post->ID ) . '\"> Read More</a></p>';\n // Returning the $output\n return $output;\n }", "function my_excerpt_more( $more ) {\n\treturn ' &hellip; <a href=\"'. get_permalink() .'\">Continue reading &ldquo;'. get_the_title() .'&rdquo; &rarr;</a>';\n}", "function rw_continue_reading_link( )\n{\n return ' <a href=\"'. get_permalink() . '\" class=\"more-link\">' . __( 'More', 'rotorwash' ) . '</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn ' <a class=\"read-more\" href=\"' . get_permalink( get_the_ID() ) . '\">قراءة المزيد</a>';\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div><a href=\"'. get_permalink($post->ID) . '\" > ... Click to View Full Post</a></div>;';\n}", "function uwmadison_auto_excerpt_more( $more ) {\n\t\treturn ' &hellip;' . uwmadison_continue_reading_link();\n\t}", "function rw_auto_excerpt_more( )\n{\n return in_the_loop() ? '&hellip;' . rw_continue_reading_link() : '&hellip;';\n}", "public static function the_content_more_link() {\n\t\t\t$cpt = self::get_post_type();\n\n\t\t\tif ( $cpt && $cpt !== 'post' ) {\n\t\t\t\t$title = esc_html( self::option( 'readmore_' . $cpt ) );\n\t\t\t\t$icon = esc_attr( self::option( 'readmore_icon_' . $cpt ) );\n\t\t\t} else {\n\t\t\t\t$title = esc_html( self::option( 'readmore' ) );\n\t\t\t\t$icon = esc_attr( self::option( 'readmore_icon' ) );\n\t\t\t}\n\t\t\t\n\t\t\t$icon = $icon ? '<i class=\"' . $icon . '\"></i>' : '';\n\n\t\t\treturn ( $title || $icon ) ? '<a class=\"cz_readmore' . ( $title ? '' : ' cz_readmore_no_title' ) . ( $icon ? '' : ' cz_readmore_no_icon' ) . '\" href=\"' . esc_url( get_the_permalink( self::$post->ID ) ) . '\">' . $icon . '<span>' . $title . '</span></a>' : '';\n\t\t}", "function more_link($more) {\n global $post;\n return '... <a class=\"view-article\" href=\"' . get_permalink($post->ID) . '\">' . __('Mehr', 'myTheme') . '</a>';\n }", "function emc_learn_more_link() {\r\n\r\n\t$more = sprintf( '<a href=\"%1$s\" title=\"%2$s\">%3$s</a>',\r\n\t\tget_permalink(),\r\n\t\tesc_attr__( 'View full post', 'emc' ),\r\n\t\tesc_html__( '&nbsp;&nbsp;More&nbsp;&rarr;', 'emc' )\r\n\t);\r\n\treturn $more;\r\n\r\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div class=\"view-full-post\"><a href=\"'. get_permalink($post->ID) . '\" class=\"view-full-post-btn\">Skaityti</a></div>';\n}", "function custom_excerpt_more( $more ) {\r\n\t return '...';\r\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function darksnow_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . darksnow_continue_reading_link();\n}", "function artmag_fm_more_link() {\n return '<div class=\"full-width margint20\"><div class=\"read-more button clearfix\"><a href=\"' . get_permalink() . '\">'. __(\"Read More\",\"artmag\") .' <span class=\"arrow-right\">'. (is_rtl() ? \"&#8592;\" : \"&#8594\") .'</span></a></div></div>';\n}", "function darksnow_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= darksnow_continue_reading_link();\n\t}\n\treturn $output;\n}", "function mithpress_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= mithpress_continue_reading_link();\n\t}\n\treturn $output;\n}", "function custom_desktop_excerpt_more($more) {\n}", "function ppo_excerpt_more($more) {\n $link = sprintf('<a href=\"%1$s\" class=\"more-link\">%2$s</a>', esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Name of current post */ \n sprintf(__('Xem thêm <span class=\"meta-nav\">&rarr;</span>', SHORT_NAME))\n );\n return ' &hellip; ' . $link;\n}", "function echotheme_auto_excerpt_more($more) {\n\treturn '&hellip; <br />' . echotheme_continue_reading_link();\n}", "public function customise_readmore_action($more_link){\n \t\t\n \tglobal $post;\n\t\t\n\t\t//determine if we want a post preview\n\t\t$upcoming_preview_status = get_post_meta($post->ID,'upcoming_preview_status', true);\n\t\tif($upcoming_preview_status == 'true'){\n\t\t\t//determine if we have set the option to display via 'more' tag\n\t\t\t$upcoming_preview_type = get_post_meta($post->ID,'upcoming_preview_type', true);\n\t\t\t\n\t\t\t//build a pretty readmore link for user engagement\n\t\t\tif($upcoming_preview_type == 'upcoming_preview_more_tag'){\n\t\t\t\t$more_link = $this->get_readmore_element();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $more_link;\n }", "public function get_readmore_element(){\n\n\t\tglobal $post; \n\n\t\t$html = '';\n\t\t\n\t\t//get default action and text to display (and allow filters)\n\t\t$upcoming_post_link_action = apply_filters('sc_upcoming_post_link_action', 'mailto:[email protected]', $post);\n\t\t$upcoming_post_link_text = apply_filters('sc_upcoming_post_link_text', 'Get in contact and we will update you when this post is published!', $post);\n\n\t\t$html .= '<div class=\"readmore-link\">';\n\t\t$html .= '<a href=\"' . $upcoming_post_link_action .'\" title=\"' . $upcoming_post_link_text . '\">' . $upcoming_post_link_text . '</a>';\n\t\t$html .= '</div>';\n\t\t\n\t\treturn $html; \n\t}", "function uwmadison_custom_excerpt_more( $output ) {\n\t\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t\t$output .= uwmadison_continue_reading_link();\n\t\t}\n\t\treturn $output;\n\t}", "function quasar_get_read_more_link($target='_self'){\n\tglobal $post;\n\tif(!$post) return;\n\t\n\t$is_button = false;\n\t\n\t$return = '';\n\t\n\tif($is_button){\n\t\t$return .= '<a href=\"'.get_permalink().'\" class=\"more-link button button-custom\" target=\"'.$target.'\">'.quasar_get_read_more_text().'</a>';\n\t}else{\n\t\t$return .= '<a href=\"'.get_permalink().'\" class=\"more-link\" target=\"'.$target.'\">'.quasar_get_read_more_text().'</a>';\n\t}\n\t\n\n\treturn $return;\n}", "function wpdocs_excerpt_more( $more ) {\n return ' ...';\n}", "function echotheme_auto_content_more($more) {\n\treturn echotheme_continue_reading_link();\n}", "function new_excerpt_more( $more ) {\n\treturn '...';\n}", "function tac_new_excerpt_more( $more ) {\n\treturn '...';\n}", "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function DF_read_more($matches) {\r\n\treturn '<p>'.$matches[1].'</p><p><a '.$matches[3].' class=\"more-link\"><i class=\"icon-double-angle-right\"></i>'.$matches[4].'</a></p> ';\r\n}", "function barjeel_excerpt($more) {\n global $post;\n return '&nbsp; &nbsp;<a href=\"'. get_permalink($post->ID) . '\">...Continue Reading</a>';\n}", "function quasar_get_read_more_text(){\n\t\n\t$return = '';\n\t\n\t$return .= __('Read More <i class=\"fa-angle-double-right\"></i>','quasar');\n\t\n\treturn $return;\t\n}", "function wpfme_replace_excerpt($content) {\n return str_replace('[...]',\n '<a class=\"readmore\" href=\"'. get_permalink() .'\">Continue Reading</a>',\n $content\n );\n}", "function new_excerpt_more( $more ) {\n return ' ...';\n}", "function wp_embed_excerpt_more($more_string)\n {\n }", "function twentyseventeen_excerpt_more( $link ) {\n\tif ( is_admin() ) {\n\t\treturn $link;\n\t}\n\n\t$link = sprintf( '<p class=\"link-more\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></p>',\n\t\tesc_url( get_permalink( get_the_ID() ) ),\n\t\t/* translators: %s: Name of current post */\n\t\tsprintf( __( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'twentyseventeen' ), get_the_title( get_the_ID() ) )\n\t);\n\treturn ' &hellip; ' . $link;\n}", "function new_excerpt_more($more) {\n\treturn '...';\n}", "function pulcherrimum_excerpt_more($link)\n {\n if (is_admin()) {\n return $link;\n }\n\n $link = sprintf(\n '<p class=\"link-more\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></p>',\n esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Post title. */\n sprintf(__('Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'pulcherrimum'), get_the_title(get_the_ID()))\n );\n return ' &hellip; ' . $link;\n }", "public function a11yExcerpt($more)\n {\n return sprintf(\n '&hellip; <a class=\"text-nowrap\" href=\"%s\">Continue reading<span class=\"sr-only\"> %s</span></a>',\n get_permalink(get_the_ID()),\n get_the_title()\n );\n }", "function kstHelpWordpressBlogPosts_excerptsAndMoreTeasers() {\n ?>\n <p>\n Your theme uses the excerpt field as well as the &lt;--more--&gt; tag giving\n you many options for formatting your blog index. Many themes use either the\n excerpt or the &lt;--more--&gt; tag to control what content appears on your\n blog index.\n </p>\n <p>\n Posts are displayed on the index in one of these formats (and order shown):\n </p>\n <ol>\n <li>Title and excerpt (if you type anything in the excerpt field)</li>\n <li>Title and the post up to the &lt;--more--&gt; (if you insert &lt;--more--&gt; in the post)</li>\n <li>Title and the entire post (if you do not enter an excerpt or the &lt;--more--&gt; tag)</li>\n </ol>\n <p><em>i.e. If you enter an excerpt and include a &lt;--more--&gt; tag only the excerpt will display</em></p>\n <p>\n <strong>How to use the \"more\" tag:</strong>\n </p>\n <p>\n In \"Visual\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Click the button above the post editor that looks like\n a rectangle cut in two pieces (a small rectangle on top and a longer rectangle on the button).\n A line that says \"more\" will appear.\n </p>\n <p>\n In \"html\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Type &lt;--more--&gt; on it's own line.\n </p>\n <p>\n Note: You may also customize the \"more\" link text that is shown per post (only possible using \"html\" mode).<br />\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Simply type the text to use after \"more\" e.g. &lt;--more But wait, there's more! --&gt;\n </p>\n <?php\n}", "function thinkup_input_readmore( $link ) {\nglobal $post;\n\n$class_button = NULL;\n\n\t// Make no changes if in admin area\n\tif ( is_admin() ) {\n\t\treturn $link;\n\t}\n\n\t// Specify button class for blog style\n\t$class_button = 'themebutton';\n\n\t$link = '<p class=\"more-link\"><a href=\"'. esc_url( get_permalink($post->ID) ) . '\" class=\"' . $class_button . '\">' . esc_html__( 'Read More', 'ESTSB') . '</a></p>';\n\n\treturn $link;\n}", "function new_excerpt_more($more) {\n global $post;\n return '...';\n}" ]
[ "0.7775938", "0.77386016", "0.7637902", "0.7552475", "0.75478446", "0.7543824", "0.7513742", "0.74987465", "0.7492041", "0.7488624", "0.7485699", "0.74832326", "0.7482271", "0.74725074", "0.74569213", "0.7447996", "0.74461734", "0.7435722", "0.74356663", "0.74342775", "0.74282146", "0.7415171", "0.7402171", "0.7394148", "0.7390306", "0.73793715", "0.7365983", "0.7355795", "0.7334431", "0.7320214", "0.73167664", "0.7313572", "0.73053366", "0.73023623", "0.7300246", "0.72976184", "0.7259306", "0.7235596", "0.72353566", "0.72245127", "0.7207442", "0.72031355", "0.7193847", "0.718799", "0.7177265", "0.7166439", "0.71532047", "0.7144302", "0.71026546", "0.708675", "0.7076755", "0.70628506", "0.70562595", "0.70520467", "0.7051735", "0.7047194", "0.7039513", "0.7027735", "0.7024024", "0.7007086", "0.70001394", "0.698828", "0.6979139", "0.69575626", "0.6957046", "0.69343257", "0.6928004", "0.69264895", "0.6911596", "0.6874478", "0.6874478", "0.68637305", "0.6820474", "0.681995", "0.6817737", "0.6817234", "0.6815611", "0.6812474", "0.6783072", "0.6777932", "0.677167", "0.67615074", "0.6759158", "0.6746072", "0.66802883", "0.6666078", "0.66640395", "0.66289157", "0.66094303", "0.66089404", "0.6605409", "0.6595933", "0.6574189", "0.6565739", "0.6545142", "0.6543302", "0.65195554", "0.64974743", "0.64947665", "0.6485098" ]
0.748525
11
Define Allowed Files to be included.
function tewwie_filter_features( ) { $files_to_load = array( 'tewwie-news-section', 'tewwie-announcement-section', 'wp-bootstrap-comments', ); return $files_to_load; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAllowedFileTypes()\n {\n return str_replace('.', '', config('media.allowed', ''));\n }", "public function getAllowedFiles(){\n return self::$allowed_files;\n }", "public function allowedIncludes()\n {\n return [];\n }", "public function getFileTypeRestrictions() {}", "function getFileTypeRestrictions() ;", "public function setAllowedExtensions(array $allowed)\n {\n $this->allowedFiles = $allowed;\n\n return $this;\n }", "private function includeFiles(){\n foreach($this->files as $file){\n require implode('', $file);\n $class_name = $this->getClassNameFromFileName($file);\n $this->classes[$file['name']] = new $class_name();\n }\n }", "function validate_file($file, $allowed_files = array())\n {\n }", "public function getAllowFileExtensions()\n\t{\n\t\treturn implode(',', array_merge($this->videoExtensions, $this->imageExtensions, $this->audioExtensions, $this->docExtensions ));\n\t\t//return Yii::app()->params['fileExtensions'];\n\t}", "public function getAllowedExtensions()\n {\n return $this->allowedFiles;\n }", "protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png', 'svg'];\n }", "protected function initFileIncluded() {\n\t\treturn [\n\t\t\t'JQUERY' => env_checker()['JQUERY'],\n\t\t\t'POPPER' => env_checker()['POPPER'],\n\t\t\t'TWBS_CSS' => env_checker()['TWBS_CSS'],\n\t\t\t'TWBS_JS' => env_checker()['TWBS_JS'],\n\t\t\t'title' => 'Sistem Informasi'\n\t\t];\n\t}", "static function allowed()\n {\n\n }", "public function supported_filetypes() {\n return '*';\n }", "function TS_VCSC_FilesRegistrations() {\r\n\t\t\trequire_once($this->registrations_dir . 'ts_vcsc_registrations_files.php');\r\n\t\t}", "protected function _FILES()\n\t{\n\t\t\n\t}", "public function processIncludes() {}", "public function evaluateUserSpecificFileFilterSettings() {}", "public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }", "public function includeAllFiles()\n {\n return in_array('all', $this->types);\n }", "public static function set()\n {\n add_filter( 'template_include', [ __CLASS__, 'add' ] );\n }", "public function can_manage_files() {\n return true;\n }", "public function setAllowedFileTypes( $types ) {\r\n\t\t\tif ( $types === false ) {\r\n\t\t\t\t// allow all filetypes\r\n\t\t\t\t$this->AllowedFileTypes = null;\r\n\t\t\t} else {\r\n\t\t\t\t$types = (array)$types;\r\n\t\t\t\tfor( $i = 0, $count = count( $types ); $i < $count; $i++ ) {\r\n\t\t\t\t\t$types[$i] = (string)$types[$i];\r\n\t\t\t\t}\r\n\t\t\t\t$this->AllowedFileTypes = $types;\r\n\t\t\t}\r\n\t\t}", "function _vip_contrib_add_upload_cap() {\n\tif ( ! is_admin() && ! defined( 'XMLRPC_REQUEST' ) )\n\t\treturn;\n\n\twpcom_vip_add_role_caps( 'contributor', array( 'upload_files' ) );\n}", "public function __construct()\n {\n $this->fileExtensionPermissions['allow'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow']));\n $this->fileExtensionPermissions['deny'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny']));\n }", "public function getAllowedFileExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png'];\n }", "public function provideFileAndExtension()\n {\n return [\n [__FILE__, 'php'],\n ['.htaccess', 'htaccess'],\n ['name', ''],\n ['a.combined.filename.with.multiple.ext.separator', 'separator']\n ];\n }", "private static function _includes()\n {\n /**\n * Includes\n */\n include_once 'functions/register-post-types.php';\n include_once 'functions/register-taxonomies.php';\n include_once 'functions/register-menus.php';\n }", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "function init_files() {\n\t$filenames = [\n\t\t'genesis',\n\t\t'general',\n\t\t'gravity-forms',\n\t\t'yoast-seo',\n\t\t'acf/options-page',\n\t\t'acf/general'\n\t];\n\n\tload_specified_files( $filenames );\n}", "public function support($file);", "private function includes() {\n \t$includes = array(\n \t\t'/includes/event-custom-post-type.php',\n \t\t'/includes/shortcodes.php',\n \t\t'/includes/display-helper.php',\n \t\t'/includes/query-helper.php'\n \t);\n \t\n \t$admin_includes = array();\n \t\n \tif ( file_exists( dirname( __FILE__ ) . '/includes/cmb2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/cmb2/init.php';\n } elseif ( file_exists( dirname( __FILE__ ) . '/includes/CMB2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/CMB2/init.php';\n }\n \n \t// Load files\n \tforeach ( $includes as $file ) {\n \t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t}\n \t}\n \n \t// Load admin files\n \tif ( is_admin() ) {\n \t\tforeach ( $admin_includes as $file ) {\n \t\t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t\t}\n \t\t}\n \t}\n }", "public function include_files()\n\t{\n\t\trequire_once(WP_PARSI_DIR . 'includes/settings.php');\n\t\tglobal $wpp_settings;\n\t\t$wpp_settings = wp_parsi_get_settings();\n\n\t\t$files = array(\n\t\t\t'parsidate',\n\t\t\t'general',\n\t\t\t'fixes-archive',\n\t\t\t'fixes-permalinks',\n\t\t\t'fixes-dates',\n\t\t\t'fixes-misc',\n\t\t\t'admin/styles-fix',\n\t\t\t'admin/lists-fix',\n\t\t\t'admin/other-fix',\n\t\t\t'fixes-calendar',\n\t\t\t'fixes-archives',\n\t\t\t'plugins/woocommerce',\n\t\t\t'plugins/edd',\n\t\t\t'widget/widget_archive',\n\t\t\t'widget/widget_calendar'\n\t\t);\n\n\t\tforeach ($files as $file)\n\t\t\trequire_once(WP_PARSI_DIR . 'includes/' . $file . '.php');\n\n\t\tif (get_locale() == 'fa_IR')\n\t\t\tload_textdomain('wp-parsidate', WP_PARSI_DIR . 'parsi-languages/fa_IR.mo');\n\n\t\tadd_action('widgets_init', array($this, 'register_widget'));\n\t}", "public function includeFile()\n {\n foreach($this->arra_constant_file as $stri_file)\n {include_once($stri_file);}\n }", "public function getAllowedExtensions(){\n return $this->allowedExtensions;\n }", "protected function initializeExtensionFiles() {}", "protected function setDefaultRules()\n\t{\n\t\tif(empty($this->rules['FileExtension']['allowed']))\n\t\t\t$this->rules['FileExtension']['allowed'] = ['jpeg', 'jpg', 'png', 'gif'];\n\t}", "private static final function loadClasses() {\n if(isset(self::$_config['include']) && is_array(self::$_config['include'])) {\n self::$_config['include'] = array_merge(self::$defaultInclude, self::$_config['include']);\n $defaultIncludeCount = count(self::$defaultInclude);\n foreach(self::$_config['include'] as $key => $include) {\n /* @var string $include */\n $include = ($key < $defaultIncludeCount) ? self::$basePath . $include : self::$path . $include;\n $matches = [];\n if(preg_match('/(.*)\\/?\\*$/', $include, $matches)) {\n if(is_dir($matches[1])) {\n $files = scandir($matches[1]);\n foreach ($files as $file) {\n /* @var string $file */\n if($file === '.' || $file === '..' || is_dir($matches[1] . $file)) {\n continue;\n }\n if (preg_match('/^.+\\.php$/', $file)) { // include only php files\n require_once($matches[1] . $file);\n }\n }\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n {$matches[1]} is not a directory\");\n }\n } else {\n if(file_exists($include)) {\n if(!is_dir($include)) {\n require_once($include);\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n $include is a directory\");\n }\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n $include is not exists.\");\n }\n }\n }\n } else {\n static::error500('Include is missing from config.');\n }\n }", "public function __LoadFile($files)\n {\n\t!is_array($files)?$files = Array($files):false;\n\t\n\tforeach($files as $file) include $file;\n }", "public function __construct()\n {\n // By default exclude annoying files\n self::exclusive();\n }", "public function getExtensionAllowed()\n {\n return array_merge($this->imageTypes, $this->videoTypes, $this->documentTypes);\n }", "function ms_upload_constants()\n {\n }", "private function includes()\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-sanitize.php';\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-format-options.php';\n\t\t\tnew SF_Sanitize;\n\t\t}", "public function getFileAndFolderNameFilters() {}", "function mkdf_re_include_roles_register_files() {\n\t\tif(mkdf_re_theme_installed()) {\n\t\t\tforeach (glob(MIKADO_RE_MODULE_PATH . '/roles/*/role-register.php') as $role_load) {\n\t\t\t\tinclude_once $role_load;\n\t\t\t}\n\t\t}\n\t}", "public function getFileTypeRestrictions(): array\n {\n return $this->supportedFileTypes;\n }", "function restrictify()\n{\n\tglobal $_CREATED_FILES,$_MODIFIED_FILES;\n\n\t// Reset functions\n\tif (isset($_CREATED_FILES)) $_CREATED_FILES=array();\n\tif (isset($_MODIFIED_FILES)) $_MODIFIED_FILES=array();\n\n\t// Put back strictness\n\terror_reporting(E_ALL & ~(defined('E_DEPRECATED')?E_DEPRECATED:0));\n\tif (function_exists('set_time_limit')) @set_time_limit(25);\n\tif (get_forum_type()=='ocf') $GLOBALS['SITE_DB']->query('SET sql_mode=STRICT_ALL_TABLES',NULL,NULL,true);\n\tif ($GLOBALS['DEBUG_MODE'])\n\t{\n\t\t//@ini_set('ocproducts.type_strictness','1');\n\t\tglobal $PREVIOUS_XSS_STATE;\n\t\t//safe_ini_set('ocproducts.xss_detect',array_pop($PREVIOUS_XSS_STATE));\t\tWe don't maintain this in v8, since we increased checking strength but are not fixing all the new false-positives. Real issues are found in v9 and back-ported.\n\t}\n\t@ini_set('include_path','');\n\t@ini_set('allow_url_fopen','0');\n\t@ini_set('suhosin.executor.disable_emodifier','1');\n\t@ini_set('suhosin.executor.multiheader','1');\n\t$GLOBALS['NO_DB_SCOPE_CHECK']=false;\n\t//$GLOBALS['NO_QUERY_LIMIT']=false;\tLeave off, may have been set elsewhere than destrictify();\n}", "function check_file_extension($ext, $allowed) {\nif (in_array($ext, $allowed)) {\nreturn true;\n}else {\necho \"Only .txt file allow to be uploaded\";\n}\n}", "public function testSetAllowedMimeTypesIllegal() {\n // list is only checked against during upload, so expect success here.\n $mytype = array('application/x-perl' => 'pl');\n $this->up->setAllowedMimeTypes($mytype);\n $this->assertEquals($mytype, $this->up->getAllowedMimeTypes());\n }", "function addFileTypes($fileTypes) {\r\n $fileTypes['svg'] = 'image/svg+xml';\r\n return $fileTypes;\r\n}", "public function addDefaultIncludes(){}", "function fields() {\n\t\tforeach(glob(ALERTS_PLUGIN_DIR . 'lib/fields/*.php') as $field) {\n\t\t\t\tinclude($field);\n\t\t}\n\t}", "public function admin_includes()\n {\n\n }", "function ms_upload_constants() {\n\tglobal $wpdb;\n\n\t// This filter is attached in ms-default-filters.php but that file is not included during SHORTINIT.\n\tadd_filter( 'default_site_option_ms_files_rewriting', '__return_true' );\n\n\tif ( ! get_site_option( 'ms_files_rewriting' ) )\n\t\treturn;\n\n\t// Base uploads dir relative to ABSPATH\n\tif ( !defined( 'UPLOADBLOGSDIR' ) )\n\t\tdefine( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' );\n\n\t// Note, the main site in a post-MU network uses wp-content/uploads.\n\t// This is handled in wp_upload_dir() by ignoring UPLOADS for this case.\n\tif ( ! defined( 'UPLOADS' ) ) {\n\t\tdefine( 'UPLOADS', UPLOADBLOGSDIR . \"/{$wpdb->blogid}/files/\" );\n\n\t\t// Uploads dir relative to ABSPATH\n\t\tif ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) )\n\t\t\tdefine( 'BLOGUPLOADDIR', WP_CONTENT_DIR . \"/blogs.dir/{$wpdb->blogid}/files/\" );\n\t}\n}", "function includes() {\r\n\t\t\trequire_once( trailingslashit( RV_PORTFOLIO_DIR ) . 'inc/public/class-rv-portfolio-registration.php' );\r\n\t\t}", "public function enableConcatenateFiles() {}", "public function allow($ext = NULL)\n {\n $this->_allow_extensions = $ext;\n }", "public function setAllowFileManager($allow);", "function add_file_types_to_uploads($file_types){\n $new_filetypes = array();\n $new_filetypes['svg'] = 'image/svg+xml';\n $file_types = array_merge($file_types, $new_filetypes );\n return $file_types;\n}", "function add_file_types_to_uploads($file_types){\n$new_filetypes = array();\n$new_filetypes['svg'] = 'image/svg+xml';\n$file_types = array_merge($file_types, $new_filetypes );\nreturn $file_types;\n}", "function mkdf_re_include_roles_files() {\n\t\tif(mkdf_re_theme_installed()) {\n\t\t\tforeach (glob(MIKADO_RE_MODULE_PATH . '/roles/*/load.php') as $role_load) {\n\t\t\t\tinclude_once $role_load;\n\t\t\t}\n\t\t}\n\t}", "public function getAllowedExtensions()\n {\n return array('md', 'markdown');\n }", "function allowed_media_upload_mimetypes( $mimes ){\n\t$allowed_mimes = array(\n\t 'jpg|jpeg|jpe' => 'image/jpeg',\n\t 'gif' => 'image/gif',\n\t 'png' => 'image/png',\n\t 'bmp' => 'image/bmp',\n\t 'tif|tiff' => 'image/tiff'\n\t);\n\treturn $allowed_mimes;\n}", "public function includes()\n {\n add_action('plugins_loaded', array($this, 'load_php_files'), 10);\n add_action('init', array(__CLASS__, 'prefix_add_api_endpoints'));\n add_action('template_redirect', array($this, 'prefix_do_api'));\n add_filter('posts_request', array($this, 'disable_main_query_wordpress'), 10, 2);\n add_action('wp_enqueue_scripts', array($this, 'register_js_script'), 5);\n }", "public function files();", "public function files();", "public function files();", "function mkdf_re_include_roles_shortcodes_file() {\n foreach(glob(MIKADO_RE_MODULE_PATH.'/roles/shortcodes/*/load.php') as $shortcode_load) {\n include_once $shortcode_load;\n }\n }", "function add_file_types_to_uploads($file_types){\n $new_filetypes = array();\n $new_filetypes['svg'] = 'image/svg+xml';\n $file_types = array_merge($file_types, $new_filetypes );\n\n return $file_types;\n}", "function set_files(&$files){\n $this->_files = $files;\n }", "protected function load_files() {\n\t\trequire_once __DIR__ . '/class-papi-admin-meta-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-option-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-post.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-taxonomy.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-columns.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-page-type-switcher.php';\n\t}", "function enable_extended_upload ( $mime_types =array() ) {\n // You can add as many MIME types as you want.\n $mime_types['exe'] = 'application/exe'; \n\n return $mime_types;\n}", "function ms_file_constants() {\n\t/**\n\t * Optional support for X-Sendfile header\n\t * @since 3.0.0\n\t */\n\tif ( !defined( 'WPMU_SENDFILE' ) )\n\t\tdefine( 'WPMU_SENDFILE', false );\n\n\t/**\n\t * Optional support for X-Accel-Redirect header\n\t * @since 3.0.0\n\t */\n\tif ( !defined( 'WPMU_ACCEL_REDIRECT' ) )\n\t\tdefine( 'WPMU_ACCEL_REDIRECT', false );\n}", "protected function getAllowedOptions()\n {\n return array_merge(parent::getAllowedOptions(), array(\n 'curlPath' => '/.+/',\n ));\n }", "private function includes()\n {\n }", "function add_file_types_to_uploads($file_types)\n{\n\n $new_filetypes = array();\n $new_filetypes['svg'] = 'image/svg+xml';\n $file_types = array_merge($file_types, $new_filetypes);\n\n return $file_types;\n}", "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "function include_user_files($dir=G_USER_PHP_FILES)\r\n{\r\n log_debug(\"include_user_files( {$dir} )\");\r\n\r\n if (file_exists($dir) && is_dir($dir))\r\n {\r\n $usr = opendir($dir);\r\n\r\n if ($usr)\r\n {\r\n while (false !== ($f = readdir($usr)))\r\n {\r\n if ($f == '.' || $f == '..')\r\n {\r\n continue;\r\n }\r\n\r\n $fn = \"{$dir}/{$f}\";\r\n\r\n if (is_dir($fn))\r\n {\r\n include_user_files($fn);\r\n }\r\n else if (is_file($fn))\r\n {\r\n log_debug(\"Including file {$fn}\");\r\n include_once($fn);\r\n }\r\n }\r\n\r\n closedir($usr);\r\n }\r\n }\r\n}", "function _construct ($files = '')\n {\n parent::_construct(strtolower($files));\n }", "private function _include_files() {\n\n require_once( KP_DIR_PATH . 'includes/korapay-shortcode.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-admin-settings.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-payment-list-class.php' );\n require_once( KP_DIR_PATH . 'includes/vc-elements/simple-vc-pay-now-form.php' );\n\n if ( is_admin() ) {\n require_once( KP_DIR_PATH . 'includes/korapay-tinymce-plugin-class.php' );\n }\n\n }", "protected function setUp(): void\n {\n $whitelistedClasses = [];\n $path = sprintf('%s/_files/controller_acl_test_whitelist_*.txt', __DIR__);\n foreach (glob($path) as $listFile) {\n $whitelistedClasses = array_merge(\n $whitelistedClasses,\n file($listFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)\n );\n }\n foreach ($whitelistedClasses as $item) {\n if (substr($item, 0, 1) === '#') {\n continue;\n }\n $this->whiteListedBackendControllers[$item] = 1;\n }\n }", "function custom_mime_types($existing_mimes = array()) {\n\n //For example, the following line allows PDF uploads\n //$existing_mimes['pdf'] = 'application/pdf';\n \n return $existing_mimes;\n}", "function ms_file_constants()\n {\n }", "private function includes() {\n\t\t\t// By default, comments are disjoined from the other post types.\n\t\t\trequire_once( $this->includes_dir . 'comments.php' );\n\n\t\t\t// Settings\n\t\t\trequire_once( $this->includes_dir . 'settings.php' );\n\t\t}", "public function load_files() {\n\n\t\t// Load our admin-related functions.\n\t\tif ( is_admin() ) {\n\t\t\trequire_once( GUPR_DIR . 'lib/admin.php' );\n\t\t}\n\t}", "static public function configureFileField() {}", "public function allow_setup_uploads( $mime_types ){\n\t\t$mime_types['sto'] = 'application/octet-stream';\n\n\t\treturn $mime_types;\n\t}", "function load_specified_files( array $filenames, $folder_root = '', $ext = '.php' ) {\n\t$folder_root = $folder_root ? : METRO_CORE_DIR . '/inc/';\n\n\tforeach ( $filenames as $filename ) {\n\t\trequire_once $folder_root . $filename . $ext ;\n\t}\n}", "public static function getAllowedFileExtensions() {\n\t\tif (self::$allowedFileExtensions === null) {\n\t\t\tself::$allowedFileExtensions = array();\n\t\t\tself::$allowedFileExtensions = array_unique(explode(\"\\n\", StringUtil::unifyNewlines(WCF::getUser()->getPermission('user.profile.avatar.allowedFileExtensions'))));\n\t\t\tself::$allowedFileExtensions = array_diff(self::$allowedFileExtensions, self::$illegalFileExtensions);\n\t\t}\n\t\t\n\t\treturn self::$allowedFileExtensions;\n\t}", "private function loadFilters()\n {\n require __DIR__.'/filters.php';\n }", "function __construct(){\n\t\tforeach (glob(INCLUDE_ROOT.\"application/controllers/controller.*.php\") as $controllers){\n\t\t\t include_once($controllers);\n\t\t}\n\t}", "function wp_is_file_mod_allowed($context)\n {\n }", "function acf_include($filename = '')\n{\n}", "static public function getAllowedExtensions()\n\t{\n\t\t$result = [];\n\t\t\n\t\tforeach(DB::table('dx_files_headers')->select('extention')->get() as $row)\n\t\t{\n\t\t\t$result[] = $row->extention;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "protected function checkSuhosinExecutorIncludeWhiteListContainsVfs() {}", "public function getSupportedFileExtensions() {}", "public function setFiles()\n {\n $this->files = [];\n $path = $this->getValue();\n\n if (!preg_match('#^/#', $path)) {\n $path = $this->parser->getServer()->getPrefix().'/'.$path;\n }\n\n $iterator = new GlobIterator($path);\n foreach ($iterator as $path) {\n $this->files[] = $path;\n }\n\n return $this;\n }", "protected function getAcceptedFiles()\n {\n $accepted_files = str_replace(' ', '',\n str_replace('.', '', $this->config->get('media.accepted_files'))\n );\n\n return $accepted_files;\n }", "public function setAllowedActions($allowedActions) {\n if ($allowedActions === '*')\n $this->_allowedActions = $allowedActions;\n else\n $this->_allowedActions = preg_split('/[\\s,]+/', $allowedActions, -1, PREG_SPLIT_NO_EMPTY);\n }", "function isAllowedFile($file) {\n\t\t$path = pathinfo($file);\n\t\t$dir = preg_replace('#[\\./]*(.*)/*#', '$1', $path['dirname']);\n\t\t$file = $path['basename'];\n\t\tif ($dir == '' && $file == '.htaccess') return true;\n\t\tif ($dir == '' && $file == 'index.php') return true;\n\t\tif ($dir == '' && $file == 'documentation.txt') return true;\n\t\tif ($dir == 'data' && $file == 'hypha.html') return true;\n\t\tif ($dir == 'data' && $file == 'hypha.css') return true;\n\t\tif ($dir == 'system/core') return true;\n\t\tif ($dir == 'system/datatypes') return true;\n\t\tif ($dir == 'system/languages') return true;\n\t\tif ($dir == 'system/php-dom-wrapper') return true;\n\t\tif ($dir == 'system/wymeditor') return true;\n\t\treturn false;\n\t}", "public function provideFileAnExpectedNames()\n {\n return [\n [__FILE__, pathinfo(__FILE__, PATHINFO_FILENAME)],\n ['.htaccess', ''],\n ['name', 'name'],\n ['a.combined.filename.with.multiple.ext.separator', 'a.combined.filename.with.multiple.ext']\n ];\n }" ]
[ "0.68944967", "0.67760015", "0.652013", "0.63537073", "0.6293571", "0.6067082", "0.58914614", "0.5886769", "0.58844286", "0.5853039", "0.5838147", "0.5801125", "0.57944393", "0.57497317", "0.5747599", "0.5746619", "0.5742816", "0.57275254", "0.57245994", "0.5718556", "0.5663027", "0.5643672", "0.5620092", "0.55981886", "0.5598179", "0.5591549", "0.55597967", "0.55522686", "0.55497664", "0.5541424", "0.55401975", "0.5536516", "0.5527697", "0.55276376", "0.55170614", "0.5511687", "0.55099416", "0.5509802", "0.5500186", "0.54923445", "0.54898447", "0.5483637", "0.5475083", "0.545533", "0.5444611", "0.5441462", "0.5438615", "0.54377085", "0.54365087", "0.5435853", "0.5430418", "0.54159284", "0.54119015", "0.5405453", "0.5398589", "0.53900087", "0.5385053", "0.5379506", "0.537273", "0.5368122", "0.5366164", "0.535582", "0.5349723", "0.5343948", "0.53435415", "0.53435415", "0.53435415", "0.53353065", "0.5326123", "0.5325005", "0.5321829", "0.53204226", "0.5319296", "0.5313318", "0.5298138", "0.5295697", "0.52914435", "0.5286857", "0.52842337", "0.5275034", "0.5274279", "0.5270124", "0.52690816", "0.5264916", "0.5258548", "0.5253491", "0.5236375", "0.52346903", "0.5231385", "0.52280927", "0.5223473", "0.52230424", "0.5213158", "0.52125853", "0.52089536", "0.5196112", "0.51932126", "0.51930743", "0.5192515", "0.5189354", "0.5189277" ]
0.0
-1
Add support for custom color palettes in Gutenberg.
function tewwie_gutenberg_color_palette() { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Primary', '@@textdomain' ), 'slug' => 'primary', 'color' => 'rgb(94, 114, 228)', ), array( 'name' => esc_html__( 'Secondary', '@@textdomain' ), 'slug' => 'secondary', 'color' => 'rgb(245, 54, 92)', ), array( 'name' => esc_html__( 'Green', '@@textdomain' ), 'slug' => 'green', 'color' => 'rgb(67, 170, 139)', ), array( 'name' => esc_html__( 'Dark Grey', '@@textdomain' ), 'slug' => 'dark-grey', 'color' => 'rgb(68,68,68)', ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hotel_lux_gutenberg_support() {\r\n\t$colors = cmsmasters_color_picker_palettes();\r\n\t\r\n\t$color_palette = array();\r\n\t\r\n\t\r\n\tforeach ($colors as $color) {\r\n\t\t$color_palette[] = array(\r\n\t\t\t'color' => $color,\r\n\t\t);\r\n\t}\r\n\t\r\n\t\r\n\tadd_theme_support('editor-color-palette', $color_palette);\r\n}", "function lalita_enqueue_color_palettes() {\n\t\t// Old versions of WP don't get nice things\n\t\tif ( ! function_exists( 'wp_add_inline_script' ) )\n\t\t\treturn;\n\n\t\t// Grab our palette array and turn it into JS\n\t\t$palettes = json_encode( lalita_get_default_color_palettes() );\n\n\t\t// Add our custom palettes\n\t\t// json_encode takes care of escaping\n\t\twp_add_inline_script( 'wp-color-picker', 'jQuery.wp.wpColorPicker.prototype.options.palettes = ' . $palettes . ';' );\n\t}", "function dg_gutenberg_custom_colors() {\n\t\n\t// disable custom colors\n\tadd_theme_support( 'disable-custom-colors' );\n\t\n\t// add custom color palette\n\tadd_theme_support( 'editor-color-palette', array(\n\t\tarray(\n\t\t\t'name' => __( 'Pale Lemon Yellow', 'dehli-grolimund' ),\n\t\t\t'slug' => 'pale-lemon-yellow',\n\t\t\t'color'\t=> '#fceeb2',\n\t\t),\t\n\t\tarray(\n\t\t\t'name' => __( 'Hermosa Pink', 'dehli-grolimund' ),\n\t\t\t'slug' => 'hermosa-pink',\n\t\t\t'color'\t=> '#e6bdc3',\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Coral Red', 'dehli-grolimund' ),\n\t\t\t'slug' => 'coral-red',\n\t\t\t'color'\t=> '#d98c7f',\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Pale Kings Blue', 'dehli-grolimund' ),\n\t\t\t'slug' => 'pale-king-blue',\n\t\t\t'color'\t=> '#aeced7',\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Olympic Blue', 'dehli-grolimund' ),\n\t\t\t'slug' => 'olympic-blue',\n\t\t\t'color'\t=> '#5f769c',\n\t\t),\t\t\n\t\tarray(\n\t\t\t'name' => __( 'Cobalt Green', 'dehli-grolimund' ),\n\t\t\t'slug' => 'cobalt-green',\n\t\t\t'color'\t=> '#9ec7a2',\n\t\t),\t\t\n\t\tarray(\n\t\t\t'name' => __( 'Venice Green', 'dehli-grolimund' ),\n\t\t\t'slug' => 'venice-green',\n\t\t\t'color'\t=> '#7cbbb1',\n\t\t),\n\n\t) );\t\n}", "public function custom_color_variables() {\n\t\tif ( 'd1e4dd' !== strtolower( get_theme_mod( 'background_color', 'D1E4DD' ) ) ) {\n\t\t\twp_add_inline_style( 'twenty-twenty-one-style', $this->generate_custom_color_variables() );\n\t\t}\n\t}", "function fp_setup() {\n\t\n\tadd_theme_support('custom-background', array('default-color' => 'ffffff'));\n\t\n}", "function hello_pro_inline_color_palette() {\n\t$css = '';\n\n\t$appearance = genesis_get_config( 'appearance' );\n\n\t$editor_color_palette = $appearance['editor-color-palette'];\n\n\tforeach ( $editor_color_palette as $color_info ) {\n\n\t\t$css .= sprintf(\n\t\t\t'.site-container .has-%1$s-color,\n\t\t.site-container .wp-block-button .wp-block-button__link.has-%1$s-color,\n\t\t.site-container .wp-block-button.is-style-outline .wp-block-button__link.has-%1$s-color {\n\t\t\tcolor: %2$s;\n\t\t}\n\n\t\t.site-container .has-%1$s-background-color,\n\t\t.site-container .wp-block-button .wp-block-button__link.has-%1$s-background-color,\n\t\t.site-container .wp-block-pullquote.is-style-solid-color.has-%1$s-background-color {\n\t\t\tbackground-color: %2$s;\n\t\t}\n\n\t\t',\n\t\t\t$color_info['slug'],\n\t\t\t$color_info['color']\n\t\t);\n\n\t}\n\n\t// Get Primary Color.\n\t$color_primary = get_theme_mod( 'hello_pro_link_color', $appearance['default-colors']['primary'] );\n\n\t// Get Secondary Color.\n\t$color_secondary = get_theme_mod( 'hello_pro_accent_color', $appearance['default-colors']['secondary'] );\n\n\t// Define Primary Color elements.\n\t$css .= sprintf(\n\t\t'/* PRIMARY COLOR */\n\t\ta,\n\t\t.home-features > .wrap > .widget .textwidget > h3 > span,\n\t\t.social-proof-slider-wrap .testimonial-item .testimonial-text .author .author-name,\n\t\t.entry-header .entry-meta .entry-comments-link a,\n\t\t.footer-widgets a:hover,\n\t\t.footer-widgets a:focus,\n\t\t.genesis-nav-menu a:focus,\n\t\t.genesis-nav-menu a:hover,\n\t\t.genesis-nav-menu .current-menu-item > a,\n\t\t.genesis-nav-menu .sub-menu .current-menu-item > a:focus,\n\t\t.genesis-nav-menu .sub-menu .current-menu-item > a:hover,\n\t\t.genesis-nav-menu .current-menu-parent > a,\n\t\t.menu-toggle:focus,\n\t\t.menu-toggle:hover,\n\t\t.sub-menu-toggle:focus,\n\t\t.sub-menu-toggle:hover,\n\t\ta:hover,\n\t\t.entry-meta a,\n\t\t.entry-meta a:hover,\n\t\t.entry-meta a:focus,\n\t\t.footer-widgets .entry-title a:hover,\n\t\t.site-footer a:hover,\n\t\t.site-footer a:focus,\n\t\t.entry-content .featured-articles button.slick-arrow > span,\n\t\t.entry-content .featured-articles ul.slick-dots li button::before,\n\t\t.entry-content .featured-articles ul.slick-dots li.slick-active button:before {\n\t\t\tcolor: %1$s;\n\t\t}\n\n\t\t.menu-toggle,\n\t\t.archive-pagination li a,\n\t\ta.button,\n\t\tbutton,\n\t\tinput[type=\"button\"],\n\t\tinput[type=\"reset\"],\n\t\tinput[type=\"submit\"],\n\t\t.sidebar .enews-widget input[type=\"submit\"],\n\t\t.sidebar-primary .widget input[type=\"submit\"],\n\t\t.sidebar-primary .widget .button,\n\t\t.wpforms-form button[type=submit] {\n\t\t\tbackground-color: %1$s;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.entry-content .featured-articles .featured-article {\n\t\t\tbackground-color: %1$s !important;\n\t\t}\n\n\t\t.wp-block-button .wp-block-button__link.has-primary-background-color,\n\t\t.ab-block-button > .ab-button,\n\t\t.gb-block-button > .gb-button {\n\t\t\tbackground-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.wp-block-button .wp-block-button__link:not(.has-background) {\n\t\t background-color: %1$s !important;\n\t\t}\n\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):not(.has-text-color),\n\t\t.wp-block-button.is-style-outline .wp-block-button__link.has-primary-background-color {\n\t\t\tbackground-color: transparent !important;\n\t\t border-color: %1$s !important;\n\t\t\tcolor: %1$s !important;\n\t\t}\n\n\t\t',\n\t\t$color_primary,\n\t\thello_pro_color_contrast( $color_primary )\n\t);\n\n\t// Define Secondary Color elements.\n\t$css .= sprintf(\n\t\t'/* SECONDARY COLOR */\n\t\t.menu-toggle:focus,\n\t\t.menu-toggle:hover,\n\t\t.archive-pagination li a:hover,\n\t\t.archive-pagination li a:focus,\n\t\t.archive-pagination li.active a,\n\t\t.button:hover,\n\t\t.button:focus,\n\t\ta.button:hover,\n\t\ta.button:focus,\n\t\tbutton:not(.slick-arrow):hover,\n\t\tbutton:not(.slick-arrow):focus,\n\t\tbutton:not(id^=\"slick-\"),\n\t\tinput:hover[type=\"button\"],\n\t\tinput:hover[type=\"reset\"],\n\t\tinput:hover[type=\"submit\"],\n\t\tinput:focus[type=\"button\"],\n\t\tinput:focus[type=\"reset\"],\n\t\tinput:focus[type=\"submit\"],\n\t\t.sidebar-primary .widget .button:focus,\n\t\t.sidebar-primary .widget .button:hover,\n\t\t.sidebar .enews-widget input[type=\"submit\"]:focus,\n\t\t.sidebar .enews-widget input[type=\"submit\"]:hover,\n\t\t.wpforms-form button[type=submit]:focus,\n\t\t.wpforms-form button[type=submit]:hover {\n\t\t\tbackground-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.wp-block-button .wp-block-button__link:not(.has-background):hover {\n\t\t background-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.wp-block-button.is-style-outline .wp-block-button__link.has-secondary-background-color {\n\t\t\tbackground-color: transparent !important;\n\t\t border-color: %1$s !important;\n\t\t\tcolor: %1$s !important;\n\t\t}\n\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:focus,\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:hover,\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):focus,\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):hover {\n\t\t\tbackground-color: %1$s !important;\n\t\t\tborder-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}',\n\t\t$color_secondary,\n\t\thello_pro_color_contrast( $color_secondary )\n\t);\n\n\treturn $css;\n}", "function dizzy7_gutenberg_features() {\n\t\t\n\n// Theme supports wide images, galleries and videos.\n add_theme_support( 'align-wide' );\n add_theme_support( 'align-full' );\n add_theme_support( 'wide-images' );\n \n add_theme_support(\n\t\t'editor-color-palette', array(\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Main Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'main-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-main-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Second Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'second-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-second-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Highlight Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'highlight-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-third-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Special Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'special-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-fourth-color'),\n\t\t\t)\n\t\t)\n\t);\n}", "public function colors()\n {\n $section = self::$panel . '_colors';\n\n /**\n * Add Section and fields for Colors\n */\n Customizer::addSection($section, array(\n 'title' => esc_html__('Colors', 'stage'),\n 'description' => esc_html__('Set color settings for your website', 'stage'),\n 'priority' => 60,\n 'panel' => self::$panel,\n ));\n\n // Fields are calculated from ColorsPanel.php\n }", "function wp_register_colors_support($block_type)\n {\n }", "protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }", "function register_admin_color_schemes()\n {\n }", "public function editor_custom_color_variables() {\n\t\twp_enqueue_style(\n\t\t\t'twenty-twenty-one-custom-color-overrides',\n\t\t\tget_theme_file_uri( 'assets/css/custom-color-overrides.css' ),\n\t\t\tarray(),\n\t\t\t(string) filemtime( get_theme_file_path( 'assets/css/custom-color-overrides.css' ) )\n\t\t);\n\n\t\t$background_color = get_theme_mod( 'background_color', 'D1E4DD' );\n\t\tif ( 'd1e4dd' !== strtolower( $background_color ) ) {\n\t\t\twp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', $this->generate_custom_color_variables( 'editor' ) );\n\t\t}\n\t}", "function CustomThemeSupport(){\n // coloring\n if(!empty(SELF::$WPgutenberg_ColorPalette)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_ColorPalette as $colorkey => $color) {\n $newColors[] = array(\n 'name' => __( $color[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($color[\"key\"]),\n 'color'\t=> $color[\"value\"],\n );\n }\n add_theme_support( 'editor-color-palette', $newColors );\n endif;\n // font sizes\n if(!empty(SELF::$WPgutenberg_FontSizes)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_FontSizes as $sizekey => $size) {\n $newColors[] = array(\n 'name' => __( $size[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($size[\"key\"]),\n 'size'\t=> $size[\"value\"],\n );\n }\n add_theme_support( 'editor-font-sizes', $newColors );\n // disable custom color picker\n if(SELF::$WPgutenberg_ColorPalette_CP == 0):\n add_theme_support( 'disable-custom-colors');\n endif;\n endif;\n // disable default patterns\n if($this->WPgutenberg_DefaultPatterns == 0):\n remove_theme_support( 'core-block-patterns' );\n endif;\n\n }", "function colloquium_theme_setup() {\n add_action('wp_head', 'colloquium_bbpress_custom_color');\n}", "function shell_custom_background(){\r\n\r\n\t\t/* Custom Background */\r\n\t\tadd_theme_support( 'custom-background', array( 'default-color' => 'f9f9f9' ) );\r\n\t}", "function themename_customize_color_register( $wp_customize ) {\n\t$wp_customize->get_setting( 'themename_theme_bgcolor1' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_header_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_theme_hovercolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_widget_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_mainpost_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_popularpost_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_a_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_text_color' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_readmore_bgcolor' )->transport = 'postMessage';\n}", "public function useColor($name);", "function WPBC_after_setup_theme__customs(){\n\t$defaults = array(\n\t\t'default-color' => 'red',\n\t\t'default-image' => '',\n\t\t'default-repeat' => 'no-repeat',\n\t\t'default-position-x' => 'center',\n\t\t'default-position-y' => 'center',\n\t\t'default-size' => 'cover',\n\t\t'default-attachment' => 'fixed',\n\t\t'wp-head-callback' => '_custom_background_cb',\n\t\t'admin-head-callback' => '',\n\t\t'admin-preview-callback' => ''\n\t);\n\t// add_theme_support( 'custom-background', $defaults );\n\t\n}", "function ux_mce4_options( $init ) {\r\n global $flatsome_opt;\r\n $default_colours = '\r\n \"000000\", \"Black\", \"993300\", \"Burnt orange\", \"333300\", \"Dark olive\", \"003300\", \"Dark green\", \"003366\", \"Dark azure\", \"000080\", \"Navy Blue\", \"333399\", \"Indigo\", \"333333\", \"Very dark gray\", \r\n \"800000\", \"Maroon\", \"FF6600\", \"Orange\", \"808000\", \"Olive\", \"008000\", \"Green\", \"008080\", \"Teal\", \"0000FF\", \"Blue\", \"666699\", \"Grayish blue\", \"808080\", \"Gray\", \r\n \"FF0000\", \"Red\", \"FF9900\", \"Amber\", \"99CC00\", \"Yellow green\", \"339966\", \"Sea green\", \"33CCCC\", \"Turquoise\", \"3366FF\", \"Royal blue\", \"800080\", \"Purple\", \"999999\", \"Medium gray\", \r\n \"FF00FF\", \"Magenta\", \"FFCC00\", \"Gold\", \"FFFF00\", \"Yellow\", \"00FF00\", \"Lime\", \"00FFFF\", \"Aqua\", \"00CCFF\", \"Sky blue\", \"993366\", \"Brown\", \"C0C0C0\", \"Silver\", \r\n \"FF99CC\", \"Pink\", \"FFCC99\", \"Peach\", \"FFFF99\", \"Light yellow\", \"CCFFCC\", \"Pale green\", \"CCFFFF\", \"Pale cyan\", \"99CCFF\", \"Light sky blue\", \"CC99FF\", \"Plum\", \"FFFFFF\", \"White\"\r\n ';\r\n $custom_colours = '\r\n \"e14d43\", \"Primary Color\", \"d83131\", \"Color 2 Name\", \"ed1c24\", \"Color 3 Name\", \"f99b1c\", \"Color 4 Name\", \"50b848\", \"Color 5 Name\", \"00a859\", \"Color 6 Name\", \"00aae7\", \"Color 7 Name\", \"282828\", \"Color 8 Name\"\r\n ';\r\n $init['textcolor_map'] = '['.$custom_colours.','.$default_colours.']';\r\n return $init;\r\n }", "function wp_apply_colors_support($block_type, $block_attributes)\n {\n }", "protected function parsePalettes(ContainerInterface $container)\n {\n $palettesDca = $this->getFromDca('palettes');\n\n // Skip while there is no extended palette definition.\n if (!is_callable($palettesDca)) {\n return;\n }\n\n if ($container->hasDefinition(PalettesDefinitionInterface::NAME)) {\n $palettesDefinition = $container->getDefinition(PalettesDefinitionInterface::NAME);\n } else {\n $palettesDefinition = new DefaultPalettesDefinition();\n $container->setDefinition(PalettesDefinitionInterface::NAME, $palettesDefinition);\n }\n\n call_user_func($palettesDca, $palettesDefinition, $container);\n }", "public function changeEditorColorPalette(): void\n\t{\n\t\t// Unable to use state due to this method is used in JS and store is not registered there.\n\t\t$colors = $this->getSettingsManifest()['globalVariables']['colors'] ?? [];\n\n\t\tif ($colors) {\n\t\t\t\\add_theme_support('editor-color-palette', $colors);\n\t\t}\n\t}", "public function tcb_get_palettes_from_config() {\n\t\treturn ! empty( $this->skin_palettes_config['palette'] ) ? $this->skin_palettes_config['palette'] : [];\n\t}", "function alt_add_color_scheme()\n {\n wp_admin_css_color(\n 'alt-design',\n __('Alt Design', 'alt-design-color-scheme'),\n get_template_directory_uri() . '/lib/alt-admin/css/admin-color-scheme.css',\n array('#25282b', '#363b3f', '#ff6600', '#ff6600')\n );\n }", "function techfak_color_schemes() {\n\t$color_scheme_options = array(\n\t\t'blau' => array(\n\t\t\t'value' => 'blau',\n\t\t\t'label' => __( 'Blue', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-blau.png',\n\t\t),\n\t\t'graublau' => array(\n\t\t\t'value' => 'graublau',\n\t\t\t'label' => __( 'Blue-grey', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-graublau.png',\n\t\t),\n\t\t'karibikgruen' => array(\n\t\t\t'value' => 'karibikgruen',\n\t\t\t'label' => __( 'Caribic-green', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-karibikgruen.png',\n\t\t),\n\t\t'gruen' => array(\n\t\t\t'value' => 'gruen',\n\t\t\t'label' => __( 'Green', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-gruen.png',\n\t\t),\n\t\t'hellblau' => array(\n\t\t\t'value' => 'hellblau',\n\t\t\t'label' => __( 'Light-blue', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-hellblau.png',\n\t\t),\n\t\t'orange' => array(\n\t\t\t'value' => 'orange',\n\t\t\t'label' => __( 'Orange', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-orange.png',\n\t\t),\n\t\t'rot' => array(\n\t\t\t'value' => 'rot',\n\t\t\t'label' => __( 'Red', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-rot.png',\n\t\t),\n\t\t'gelb' => array(\n\t\t\t'value' => 'gelb',\n\t\t\t'label' => __( 'Yellow', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-gelb.png',\n\t\t),\n\n\t);\n\n\treturn apply_filters( 'techfak_color_schemes', $color_scheme_options );\n}", "function capezzahill_colors_css_wrap() {\r\n\t// Only include custom colors in customizer or frontend.\r\n\tif ( ( ! is_customize_preview() && 'default' === get_theme_mod( 'primary_color', 'default' ) ) || is_admin() ) {\r\n\t\treturn;\r\n\t}\r\n\trequire_once get_parent_theme_file_path( '/inc/color-patterns.php' );\r\n\t$primary_color = 199;\r\n\tif ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) {\r\n\t\t$primary_color = get_theme_mod( 'primary_color_hue', 199 );\r\n\t}\r\n\t?>\r\n\r\n\t<style type=\"text/css\" id=\"custom-theme-colors\" <?php echo is_customize_preview() ? 'data-hue=\"' . absint( $primary_color ) . '\"' : ''; ?>>\r\n\t\t<?php echo capezzahill_custom_colors_css(); ?>\r\n\t</style>\r\n\t<?php\r\n}", "function land_theme_customizer( $wp_customize ){\r\n\r\n $wp_customize->add_setting(\r\n 'primary_color',\r\n array(\r\n 'default' => '#ff5c36'\r\n )\r\n );\r\n $wp_customize->add_control(\r\n new WP_Customize_Color_Control(\r\n $wp_customize,\r\n 'primary_color',\r\n array(\r\n 'label' => __('Primary color', 'land'),\r\n 'section' => 'colors',\r\n 'priority' => 9\r\n )\r\n )\r\n );\r\n\r\n $wp_customize->add_setting(\r\n 'header_bg_color',\r\n array(\r\n 'default' => '#f5f5f5'\r\n )\r\n );\r\n $wp_customize->add_control(\r\n new WP_Customize_Color_Control(\r\n $wp_customize,\r\n 'header_bg_color',\r\n array(\r\n 'label' => __('Header background color', 'land'),\r\n 'section' => 'background_image',\r\n 'priority' => 9\r\n )\r\n )\r\n );\r\n}", "function twentyseventeen_colors_css_wrap() {\n\tif ( 'custom' !== get_theme_mod( 'colorscheme' ) && ! is_customize_preview() ) {\n\t\treturn;\n\t}\n\n\trequire_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) );\n\t$hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) );\n?>\n\t<style type=\"text/css\" id=\"custom-theme-colors\" <?php if ( is_customize_preview() ) { echo 'data-hue=\"' . $hue . '\"'; } ?>>\n\t\t<?php echo twentyseventeen_custom_colors_css(); ?>\n\t</style>\n<?php }", "function my_mce4_options($init) {\n\t$default_colors = '';\n\tif(get_field('wysiwyg_colors','option')):\n\t\twhile(has_sub_field('wysiwyg_colors','option')):\n\t\t\t$default_colors .= '\"' . ltrim(get_sub_field('color'), '#') . '\", \"' . get_sub_field('color_name') . '\",';\n\t\tendwhile;\n\tendif;\n\t$init['textcolor_map'] = '['.$default_colors.']';\n\treturn $init;\n}", "function puzzle_modify_puzzle_colors($colors) {\n /* Edit existing theme colors */\n // $colors->theme_color('primary')->set_color('#f6a4cd')\n // ->set_name('Pink')\n // ->set_text_color_scheme('dark');\n \n /* Remove existing theme colors */\n // $colors->remove_theme_color('dark-gray');\n \n /* Add new colors */\n // $accent = new PuzzleColor(array(\n // 'name' => __('Accent Color'),\n // 'id' => 'accent',\n // 'color' => '#f00',\n // 'text_color_scheme' => 'light',\n // 'order' => 11\n // ));\n // $colors->add_theme_color($accent);\n \n /* Edit text colors */\n // $colors->set_text_colors(array(\n // 'headline_dark' => '#333',\n // 'text_dark' => '#555',\n // 'headline_light' => '#fff',\n // 'text_light' => '#fff'\n // ));\n \n /* Edit link colors */\n // $colors->set_link_colors(array(\n // 'link_dark' => '#3b54a5',\n // 'link_dark_hover' => '#2cb799',\n // 'link_light' => '#fff',\n // 'link_light_hover' => 'rgba(255, 255, 255, 0.75)'\n // ));\n}", "function modshrink_s_register_custom_background() {\n\t$args = array(\n\t\t'default-color' => 'ffffff',\n\t\t'default-image' => '',\n\t);\n\n\t$args = apply_filters( 'modshrink_s_custom_background_args', $args );\n\n\tif ( function_exists( 'wp_get_theme' ) ) {\n\t\tadd_theme_support( 'custom-background', $args );\n\t} else {\n\t\tdefine( 'BACKGROUND_COLOR', $args['default-color'] );\n\t\tif ( ! empty( $args['default-image'] ) )\n\t\t\tdefine( 'BACKGROUND_IMAGE', $args['default-image'] );\n\t\tadd_custom_background();\n\t}\n}", "function get_peepso_color_template() {\n $color = \"\";\n\n if (class_exists( 'PeepSo' )) {\n $color = PeepSo::get_option('site_css_template','');\n }\n\n return $color;\n}", "function gcb_custom_background() {\r\n\tadd_custom_background( apply_filters( 'gcb_args' , 'gcb_do_theme_background' ) );\t\r\n}", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function init()\n {\n $this->shortcode->getHandlers()->add('color', function (ShortcodeInterface $sc) {\n $color = $sc->getParameter('c', null);\n $bgColor = $sc->getParameter('bg', null);\n $padding = $sc->getParameter('padding', 3);\n\n if ($color || $bgColor) {\n $colorString = sprintf(\"%s%s%s\",\n $color !== null ? \"color:{$color};\" : '',\n $bgColor !== null ? \"background-color:{$bgColor};\" : '',\n $bgColor !== null ? \"padding-left:{$padding}px;padding-right:{$padding}px;\" : ''\n );\n\n return '<span style=\"' . $colorString . '\">' . $sc->getContent() . '</span>';\n }\n });\n }", "function upgrade_colourFields($p_currentSettings, $p_pluginName ) {\n\t// 1. site-wide 'colour_offsets'\n\tif (isset( $p_currentSettings['colour_offsets'])) {\n\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t$p_currentSettings['colour_offsets']\n\t\t\t,\t'clr_off_' );\t\n\t\tforeach ( $l_newSettingsArray as $l_newKey => $l_newValue ) {\n\t\t\tset_config( $l_newKey, $l_newValue,\t$p_pluginName);\n\t\t}//foreach\n\t\tset_config( \t'colour_offsets_bak'\n\t\t\t\t\t, \t$p_currentSettings['colour_offsets']\n\t\t\t\t\t,\t$p_pluginName);\n\t\tunset_config('colour_offsets', $p_pluginName);\n\t}\n\t// 2. site-wide 'colour_palettes'\n\tif (isset( $p_currentSettings['colour_palettes'])) {\n\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t$p_currentSettings['colour_palettes']\n\t\t\t,\t'clr_pal_' );\n\t\t\t\n\t\tforeach ( $l_newSettingsArray as $l_newKey => $l_newValue ) {\n\t\t\tset_config( $l_newKey, $l_newValue,\t$p_pluginName);\n\t\t}//foreach\n\t\tset_config( \t'colour_palettes_bak'\n\t\t\t\t\t, \t$p_currentSettings['colour_palettes']\n\t\t\t\t\t,\t$p_pluginName);\n\t\tunset_config('colour_palettes', $p_pluginName);\t\t\t\n\t}//if (isset(...\n\t\n\t// 3. course overrides for 'colour_offsets' and 'colour_palettes'\n\t$l_allOverridesString = $p_currentSettings[IcandConstantsBackend::DB_FIELD_COURSE_OVERRIDES];\n\t$l_allOverridesString = preg_replace( IcandConstantsBackend::PREG_REMOVE_FROM_OVERRIDES, '', $l_allOverridesString); \t\t\n\t$l_allOverridesString = substr( $l_allOverridesString,0,-1);\n\t$l_allOverridesArray = IcandConstantsBackend::explode2( \n\t\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ALL_SEPARATOR \n\t\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ALL_CONNECTOR\n\t\t\t\t\t,\t$l_allOverridesString );\n\t$l_madeAnyChange = false;\n\tforeach ( $l_allOverridesArray as $l_course => $l_courseOverridesString ) {\n\t\t$l_courseOverridesString = substr($l_courseOverridesString,1); //remove leading '{'\n\t\t$l_courseOverridesString = preg_replace( IcandConstantsBackend::PREG_REMOVE_FROM_OVERRIDES, '', $l_courseOverridesString );\n\t\t$l_courseOverridesArray = IcandConstantsBackend::explode2(\n\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ONE_SEPARATOR \n\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ONE_CONNECTOR\n\t\t\t\t,\t$l_courseOverridesString\n\t\t\t\t,\t2 ); // only get key and value\n\t\t$l_madeChangeToCourse = false;\n\t\tif (isset( $l_courseOverridesArray['colour_offsets'])) {\n\t\t\t$l_madeChangeToCourse = true;\n\t\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t\t$l_courseOverridesArray['colour_offsets']\n\t\t\t\t,\t'clr_off_' );\n\t\t\t$l_courseOverridesArray = array_merge($l_courseOverridesArray,$l_newSettingsArray );\t\t\t\t\n\t\t\tunset( $l_courseOverridesArray['colour_offsets'] ); \n\t\t}\n\t\tif (isset( $l_courseOverridesArray['colour_palettes'])) {\n\t\t\t$l_madeChangeToCourse = true;\n\t\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t\t$l_courseOverridesArray['colour_palettes']\n\t\t\t\t,\t'clr_pal_' );\n\t\t\t$l_courseOverridesArray = array_merge($l_courseOverridesArray,$l_newSettingsArray );\n\t\t\tunset( $l_courseOverridesArray['colour_palettes'] ); \t\t\t\n\t\t}\n\t\tif ($l_madeChangeToCourse) {\n\t\t\t$l_madeAnyChange = true;\n\t\t\t$l_allOverridesArray[ $l_course ] = \n\t\t\t\t\t'{' \n\t\t\t\t\t. \t(IcandConstantsBackend::implode2(\n\t\t\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ONE_SEPARATOR . IcandConstantsBackend::STR_APPEND_TO_OVERRIDES\n\t\t\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ONE_CONNECTOR\n\t\t\t\t\t\t,\t$l_courseOverridesArray )\n\t\t\t\t\t\t);\n\t\t}\n\t}//foreach\n\tif ($l_madeAnyChange) {\t// write course overrides back to database\n\t\t$l_newValue = IcandConstantsBackend::implode2(\n\t\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ALL_SEPARATOR . IcandConstantsBackend::STR_APPEND_TO_OVERRIDES\n\t\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ALL_CONNECTOR\n\t\t\t\t\t,\t$l_allOverridesArray );\n\t\tif (strlen( $l_newValue ) > 0) {\n\t\t\t$l_newValue .= IcandConstantsBackend::OVERRIDE_ALL_TERMINATOR;\n\t\t\tset_config( IcandConstantsBackend::DB_FIELD_COURSE_OVERRIDES\n\t\t\t\t, \t$l_newValue\n\t\t\t\t,\t$p_pluginName);\t\n\t\t}//if\t\t\n\t}//if\n}", "final private function setColors()\n {\n\n $systemColorFile = new PhingFile(Phing::getResourcePath(\"phing/listener/defaults.properties\"));\n\n try {\n $prop = new Properties();\n\n $prop->load($systemColorFile);\n\n $err = $prop->getProperty(\"HtmlColorLogger.ERROR_CLASS\");\n $warn = $prop->getProperty(\"HtmlColorLogger.WARNING_CLASS\");\n $info = $prop->getProperty(\"HtmlColorLogger.INFO_CLASS\");\n $verbose = $prop->getProperty(\"HtmlColorLogger.VERBOSE_CLASS\");\n $debug = $prop->getProperty(\"HtmlColorLogger.DEBUG_CLASS\");\n if ($err !== null) {\n $this->errColor = self::PREFIX . $err . self::SUFFIX;\n }\n if ($warn !== null) {\n $this->warnColor = self::PREFIX . $warn . self::SUFFIX;\n }\n if ($info !== null) {\n $this->infoColor = self::PREFIX . $info . self::SUFFIX;\n }\n if ($verbose !== null) {\n $this->verboseColor = self::PREFIX . $verbose . self::SUFFIX;\n }\n if ($debug !== null) {\n $this->debugColor = self::PREFIX . $debug . self::SUFFIX;\n }\n } catch (IOException $ioe) {\n //Ignore exception - we will use the defaults.\n }\n }", "function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}", "public function theme_color_customizer( $wp_customize ){\n\n\t\t$theme_color_locations = $this->colorcase_theme_support();\n\n\t\t// bail if no theme support\n\t\tif( $theme_color_locations == false ){\n\t\t\treturn;\n\t\t}\n\n\t\t// get custom inputs\n\t\tinclude_once('customizer-inputs.php');\n\n\t\t// remove title color customization\n\t\t$wp_customize->remove_control( 'header_textcolor' );\n\n\t\t// add theme colors panel\n\t\t$wp_customize->add_panel( 'theme_colors', array(\n\t\t\t'priority' => 35,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => 'colorcase',\n\t\t\t'title' => 'Theme Colors',\n\t\t\t'description' => 'Pick a color palette, or choose custom colors.',\n\t\t) );\n\n\t\t// bail if not areas to customize\n\t\tif( !isset( $theme_color_locations['sections'] ) || empty( $theme_color_locations['sections'] ) ){\n\t\t\treturn;\n\t\t}\n\n\t\tif( isset( $theme_color_locations['palettes'] ) && !empty( $theme_color_locations['palettes'] ) ){\n\n\t\t\t$section_label = 'Color Palettes';\n\t\t\t$section_slug = sanitize_title( $section_label );\n\n\t\t\t// add theme color palettes section to customizer\n\t\t\t$wp_customize->add_section(\n\t\t\t\t'theme_colors_' . $section_slug,\n\t\t\t\tarray(\n\t\t\t\t\t'title' => $section_label,\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'priority' => 10,\n\t\t\t\t\t'panel' => 'theme_colors',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$section_slug . '_Picker',\n\t\t\t\tarray(\n\t\t\t\t\t'default' => 'default',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew Color_Palette_Picker_Customize_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$section_slug . '_Picker',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => 'Color Palette',\n\t\t\t\t\t\t'section' => 'theme_colors_' . $section_slug,\n\t\t\t\t\t\t// 'settings' => ''\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tforeach( $theme_color_locations['sections'] as $section_label => $theme_color_section_locations ){\n\n\t\t\t$section_slug = sanitize_title( $section_label );\n\n\t\t\t// add theme colors section to customizer\n\t\t\t$wp_customize->add_section(\n\t\t\t\t'theme_colors_' . $section_slug,\n\t\t\t\tarray(\n\t\t\t\t\t'title' => $section_label,\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'priority' => 10,\n\t\t\t\t\t'panel' => 'theme_colors',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tforeach( $theme_color_section_locations as $color_location_label => $color_location ){\n\n\t\t\t\t$slug = sanitize_title( $section_label . '_' . $color_location_label );\n\n\t\t\t\t$wp_customize->add_setting(\n\t\t\t\t\t$slug,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => $color_location['default'],\n\t\t\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif( isset( $color_location['description'] ) ){\n\t\t\t\t\t$color_location_label .= '<p class=\"description\"><small>' . $color_location['description'] . '</small></p>';\n\t\t\t\t}\n\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$slug,\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'label' => $color_location_label,\n\t\t\t\t\t\t\t'section' => 'theme_colors_' . $section_slug,\n\t\t\t\t\t\t\t'settings' => $slug,\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function scbirs_add_theme_meta() {\r\n?>\r\n\t<meta name=\"theme-color\" content=\"#005fab\">\r\n<?php\r\n}", "function wpcom_vip_audio_player_colors( $colors ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "public function update_lp_palettes_config_v2( $palettes_config_v2 ) {\n\t\tupdate_post_meta( $this->lp_id, static::LP_PALETTES_CONFIG, $palettes_config_v2 );\n\n\t\t$this->skin_palettes_config = $palettes_config_v2;\n\t}", "private function start_color_schemes() {\r\n\t\t$handler = 'unapp-style-overrides';\r\n\r\n\t\t$args = array(\r\n\t\t\t'fields' => $this->get_color_scheme(),\r\n\t\t\t'css' => Epsilon_Color_Scheme::load_css_overrides( get_template_directory() . '/assets/css/style-overrides.css' ),\r\n\t\t);\r\n\r\n\t\tEpsilon_Color_Scheme::get_instance( $handler, $args );\r\n\t}", "function callback_color($args)\n {\n }", "public function __construct() {\n $this->foreground_colors['black'] = '0;30';\n $this->foreground_colors['dark_gray'] = '1;30';\n $this->foreground_colors['blue'] = '0;34';\n $this->foreground_colors['light_blue'] = '1;34';\n $this->foreground_colors['green'] = '0;32';\n $this->foreground_colors['light_green'] = '1;32';\n $this->foreground_colors['cyan'] = '0;36';\n $this->foreground_colors['light_cyan'] = '1;36';\n $this->foreground_colors['red'] = '0;31';\n $this->foreground_colors['light_red'] = '1;31';\n $this->foreground_colors['purple'] = '0;35';\n $this->foreground_colors['light_purple'] = '1;35';\n $this->foreground_colors['brown'] = '0;33';\n $this->foreground_colors['yellow'] = '1;33';\n $this->foreground_colors['light_gray'] = '0;37';\n $this->foreground_colors['white'] = '1;37';\n\n $this->background_colors['black'] = '40';\n $this->background_colors['red'] = '41';\n $this->background_colors['green'] = '42';\n $this->background_colors['yellow'] = '43';\n $this->background_colors['blue'] = '44';\n $this->background_colors['magenta'] = '45';\n $this->background_colors['cyan'] = '46';\n $this->background_colors['light_gray'] = '47';\n }", "function client_portal_get_theme_colors_gutenberg() {\n\n\t// Grab our ACF theme colors.\n\t$colors = client_portal_get_theme_colors();\n\n\tif ( ! $colors ) {\n\t\treturn array();\n\t}\n\n\tforeach ( $colors as $key => $color ) {\n\t\t$gutenberg_colors[] = array(\n\t\t\t'name' => esc_html( $key ),\n\t\t\t'slug' => sanitize_title( $key ),\n\t\t\t'color' => esc_attr( $color ),\n\t\t);\n\t}\n\n\treturn $gutenberg_colors;\n}", "function writr_add_wpcom_support() {\n\tglobal $themecolors;\n\n\tif ( ! isset( $themecolors ) ) {\n\n\t\t// Set a default theme color array.\n\t\t$themecolors = array(\n\t\t\t'bg' => 'ffffff',\n\t\t\t'border' => 'ffffff',\n\t\t\t'text' => '656565',\n\t\t\t'link' => '1abc9c',\n\t\t\t'url' => '1abc9c',\n\t\t);\n\n\t}\n\n\t// Add print stylesheet.\n\tadd_theme_support( 'print-style' );\n\n}", "function theme_custamize_add_color_control($name, $id, $section, $default, $wp_customize) {\n $wp_customize->add_setting( $id, array( 'default' => $default, ) );\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n $id,\n array(\n 'label' => __( $name, $id ),\n 'section' => $section,\n 'settings' => $id,\n )\n )\n );\n}", "function htmlconvertwordpresstheme($wp_customize){\n $wp_customize->add_panel('htmlconvertwordpresstheme_settings', array(\n\n 'title'=>__('htmlconvertwordpresstheme_settings'),\n 'description' =>'',\n 'priority'=>10,\n\n\n ));\n\n\n $wp_customize->add_section('htmlconvertwordpresstheme_colors', array(\n 'title'=>'color',\n 'panel'=> 'htmlconvertwordpresstheme_settings',\n\n\n ));\n\n\n $wp_customize->add_setting('htmlconvertwordpresstheme_nav_bg_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n ));\n\n\n $wp_customize->add_control('htmlconvertwordpresstheme_nav_bg_color', array(\n \n 'label'=>__('Menu Background'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n ));\n\n/* customize setting body background color*/\n$wp_customize->add_setting('htmlconvertwordpresstheme_body_background_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'#fff',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n));\n\n\n$wp_customize->add_control('htmlconvertwordpresstheme_body_background_color', array(\n\n 'label'=>__('Body Background color'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n));\n\n\n}", "public function __construct() {\n\t\t$this->foreground_colors['black'] = '0;30';\n\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t$this->foreground_colors['green'] = '0;32';\n\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t$this->foreground_colors['red'] = '0;31';\n\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t$this->foreground_colors['white'] = '1;37';\n\n\t\t$this->background_colors['black'] = '40';\n\t\t$this->background_colors['red'] = '41';\n\t\t$this->background_colors['green'] = '42';\n\t\t$this->background_colors['yellow'] = '43';\n\t\t$this->background_colors['blue'] = '44';\n\t\t$this->background_colors['magenta'] = '45';\n\t\t$this->background_colors['cyan'] = '46';\n\t\t$this->background_colors['light_gray'] = '47';\n\t}", "function _ga_typography_color( $option ) {\n\n\tif ( ! ( $_color = genesis_get_option( $option, GA_CHILDTHEME_FIELD ) ) )\n\t\treturn false;\n\n\t return 'color: ' . $_color . ';';\n\n}", "function pl_link_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'linkcolor' ) ) ) ? pl_hash_strip( ploption( 'linkcolor' ) ) : '225E9B';\n\t\n\treturn $color;\t\n}", "function pt_text_color_render()\n\t\t{ \n\t\t\t$options = get_option( 'pt_settings' );\n\t\t\t?>\n\t\t\t<input type='text' name='pt_settings[pt_text_field_color]' value='<?php if( @$options['pt_text_field_color'] != '') echo $options['pt_text_field_color']; else echo '#ffffff';?>'> (Hex color code, ex white: \"#ffffff\")\n\t\t\t<?php\n\t\t}", "public function customizer_register( WP_Customize_Manager $wp_customize ) {\n\t\t$wp_customize->add_setting( 'color_scheme', array(\n\t\t 'default' => 'default',\n\t\t //'transport' => 'postMessage',\n\t\t) );\n\t\t\n\t\n $entrepreneur_color_scheme = new entrepreneur_color_scheme();\n $color_schemes = $entrepreneur_color_scheme->get_color_schemes();\n $choices = array();\n foreach ($color_schemes as $color_scheme => $value) {\n $choices[$color_scheme] = $value['label'];\n }\n\n\t\t$wp_customize->add_control( 'color_scheme', array(\n\t\t 'label' => __( 'Color scheme', 'entrepreneur' ),\n\t\t 'section' => 'theme_common_color_section',\n\t\t 'type' => 'select',\n\t\t 'choices' => $choices,\n\t\t) );\n\n\n/*\n\t\t$options = array(\n\t\t 'primary_color' => __( 'Primary color', 'entrepreneur' ),\n\t\t 'primary_hover_color' => __( 'Primary hover color', 'entrepreneur' ),\n\t\t 'secondary_color' => __( 'Secondary color', 'entrepreneur' ),\n\t\t 'secondary_hover_color' => __( 'Secondary hover color', 'entrepreneur' ),\n\t\t);\n\t\tforeach ( $options as $key => $label ) {\n\t\t $wp_customize->add_setting( $key, array(\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t 'transport' => 'postMessage',\n\t\t ) );\n\t\t $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $key, array(\n\t\t 'label' => $label,\n\t\t 'section' => 'colors',\n\t\t ) ) );\n\t\t}\n\t\t*/\n\t}", "public function __construct() {\n\t\t\t$this->foreground_colors['black'] = '0;30';\n\t\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t\t$this->foreground_colors['green'] = '0;32';\n\t\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t\t$this->foreground_colors['red'] = '0;31';\n\t\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t\t$this->foreground_colors['white'] = '1;37';\n \n\t\t\t$this->background_colors['black'] = '40';\n\t\t\t$this->background_colors['red'] = '41';\n\t\t\t$this->background_colors['green'] = '42';\n\t\t\t$this->background_colors['yellow'] = '43';\n\t\t\t$this->background_colors['blue'] = '44';\n\t\t\t$this->background_colors['magenta'] = '45';\n\t\t\t$this->background_colors['cyan'] = '46';\n\t\t\t$this->background_colors['light_gray'] = '47';\n\t\t}", "public function extendPalettes($strName)\n\t{\n\t\tif ($strName != 'tl_module')\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$GLOBALS['TL_DCA']['tl_module']['subpalettes']['reg_activate'] = str_replace('reg_jumpTo,reg_text', 'reg_jumpTo,reg_text,nc_registration_notify_admin,nc_registration_notify_admin_activate', $GLOBALS['TL_DCA']['tl_module']['subpalettes']['reg_activate']);\n\t}", "public function generate_custom_color_variables( $context = null ) {\n\n\t\t$theme_css = 'editor' === $context ? ':root .editor-styles-wrapper{' : ':root{';\n\t\t$background_color = get_theme_mod( 'background_color', 'D1E4DD' );\n\n\t\tif ( 'd1e4dd' !== strtolower( $background_color ) ) {\n\t\t\t$theme_css .= '--global--color-background: #' . $background_color . ';';\n\t\t\t$theme_css .= '--global--color-primary: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\t\t\t$theme_css .= '--global--color-secondary: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\t\t\t$theme_css .= '--button--color-background: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\t\t\t$theme_css .= '--button--color-text-hover: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\n\t\t\tif ( '#fff' === $this->custom_get_readable_color( $background_color ) ) {\n\t\t\t\t$theme_css .= '--table--stripes-border-color: rgba(240, 240, 240, 0.15);';\n\t\t\t\t$theme_css .= '--table--stripes-background-color: rgba(240, 240, 240, 0.15);';\n\t\t\t}\n\t\t}\n\n\t\t$theme_css .= '}';\n\n\t\treturn $theme_css;\n\t}", "public function colorList() {}", "public function __construct() {\n\t\t$this->foreground_colors['black'] = '0;30';\n\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t$this->foreground_colors['green'] = '0;32';\n\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t$this->foreground_colors['red'] = '0;31';\n\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t$this->foreground_colors['white'] = '1;37';\n \n\t\t$this->background_colors['black'] = '40';\n\t\t$this->background_colors['red'] = '41';\n\t\t$this->background_colors['green'] = '42';\n\t\t$this->background_colors['yellow'] = '43';\n\t\t$this->background_colors['blue'] = '44';\n\t\t$this->background_colors['magenta'] = '45';\n\t\t$this->background_colors['cyan'] = '46';\n\t\t$this->background_colors['light_gray'] = '47';\n\t\t}", "function header_footer_color_customizer($wp_customize) {\n\t$default_theme_bgcolor1 = \"#000000\";\n $defaule_header_bgcolor = \"#b3daff\";\n\t$default_theme_hovercolor = \"#ffffff\";\n\t$default_widget_bgcolor = \"#b3daff\";\n\t$default_mainpost_bgcolor = \"#f0f0f0\";\n\t$default_popularpost_bgcolor =\"#c3c3c3\";\n\t$default_a_bgcolor = \"#9e0c78\";\n\t$default_readmore_bgcolor = \"#ff3a3a\";\n\t$default_text_color = \"#000000\";\n\n\t$wp_customize->add_setting('themename_theme_bgcolor1', array(\n\t\t'default' => $default_theme_bgcolor1,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_theme_bgcolor1', array(\n\t\t'label' => 'Theme color1',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_theme_bgcolor1',\n\t)));\n\t$wp_customize->add_setting('themename_header_bgcolor', array(\n\t\t'default' => $defaule_header_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_header_bgcolor', array(\n\t\t'label' => 'Header bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_header_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_theme_hovercolor', array(\n\t\t'default' => $default_theme_hovercolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_theme_hovercolor', array(\n\t\t'label' => 'Theme hovercolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_theme_hovercolor',\n\t)));\n\t$wp_customize->add_setting('themename_widget_bgcolor', array(\n\t\t'default' => $default_widget_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_widget_bgcolor', array(\n\t\t'label' => 'Widget bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_widget_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_mainpost_bgcolor', array(\n\t\t'default' => $default_mainpost_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_mainpost_bgcolor', array(\n\t\t'label' => 'Main Post bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_mainpost_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_popularpost_bgcolor', array(\n\t\t'default' => $default_popularpost_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_popularpost_bgcolor', array(\n\t\t'label' => 'Popular bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_popularpost_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_a_bgcolor', array(\n\t\t'default' => $default_a_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_a_bgcolor', array(\n\t\t'label' => 'Text Link color',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_a_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_readmore_bgcolor', array(\n\t\t'default' => $default_readmore_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_readmore_bgcolor', array(\n\t\t'label' => 'ReadMore bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_readmore_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_text_color', array(\n\t\t'default' => $default_text_color,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_text_color', array(\n\t\t'label' => 'Text color',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_text_color',\n\t)));\n}", "function pewc_enqueue_color_picker( $hook_suffix ) {\n wp_enqueue_style( 'wp-color-picker' );\n wp_enqueue_script( 'wp-color-picker');\n}", "function enlight_render_visual_preferences_meta_box($post)\n{\n $highlightColor = get_post_meta($post->ID, 'enlight_highlight_color', true);\n?>\n <p>\n <strong><?php _e('Highlight Color', 'enlight'); ?></strong>\n </p>\n <p>\n <select name=\"enlight_highlight_color\">\n <?php foreach (enlight_get_colors() as $name => $color) : ?>\n <option value=\"<?php echo esc_attr($name); ?>\"<?php selected($name, $highlightColor); ?> style=\"color: <?php echo $color; ?>\"><?php echo $name; ?></option>\n <?php endforeach; ?>\n </select>\n </p>\n<?php\n}", "function block_core_page_list_build_css_colors($attributes, $context)\n {\n }", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function colour();", "function inkpro_add_theme_button_type( $button_types ) {\r\n\t\r\n\t$additional_button_types = array();\r\n\t$additional_button_types['wolf-wpb-button'] = esc_html__( 'Theme Accent Color', 'inkpro' );\r\n\r\n\treturn $additional_button_types + $button_types;\r\n}", "function wp_ajax_save_user_color_scheme()\n {\n }", "function costum_setting_colors_fontColorHaveBackground_callback() {\n\t$fontColorHaveBackground = esc_attr( get_option( 'fontColorHaveBackground' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"fontColorHaveBackground\" id=\"input-fontColorHaveBackground\" value=\"<?php echo $fontColorHaveBackground; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "function costum_setting_colors_transparentColor_callback() {\n\t$transparentColor = esc_attr( get_option( 'transparentColor' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"transparentColor\" id=\"input-transparentColor\" value=\"<?php echo $transparentColor; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "function capezzahill_editor_customizer_styles() {\r\n\twp_enqueue_style( 'capezzahill-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.1', 'all' );\r\n\tif ( 'custom' === get_theme_mod( 'primary_color' ) ) {\r\n\t\t// Include color patterns.\r\n\t\trequire_once get_parent_theme_file_path( '/inc/color-patterns.php' );\r\n\t\twp_add_inline_style( 'capezzahill-editor-customizer-styles', capezzahill_custom_colors_css() );\r\n\t}\r\n}", "function block_core_home_link_build_css_colors($context)\n {\n }", "public function getColor()\n {\n }", "public function modifyPalette()\n\t{\n\t\tif (version_compare(VERSION . '.' . BUILD, '2.11.0', '<'))\n\t\t\t{\n\t\t\t\t$GLOBALS['TL_DCA']['tl_module']['fields']['newslist_comments_avatarSize'] = array\n\t\t\t\t(\n\t\t\t\t\t'label' => &$GLOBALS['TL_LANG']['tl_content']['size'],\n\t\t\t\t\t'exclude' => false,\n\t\t\t\t\t'inputType' => 'imageSize',\n\t\t\t\t\t'options' => array('crop', 'proportional', 'box'),\n\t\t\t\t\t'reference' => &$GLOBALS['TL_LANG']['MSC'],\n\t\t\t\t\t'eval' => array('rgxp'=>'digit', 'nospace'=>true, 'tl_class'=>'w50')\n\t\t\t\t);\n\t\t}\n\t}", "public function update_lp_palettes_v2( $palettes_v2 ) {\n\t\tupdate_post_meta( $this->lp_id, static::LP_PALETTES, $palettes_v2 );\n\n\t\t$this->skin_palettes = $palettes_v2;\n\t}", "public function get_variables_for_css() {\n\t\t$data = '';\n\n\t\tif ( ! empty( $this->skin_palettes_config ) && is_array( $this->skin_palettes_config ) ) {\n\t\t\t$palette = $this->skin_palettes_config ['palette'];\n\n\t\t\tforeach ( $palette as $variable ) {\n\n\t\t\t\t$color_name = static::SKIN_COLOR_VARIABLE_PREFIX . $variable['id'];\n\n\t\t\t\tif ( ! empty( $variable['hsla_code'] ) && ! empty( $variable['hsla_vars'] ) && is_array( $variable['hsla_vars'] ) ) {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['hsla_code'] . ';';\n\n\t\t\t\t\tforeach ( $variable['hsla_vars'] as $var => $css_variable ) {\n\t\t\t\t\t\t$data .= $color_name . '-' . $var . ':' . $css_variable . ';';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['color'] . ';';\n\n\t\t\t\t\tif ( function_exists( 'tve_rgb2hsl' ) && function_exists( 'tve_print_color_hsl' ) ) {\n\t\t\t\t\t\t$data .= tve_print_color_hsl( $color_name, tve_rgb2hsl( $variable['color'] ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( function_exists( 'tve_prepare_master_variable' ) ) {\n\t\t\t$palettes = $this->get_smart_lp_palettes_v2();\n\t\t\t$active_id = (int) $palettes['active_id'];\n\t\t\t$master_variable = $palettes['palettes'][ $active_id ]['modified_hsl'];\n\t\t\t$general_master_variable = tve_prepare_master_variable( array( 'hsl' => $master_variable ) );\n\t\t\t$theme_master_variable = str_replace( '--tcb-main-master', '--tcb-theme-main-master', $general_master_variable );\n\n\t\t\t$data .= $general_master_variable;\n\t\t\t$data .= $theme_master_variable;\n\t\t}\n\n\t\treturn $data;\n\t}", "public static function register($wp_customize)\n {\n require_once(get_template_directory().\"/customizer/alpha-color-picker-customizer.php\");\n\n if (!isset($lc_customize['menu_mobile_bg_color'])) {\n $lc_customize['menu_mobile_bg_color'] = 'rgba(35, 35, 35, 1)';\n }\n if (!isset($lc_customize['mobile_border_bottom_color'])) {\n $lc_customize['mobile_border_bottom_color'] = '#333333';\n }\n\n\n //Define a new section (if desired) to the Theme Customizer\n $wp_customize->add_section( 'lc_second_color',\n array(\n 'title' => esc_html__('Vibrant Color', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 1, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Choose the link color', 'heritage'), //Descriptive tooltip\n )\n );\n\n //Register new settings to the WP database...\n $wp_customize->add_setting( 'lc_customize[lc_second_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#18aebf', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //Finally, we define the control itself (which links a setting to a section and renders the HTML controls)...\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_second_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Secondary Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_second_color', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_second_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 1, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*\n MENU OPTIONS\n */\n $wp_customize->add_section('lc_menu_options',\n array(\n 'title' => esc_html__('Menu Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 2, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Choose menu colors', 'heritage'), //Descriptive tooltip\n )\n );\n\n /*menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_bar_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 0)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_bar_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_bar_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*sticky menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_sticky_bar_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 1)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_sticky_bar_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Sticky Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_sticky_bar_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*mobile menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_mobile_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 1)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_mobile_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Mobile Menu Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_mobile_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*mobile menu border bottom color*/\n $wp_customize->add_setting('lc_customize[mobile_border_bottom_color]',\n array(\n 'default' => '#e1e1e1', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'mobile_border_bottom_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Mobile Menu Border Bottom Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[mobile_border_bottom_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*above the menu bar*/\n $wp_customize->add_setting('lc_customize[above_the_menu_bar]',\n array(\n 'default' => 'rgba(241, 246, 247, 0.9)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'above_the_menu_bar', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Above The Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[above_the_menu_bar]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*menu text color*/\n $wp_customize->add_setting('lc_customize[menu_text_color]',\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_menu_text_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Text Color', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_text_color]',\n 'priority' => 2,\n )\n ));\n\n /*menu text hover color*/\n $wp_customize->add_setting('lc_customize[menu_text_hover_color]',\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_menu_text_hover_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Text Color on Hover', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_text_hover_color]',\n 'priority' => 3,\n )\n ));\n\n /*current menu item text color*/\n $wp_customize->add_setting('lc_customize[current_menu_item_text_color]',\n array(\n 'default' => '#18aebf',\t\t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_current_menu_item_text_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Current Menu Item Text Color', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[current_menu_item_text_color]',\n 'priority' => 5,\n )\n ));\n\n /*sub menu bg color*/\n $wp_customize->add_setting('lc_customize[submenu_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 0)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'submenu_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Sub Menu Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[submenu_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 6\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*menu bar color*/\n $wp_customize->add_setting('lc_customize[creative_menu_overlay_bg]',\n array(\n 'default' => 'rgba(255, 255, 255, 0.9)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'creative_menu_overlay_bg', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Creative Menu Overlay Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[creative_menu_overlay_bg]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 7\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*top icons on creative menu*/\n $wp_customize->add_setting('lc_customize[creative_icons_color]',\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_creative_icons_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Top Icons Color For Creative Menu. Also, the color for mobile menu icons, menu icon and search icon.', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[creative_icons_color]',\n 'priority' => 8\n )\n ));\n\n /*login signup wish list color*/\n $wp_customize->add_setting('lc_customize[login_wishlist_color]',\n array(\n 'default' => '#959595', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'at_login_wishlist_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Text color for login, sign-up and wish list links on the menu bar.', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[login_wishlist_color]',\n 'priority' => 8\n )\n ));\n\n /*buttons*/\n $wp_customize->add_section( 'lc_button_colors',\n array(\n 'title' => esc_html__('Button Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 3, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Set button colors.', 'heritage'), //Descriptive tooltip\n )\n );\n\n $wp_customize->add_setting( 'lc_customize[lc_use_custom_btn_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => 'use_defaults', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback'\t=> 'HERITAGE_sanitize_buttons_custom',\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control('lc_use_custom_btn_color_control' ,\n array(\n 'label' \t=> esc_html__('Buttons Colors', 'heritage'),\n 'section' \t=> 'lc_button_colors',\n 'settings' \t=> 'lc_customize[lc_use_custom_btn_color]',\n 'priority' \t=> 1,\n 'type'\t\t=> 'select',\n 'choices' => array(\n 'use_defaults' \t\t=> esc_html__('Use Theme Defaults', 'heritage'),\n 'custom_btn_colors' => esc_html__('Use Custom Colors', 'heritage' ),\n ),\n )\n );\n\n /*btn bg color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Background Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn text color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_txt_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_txt_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Text Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_txt_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn border color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_border_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_border_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Border Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_border_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn bg color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_bg_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#555555', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_bg_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Background Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_bg_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn text color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_txt_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_txt_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Text Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_txt_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn border color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_border_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#555555', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_border_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Border Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_border_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n\n /*Various*/\n $wp_customize->add_section( 'lc_various_colors',\n array(\n 'title' => esc_html__('Various Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 3, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Set general colors.', 'heritage'), //Descriptive tooltip\n )\n );\n\n /*bg color for single post with no featured img in blog template*/\n $wp_customize->add_setting( 'lc_customize[lc_blog_brick_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#1d1d1d', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_blog_brick_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color For Blog Items With No Featured Image', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_blog_brick_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 1, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*bg color for minicart and wishlist popups*/\n $wp_customize->add_setting( 'lc_customize[lc_minicart_wishlist_popup_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //define the control\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_minicart_wishlist_popup_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color For Minciart And Wishlist Popups', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_minicart_wishlist_popup_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n\n /*bg color for overlay on shop page*/\n $wp_customize->add_setting( 'lc_customize[lc_shop_overlay_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => 'rgba(255,255,255, 0.7)', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //define the control\n $wp_customize->add_control( new Customize_Alpha_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_shop_overlay_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color Product Actions Overlay On Shop Page', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_shop_overlay_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 4, //Determines the order this control appears in for the specified section\n )\n ));\n\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public static function plantuml_colour_scheme(): array\n\t{\n\t\treturn [\n\t\t\t'background' => 'FireBrick',\n\t\t\t'border' => 'DarkRed',\n\t\t\t'text' => 'White',\n\t\t];\n\t}", "function gopathemes_save_custom_css(){\n \n if (!function_exists('ot_get_option')) {\n return;\n }\n \n /* CUSTOM COLOR STYLING */\n if (ot_get_option('haira_custom_styling', 'off') == 'on') {\n\n $primary_color = ot_get_option('haira_primary_color','#FFBA00');\n $secondary_color = ot_get_option( 'haira_secondary_color', '#333333' );\n $body_bg = ot_get_option( 'haira_body_background', '#f6f6f6' );\n \n $body_font = ot_get_option('haira_body_font', \n array(\n 'font-family' => \"source-sans-pro, sans-serif\", \n 'font-color' => '#8a8a8a', \n 'font-size' => '14px',\n 'line-height' => '24px',\n 'font-weight' => '400'\n ));\n \n $heading_font = ot_get_option('haira_heading_font', \n array(\n 'font-family' => \"source-sans-pro, sans-serif\", \n 'font-color' => '#333333', \n 'font-weight' => '700'\n ));\n \n $menu_typo = ot_get_option( 'haira_menu_typography',\n array(\n 'font-color' => '#FFFFFF', \n 'font-size' => '13px', \n 'font-weight' => '400', \n 'letter-spacing' => '0.03em', \n 'text-transform' => 'none'\n ));\n \n $submenu_typo = ot_get_option( 'haira_submenu_typography',\n array(\n 'font-color' => '#FFFFFF', \n 'font-size' => '12px', \n 'font-weight' => '400', \n 'line-height' => '45px', \n 'letter-spacing' => '0.03em', \n 'text-transform' => 'none'\n ));\n\n $variables = array(\n 'primary-color' => $primary_color,\n 'second-color' => $secondary_color,\n 'bg-color' => $body_bg,\n \n 'header-bg' => ot_get_option( 'haira_header_bg' ),\n 'header-height' => ot_get_option( 'haira_header_height' ),\n \n 'menu-fs' => $menu_typo['font-size'],\n 'menu-link-color' => $menu_typo['font-color'],\n 'menu-link-color-hover' => ot_get_option( 'haira_menu_link_color_hover' ),\n 'menu-link-bg-hover' => ot_get_option( 'haira_menu_link_bg_hover' ),\n 'menu-link-ls' => $menu_typo['letter-spacing'],\n 'menu-font-weight' => $menu_typo['font-weight'],\n 'menu-text-transform' => $menu_typo['text-transform'],\n \n 'submenu-bg' => ot_get_option( 'haira_submenu_bg' ),\n 'submenu-fs' => $submenu_typo['font-size'],\n 'submenu-link-color' => $submenu_typo['font-color'],\n 'submenu-link-color-hover' => ot_get_option( 'haira_submenu_link_color_on_hover' ),\n 'submenu-link-bg-hover' => ot_get_option( 'haira_submenu_link_bg_on_hover' ),\n 'submenu-link-ls' => $submenu_typo['letter-spacing'],\n 'submenu-font-weight' => $submenu_typo['font-weight'],\n 'submenu-text-transform' => $submenu_typo['text-transform'],\n 'submenu-lh' => $submenu_typo['line-height'],\n \n 'heading-color' => $heading_font['font-color'],\n 'heading-font' => $heading_font['font-family'],\n 'hweight' => $heading_font['font-weight'],\n \n 'text-color' => $body_font['font-color'],\n 'body-font' => $body_font['font-family'],\n 'fsize' => $body_font['font-size'],\n 'lheight' => $body_font['line-height'],\n 'bweight' => $body_font['font-weight']\n );\n\n\n $default_vars = file( get_template_directory().'/scss/_vars.scss' );\n \n gopathemes_compile_css( haira_setup_scss_vars($default_vars, $variables) );\n }\n \n}", "function xanthia_admin_updateColors($args)\n{\n\textract($args);\n\t// check the session auth key\n\tif (!pnSecConfirmAuthKey())\t{\n\t\tpnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_BADAUTHKEY));\n\t\tpnRedirect(pnModURL('Xanthia', 'admin', 'main'));\n\t\treturn true;\n\t}\n\n\t// grab our parameters in a secure manner\n\tlist($skin, $paletteid) = pnVarCleanFromInput('skin','paletteid');\n\tlist($palname,\n\t\t $bgcolor,\n\t\t $color1,\n\t\t $color2,\n\t\t $color3,\n\t\t $color4,\n\t\t $color5,\n\t\t $color6,\n\t\t $color7,\n\t\t $color8,\n\t\t $sepcolor,\n\t\t $text1,\n\t\t $text2,\n\t\t $link,\n\t\t $vlink,\n\t\t $hover) = pnVarCleanFromInput('palname',\n\t\t\t\t\t\t\t\t\t 'bgcolor',\n\t\t\t\t\t\t\t\t\t 'color1',\n\t\t\t\t\t\t\t\t\t 'color2',\n\t\t\t\t\t\t\t\t\t 'color3',\n\t\t\t\t\t\t\t\t\t 'color4',\n\t\t\t\t\t\t\t\t\t 'color5',\n\t\t\t\t\t\t\t\t\t 'color6',\n\t\t\t\t\t\t\t\t\t 'color7',\n\t\t\t\t\t\t\t\t\t 'color8',\n\t\t\t\t\t\t\t\t\t 'sepcolor',\n\t\t\t\t\t\t\t\t\t 'text1',\n\t\t\t\t\t\t\t\t\t 'text2',\n\t\t\t\t\t\t\t\t\t 'link',\n\t\t\t\t\t\t\t\t\t 'vlink',\n\t\t\t\t\t\t\t\t\t 'hover');\n\n\t// check for our parameters\n\tif (empty($palname)) {\n\t\tpnSessionSetVar('errormsg', pnVarPrepForDisplay(_XA_ARGSERROR));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n\t\treturn false;\n\t}\n\n\t// load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')){\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n\t// Update colors\n\tif (pnModAPIFunc('Xanthia', 'admin', 'updateColors',\n\t\t\t\t\t\t array('skin'\t => $skin,\n 'paletteid' => $paletteid,\n 'palname' => $palname,\n 'bgcolor' => $bgcolor,\n 'color1' => $color1,\n 'color2' => $color2,\n 'color3' => $color3,\n 'color4' => $color4,\n 'color5' => $color5,\n 'color6' => $color6,\n 'color7' => $color7,\n 'color8' => $color8,\n 'sepcolor' => $sepcolor,\n 'text1' => $text1,\n 'text2' => $text2,\n 'link' => $link,\n 'vlink' => $vlink,\n 'hover' => $hover))) {\n\t\t// Success\n\t\tpnSessionSetVar('statusmsg', pnVarPrepForDisplay(_XA_COLORSUPDATED));\n\t\t\n // Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\t \n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\t\n\t\n\t$skinName = pnModAPIFunc('Xanthia','user','getSkinFromID',\n\t\t\tarray('id' => $skin));\n\n\t\t\tif ($paletteid == pnModGetVar('Xanthia',''.$skinName.'use')){\n\t\t\t\t\n\t\t\t\t$cachedthemes = pnModGetVar('Xanthia',''.$skinName.'themecache');\n\t\t\t\t\n\t\t\t\tif (isset($cachedthemes)){\n\t\t\t\t\tpnModAPIFunc('Xanthia', 'admin', 'writepalettescache', array('skinid' => $skin));\n\t\t\t\t\tpnModAPIFunc('Xanthia', 'admin', 'writestylesheet', array('skinid' => $skin,\n\t\t\t\t\t\t\t'paletteid' => $paletteid));\n\t\t\t\t}\n\t\t\t}\n }\n\t// Work completed, return to main\n\tpnRedirect(pnModURL('Xanthia', 'admin', 'editTheme',\n\t\t\t\t\t\t\tarray('todo' => 'colors',\n\t\t\t\t\t\t\t 'skin' => $skinName)));\n\treturn true;\n}", "abstract public function register_style();", "public function get_color_scheme() {\r\n\r\n return \tarray(\r\n 'epsilon_general_separator' => array(\r\n 'label' => esc_html__( 'Accent Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_accent_color' => array(\r\n 'label' => esc_html__( 'Accent Color #1', 'unapp' ),\r\n 'description' => esc_html__( 'Theme main color.', 'unapp' ),\r\n 'default' => '#798eea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_accent_color_second' => array(\r\n 'label' => esc_html__( 'Accent Color #2', 'unapp' ),\r\n 'description' => esc_html__( 'The second main color.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n 'epsilon_accent_color_third' => array(\r\n 'label' => esc_html__( 'Accent Color #3', 'unapp' ),\r\n 'description' => esc_html__( 'The third main color.', 'unapp' ),\r\n 'default' => '#499bea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_separator' => array(\r\n 'label' => esc_html__( 'Typography Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_title_color' => array(\r\n 'label' => esc_html__( 'Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for titles.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for paragraphs.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for links.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for hovered links.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_separator' => array(\r\n 'label' => esc_html__( 'Navigation Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n \r\n\r\n 'epsilon_menu_item_color' => array(\r\n 'label' => esc_html__( 'Menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_background' => array(\r\n 'label' => esc_html__( 'Dropdown background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu background.', 'unapp' ),\r\n 'default' => '#000000',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#999999',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_separator' => array(\r\n 'label' => esc_html__( 'Footer Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_footer_contact_background' => array(\r\n 'label' => esc_html__( 'Footer Widget Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget background.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_background' => array(\r\n 'label' => esc_html__( 'Footer Copyright Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer copyright background.', 'unapp' ),\r\n 'default' => '#262626',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_title_color' => array(\r\n 'label' => esc_html__( 'Footer Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget title.', 'unapp' ),\r\n 'default' => '#e6e6e6',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer text.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link hover.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n );\r\n\t}", "function dwwp_register_custom_settings_colors() {\n\tregister_setting( 'colors-settings-group','color1' );\n\t// Register Color Background Two\n\tregister_setting( 'colors-settings-group','color2' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color3' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color4' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color5' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color6' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color7' );\n\t// Register Color Fonts\n\tregister_setting( 'colors-settings-group','color8' );\n\t// Register Color Fonts\n\tregister_setting( 'colors-settings-group','infoColor' );\n\t// Register Transparent Image Background Color\n\tregister_setting( 'colors-settings-group','transparentColor' );\n\t// Register Font Color Have Deffrent Background\n\tregister_setting( 'colors-settings-group','fontColorHaveBackground' );\n\t// Register Scroll Color\n\tregister_setting( 'colors-settings-group','mainScrollColor' );\n\t// Register Words Under Logo\n\tregister_setting( 'colors-settings-group','wordsUnderLogo' );\n\t// Register Notification Upperbar\n\tregister_setting( 'colors-settings-group','notificationUpperbar' );\n\t// Register Notification Upperbar Link\n\tregister_setting( 'colors-settings-group','notificationUpperbarLink' );\n\t// Shoose Your Logo Image\n\tregister_setting( 'colors-settings-group','logoImages' );\n\t// Shoose Your Images For Header\n\tregister_setting( 'colors-settings-group','headerImages' );\n\n\tadd_settings_section( 'main-colors-settings', '', 'colors_main__options', 'colors_setting' );\n\n\t// Color Background One\n\tadd_settings_field( 'color1', 'background One', 'costum_setting_colors_background1_callback', 'colors_setting', 'main-colors-settings' );\n\t// Color Background Two\n\tadd_settings_field( 'color2', 'background Two', 'costum_setting_colors_background2_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color3', 'Main Color 1', 'costum_setting_colors_color3_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color4', 'Main Color 2', 'costum_setting_colors_color4_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color5', 'Main Color 3', 'costum_setting_colors_color5_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color6', 'Main Color 4', 'costum_setting_colors_color6_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color7', 'Main Color 5', 'costum_setting_colors_color7_callback', 'colors_setting', 'main-colors-settings' );\n\t// Fonts Color One\n\tadd_settings_field( 'color8', 'Fonts Color One', 'costum_setting_colors_color8_callback', 'colors_setting', 'main-colors-settings' );\n\t// Fonts Color Two\n\tadd_settings_field( 'infoColor', 'Fonts Color Two', 'costum_setting_colors_infoColor_callback', 'colors_setting', 'main-colors-settings' );\n\t// font Color Have Background\n\tadd_settings_field( 'fontColorHaveBackground', 'Font Color Three', 'costum_setting_colors_fontColorHaveBackground_callback', 'colors_setting', 'main-colors-settings' );\n\t// Transparent Image\n\tadd_settings_field( 'transparentColor', 'Transparent Image', 'costum_setting_colors_transparentColor_callback', 'colors_setting', 'main-colors-settings' );\n\t// Scroll Image\n\tadd_settings_field( 'mainScrollColor', 'main Scroll Color', 'costum_setting_colors_mainScrollColor_callback', 'colors_setting', 'main-colors-settings' );\n\t// Words Under Logo\n\tadd_settings_field( 'wordsUnderLogo', 'Words Under Logo', 'costum_setting_colors_wordsUnderLogo_callback', 'colors_setting', 'main-colors-settings' );\n\t// Notification Upperbar\n\tadd_settings_field( 'notificationUpperbar', 'Notification Upperbar', 'costum_setting_notificationUpperbar_callback', 'colors_setting', 'main-colors-settings' );\n\t// Notification Upperbar\n\tadd_settings_field( 'notificationUpperbarLink', 'Notification Upperbar Link', 'costum_setting_notificationUpperbarLink_callback', 'colors_setting', 'main-colors-settings' );\n\t// Shoose Your Logo Image\n\tadd_settings_field( 'logoImages', 'Logo Images', 'costum_setting_LogoImages_callback', 'colors_setting', 'main-colors-settings' );\n\t// Shoose Your Images For Header\n\tadd_settings_field( 'headerImages', 'Header Images', 'costum_setting_headerImages_callback', 'colors_setting', 'main-colors-settings' );\n\n}", "function colorMap(): array\n{\n return [\n 'black' => 'white',\n 'red' => 'white',\n 'green' => 'black',\n 'yellow' => 'black',\n 'blue' => 'white',\n 'magenta' => 'white',\n 'cyan' => 'black',\n 'white' => 'black',\n 'default' => 'white',\n ];\n}", "function costum_setting_colors_color3_callback() {\n\t$color3 = esc_attr( get_option( 'color3' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"color3\" id=\"input-color3\" value=\"<?php echo $color3; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "function costum_setting_colors_background1_callback() {\n\t$color1 = esc_attr( get_option( 'color1' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"color1\" id=\"input-color1\" value=\"<?php echo $color1; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "public function getColor() {}", "public function getColor() {}", "protected function setTransparencyColor():void{\n\n\t\tif($this->options->outputType === QROutputInterface::GDIMAGE_JPG || !$this->options->imageTransparent){\n\t\t\treturn;\n\t\t}\n\n\t\t$transparencyColor = $this->background;\n\n\t\tif($this::moduleValueIsValid($this->options->transparencyColor)){\n\t\t\t$transparencyColor = $this->prepareModuleValue($this->options->transparencyColor);\n\t\t}\n\n\t\timagecolortransparent($this->image, $transparencyColor);\n\t}", "public function color()\n {\n }", "function generateSocialColorPalette()\n {\n $socialnetworks = array(\"twitter\", \"instagram\", \"facebook\", \"storify\");\n \n $properties = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"ctmtb\", \"ctmlr\");\n /*$properties[$socialnetowks[1]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n $properties[$socialnetowks[2]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n $properties[$socialnetowks[3]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n */\n // Twitter default values\n $default_properties[$socialnetworks[0]] = array(\"#ffffff\", \"#ffffff\", \"#002957\", \"#4099ff\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Instagram default values\n $default_properties[$socialnetworks[1]] = array(\"#ffffff\", \"#000000\", \"#ffffff\", \"#517fa4\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Facebook default values\n $default_properties[$socialnetworks[2]] = array(\"#ffffff\", \"#000000\", \"#ffffff\", \"#3B5998\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Storify default values\n $default_properties[$socialnetworks[3]] = array(\"#3a96db\", \"#3a96db\", \"#dfe5ea\", \"#a9bbcc\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n \n \n $db = JFactory::getDBO();\n\n foreach($socialnetworks as $socialnetwork)\n {\n $category_id = self::checkCategoryExists($socialnetwork);\n if($category_id)\n {\n $propertyIndex = 0;\n foreach($properties as $property)\n {\n $value = $default_properties[$socialnetwork][$propertyIndex++]; \n if(!self::checkExistingCategoryColorPalette($property, $category_id)) \n {\n $sql = \"INSERT INTO #__activategrid (context, name, value) VALUES ('category_color', '\".$property.\"_\".$category_id.\"', '{$value}');\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n }\n }\n \n \n // Default properties for other categories\n $default_properties[\"other\"] = array(\"#000000\", \"#000000\", \"#002bff\", \"#ebebeb\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n \n // Other categories \n $sql = \"SELECT id FROM #__categories WHERE extension='com_content' AND title <> 'twitter' AND title <> 'facebook' AND title <> 'instagram' AND title <> 'storify'\";\n $db->setQuery($sql);\n $db->execute();\n $result = $db->loadObjectList();\n foreach($result as $category)\n { \n $category_id = $category->id; \n $propertyIndex = 0;\n foreach($properties as $property)\n {\n $value = $default_properties[\"other\"][$propertyIndex++]; \n if(!self::checkExistingCategoryColorPalette($property, $category_id)) \n {\n $sql = \"INSERT INTO #__activategrid (context, name, value) VALUES ('category_color', '\".$property.\"_\".$category_id.\"', '{$value}');\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n }\n }", "function wp_tinycolor_hue_to_rgb($p, $q, $t)\n {\n }" ]
[ "0.72150284", "0.69665104", "0.6926205", "0.64307857", "0.614706", "0.6119006", "0.61009115", "0.60835445", "0.60757315", "0.60445267", "0.60401005", "0.6023986", "0.60196173", "0.5969022", "0.5923433", "0.586679", "0.5779214", "0.5763321", "0.57502395", "0.5736252", "0.5730938", "0.5656518", "0.5647034", "0.56443346", "0.5594995", "0.5584178", "0.55325514", "0.5528638", "0.5492364", "0.5481506", "0.5441452", "0.543912", "0.5435025", "0.54269475", "0.54269475", "0.54113346", "0.5381968", "0.5363842", "0.5356244", "0.53519833", "0.53498834", "0.5345584", "0.53266245", "0.5318394", "0.53179044", "0.53014684", "0.52980715", "0.529352", "0.5288625", "0.52757704", "0.52582157", "0.5248254", "0.5229616", "0.52283025", "0.52214926", "0.5198083", "0.51947683", "0.518959", "0.51894873", "0.51831734", "0.51584715", "0.5158285", "0.51401573", "0.51384425", "0.5129733", "0.5129733", "0.5129733", "0.5129733", "0.5129733", "0.5129733", "0.51297265", "0.5126454", "0.5116464", "0.5111363", "0.5109498", "0.5109008", "0.51080155", "0.5096496", "0.50936574", "0.50816524", "0.50808775", "0.50802386", "0.50761116", "0.5074816", "0.5074816", "0.50695044", "0.506775", "0.50671923", "0.5062138", "0.505741", "0.50524026", "0.5050118", "0.50488764", "0.50406975", "0.5033328", "0.5033328", "0.50320965", "0.5032052", "0.5030233", "0.5024881" ]
0.7064425
1
Remove page templates inherited from the parent theme.
function child_theme_remove_page_template( $page_templates ) { unset( $page_templates['page-templates/blank.php'],$page_templates['page-templates/empty.php'], $page_templates['page-templates/fullwidthpage.php'], $page_templates['page-templates/left-sidebarpage.php'], $page_templates['page-templates/both-sidebarspage.php'] ); return $page_templates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function be_remove_genesis_page_templates( $page_templates ) {\n\tunset( $page_templates['page_archive.php'] );\n\tunset( $page_templates['page_blog.php'] );\n\treturn $page_templates;\n}", "function wmf_undo_redirect_template_changes_in_admin() {\n\tremove_filter( 'page_link', 'wmf_skip_redirect_template_in_page_link' );\n\tremove_filter( 'the_title', 'wmf_skip_redirect_template_in_title' );\n}", "function kanso_custom_menu_page_removing() {\n //remove_menu_page( 'themes.php' ); // Appearance -- (!) There are other ways to do this\n //remove_menu_page( itsec ); // iThemes Security -- Very specific, consider revising\n}", "function remove_parent_features() {\n \tremove_action( 'init', 'gdlr_register_portfolio_admin_option' );\n remove_action('init', 'gdlr_init_page_feature');\n\n //remove theme support for post formats\n remove_theme_support('post-formats');\n}", "function jn_htmlInUrl_deactive() {\r\n\t\tglobal $wp_rewrite;\r\n\t\tif ( in_array( 'page', $this->selected_post_type ) ) {\r\n\t\t\t$wp_rewrite->page_structure = str_replace( '.html','',$wp_rewrite->page_structure );\r\n\t\t\t$wp_rewrite->flush_rules();\r\n\t\t}\r\n\t}", "function ws_kill_parent_theme($themes) {\r\n\tunset( $themes['thematic'] );\r\n\treturn $themes;\r\n}", "public static function use_parent_template() {\n add_action('save_post', array('core_admin', 'switch_page_template'));\n }", "function remove_post_type_support_for_pages() {\n\t\t// UNCOMMENT if you want to remove some stuff\n\t\t// Replace 'page' with 'post' or a custom post/content type\n\t\t# remove_post_type_support( 'page', 'title' );\n\t\t// remove_post_type_support( 'page', 'editor' );\n\t\tremove_post_type_support( 'page', 'thumbnail' );\n\t\t# remove_post_type_support( 'page', 'page-attributes' );\n\t\t# remove_post_type_support( 'page', 'excerpt' );\n}", "public function remove_page_editor() {\n\t\tremove_post_type_support('page', 'editor');\n\t}", "function remove_parent_widgets(){\n\t\t\n\t// remove footer sidebars\n\tunregister_sidebar( 'sidebar-3' );\n\tunregister_sidebar( 'sidebar-4' );\n\tunregister_sidebar( 'sidebar-5' );\n\t\n\t\n}", "function unhook_parent_style() {\n \n wp_dequeue_style( 'genericons' );\n\twp_deregister_style( 'genericons' );\n wp_dequeue_style( 'twentyfifteen-ie' );\n\twp_deregister_style( 'twentyfifteen-ie' );\n wp_dequeue_style( 'twentyfifteen-ie7' );\n\twp_deregister_style( 'twentyfifteen-ie7' );\n wp_dequeue_style( 'twentyfifteen-fonts' );\n\twp_deregister_style( 'twentyfifteen-fonts' );\n}", "function _ut_remove_default_vc_templates( $data ) {\r\n \r\n $data = array();\r\n \r\n return $data;\r\n \r\n}", "function remove_guttenberg_from_pages() {\n\tremove_post_type_support( 'youthclub', 'editor' );\n}", "function remove_theme_mods()\n {\n }", "function _remove_theme_attribute_in_block_template_content($template_content)\n {\n }", "function childtheme_no_superfish(){\r\n\tremove_theme_support('thematic_superfish');\r\n}", "function remove_post_support() {\n remove_post_type_support( 'page', 'editor' );\n }", "public function deleteCompiledTemplates() {\n\t\t// templates\n\t\t$filenames = glob(WCF_DIR.'templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t\t\n\t\t// acp templates\n\t\t$filenames = glob(WCF_DIR.'acp/templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t}", "function deactivate() {\r\n global $wp_rewrite;\r\n\r\n $wp_rewrite->page_structure = str_replace(\".\" . $this->options->extension, \"\", $wp_rewrite->page_structure);\r\n $wp_rewrite->flush_rules();\r\n }", "public static function register_templates() {\n if (version_compare(floatval(get_bloginfo('version')), '4.7', '<')) {\n // 4.6 and older\n add_filter('page_attributes_dropdown_pages_args', array(get_called_class(), 'register_project_templates'));\n } else {\n // Add a filter to the wp 4.7 version attributes metabox\n add_filter('theme_page_templates', array(get_called_class(), 'add_new_template'));\n }\n // Add a filter to the save post to inject out template into the page cache\n add_filter('wp_insert_post_data', array(get_called_class(), 'register_project_templates'));\n // Add a filter to the template include to determine if the page has our \n // template assigned and return it's path\n add_filter('template_include', array(get_called_class(), 'view_project_template'));\n }", "function remove_menu_pages() {\n //remove_menu_page( 'upload.php' ); //Media\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n //remove_menu_page( 'edit.php?post_type=page' );\n \n}", "function kill_unused_templates() {\n\tglobal $wp_query, $post;\n\n\tif ( is_author() || is_attachment() || is_day() || is_search() || is_feed() ) {\n\t\twp_redirect( home_url() );\n\t\texit();\n\t}\n}", "public static function switch_page_template() {\n\n global $post;\n\n $post_type = get_post_type($post->ID);\n\n if (is_page() or is_post_type_hierarchical($post_type)) {// Checks if current post type is a page, rather than a post\n $current_page_template = get_post_meta($post->ID, '_wp_page_template', true);\n $parent_page_template = get_post_meta($post->post_parent, '_wp_page_template', true);\n $parents = get_post_ancestors($post->ID);\n\n if ($parents) {\n update_post_meta($post->ID, '_wp_page_template', $parent_page_template, $current_page_template);\n }\n }// End check for page\n }", "function jetpackme_remove_rp() {\n\tif ( class_exists( 'Jetpack_relatedPosts')) {\n\t\t$jprp = Jetpack_relatedPosts::init();\n\t\t$callback = array ( $jprp, 'filter_add_target_to_dom' );\n\t\tremove_filter( 'the_content', $callback, 40);\n\t}\n}", "final public function removePages(): void\n {\n $this->pages = [];\n $this->index = [];\n }", "function rd_fix_blog_tab_on_cpt($classes, $item, $args) {\n if (!is_singular('post') && !is_category() && !is_tag()) {\n $blog_page_id = intval(get_option('page_for_posts'));\n if ($blog_page_id != 0) {\n if ($item->object_id == $blog_page_id) {\n unset($classes[array_search('current_page_parent', $classes)]);\n }\n }\n }\n return $classes;\n}", "function custom_page_home() {\n\tif(isset($_GET['post']))\n\t\t$post_id = $_GET['post'];\n\telse if(isset($_POST['post_ID']))\n\t\t$post_id = $_POST['post_ID'];\n\n\tif(!isset($post_id) || empty($post_id))\n\t\treturn;\n\n\t// Get the name of the Page Template file.\n\t$template_file = get_post_meta($post_id, '_wp_page_template', true);\n\n\t// Do something for the template\n\tif($template_file == \"home\") {\n\t\tremove_post_type_support('page','author');\n\t\tremove_post_type_support('page','custom-fields');\n\t\tremove_post_type_support('page','comments');\n\t\tremove_post_type_support('page','excerpt' );\n\t\tremove_post_type_support('page','trackbacks');\n\t\tremove_post_type_support('page','revisions');\n\t}\n}", "public static function remove_menu_pages() {\n\t\t$post_type = Registrations::get_post_type();\n\n\t\tremove_submenu_page( \"edit.php?post_type={$post_type}\", \"manage_frontend_uploader_{$post_type}s\" );\n\t\tremove_submenu_page( 'upload.php', 'manage_frontend_uploader' );\n\t}", "protected function uninstall_templates()\n {\n // initialize the Finder\n $finder = new Finder();\n // we need only the top level\n $finder->depth('== 0');\n // get all directories in the /Examples\n $finder->directories()->in(MANUFAKTUR_PATH.'/TemplateTools/Examples');\n \n foreach ($finder as $directory) {\n $template_name = $directory->getFilename();\n $target_directory = CMS_PATH.'/templates/'.$template_name;\n \n if ($this->app['filesystem']->exists($target_directory)) {\n // the template exists - remove it\n $this->app['filesystem']->remove($target_directory);\n }\n \n $this->app['db']->delete(CMS_TABLE_PREFIX.'addons', \n array('type' => 'template', 'directory' => $template_name));\n }\n }", "function _preview_theme_template_filter()\n {\n }", "function my_remove_post_type_support()\n{\n\tremove_post_type_support('page', 'editor');\n\tremove_post_type_support('post', 'editor');\n\tremove_post_type_support('companies', 'editor');\n\tremove_post_type_support('group_of_companies', 'editor');\n}", "public function remove_sub_menus() {\n remove_menu_page( 'edit-comments.php' );\n\n if ( current_user_can( 'editor' ) ) {\n remove_submenu_page( 'themes.php', 'themes.php' );\n\n global $submenu;\n unset( $submenu['themes.php'][6] );\n }\n }", "function ti_wp_foundation_theme_head_cleanup() {\n\t// Remove category feeds\n\t// remove_action( 'wp_head', 'feed_links_extra', 3 );\n\t// Remove post and comment feeds\n\t// remove_action( 'wp_head', 'feed_links', 2 );\n\t// Remove EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// Remove Windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// Remove index link\n\tremove_action( 'wp_head', 'index_rel_link' );\n\t// Remove previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// Remove start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// Remove links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// Remove WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n}", "function my_remove_menu_pages(){\n\t// remove_menu_page('edit.php?post_type=acf');\n\t// remove_menu_page( 'index.php' ); //Dashboard\n\t//remove_menu_page( 'edit.php' ); \t//Posts\n\t// remove_menu_page( 'upload.php' ); //Media\n\t// remove_menu_page( 'edit.php?post_type=page' ); \t//Pages\n\t//remove_menu_page( 'edit-comments.php' ); \t//Comments\n\t// remove_menu_page( 'themes.php' ); //Appearance\n\t// remove_menu_page( 'plugins.php' ); //Plugins\n\t#remove_menu_page( 'users.php' ); \t//Users\n\t//remove_menu_page( 'tools.php' ); \t//Tools\n\t// remove_menu_page( 'options-general.php' ); //Settings\n}", "function remove_genesis_features() {\n remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );\n remove_action('genesis_footer', 'genesis_do_footer');\n remove_action('genesis_footer', 'genesis_footer_markup_open', 5);\n remove_action('genesis_footer', 'genesis_footer_markup_close', 15);\n remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );\n remove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n}", "function PREFIX_remove_page_class_from_post_class($classes) {\n\t$classes = array_diff( $classes, array(\"page\") );\n\n\treturn $classes;\n}", "function remove_menus(){\n// remove_menu_page( 'edit.php' ); //Posts\n\n// remove_menu_page( 'edit.php?post_type=page' ); //Pages\n\n\n}", "public function Setup_Templates_List() : void\n {\n $this->Templates = apply_filters(\"WP_Plugin_virtual_pages_templates\",[\n ...array('page.php', 'index.php' ), ...(array) $this->Template]);\n }", "function my_remove_menu_pages() {\n global $menu;\n if (!current_user_can('manage_options')) {\n remove_menu_page('tools.php');\n remove_menu_page('edit-comments.php');\n\t remove_menu_page('upload.php');\n\t remove_menu_page('edit.php');\n\t\tremove_menu_page('edit.php?post_type=page');\n\t\tremove_menu_page('index.php');\n\t\tunset($menu[4]);\n }\n}", "function customize_themes_print_templates()\n {\n }", "public static function plugin_deactivated() {\n\n\t\t// define page array\n\t\t$page_definitions = [\n\t\t\t'codeable-users-table-shortcode-page' => [\n\t\t\t\t'title' => __( 'Codeable Users Table Shortcode Page', 'codeable-user-tables' ),\n\t\t\t\t'content' => '[codeable_users_table]'\n\t\t\t],\n\t\t];\n\n\t\tforeach ( $page_definitions as $slug => $page ) {\n\t\t\t// remove all the data we created\n\t\t\t$page = get_page_by_path( $slug, OBJECT, 'page' );\n\t\t\twp_delete_post( $page->ID, true );\n\t\t}\n\n\t}", "public function page_templates()\n {\n // Single Chiro Quiz page template\n if (is_single() && get_post_type() == $this->token) {\n if (!defined('PLATFORM_FUNNEL')) {\n define('PLATFORM_FUNNEL', 'CHIRO_QUIZ');\n }\n\n include($this->template_path . 'single-quiz.php');\n exit;\n }\n }", "public function removeNodeThemes()\n\t{\n\t\t$this->removeNode( 'themes' );\n\t}", "function minim_preprocess_page(&$vars) {\n //for some reason system main inserts itself into content region even if empty\n //so we remove it here to prevent bloat\n //to test if this is still applicable comment out, clear caches and look for a white space at\n //bottom of the front page\n if (count($vars['page']['content']) == 1 && empty($vars['page']['content']['system_main']['main']['#markup'])) {\n unset($vars['page']['content']);\n }\n\n //default styling for tabs\n if (!empty($vars['tabs'])) {\n foreach ($vars['tabs']['#primary'] as $tab_key => $tab) {\n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'padding-xxs'; \n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'margin-s'; \n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'block-link'; \n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'bg-green'; \n }\n }\n\n //node-type adjustments\n if (is_object($vars['node'])) {\n $node_type = $vars['node']->getType();\n switch ($node_type) {\n case 'google_form':\n //all the js and css specific to dealing with google forms\n minim_add_google_form_elements($vars);\n break;\n case 'portfolio_piece':\n //no titles on portfolio pages\n $vars['title'] = false;\n break;\n case 'facility':\n //automatically setting parent for facility nodes\n $menu_tree = \\Drupal::service('menu_link.tree');\n $menu_tree->setPath('main', 'tools/facilities');\n break;\n }\n\n //set a variable here for nodes without bodies that\n //way we can hide titles as well.. allows for easy creation\n //of pages without content that we can place blocks on\n $body = $vars['node']->get('body')->getValue();\n if (empty($body[0]['value']) && $node_type != 'google_form') {\n $vars['page']['no_body'] = true;\n } \n }\n if (\\Drupal::request()->attributes->get('_system_path') == '2011-annual-report') {\n $drop_menus = array(\n '#attached' => array(\n 'css' => array(\n drupal_get_path('theme', 'minim') . '/css/ar2011.css',\n ),\n ),\n );\n drupal_render($drop_menus);\n }\n}", "public function removePage()\n\t{\n\t\tif(isset($this->searchFilters[$this->ref_page]))\n\t\t{\n\t\t\tunset($this->searchFilters[$this->ref_page]);\n\t\t}\n\t}", "function mdwpfp_init_markup_cleanup() {\n add_action('init', 'mdwpfp_head_cleanup');\n\n // Remove WP version from the RSS feed.\n add_filter('the_generator', 'mdwpfp_rss_version');\n\n // Clean the WP generated code around images.\n add_filter('the_content', 'mdwpfp_filter_ptags_on_images');\n\n // Remove pesky injected css for recent comments widget.\n add_filter('wp_head', 'mdwpfp_remove_wp_widget_recent_comments_style', 1);\n // Clean up injected comment styles in the <head>.\n add_action('wp_head', 'mdwpfp_remove_recent_comments_style', 1);\n\n // Clean the default WP photo gallery output.\n add_filter('gallery_style', 'mdwpfp_gallery_style');\n\n}", "function isf_remove_unused_menu_options() {\n\n\tremove_menu_page( 'edit.php' ); // Removes Posts.\n\tremove_menu_page( 'edit.php?post_type=page' ); // Removes Pages.\n\tremove_menu_page( 'edit-comments.php' ); // Removes Comments.\n\n}", "function childtheme_remove_scripts(){\n remove_action('wp_enqueue_scripts','thematic_head_scripts');\n}", "function noc_deregister_scripts() {\n\n //Deregister styles\n\n\t// Parent\n\twp_dequeue_style( 'theme-style-child' );\n\twp_deregister_style( 'theme-style-child' );\n\n\t// Theme child from parent\n\twp_dequeue_style( 'theme-style' );\n\twp_deregister_style( 'theme-style' );\n\n\t// // tt-main-style\n\t// wp_dequeue_style( 'tt-main-style' );\n\t// wp_deregister_style( 'tt-main-style' );\n\n\t// // tt-theme-style\n\t// wp_dequeue_style( 'tt-theme-style' );\n\t// wp_deregister_style( 'tt-theme-style' );\n\n}", "public function stop_previewing_theme()\n {\n }", "function itcr_preprocess_page( & $variables ) {\n\tif ( $variables[ 'is_front' ] ) {\n\t\t$variables[ 'title' ] = '';\n\t\tunset( $variables[ 'page' ][ 'content' ][ 'system_main' ][ 'default_message' ] );\n\t}\n}", "function GTPress_hide_themes()\r\n{\r\n\t$disabled_menu_items = get_option('gtpressMenu_disabled_menu_items');\r\n\t$disabled_submenu_items = get_option('gtpressMenu_disabled_submenu_items');\r\n\tif (in_array('themes.php', $disabled_menu_items)) {\r\n\t\tadd_menu_page ( 'Look & Feel', 'Look & Feel', 'edit_theme_options', 'nav-menus.php' );\r\n\t\tadd_submenu_page( 'nav-menus.php', 'Menus', 'Menus', 'edit_theme_options', 'nav-menus.php' );\r\n\t\tadd_submenu_page( 'nav-menus.php', 'Custom Header', 'Custom Header', 'edit_theme_options', 'themes.php?page=custom-header' );\r\n\t\tadd_submenu_page( 'nav-menus.php', 'Custom Background', 'Custom Background', 'edit_theme_options', 'themes.php?page=custom-background' );\r\n\t}\r\n}", "public static function resetTemplates()\n\t{\n\t\tself::$_template_names = array();\n\t}", "function phptemplate_preprocess_page(&$vars) {\n $vars['tabs2'] = menu_secondary_local_tasks();\n // Hook into color.module\n if (module_exists('color')) {\n _color_page_alter($vars);\n }\n// Add per content type pages\n#\n if (isset($vars['node'])) {\n# // Add template naming suggestion. It should alway use hyphens.\n#// If node type is \"custom_news\", it will pickup \"page-custom-news.tpl.php\".\n#\n $vars['template_files'][] = 'page-' . str_replace('_', '-', $vars['node']->type);\n }\n drupal_add_js('sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce.js');\n drupal_add_js('sites/all/libraries/ckeditor5/ckeditor.js');\n $vars['scripts'] = drupal_get_js();\n}", "public function tear_down(): void {\n\t\tremove_action( 'wp_body_open', [ $this->instance, 'embed_web_stories' ] );\n\n\t\tremove_theme_support( 'web-stories' );\n\n\t\tdelete_option( Customizer::STORY_OPTION );\n\t\tupdate_option( 'stylesheet', $this->stylesheet );\n\n\t\tparent::tear_down();\n\t}", "function cera_grimlock_remove_actions() {\n\t\tif ( is_page_template( 'template-homepage.php' ) || is_page_template( 'template-dashboard.php' ) || is_page_template( 'template-homepage-minimal.php' ) ) :\n\t\t\tremove_action( 'cera_header', 'cera_grimlock_before_content', 20 );\n\t\t\tadd_action( 'cera_header', 'cera_grimlock_homepage_before_content', 20 );\n\n\t\t\tremove_action( 'cera_footer', 'cera_grimlock_after_content', 10 );\n\t\t\tadd_action( 'cera_footer', 'cera_grimlock_homepage_after_content', 10 );\n\t\telseif ( is_404() ) :\n\t\t\tremove_action( 'cera_header', 'cera_grimlock_before_content', 20 );\n\t\t\tadd_action( 'cera_header', 'cera_grimlock_404_before_content', 20 );\n\n\t\t\tremove_action( 'cera_footer', 'cera_grimlock_after_content', 10 );\n\t\t\tadd_action( 'cera_footer', 'cera_grimlock_404_after_content', 10 );\n\t\tendif;\n\t}", "function dentario_clients_settings_theme_setup2() {\n\t\tdentario_add_theme_inheritance( array('clients' => array(\n\t\t\t'stream_template' => 'blog-clients',\n\t\t\t'single_template' => 'single-client',\n\t\t\t'taxonomy' => array('clients_group'),\n\t\t\t'taxonomy_tags' => array(),\n\t\t\t'post_type' => array('clients'),\n\t\t\t'override' => 'custom'\n\t\t\t) )\n\t\t);\n\t}", "function rgc_remove_menus(){\n remove_menu_page( 'jetpack' ); //Jetpack* \n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n}", "function d4tw_remove_sidebars () {\r\n\tunregister_sidebar( 'statichero' );\r\n\tunregister_sidebar( 'hero' );\r\n\tunregister_sidebar( 'footerfull' );\r\n\tunregister_sidebar( 'left-sidebar' );\r\n unregister_sidebar( 'right-sidebar' );\r\n unregister_sidebar( 'herocanvas' );\r\n}", "function rgc_remove_menus(){\n remove_menu_page( 'jetpack' ); //Jetpack* \n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n}", "public static function removeDefaultViews()\n {\n File::delete(resource_path('/views/home.blade.php'));\n File::delete(resource_path('/views/welcome.blade.php'));\n }", "function remove_menus(){\n \n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'themes.php' ); //Appearance\n\t//remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n \n}", "function _h_remove_jetpack_related_posts() {\n if (class_exists('Jetpack_RelatedPosts')) {\n $jprp = Jetpack_RelatedPosts::init();\n $callback = [$jprp, 'filter_add_target_to_dom'];\n remove_filter('the_content', $callback, 40);\n }\n}", "function extamus_remove_menu_pages() {\n if ( ! current_user_can( 'administrator' ) ) {\n remove_menu_page( 'index.php' ); //Dashboard\n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'upload.php' ); //Media\n remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'themes.php' ); //Appearance\n remove_menu_page( 'plugins.php' ); //Plugins\n remove_menu_page( 'users.php' ); //Users\n remove_menu_page( 'tools.php' ); //Tools\n remove_menu_page( 'options-general.php' ); //Settings\n remove_menu_page( 'acf.php' ); //Advanced Custom Fields\n}}", "function cleaning_wp(){\n remove_action('wp_head', 'wp_generator'); // remove WP tag\n\n remove_action( 'wp_head', 'feed_links_extra', 3 ); // remove extra feeds\n remove_action( 'wp_head', 'feed_links', 2 ); // remove general feeds\n remove_action( 'wp_head', 'rsd_link' ); // remove RSD link\n remove_action( 'wp_head', 'wlwmanifest_link' ); // remove manifest link\n remove_action( 'wp_head', 'index_rel_link' ); // remove index link\n remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // remove prev link\n remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // remove start link\n remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // remove links to adjacent posts\n remove_action( 'wp_head', 'wp_shortlink_wp_head'); // remove shortlink\n\n // disable admin bar\n add_filter('the_generator', '__return_false');\n add_filter('show_admin_bar','__return_false');\n\n // disable emoji\n remove_action( 'wp_head', 'print_emoji_detection_script', 7);\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n\n // disbale json\n remove_action( 'wp_head', 'rest_output_link_wp_head' );\n remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );\n remove_action( 'template_redirect', 'rest_output_link_header', 11 );\n}", "function thb_disable_layout_default_options_splash_page() {\n\t\tif ( thb_get_admin_template() == 'template-splash.php' ) {\n\t\t\t$fields_container = thb_theme()->getPostType( 'page' )->getMetabox( 'layout' )->getContainer( 'layout_container' );\n\t\t\t$fields_container->removeField('subtitle');\n\t\t\t$fields_container->removeField('pageheader_disable');\n\t\t}\n\t}", "function kstHelpWordpressSitePages_customPageTemplates() {\n ?>\n <p>\n WordPress offers incredible flexibility as a CMS (Content Management System).\n Theme and plugin developers often include special layout templates that you\n can use on your site pages to present information in a different format or\n layout, as well as to add functionality to certain pages of your site.\n </p>\n <p>\n Examples include contact forms, multi-column layouts, magazine style\n index layouts, or even mini applications.\n </p>\n <p>\n Occasionally these templates can be so complex that you can't really\n even edit the content the page and the page that appears in your\n Pages Admin List is really only a place holder. It will be obvious\n if you come across one of these pages.\n </p>\n <p>\n You will know that the creator of your theme or plugins included custom\n layout templates for you to use if (when creating/editing a Site Page)\n you see \"Template\" with a dropdown box under it in the right hand sidebar.\n </p>\n <p>\n Choosing a template and publishing the page will use that template instead of\n the default \"pages\" template that your site pages use.\n </p>\n <?php\n}", "public function clearTemplateCache()\n {\n $this->loadedTemplates = array();\n }", "function admin_remove_menus() {\n if ( ! current_user_can( 'manage_options' ) ) {\n remove_menu_page( 'themes.php' ); // Appearance\n remove_menu_page( 'plugins.php' ); // Plugins\n remove_menu_page( 'users.php' ); // Users\n remove_menu_page( 'profile.php' ); // Profile\n remove_menu_page( 'tools.php' ); // Tools\n remove_menu_page( 'options-general.php' ); // Settings\n }\n}", "function remove_menus(){ \n\t// remove_menu_page('edit.php');\n\t// remove_menu_page('edit-comments.php');\n}", "function remove_menus_bloggood_ru(){\n// remove_menu_page( 'index.php' ); //Консоль\n// remove_menu_page( 'edit.php' ); //Записи\n// remove_menu_page( 'upload.php' ); //Медиафайлы\n// remove_menu_page( 'edit.php?post_ENGINE=page' ); //Страницы\n// remove_menu_page( 'edit-comments.php' ); //Комментарии\n// remove_menu_page( 'themes.php' ); //Внешний вид\n// remove_menu_page( 'plugins.php' ); //Плагины\n// remove_menu_page( 'users.php' ); //Пользователи\n// remove_menu_page( 'tools.php' ); //Инструменты\n// remove_menu_page( 'options-general.php' ); //Настройки\n\n}", "function fes_remove_posts_admin_menus() {\n remove_menu_page( 'edit.php' );\n}", "function deenqueue_parent_scripts_styles() {\n wp_dequeue_script( 'one-page-slitslider' );\n wp_deregister_script( 'one-page-slitslider' );\n wp_dequeue_script( 'one-page-custom' );\n wp_deregister_script( 'one-page-custom' );\n}", "function purity_theme_init() {\n elgg_extend_view('page/elements/head', 'purity_theme/meta');\n elgg_unregister_menu_item('topbar', 'elgg_logo');\n\telgg_register_plugin_hook_handler('index', 'system', 'purity_theme');\n}", "function ru_filter_styles(){\n $this->removestyle(\"bbp-default\");\n\n // download monitor is not used in the front-end.\n $this->removestyle(\"wp_dlmp_styles\");\n\n if( !is_singular( 'docs' ) ){\n // the table of contents plugin is being used on documentation pages only\n $this->removestyle(\"toc-screen\");\n }\n\n if ( !( is_page( 'account' ) || is_page( 'edit-profile' )) ){\n // this should not be like this. Need to look into it.\n $this->removestyle(\"wppb_stylesheet\");\n }\n\n if( !is_singular( array('docs', 'post' ) ) ){\n $this->removestyle(\"codebox\");\n }\n }", "function my_footer_shh() {\n remove_filter( 'update_footer', 'core_update_footer' );\n}", "function init_remove_support(){\n if( !empty($_GET['post']) && intval($_GET['post']) == get_option( 'page_on_front' ) ) {\n remove_post_type_support('page', 'editor');\n }\n}", "public function createPlaceholdersAndDeleteLiveParentPage() {}", "function vida_theme_setup() {\n\t\n\tadd_theme_support( 'title-tag' );\n\n\t/*\n\t * Remove parent theme setups we don't need/use\n\t */\t\n\t\n\tremove_theme_support( 'custom-header' );\n\t\n\t// remove post formats\n\tremove_theme_support( 'post-formats' );\n\n\t// remove custom scripts\n\tremove_action( 'wp_enqueue_scripts', 'moesia_custom_styles');\n\t\n\t// remove images sizes\n\tif ( function_exists( 'remove_image_size' ) ) {\n\t\t\n\t\tremove_image_size('moesia-thumb');\n\t\tremove_image_size('project-image');\n\t\tremove_image_size('moesia-news-thumb');\n\t\tremove_image_size('moesia-news-thumb');\n\t\tremove_image_size('moesia-clients-thumb');\n\t\tremove_image_size('moesia-testimonials-thumb');\t\n\t\tremove_image_size('moesia-employees-thumb');\t\t\n\t\t\n\t}\n\t\n\t// hide wp generator\n\tremove_action('wp_head', 'wp_generator');\n\t\n\t// removes EditURI/RSD (Really Simple Discovery) link.\n\tremove_action('wp_head', 'rsd_link');\n\t\n\t// removes wlwmanifest (Windows Live Writer) link.\n\tremove_action('wp_head', 'wlwmanifest_link');\t\n\t\n\t// Remove the REST API lines from the HTML Header\n remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );\n\t\n\tremove_action( 'after_setup_theme', 'moesia_custom_header_setup', 10 );\n\t\n\tremove_action('wp_head', 'print_emoji_detection_script', 7);\n\t\n\tremove_action('wp_print_styles', 'print_emoji_styles');\t\n\t\n\t/*\n\t * Add our custom theme setups\n\t *\n\t * Footer menu, additional sidebars, etc..\n\t */\n\n\t// Add our footer menu\n\tregister_nav_menus( array(\n\t\t'secondary' => __( 'Footer Menu', 'vida-footer-menu' ),\n\t\t'tertiary' => __( 'Blog - Posts', 'vida-blog-menu' ),\n\t\t'footerblog' => __( 'Blog - Posts Footer Menu', 'vida-blog-footer' ),\n\t) );\t\n\t\n\t// Register the articles pages' sidebar. \n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'article-header-widget',\n\t\t\t'name' => __( 'Articles Header Widget', 'moesia-vida' ),\n\t\t\t'description' => __( 'Header widget for the articles pages only', 'moesia-vida' ),\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</aside>',\n\t\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t\t'after_title' => '</h2>'\n\t\t)\n\t);\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar Search', 'moesia' ),\n\t\t'id' => 'sidebar-search',\n\t\t'description' => __( 'Widget to add a search box in the sidebar, goes at the top most of the sidebar.', 'moesia-vida' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget sidebar-nopadding %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar Optin', 'moesia' ),\n\t\t'id' => 'sidebar-optin',\n\t\t'description' => __( 'Widget to display an optin in the posts\\' sidebar, goes above the main sidebar.', 'moesia-vida' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget sidebar-nopadding %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar - Matchmaking', 'moesia' ),\n\t\t'id' => 'sidebar-matchmaking',\n\t\t'description' => __( 'Widget to display an optin in the posts\\' sidebar, goes above the main sidebar.', 'moesia-vida' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget sidebar-nopadding %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\t\n\t// Add custom image sizes\n\tif ( function_exists('add_image_size') ) {\n\n\t\n\t\t//add_image_size( 'vida-blog-thumb', xxx, xxx, TRUE ); <-- in case of changing blog featured\n\t\t\n\t\t// used mainly as the featured\n\t\tadd_image_size( 'vida-blog-featured', 682, 480, TRUE );\n\t\t\n\t\t// blog full width\n\t\tadd_image_size( 'vida-blog-full', 720, 9999 );\n\t\t\n\t\t// blog three-fourth width\n\t\tadd_image_size( 'vida-blog-threefourth', 525, 9999 );\n\t\t\n\t\t// blog two-third width\n\t\tadd_image_size( 'vida-blog-twothird', 460, 9999 );\n\t\t\n\t\t// blog half width \n\t\tadd_image_size( 'vida-blog-onehalf', 355, 9999 );\t\t\n\t\t\n\t\t// blog one-third width\n\t\tadd_image_size( 'vida-blog-onethird', 230, 9999 );\n\n\t\t// related posts thumbs\n\t\tadd_image_size( 'vida-rel-thumb', 237, 165, true );\t\t\n\t\t\n\t} //end custom image sizes\n\t\n\t\n}", "function remove_business_starter_widgets(){\n\n\tunregister_sidebar( 'sidebar-1' );\n\tunregister_sidebar( 'sidebar-2' );\n\tunregister_sidebar( 'sidebar-3' );\n}", "public function wp_delete_theme(){\n\n\t\trequire_once( 'wp-load.php' );\n\t\trequire_once( 'wp-admin/includes/upgrade.php' );\n\n\t\tdelete_theme( 'twentyfourteen' );\n\t\tdelete_theme( 'twentythirteen' );\n\t\tdelete_theme( 'twentytwelve' );\n\t\tdelete_theme( 'twentyeleven' );\n\t\tdelete_theme( 'twentyten' );\n\t\t// We delete the _MACOSX folder (bug with a Mac)\n\t\tdelete_theme( '__MACOSX' );\n\t}", "public function remove_content_filter() {\n\t\t// @todo also check if this page supports blocks.\n\t\tif ( is_page() ) {\n\t\t\tremove_filter( 'the_content', 'wpautop', 10 );\n\t\t\tadd_filter( 'the_content', array( $this, 'spineautop' ), 10 );\n\t\t}\n\t}", "function hide_menu() {\n // To remove the whole Appearance admin menu\n //remove_menu_page( 'themes.php' );\n\n // remove the theme editor and theme options submenus \n\n remove_submenu_page( 'themes.php', 'themes.php' );\n remove_submenu_page( 'themes.php', 'theme-editor.php' );\n remove_submenu_page( 'themes.php', 'customize.php' );\n remove_submenu_page( 'themes.php', 'theme_options' );\n remove_submenu_page( 'themes.php', 'options-framework' );\n\n}", "public static function uninstall() {\r\n // $pop_ups = get_pages( array('post_type'=>DGDSCROLLBOXTYPE));\r\n // foreach($pop_ups as $pop_up) {\r\n // wp_delete_post($pop_up->ID, true);\r\n // }\r\n }", "public function theme() {\n // Do nothing by default\n }", "function delete_sample_page() {\n $default_page = get_page_by_title( 'Sample Page' );\n if ($default_page) {\n wp_delete_post( $default_page->ID );\n }\n }", "function child_theme_setup_before_parent() {\n}", "public static function cleanTemplatesCache()\r\n {\r\n $path = APP_VAR_DIR.'/_compiled/site/*';\r\n exec('rm -rf '.$path);\r\n return true;\r\n }", "function childtheme_override_postfooter() {}", "function tsapress_clean_assets($content) {\n\t$tsapress_base_dir = tsapress_base_dir();\n $theme_name = next(explode('/themes/', $content));\n \n $current_path = '/'.$tsapress_base_dir.'wp-content/themes/' . $theme_name;\n $new_path = '';\n $content = str_replace($current_path, $new_path, $content);\n \n return $content;\n}", "function shift_admin_menu_cleanup() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}", "private function hierarchy()\n {\n $types = [\n '404',\n 'archive',\n 'attachment',\n 'author',\n 'category',\n 'date',\n 'embed',\n 'frontpage',\n 'home',\n 'index',\n 'page',\n 'paged',\n 'search',\n 'single',\n 'singular',\n 'tag',\n 'taxonomy',\n ];\n\n foreach ($types as $type) {\n add_filter(\"{$type}_template_hierarchy\", [$this, 'addTemplateDirectory']);\n }\n }", "function replace_widjets_content() {\n remove_action( 'widgets_init', 'envo_storefront_widgets_init' );\n}", "public function restore_templates( $name = '' ) {\n\t\t\t$theme = wp_get_theme( $name );\n\n\t\t\tif ( empty( $theme ) || ! $theme->exists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( isset( $this->restored[ $theme->get( 'Name' ) ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( empty( $this->saved[ $theme->get( 'Name' ) ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$old_version = get_option( 'theme_version ' . $theme->get( 'Name' ) );\n\t\t\t$version = $theme->get( 'Version' );\n\t\t\tif ( $old_version === $version ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$temp_dir = UM()->uploader()->get_core_temp_dir() . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme->get( 'template' );\n\t\t\tif ( ! is_dir( $temp_dir ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$um_dir = $theme->get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'ultimate-member';\n\t\t\t@mkdir( $um_dir, 0777, true );\n\n\t\t\t$src = realpath( $temp_dir );\n\t\t\t$dest = realpath( $um_dir );\n\t\t\tif ( $src && $dest ) {\n\t\t\t\tself::recurse_copy( $src, $dest );\n\t\t\t\terror_log( \"UM Log. Theme '\" . $theme->get( 'template' ) . \"' templates restored.\" );\n\t\t\t\tUM()->files()->remove_dir( $src );\n\t\t\t} else {\n\t\t\t\terror_log( \"UM Error. Can not restore theme templates.\" );\n\t\t\t}\n\n\t\t\tdelete_option( 'theme_version ' . $theme->get( 'Name' ) );\n\t\t\t$this->restored[ $theme->get( 'Name' ) ] = $theme->get( 'Version' );\n\t\t}", "function wpgrade_head_cleanup() {\r\n\t// Remove WP version\r\n\tremove_action( 'wp_head', 'wp_generator' );\r\n\t\r\n\tremove_action( 'wp_head', 'rsd_link' );\r\n\t// windows live writer\r\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\r\n\t\r\n\t// remove WP version from css - those parameters can prevent caching\r\n\t//add_filter( 'style_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\t// remove WP version from scripts - those parameters can prevent caching\r\n\t//add_filter( 'script_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\r\n}", "function remove_thefeeds()\r\n{\r\n remove_theme_support( 'automatic-feed-links' ); //remove feed links in head\r\n}", "function cinerama_edge_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( apply_filters( 'cinerama_edge_filter_meta_box_post_types_remove', array( 'post', 'page' ) ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}", "function pd_head_cleanup()\n{\n\n /* ===============\n Remove RSS from header\n =============== */\n remove_action('wp_head', 'rsd_link'); #remove page feed\n remove_action('wp_head', 'feed_links_extra', 3); // Remove category feeds\n remove_action('wp_head', 'feed_links', 2); // Remove Post and Comment Feeds\n\n\n /* ===============\n remove windindows live writer link\n =============== */\n remove_action('wp_head', 'wlwmanifest_link');\n\n\n /* ===============\n links for adjacent posts\n =============== */\n remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);\n\n\n /* ===============\n WP version\n =============== */\n remove_action('wp_head', 'wp_generator');\n\n\n /* ===============\n remove WP version from css\n =============== */\n add_filter('style_loader_src', 'pd_remove_wp_ver_css_js', 9999);\n\n\n /* ===============\n remove Wp version from scripts\n =============== */\n add_filter('script_loader_src', 'pd_remove_wp_ver_css_js', 9999);\n}", "public function plugin_deactive_hook(){\r\n delete_transient( 'woolentor_template_info' );\r\n delete_metadata( 'user', null, 'woolentor_dismissed_lic_notice', null, true );\r\n }", "function full_reset(){\n\t/**\n\t* This function will reset all the header links\n\t* http://wordpress.stackexchange.com/questions/207104/edit-theme-wp-head\n\t*/\n\t// Removes the wlwmanifest link\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// Removes the RSD link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// Removes the WP shortlink\n\t//remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );\n\t// Removes the canonical links\n\t//remove_action( 'wp_head', 'rel_canonical' );\n\t// Removes the links to the extra feeds such as category feeds\n\t//remove_action( 'wp_head', 'feed_links_extra', 3 ); \n\t// Removes links to the general feeds: Post and Comment Feed\n\t//remove_action( 'wp_head', 'feed_links', 2 ); \n\t// Removes the index link\n\tremove_action( 'wp_head', 'index_rel_link' ); \n\t// Removes the prev link\n\tremove_action( 'wp_head', 'parent_post_rel_link' ); \n\t// Removes the start link\n\tremove_action( 'wp_head', 'start_post_rel_link' ); \n\t// Removes the relational links for the posts adjacent to the current post\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link' );\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );\n\t// Removes the WordPress version i.e. -\n\tremove_action( 'wp_head', 'wp_generator' );\n\t\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\t\n\t/**\n\t*https://wordpress.org/support/topic/wp-44-remove-json-api-and-x-pingback-from-http-headers\n\t*/\n\tadd_filter('rest_enabled', '_return_false');\n\tadd_filter('rest_jsonp_enabled', '_return_false');\n\t\n\tremove_action( 'wp_head', 'rest_output_link_wp_head', 10 );\n\tremove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );\n\t\n\tremove_action('wp_head', 'wp_print_scripts');\n //remove_action('wp_head', 'wp_print_head_scripts', 9);\n add_action('wp_footer', 'wp_print_scripts', 5);\n add_action('wp_footer', 'wp_print_head_scripts', 5);\n}" ]
[ "0.702426", "0.65037644", "0.64131457", "0.6406326", "0.6262876", "0.62376744", "0.61424834", "0.6110962", "0.61082923", "0.6108143", "0.6036941", "0.60307467", "0.602198", "0.5971363", "0.59237164", "0.58937496", "0.5886289", "0.5847543", "0.58383566", "0.5826905", "0.5806757", "0.5801867", "0.5782649", "0.5775987", "0.57499826", "0.57460856", "0.5743062", "0.57243055", "0.5705576", "0.56426513", "0.56407607", "0.56347555", "0.56237876", "0.5618678", "0.5617391", "0.5613601", "0.5605866", "0.5598111", "0.5590409", "0.55682844", "0.55120546", "0.5504017", "0.5485255", "0.5477747", "0.5474641", "0.5468583", "0.5448823", "0.54335845", "0.5408053", "0.54067576", "0.54059404", "0.540026", "0.53872985", "0.53782916", "0.53493255", "0.53492683", "0.5345255", "0.53424835", "0.5335433", "0.53352004", "0.5335157", "0.53329825", "0.5329625", "0.5323008", "0.5312587", "0.53035575", "0.52992743", "0.52986866", "0.52908677", "0.5287484", "0.52851605", "0.52746713", "0.52704227", "0.5268362", "0.5266471", "0.52653843", "0.52513397", "0.5249128", "0.5246151", "0.52433425", "0.52425134", "0.5239628", "0.5222094", "0.5213075", "0.5208597", "0.5204263", "0.51930004", "0.5192849", "0.51921654", "0.51860934", "0.5175579", "0.5168917", "0.5161614", "0.51603353", "0.5151271", "0.51494986", "0.5141813", "0.514177", "0.51397103", "0.51374274" ]
0.7632337
0
Template Parts with Display Posts Shortcode
function be_dps_template_part( $output, $original_atts ) { // Return early if our "layout" attribute is not specified if( empty( $original_atts['layout'] ) ) return $output; ob_start(); get_template_part( 'partials/dps', $original_atts['layout'] ); $new_output = ob_get_clean(); if( !empty( $new_output ) ) $output = $new_output; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accouk_display_post_content() {\n\n $post_formats = get_the_terms(get_the_id(), 'post-format');\n\n switch($post_formats[0]->slug) {\n\n case 'post-with-hero':\n include_once('templates/post-with-hero.php');\n break;\n\n case 'portfolio':\n include_once('templates/post-portfolio.php');\n break;\n\n case 'portfolio-item-with-hero':\n include_once('templates/post-portfolio-with-hero.php');\n break;\n\n case 'default':\n include_once('templates/post-default.php');\n break;\n\n case 'no-featured-image':\n include_once('templates/post-no-featured-image.php');\n break;\n\n default:\n include_once('templates/post-default.php');\n break;\n\n }\n\n}", "protected function content($atts, $content = null) {\n\n extract(shortcode_atts(array(\n\t\t\t'id' => '',\n\t\t\t'display_social_meta' => 'on',\n\t\t\t'display_comments_count' => 'on',\n\t\t\t'display_excerpt' => 'off',\n\t\t\t'display_meta' => 'on',\n ), $atts));\n\n\n /* ================ Render Shortcodes ================ */\n\n ob_start();\n\t\t\n\t\t//Method to retrieve a single post\n\t\t$queried_post = get_post($id);\n\t\t$postID = $queried_post->ID;\n\t\t$postLink = get_permalink($postID);\n\t\t$postTitle = $queried_post->post_title;\n\t\t$postDate = mysql2date('l, F j, Y', $queried_post->post_date);\n\t\t$postAuthorID = $queried_post->post_author;\n\t\t$postAuthor = get_the_author_meta('nickname', $postAuthorID);\n\t\t//$postTags = get_the_tags($postID);\n\t\t$postCommentCount = $queried_post->comment_count;\n\t\t$postExcerpt = $queried_post->post_excerpt;\n\t\t$postContent = $queried_post->post_content;\n\t\t$postTip = get_post_meta($postID, 'pm_post_tooltip_meta_function', true);\n\t\t$postIconSaved = get_post_meta($postID, 'pm_post_icon_meta', true);\n\t\t$postIcon = $postIconSaved != '' ? $postIconSaved : 'fa fa-file';\n\t\t\n\t\t$displayExcerptOnMeta = get_theme_mod('displayExcerptOnMeta', 'on');\n\t\t\t\n ?>\n \n <?php \n\t\t\t//$img = wp_get_attachment_image_src($el_image, \"large\"); \n\t\t\t//$imgSrc = $img[0];\n\t\t?>\n\n <!-- Element Code start -->\n \n <div class=\"pm-single-post-shortcode-container\">\n\t\n <div class=\"pm_span_header pm_post_single\">\n <h4>\n \n <span><?php esc_attr_e($postTitle); ?></span>\n \n <?php if( $postTip !== '' ){ ?>\n <a class=\"<?php esc_attr_e($postIcon); ?> pm_tip\" title=\"<?php esc_attr_e($postTip); ?>\" href=\"<?php echo esc_url($postLink); ?>\"></a>\n <?php } else { ?>\n <a class=\"<?php esc_attr_e($postIcon); ?>\" href=\"<?php echo esc_url($postLink); ?>\"></a>\n <?php } ?>\n \n </h4>\n </div>\n \n <div class=\"pm-hover-item\">\n \n <div class=\"pm-hover-item-title-panel\">\n <a class=\"icon-location-arrow pm_float_right pm_panel_touch_btn\"></a>\n \n <?php if( $display_meta === 'on' ) { ?>\n <p><b><?php esc_attr_e('Posted','localization'); ?></b> <?php esc_attr_e($postDate); ?><b> <?php esc_attr_e('by','localization'); ?></b> <?php esc_attr_e($postAuthor); ?></p>\n <?php } ?>\n \n <?php if( $displayExcerptOnMeta === 'on' ){ ?>\n <p><?php echo pm_hope_string_limit_words($postExcerpt, 7); ?>...</p>\n <?php } ?>\n \n </div>\n \n <div class=\"pm-hover-item-details\">\n <div class=\"pm-hover-item-spacer\">\n \n \t<?php if( $display_excerpt === 'on' ){ ?>\n <p><?php echo pm_hope_string_limit_words($postExcerpt, 20); ?>...</p>\n <?php } ?>\n \n <a href=\"<?php echo esc_url($postLink); ?>\"><?php esc_attr_e('Read More','localization'); ?> &raquo;</a>\n \n \n <?php if($display_comments_count === 'on'){ ?>\n <div class=\"pm_post_tags\">\n <i class=\"fa fa-comment\"></i><?php echo get_comments_number(); ?> <?php esc_attr_e('comments', 'localization'); ?>\t\n </div>\n <?php } else { ?>\n <div class=\"pm_post_tags\" style=\"margin-bottom:0px;\">\n </div>\t\n <?php } ?>\n \n <?php if( $display_social_meta === 'on' ) : ?>\t\t\t\t\t\t\t\t\t\t\n \n <ul class=\"pm-post-social-icons\">\n \n <li class=\"twitter\">\n <a target=\"_blank\" href=\"http://twitter.com/home?status=<?php echo urlencode(get_the_title()); ?>\"><i class=\"fa fa-twitter\"></i></a>\n </li>\n \n <li class=\"facebook\">\n <a target=\"_blank\" href=\"http://www.facebook.com/share.php?u=<?php echo urlencode(get_the_permalink()); ?>\"><i class=\"fa fa-facebook\"></i></a>\n </li>\n \n <li class=\"linkedin\">\n <a href=\"http://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo urlencode(get_the_permalink()); ?>&amp;title=<?php echo urlencode(get_the_title()); ?>&amp;summary=<?php echo urlencode(get_the_excerpt()); ?>\" target=\"_blank\"><i class=\"fa fa-linkedin\"></i></a>\n </li>\n \n <li class=\"gplus\">\n <a href=\"https://plus.google.com/share?url=<?php echo urlencode(get_the_permalink()); ?>\" target=\"_blank\"><i class=\"fa fa-google-plus\"></i></a>\n </li>\n \n </ul>\n \n <?php endif; ?>\t\n \n </div>\n </div>\n \n <div class=\"pm-hover-item-img\">\n \t<?php echo get_the_post_thumbnail( $postID ); ?>\n </div>\n \n </div>\n \n </div>\t\n \n <!-- Element Code / END -->\n\n <?php\n\n $output = ob_get_clean();\n\n /* ================ Render Shortcodes ================ */\n\n return $output;\n\n }", "function oet_ajax_display_featured_content_block(){\n $shortcode = oet_featured_content_block_display($_POST['attributes'], true);\n echo wpautop(stripslashes($shortcode));\n die();\n}", "function add_shortcode_for_our_plugin ($attr , $content = null ){\n\t\textract(shortcode_atts(array(\n\t\t\t'post_type'=>'post',\n\t\t\t'posts_per_page'=>2,\n\t\t\t\n\t\t\t\n\t\t\n\t\t), $attr,'our_shortcode' ));\n\t\n\t$query = new WP_Query(array(\n\t\t'post_type'=>$post_type,\n\t\t'posts_per_page'=>$posts_per_page,\n\t\n\t));\n\t\n\tif($query->have_posts()):\n\t\t$output = '<div class=\"recent_posts\"><ul>';\n\t\t$i=0;\n\t\twhile($query->have_posts()){\n\t\t\t\n\t\t\t$query->the_post();\n\t\t\tif($i == 0):\n\t\t\t$output .= '<li><a href=\"'.get_the_permalink().'\" style=\"color:red;\" >'.get_the_title().'</a></li>';\n\t\t\telse:\n\t\t\t$output .= '<li><a href=\"'.get_the_permalink().'\">'.get_the_title().'</a></li>';\n\t\t\tendif;\n\t\t\t\n\t\t\t\n\t\t$i++; }\n\t\twp_reset_postdata();\n\t$output .= '</ul></div>';\n\treturn $output;\n\telse:\n\t return 'no post found';\n\t\n\tendif;\n\t\n\t\n\t\n\t\n\t\n\t\n}", "function digthis_show_posts( $atts ) {\n\t// \t'default' => 'values'\n\t// ), $atts );\n\twp_enqueue_script( 'digthis-load-more-js' );\n\tob_start();\n\t?>\n\t<style type=\"text/css\">\n\t\t.post{\n\t\t\tclear: both;\n\t\t}\n\t\t.load-more{\n\t\t\tmargin-top: 10px;\n\t\t}\n\t</style>\n\n\t<!-- html markup required to be displayed on page -->\n\t\t<div class=\"digthis-posts-wrapper\">\n\n\t\t</div>\n\t\t<div class=\"digthis-btn-wrapper\" style=\"width:100%; clear:both;\">\n\t\t\t<input type=\"button\" class=\"load-more\" value=\"load more\" data-page=\"1\">\n\t\t</div>\n\t<!-- end of html markup -->\n\t<!-- javascript template to be used -->\n\t\t<script type=\"text/html\" id=\"tmpl-multiple-posts\">\n\t\t<# _.each( data, function(data){ #>\n\t\t\t<article class=\"post\" >\n\t\t\t\t<header class=\"entry-header\">\n\t\t\t\t\t<h1 class=\"entry-title\">{{ data.title.rendered }}</h1>\n\t\t\t\t</header>\n\t\t\t\t<div class=\"entry-content\">\n\t\t\t\t\t{{{ data.content.rendered }}}\n\t\t\t\t</div>\n\t\t\t</article>\n\t\t<# }); #>\n\t\t</script>\n\t<?php\n\treturn ob_get_clean();\n}", "function training_section(){\r\n\t$singular='Training Show';\r\n\t$plural='Training Shows';\r\n\r\n\t$labels=array(\r\n 'name'=>$plural,\r\n 'singular_name'=>$singular,\r\n 'add_name'=>'Add New',\r\n 'add_new_item'=>'Add New' . $singular,\r\n 'edit'=>'Edit',\r\n 'edit_item' =>'Edit' . $singular,\r\n 'new_item' =>'New' . $singular,\r\n 'view'=>'View' . $singular,\r\n 'view_item'=>'View' . $singular,\r\n 'search_item'=>'Search' . $plural,\r\n 'parent'=>'Parent' . $singular,\r\n 'not_found'=>'No' . $plural .'found',\r\n 'not_found_in_trash'=>'No' . $plural .'in Trash'\r\n\t\t);\r\n\t$args =array(\r\n 'labels' =>$labels,\r\n 'public' =>true,\r\n 'menu_position'=>10,\r\n 'has_archive'=>true,\r\n 'capability_type'=>'post',\r\n 'map_meta_cap'=>true,\r\n 'supports'=>array(\r\n 'title',\r\n 'editor',\r\n 'custom-fields',\r\n 'thumbnail'\r\n \t)\r\n\t\t);\r\n\tregister_post_type('training_show',$args);\r\n}", "function x_add_social_sharing ( $content ) {\n\t\n if ( is_singular('post') ) {\n\t \n echo do_shortcode('[share title=\"Share this Post\" facebook=\"true\" twitter=\"true\" google_plus=\"true\" linkedin=\"true\" pinterest=\"false\" reddit=\"false\" email=\"true\"]');\n \n }\n}", "public function uwd_articles_display( $atts ) {\n\t\t//* Collect values, combining passed in values and defaults.\n\t\t$values = shortcode_atts( array(\n\t\t\t'id' => 'rand',\n\t\t), $atts );\n\n\t\t//* Form the arguments for WP_Query.\n\t\t$args = array(\n\t\t\t'post_type' => array( 'post', 'weeklies', 'videos' ),\n\t\t\t'ignore_sticky_posts' => true,\n\t\t\t'posts_per_page' => 2,\n\t\t);\n\n\t\tif ( $values['id'] == 'rand' ) {\n\t\t\t//* Set random order if no ids specified.\n\t\t\t$args['orderby'] = 'rand';\n\t\t} else {\n\t\t\t//* Remove all the whitespace.\n\t\t\t$id_string = preg_replace( '/\\s+/', '', $values['id'] );\n\t\t\t//* Explode the string into array.\n\t\t\t$id = explode( ',', $id_string );\n\t\t\t//* Set the array to the query.\n\t\t\t$args['post__in'] = $id;\n\t\t}\n\n\t\t$wp_query = new WP_Query( $args );\n\n\t\t//* Start the buffer.\n\t\tob_start();\n\n\t\tif ( $wp_query->have_posts() ) {\n\t\t\t?>\n\t\t\t<div class=\"entry-inner-container\">\n\t\t\t\t<?php\n\t\t\t\twhile ( $wp_query->have_posts() ) {\n\t\t\t\t\t$wp_query->the_post();\n\n\t\t\t\t\t$entry_image_id = get_post_thumbnail_id();\n\t\t\t\t\t$entry_image_object = wp_get_attachment_image_src( $entry_image_id, 'uwd-custom-medium' );\n\t\t\t\t\t$entry_image_src = $entry_image_object[0];\n\t\t\t\t\t$entry_image_width = $entry_image_object[1];\n\t\t\t\t\t$entry_image_height = $entry_image_object[2];\n\t\t\t\t\t$entry_image_alt = get_post_meta( $entry_image_id, '_wp_attachment_image_alt', true );\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"entry-inner-item\">\n\t\t\t\t\t\t<?php if ( $entry_image_id ) {\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<img class=\"entry-inner-item-image\" width=\"<?php echo $entry_image_width; ?>\"\n\t\t\t\t\t\t\t height=\"<?php echo $entry_image_height; ?>\"\n\t\t\t\t\t\t\t src=\"<?php echo $entry_image_src; ?>\" alt=\"<?php echo $entry_image_alt; ?>\"\n\t\t\t\t\t\t\t title=\"<?php echo $entry_image_alt; ?>\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t<h2 class=\"entry-inner-item-title\">\n\t\t\t\t\t\t\t<?php the_title(); ?>\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<div class=\"entry-inner-item-content\">\n\t\t\t\t\t\t\t<?php the_content(); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\n\t\t//* Get all the content.\n\t\t$html = ob_get_contents();\n\n\t\t//* Clean the buffer.\n\t\tob_end_clean();\n\n\t\t//* Reset the WP_Query.\n\t\twp_reset_postdata();\n\n\t\treturn $html;\n\t}", "function sp_postlist_sc( $atts ){\n\t\tglobal $post;\n\t\t\n\t\textract(shortcode_atts(array(\n\t\t\t'category' => '',\n\t\t\t'num' => ''\n\t\t),$atts));\t\n\t\t\n\t\t$output = '';\n\t\t$category_link = get_category_link( $category );\n\t\t\n\t\t$args = array(\n\t\t\t\t\t\t'cat' \t\t\t\t=> $category,\n\t\t\t\t\t\t'posts_per_page' \t=> $num\n\t\t\t\t );\n\t\tquery_posts( $args );\t\n\t\t\n\t\tif( have_posts() ) while ( have_posts() ) : the_post();\n\t\t\n\t\t$format = get_post_format();\n\t\t\n\t\t$post_thumb = get_post_thumbnail_id( $post->ID );\n\t\t$image_src = wp_get_attachment_image_src($post_thumb, 'large');\n\t\t$image = aq_resize( $image_src[0], 118, 118, true ); //resize & crop the image\n\t\t\n\t\t$output .= '<div class=\"pagelist-items\">';\n\t\t\n\t\tif ( ( function_exists( 'get_post_format' ) && 'audio' == get_post_format( $post->ID ) ) ) :\n\t\t\n\t\t$output .= do_shortcode( sp_get_custom_field( 'sp_audio_external', $post->ID ) );\n\t\t\n\t\telse:\n\t\t\n\t\t$output .= '<div class=\"one_third\">';\n\t\t\n\t\tif ( ( function_exists( 'get_post_format' ) && 'video' == get_post_format( $post->ID ) ) ) : \n\t\t$output .= '<a href=\"'.get_permalink().'\">';\n\t\t$output .= '<img src=\"http://img.youtube.com/vi/' . sp_get_custom_field( 'sp_video_id', $post->ID ) . '/0.jpg\" width=\"267\" height=\"175\" class=\"alignnone\" />';\n\t\t$output .= '</a>';\n\t\telse:\n\t\t\tif ($image) {\n\t\t\t$output .= '<a href=\"'.get_permalink().'\"><img src=\"' . $image . '\" class=\"alignnone\" /></a>';\n\t\t\t} else {\n\t\t\t$output .= '<img src=\"' . SP_BASE_URL . 'images/blank-pagelist-photo.gif\" width=\"118\" height=\"118\" alt=\"Blank photo\" class=\"alignnone\" />';\n\t\t\t}\n\t\tendif;\n\t\t\n\t\t$output .= '</div>';\n\t\t\n\t\t$output .= '<div class=\"two_third last\">';\n\t\t$output .= '<h3 class=\"name\"><a href=\"'.get_permalink().'\">' . get_the_title() .'</a></h3>';\n\n\t\t$output .= '<p>' . sp_excerpt_length(6) . '</p>';\n\t\t$output .= '<a href=\"'.get_permalink().'\" class=\"learn-more button\">' . __( 'Read more »', 'sptheme' ) . '</a>';\n\t\t\n\t\t$output .= '</div>';\n\t\t$output .= '<div class=\"clear\"></div>';\n\t\t\n\t\tendif; // end if audio post\n\t\t\n\t\t$output .= '</div>';\n\t\t\n\t\tendwhile;\n\n\t\twp_reset_query();\n\t\t\n\t\t$output .= '<a href=\"'.esc_url( $category_link ).'\" class=\"learn-more button\">' . __('See more ', 'sptheme') . get_the_title($post->ID) .'</a>';\n\n\t\treturn $output;\t \t \n\t}", "public function register_shortcodes(){\n\t\tadd_shortcode('upcoming_post_preview', array($this,'shortcode_display'));\n\t}", "function demolistposts_handler() {\n $demolph_output = demolistposts_function();\n //send back text to replace shortcode in post\n return $demolph_output;\n}", "public function featured_q_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\n\t\t$args = array(\n\t\t\t'posts_per_page' => 1,\n\t\t\t'post_type' => 'post',\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t'terms' => 'featured-q',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$my_posts = new WP_Query( $args );\n\n\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t?>\n\t\t\t<div class=\"nested-halves\">\n\t\t\t\t<div class=\"nested-one\">\n\t\t\t<h1 class=\"blog-title\"><a href=\"<?php the_permalink(); ?>\" class=\"crimson\"><?php echo get_the_title(); ?></a></h1>\n\t\t\t<p class=\"blog-excerpt\"><?php echo wp_trim_words( get_the_excerpt(), 72, '...' ); ?></p>\n\t\t\t<p class=\"rmore\"><a href=\"<?php the_permalink(); ?>\">Read more</a></p>\n\t\t</div>\n\t\t\t<div class=\"nested-two\">\n\t\t\t<?php echo get_the_post_thumbnail( $post_id, 'spine-large_size'); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php endwhile; endif;\n\n\t\twp_reset_query();\n\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "function dm_solution_news_shortcode($atts, $content = null) {\n\tglobal $post;\n\textract(shortcode_atts(array(\n\t\t'post_id' => ($post ? $post->ID : ''),\n\t\t'title' => \"In the News\",\n\t\t'limit' => 1,\n\t), $atts));\n\n\tif (!$post_id) {\n\t\treturn '';\n\t}\n\n\t$term_ids = dm_get_post_term_ids($post_id, 'solutions');\n\n\tif (empty($term_ids)) return '';\n\n\t$args = array(\n\t\t'post_status' => 'publish',\n\t\t'post_type' => 'post',\n\t\t'posts_per_page' => $limit,\n\t\t'orderby' => 'date',\n\t\t'order' => 'DESC',\n\t\t'tax_query' => array(\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'solutions',\n\t\t\t\t'field' => 'id',\n\t\t\t\t'terms' => $term_ids,\n\t\t\t)\n\t\t),\n\t);\n\t$query = new WP_Query($args);\n\n\tif (!$query->have_posts()) return '';\n\n\tob_start();\n?>\n\t<div class=\"sidebar_news_excerpt\">\n\t\t<?php while($query->have_posts()): $query->the_post(); ?>\n\t\t\t<p>\n\t\t\t\t<strong><?php echo $title; ?>:</strong>\n\t\t\t\t<?php the_title(); ?>\n\t\t\t\t<a href=\"<?php the_permalink(); ?>\">READ MORE &raquo;</a>\n\t\t\t</p>\n\t\t<?php endwhile; ?>\n\t</div>\n<?php\n\t$output = ob_get_clean();\n\treturn $output;\n}", "function bdpp_render_post_creative_1( $atts, $content = null ) {\n\n\t// Shortcode Parameters\n\t$atts = shortcode_atts(array(\n\t\t'post_type'\t\t\t\t=> BDPP_POST_TYPE,\n\t\t'taxonomy'\t\t\t\t=> BDPP_CAT,\n\t\t'cat_taxonomy'\t\t\t=> '',\n\t\t'type'\t\t\t\t\t=> '',\n\t\t'limit' \t\t\t\t=> 9,\n\t\t'grid' \t\t\t\t\t=> 3,\n\t\t'show_author' \t\t\t=> 'true',\n\t\t'show_comments'\t\t\t=> 'true',\n\t\t'show_category' \t\t=> 'true',\n\t\t'show_date' \t\t\t=> 'true',\n\t\t'link_behaviour'\t\t=> 'self',\n\t\t'sharing'\t\t\t\t=> '',\n\t\t'media_size' \t\t\t=> 'full',\n\t\t'lazyload'\t\t\t\t=> 'true',\n\t\t'order'\t\t\t\t\t=> 'DESC',\n\t\t'orderby'\t\t\t\t=> 'date',\n\t\t'category' \t\t\t\t=> array(),\n\t\t'exclude_cat'\t\t\t=> array(),\n\t\t'category_operator'\t\t=> 'IN',\n\t\t'include_cat_child'\t\t=> 'true',\n\t\t'posts'\t\t\t\t\t=> array(),\n\t\t'hide_post'\t\t\t\t=> array(),\n\t\t'author' \t\t\t\t=> array(),\n\t\t'exclude_author'\t\t=> array(),\n\t\t'sticky_posts'\t\t\t=> 'false',\n\t\t'query_offset'\t\t\t=> '',\n\t\t'css_class'\t\t\t\t=> '',\n\t\t'slider_screen'\t\t\t=> 640,\n\t\t'custom_param_1'\t\t=> '',\t// Custom Param Passed Just for Developer\n\t\t'custom_param_2'\t\t=> '',\n\t\t), $atts, 'bdp_post_ctv1');\n\n\t$sharing_designs\t\t\t\t= bdpp_sharing_designs();\n\t$allowed_post_types\t\t\t\t= ( $atts['type'] == 'trending' ) ? bdpp_get_option( 'trend_post_types', array() ) : bdpp_get_option( 'post_types', array() );\n\t$atts['shortcode']\t\t\t\t= 'bdp_post_ctv1';\n\t$atts['limit'] \t\t\t\t\t= bdpp_clean_number( $atts['limit'], 9, 'number' );\n\t$atts['grid']\t\t\t\t\t= bdpp_clean_number( $atts['grid'], 3 );\n\t$atts['grid']\t\t\t\t\t= ( $atts['grid'] <= 12 ) ? $atts['grid'] : 3;\n\t$atts['post_type']\t\t\t\t= !empty( $atts['post_type'] )\t\t\t\t? explode( ',', $atts['post_type'] )\t: array( BDPP_POST_TYPE );\n\t$atts['cat_taxonomy']\t\t\t= !empty( $atts['cat_taxonomy'] )\t\t\t? $atts['cat_taxonomy'] \t\t\t\t: $atts['taxonomy'];\n\t$atts['show_author'] \t\t\t= ($atts['show_author'] == 'false')\t\t\t? false\t\t\t\t\t\t\t\t\t: true;\n\t$atts['show_comments'] \t\t\t= ( $atts['show_comments'] == 'false' ) \t? false\t\t\t\t\t\t\t\t\t: true;\n\t$atts['show_date'] \t\t\t\t= ( $atts['show_date'] == 'false' ) \t\t? false\t \t\t\t\t\t\t\t\t: true;\n\t$atts['show_category'] \t\t\t= ( $atts['show_category'] == 'false' ) \t? false \t\t\t\t\t\t\t\t: true;\n\t$atts['lazyload']\t\t\t\t= ( $atts['lazyload'] == 'false' ) \t\t\t? false\t\t\t\t\t\t\t\t\t: true;\n\t$atts['link_behaviour']\t\t\t= ( $atts['link_behaviour'] == 'new' )\t\t? '_blank'\t\t\t\t\t\t\t\t: '_self';\n\t$atts['order'] \t\t\t\t\t= ( strtolower($atts['order']) == 'asc' ) \t? 'ASC' \t\t\t\t\t\t\t\t: 'DESC';\n\t$atts['orderby'] \t\t\t\t= !empty( $atts['orderby'] )\t\t\t\t? $atts['orderby'] \t\t\t\t\t\t: 'date';\n\t$atts['category'] \t\t\t\t= !empty( $atts['category'] )\t\t\t\t? explode(',', $atts['category']) \t\t: array();\n\t$atts['exclude_cat']\t\t\t= !empty( $atts['exclude_cat'] )\t\t\t? explode(',', $atts['exclude_cat'])\t: array();\n\t$atts['include_cat_child']\t\t= ( $atts['include_cat_child'] == 'false' )\t? false \t\t\t\t\t\t\t\t: true;\n\t$atts['posts']\t\t\t\t\t= !empty( $atts['posts'] )\t\t\t\t\t? explode(',', $atts['posts']) \t\t\t: array();\n\t$atts['hide_post']\t\t\t\t= !empty( $atts['hide_post'] )\t\t\t\t? explode(',', $atts['hide_post']) \t\t: array();\n\t$atts['author']\t\t\t\t\t= !empty( $atts['author'] )\t\t\t\t\t? explode(',', $atts['author']) \t\t: array();\n\t$atts['exclude_author']\t\t\t= !empty( $atts['exclude_author'] )\t\t\t? explode(',', $atts['exclude_author']) : array();\n\t$atts['sticky_posts'] \t\t\t= ($atts['sticky_posts'] == 'false')\t\t? true\t\t\t\t\t\t\t\t\t: false;\n\t$atts['query_offset']\t\t\t= !empty( $atts['query_offset'] )\t\t\t? $atts['query_offset'] \t\t\t\t: null;\t\n\t$atts['sharing'] \t\t\t\t= ( $atts['sharing'] && (array_key_exists(trim($atts['sharing']), $sharing_designs)) ) ? trim( $atts['sharing'] ) : false;\n\t$atts['slider_screen']\t\t\t= bdpp_clean_number( $atts['slider_screen'], 640 );\n\t$atts['css_class']\t\t\t\t= bdpp_sanitize_html_classes( $atts['css_class'] );\n\t$atts['unique'] \t\t\t\t= bdpp_get_unique();\n\t$atts['thumb_html']\t\t\t\t= '';\n\n\textract( $atts );\n\n\t// Taking some globals\n\tglobal $post;\n\n\t// Enqueue required scripts\n\tif( $sharing ) {\n\t\twp_enqueue_script( 'tooltipster' );\n\t}\n\twp_enqueue_script( 'jquery-owl-carousel' );\n\twp_enqueue_script( 'bdpp-public-script' );\n\tbdpp_enqueue_script();\n\n\t// Taking some variables\n\t$count \t\t\t= 0;\n\t$post_type_arr\t= array();\n\t$prefix \t\t= BDPP_META_PREFIX;\n\n\t// Processing post types\n\tif( !empty( $post_type ) ) {\n\t\tforeach ($post_type as $post_key => $post_val) {\n\t\t\t\n\t\t\t$post_val = bdpp_clean( $post_val );\n\t\t\t\n\t\t\tif( in_array( $post_val, $allowed_post_types ) ) {\n\t\t\t\t$post_type_arr[] = $post_val;\n\t\t\t}\n\t\t}\n\t\t$post_type_arr\t\t= array_unique( $post_type_arr );\n\t\t$atts['post_type']\t= $post_type_arr;\n\t}\n\n\t// WP Query Parameters\n\t$args = array(\n\t\t'post_type' \t\t=> $post_type_arr,\n\t\t'post_status' \t\t\t=> array('publish'),\n\t\t'order' \t\t=> $order,\n\t\t'orderby' \t\t=> $orderby,\n\t\t'posts_per_page' \t\t=> $limit,\n\t\t'post__in'\t\t \t\t=> $posts,\n\t\t'post__not_in'\t \t\t=> $hide_post,\n\t\t'author__in' \t=> $author,\n\t\t'author__not_in' \t\t=> $exclude_author,\t\t\n\t\t'offset'\t\t\t\t=> $query_offset,\n\t\t'no_found_rows'\t\t\t=> true,\n\t\t'ignore_sticky_posts'\t=> $sticky_posts,\n\t);\n\n // Category Parameter\n\tif( $category ) {\n\n\t\t$args['tax_query'] = array(\n\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t'taxonomy' \t\t\t=> $taxonomy,\n\t\t\t\t\t\t\t\t\t'terms' \t\t\t=> $category,\n\t\t\t\t\t\t\t\t\t'operator'\t\t\t=> $category_operator,\n\t\t\t\t\t\t\t\t\t'include_children'\t=> $include_cat_child,\n\t\t\t\t\t\t\t\t\t'field' \t\t\t=> ( isset($category[0]) && is_numeric($category[0]) ) ? 'term_id' : 'slug',\n\t\t\t\t\t\t\t\t));\n\n\t} else if( $exclude_cat ) {\n\t\t\n\t\t$args['tax_query'] = array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'taxonomy' \t\t\t=> $taxonomy,\n\t\t\t\t\t\t\t\t\t\t'terms' \t\t\t=> $exclude_cat,\n\t\t\t\t\t\t\t\t\t\t'operator'\t\t\t=> 'NOT IN',\n\t\t\t\t\t\t\t\t\t\t'include_children'\t=> $include_cat_child,\n\t\t\t\t\t\t\t\t\t\t'field' \t\t\t=> ( isset($exclude_cat[0]) && is_numeric($exclude_cat[0]) ) ? 'term_id' : 'slug',\n\t\t\t\t\t\t\t\t\t));\n\t}\n\n\t// For featured post\n\tif( $type == 'featured' ) {\n\n\t\t$args['meta_query'] = array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'key'\t=> $prefix.'feat_post',\n\t\t\t\t\t\t\t\t\t\t'value'\t=> 1,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\n\t} else if( $type == 'trending' ) {\n\n\t\t$args['orderby'] \t= ( $orderby == 'post_views' ) ? 'meta_value_num' : $orderby;\n\t\t$args['meta_query'] = array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'key'\t\t=> $prefix.'post_views',\n\t\t\t\t\t\t\t\t\t\t'value'\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t'compare' \t=> '>',\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t}\n\n\t$args = apply_filters( 'bdpp_post_ctv1_query_args', $args, $atts );\n\t$args = apply_filters( 'bdpp_posts_query_args', $args, $atts );\n\n\t// WP Query\n\t$query \t\t\t\t\t= new WP_Query( $args );\n\t$atts['max_num_pages'] \t= $query->max_num_pages;\n\n\tob_start();\n\n\t// If post is there\n\tif ( $query->have_posts() ) {\n\n\t\t\tbdpp_get_template( 'misc/creative-1/loop-start.php', $atts );\n\n\t\t\twhile ( $query->have_posts() ) : $query->the_post();\n\n\t\t\t\t$count++;\n\t\t\t\t$atts['count'] \t\t= $count;\n\t\t\t\t$atts['format']\t\t= bdpp_get_post_format();\n\t\t\t\t$atts['feat_img'] \t= bdpp_get_post_feat_image( $post->ID, $media_size, true );\n\t\t\t\t$atts['post_link'] \t= bdpp_get_post_link( $post->ID );\n\t\t\t\t$atts['cate_name'] \t= bdpp_get_post_terms( $post->ID, $cat_taxonomy );\n\n\t\t\t\t$atts['wrp_cls']\t= \"bdpp-col-nr-{$grid} bdpp-columns bdpp-post-{$atts['format']} bdpp-post-{$post->ID}\";\n\t\t\t\t$atts['wrp_cls']\t.= empty( $atts['feat_img'] )\t? ' bdpp-no-thumb'\t: '';\n\t\t\t\t$atts['wrp_cls']\t.=\t( is_sticky( $post->ID ) )\t? ' bdpp-sticky'\t: '';\n\n\t // Include Dsign File\n\t\t\t\tbdpp_get_template( \"misc/creative-1/creative-1.php\", $atts );\n\n\t\t\t\t// Creating Thumb HTML\n\t\t\t\tif( $atts['feat_img'] ) {\n\t\t\t\t\t$thumb_active\t= ( $count == 1 ) ? 'bdpp-post-ctv1-thumb-active' : '';\n\t\t\t\t\t$lazy_style\t\t= ( ! $lazyload ) ? 'style=\"background-image:url('.$atts['feat_img'].');\"' : '';\n\t\t\t\t\t\n\t\t\t\t\tif( $count == 1 ) {\n\t\t\t\t\t\t$atts['thumb_html'] .= '<div class=\"bdpp-post-ctv1-thumb bdpp-post-ctv1-thumb-'.$count .' '. $thumb_active.'\" style=\"background-image:url('.$atts['feat_img'].');\"></div>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$atts['thumb_html'] .= '<div class=\"bdpp-post-ctv1-thumb bdpp-post-ctv1-thumb-'.$count .' '. $thumb_active.'\" '.$lazy_style.'></div>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tendwhile;\n\n\t\t\tbdpp_get_template( 'misc/creative-1/loop-end.php', $atts );\n\n\t} // end of have_post()\n\n\twp_reset_postdata(); // Reset WP Query\n\n\t$content .= ob_get_clean();\n\treturn $content;\n}", "function cpt_casestudy() {\n\n \t$labels = array(\n \t\t'name' => _x( 'Case Studies', 'Post Type General Name', 'case_study' ),\n \t\t'singular_name' => _x( 'Case Study', 'Post Type Singular Name', 'case_study' ),\n \t\t'menu_name' => __( 'Case Studies', 'case_study' ),\n \t\t'name_admin_bar' => __( 'Case Study', 'case_study' ),\n \t\t'archives' => __( 'Case Study Archives', 'case_study' ),\n \t\t'attributes' => __( 'Case Study Attributes', 'case_study' ),\n \t\t'parent_item_colon' => __( 'Parent Case Study:', 'case_study' ),\n \t\t'all_items' => __( 'All Case Studies', 'case_study' ),\n \t\t'add_new_item' => __( 'Add New Case Study', 'case_study' ),\n \t\t'add_new' => __( 'Add New', 'case_study' ),\n \t\t'new_item' => __( 'New Case Study', 'case_study' ),\n \t\t'edit_item' => __( 'Edit Case Study', 'case_study' ),\n \t\t'update_item' => __( 'Update Case Study', 'case_study' ),\n \t\t'view_item' => __( 'View Case Study', 'case_study' ),\n \t\t'view_items' => __( 'View Case Studies', 'case_study' ),\n \t\t'search_items' => __( 'Search Case Study', 'case_study' ),\n \t\t'not_found' => __( 'Not found', 'case_study' ),\n \t\t'not_found_in_trash' => __( 'Not found in Trash', 'case_study' ),\n \t\t'featured_image' => __( 'Business Logo', 'case_study' ),\n \t\t'set_featured_image' => __( 'Set business logo', 'case_study' ),\n \t\t'remove_featured_image' => __( 'Remove business logo', 'case_study' ),\n \t\t'use_featured_image' => __( 'Use as business logo', 'case_study' ),\n \t\t'insert_into_item' => __( 'Insert into Case Study', 'case_study' ),\n \t\t'uploaded_to_this_item' => __( 'Uploaded to this Case Study', 'case_study' ),\n \t\t'items_list' => __( 'Case Studies list', 'case_study' ),\n \t\t'items_list_navigation' => __( 'Case Studies list navigation', 'case_study' ),\n \t\t'filter_items_list' => __( 'Filter Case Studies list', 'case_study' ),\n \t);\n \t$args = array(\n \t\t'label' => __( 'Case Study', 'case_study' ),\n \t\t'labels' => $labels,\n \t\t'supports' => array( 'title', 'thumbnail' ),\n \t\t'taxonomies' => array( 'case_study_categories' ),\n \t\t'hierarchical' => false,\n \t\t'public' => true,\n \t\t'show_ui' => true,\n \t\t'show_in_menu' => true,\n \t\t'menu_position' => 20,\n \t\t'menu_icon' => 'dashicons-analytics',\n \t\t'show_in_admin_bar' => true,\n \t\t'show_in_nav_menus' => true,\n \t\t'can_export' => true,\n \t\t'has_archive' => true,\n \t\t'exclude_from_search' => true,\n \t\t'publicly_queryable' => true,\n \t\t'rewrite' => false,\n \t\t'capability_type' => 'page',\n \t);\n \tregister_post_type( 'case_study', $args );\n\n }", "function dm_product_news_shortcode($atts, $content = null) {\n\tglobal $post;\n\textract(shortcode_atts(array(\n\t\t'post_id' => ($post ? $post->ID : ''),\n\t\t'title' => \"In the News\",\n\t\t'limit' => 1,\n\t), $atts));\n\n\tif (!$post_id) {\n\t\treturn '';\n\t}\n\n\t$term_ids = dm_get_post_term_ids($post_id, 'products');\n\n\tif (empty($term_ids)) return '';\n\n\t$args = array(\n\t\t'post_status' => 'publish',\n\t\t'post_type' => 'post',\n\t\t'posts_per_page' => $limit,\n\t\t'orderby' => 'date',\n\t\t'order' => 'DESC',\n\t\t'tax_query' => array(\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'products',\n\t\t\t\t'field' => 'id',\n\t\t\t\t'terms' => $term_ids,\n\t\t\t)\n\t\t),\n\t);\n\t$query = new WP_Query($args);\n\n\tif (!$query->have_posts()) return '';\n\n\tob_start();\n?>\n\t<div class=\"sidebar_news_excerpt\">\n\t\t<?php while($query->have_posts()): $query->the_post(); ?>\n\t\t\t<p>\n\t\t\t\t<strong><?php echo $title; ?>:</strong>\n\t\t\t\t<?php the_title(); ?>\n\t\t\t\t<a href=\"<?php the_permalink(); ?>\">READ MORE &raquo;</a>\n\t\t\t</p>\n\t\t<?php endwhile; ?>\n\t</div>\n<?php\n\t$output = ob_get_clean();\n\treturn $output;\n}", "protected function _content_template()\n {\n ?>\n <div>\n <ul class=\"elementor-portfolio__filters cat-filter-for-{{ settings.post_id }}\">\n <li class=\"elementor-portfolio__filter elementor-active\">{{{ settings.all_text }}}</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 1</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 2</li>\n </ul>\n </div>\n<?php\n }", "function pt_shortcode( $atts )\n\t\t{\n\t\t\treturn $this->pt_show_blc_front();\n\t\t}", "function blog_post_shortcode($atts) {\n // Defaults\n extract(shortcode_atts(array(\n\t \"no_of_post\" => '',\n\t \"order\" => 'desc',\n\t \"order_by\" => 'rand',\n\t \"excerpt_length\" => '80',\n\t \"link_text\" => 'Continue Reading'\n ), $atts));\n $paged = (get_query_var('paged')); \n $the_query = '';\n // de-funkify query\n $the_query = preg_replace('~&#x0*([0-9a-f]+);~ei', 'chr(hexdec(\"\\\\1\"))', $the_query);\n $the_query = preg_replace('~&#0*([0-9]+);~e', 'chr(\\\\1)', $the_query);\n \n \n\t$the_query = array(\n\t\t\"posts_per_page\" => $no_of_post,\n\t\t\"order\" => $order,\n\t\t\"orderby\" => $order_by,\n\t\t\"paged\" => $paged\n\t);\n // query is made \n query_posts($the_query);\n\n // Reset and setup variables\n $output = '';\n $temp_title = '';\n $temp_link = '';\n $temp_ex = '';\n $temp_content = '';\n $temp_thumb = '';\n $temp_id = '';\n\n // the loop\n $output = '';\n if (have_posts()) : while (have_posts()) : the_post();\n global $post;\n \t $temp_id = get_the_ID();\n $temp_title = get_the_title($temp_id);\n $temp_link = get_permalink($temp_id);\n $temp_content = ShortenText(strip_shortcodes(strip_tags(get_the_content($temp_id))), $excerpt_length) ;\n\t \n\t $meta = '<p>Posted by <span class=\"author\">';\n\t $meta .= '<a href=\" '. get_author_posts_url($post -> author). '\">'; \n\t $meta .= get_the_author_meta('display_name');\n\t $meta .= '</a></span>';\n\t \n\t \n\t $meta .= ' On '.get_the_time('F j, Y');\n\t $meta .= '</p>';\n\t $category = get_the_category_list(', ');\n\t \n\t \n\t \n $output .= '<article id=\"post-'.$temp_id.'\" class=\"post clearfix\" role=\"article\">\n \t<header>\n \t\t<h2 class=\"blogTitle\"><a href=\"'.$temp_link.'\" rel=\"bookmark\">'.$temp_title.'</a></h2>\n \t<div class=\"meta clearfix\">\n <div class=\"post-format-icon\"></div>\n\t\t\t\t\t\t '.$meta.'\n <p>Categories: '.$category.'</p> \n </div>\n </header>\n \n <div class=\"blogContent\">';\n \n $meta = get_post_meta($post->ID, 'drive_post_options', false);\n\t\t\t\t\t\n if( !empty($meta) )\n extract($meta[0]);\n\n $fcs_video = isset($fcs_video) ? $fcs_video : '';\n $fcs_audio = isset($fcs_audio) ? esc_url($fcs_audio) : '';\n\n if ( has_post_format( 'audio' ) ){\n if(!empty($fcs_audio)){\n $output .= '<div class=\"fcs-post-audio\">'.do_shortcode('[audio src=\"'. $fcs_audio .'\"]').'</div>';\n }\n }\n elseif ( has_post_format( 'video' ) ){\n if (!empty($fcs_video)) {\n $output .= '<div class=\"fcs-post-video\">'.$fcs_video.'</div>';\n }\n }\n else{\n if( has_post_thumbnail() && function_exists('dfi_get_featured_images') ) {\n \n \t$output .= '<div class=\"post-thumbnail\">\n <div class=\"flexslider\">\n <ul class=\"slides\">'; \n\t\t\t\t\t\t\t\n $img = '';\n // Checks if post has a feature image, grabs the feature-image and outputs that along with thumbnail SRC as a REL attribute \n if (has_post_thumbnail()) { // checks if post has a featured image and then outputs it. \n $image_id = get_post_thumbnail_id ($post->ID ); \n $image_thumb_url = wp_get_attachment_image_src( $image_id, 'full'); \n if(!empty($image_thumb_url))\n $img = aq_resize($image_thumb_url[0], 1100, 300, true, true); \n\n if($img){\n $output .= '<li><img src=\"' . $img . '\" alt=\"\"></li>';\n }else{\n $output .= '<li><img src=\"' . $image_thumb_url[0] . '\" alt=\"\"></li>'; \n }\n }\n\n \n if( function_exists('dfi_get_featured_images') ) {\n $featuredImages = dfi_get_featured_images();\n\n if(!empty($featuredImages)){\n\n foreach ($featuredImages as $featuredImage) {\n $img = aq_resize($featuredImage['full'], 817, 300, true, true);\n \n if($img){\n $output .= '<li><img src=\"' . $img . '\" alt=\"\"></li>';\n }else{\n $output .= '<li><img src=\"' . $featuredImage['full'] . '\" alt=\"\"></li>'; \n }\n }\n }\n }\n \n \n $output .= '</ul>\n </div><!-- end #slider -->\n </div>'; \n \n }\n }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\n $output .= '<p>'.$temp_content.'</p>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n \n $output .= '<a href=\"'.$temp_link.'\" class=\"permalink\" rel=\"bookmark\">'.$link_text.'</a>\n </div>\n </article>';\n\t\t\n\t\t\n\t\t\t\n endwhile; \n $output .= shortcode_nav( '<div class=\"sep\"></div><div class=\"pagination theme-style\">','</div><div class=\"sep\"></div>');\n else:\n $output .= \"Post not found.\";\n endif;\n wp_reset_query();\n return $output;\n}", "function khLess_shortcodes_init()\n{\n function khLess_shortcode($atts = [], $content = null)\n {\n get_template_part('template', 'schedule');\n }\n\n add_shortcode('khLess', 'khLess_shortcode');\n}", "function the_show( $before = '', $after = ': ' ) {\n global $post;\n echo get_the_show( $post->ID, $before, $after );\n}", "function displayTemplateColumn($column_name, $post_ID) { \n if ($column_name == 'template') { \n $pageTemplate = $this->getPageTemplate($post_ID); \n if ($pageTemplate) { \n echo $pageTemplate; \n } \n } \n }", "function Display_Shortcode_metabox() \n{\n\n ?>\n <div>\n <?php echo \"[FlipAnything id = \".get_the_id().\"]\"; ?>\n </div>\n <?php\n\n}", "function acf_get_post_templates()\n{\n}", "function tz_one_third( $atts, $content = null ) {\n return '<div class=\"one_third\">' . do_shortcode($content) . '</div>';\n}", "function otm_show_featured_posts() {\n\n\t$my_query = new WP_Query( array( \n\t\t'meta_key' \t\t\t\t=> 'is_featured',\n\t\t'post_type'\t\t\t\t=> 'post',\n\t\t'meta_value'\t\t\t=> true,\n\t\t'numberposts' \t\t=> 3\n\t) );\n\n\t// If our query has posts\n\tif ( $my_query->have_posts() ) :\n\t\twhile ( $my_query->have_posts() ) : $my_query->the_post();\n\n\t\t\t// Get specific template-part\n\t\t\tget_template_part( 'template-parts/post/content-featured' );\n\n\t\tendwhile;\n\tendif;\n\n\twp_reset_query();\n}", "public function get_shortcode() {\n\t\t$args = array();\n\t\tforeach ($this->args as $k => $v) {\n\t\t\t// Only include info if it's not the default... save space and easier to read shortcodes\n\t\t\tif (isset($this->defaults[$k]) && $this->defaults[$k] != $v) { // && (!empty($this->defaults[$k]) && !empty($v))) {\n\t\t\t\tif ( !empty($v) ) {\n\t\t\t\t\tif ( is_array($v) ) {\n\t\t\t\t\t\t$args[] = $k.'=\"'.implode(',', $v).'\"';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Direct filtering on a field\n\t\t\telseif (!isset($this->defaults[$k])) {\n\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$args = implode(' ', $args);\n\t\tif (!empty($args)) {\n\t\t\t$args = ' '.$args;\n\t\t}\n\t\treturn '[summarize-posts'.$args.']';\n\t}", "function tmiContentAreaShortCode( $atts) {\n $atts = shortcode_atts( array(\n \t'id' => '0',\n \t'slug' => ''\n \t), $atts, 'tmiContentArea' );\n $args = array('post_type' => 'tmi-content-Area',\n 'post_status' => 'publish',\n 'numberposts' => 1);\n if($atts['id'] != '0'){\n $args['ID'] = $atts['id'];\n }elseif($atts['slug'] != ''){\n $args['name'] = $atts['slug'];\n }else{\n return 'Please sepecify attribute ID or slug for shortcode';\n }\n // tmiDebug($args);\n $content = get_posts($args);\n if(is_array($content) && count($content) > 0){\n // tmiDebug($content);\n return apply_filters( 'the_content', $content[0]->post_content);\n }\n\treturn \"No data found\";\n }", "public function p_news_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 3,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'post',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'news-polymeric'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "function ibio_display_posts_with_short_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) {\n \n\t// Create a new title\n\t$short_title = get_field( 'short_title' );\n\tif ( $short_title > '' ) {\n\t\t$title = $short_title;\n\t}\n\t\n\t$url = get_the_permalink();\t\n\t$title = \"<h3 class='entry-title'><a href='$url'>$title</a></h3>\";\t\n\n\t// if the post we are displaying is an ibio custom post type, we want to use a div for the span tag normally used around an excerpt.\n\tglobal $post;\n\tif ( $post->post_type == IBioSession::$post_type\n\t || $post->post_type == IBioPlaylist::$post_type\n\t\t|| $post->post_type == IBioTalk::$post_type\n\t) {\n\t\t$excerpt = preg_replace( '/<span class=\"excerpt\"/', '<div class=\"excerpt\"' , $excerpt);\n\t\t$excerpt = preg_replace( '/<\\/span>$/', '</div>', $excerpt);\n\t}\n\t// Now let's rebuild the output\n\t$output = '<' . $inner_wrapper . ' class=\"' . implode( ' ', $class ) . '\">' . $image . $title . $date . $excerpt . $content . '</' . $inner_wrapper . '>';\n\n\n\t// Finally we'll return the modified output\n\treturn $output;\n}", "function echotheme_flexslider_shortcode($atts)\n{\n\tob_start();\n\tget_template_part('part', 'flexslider-gallery');\n\treturn ob_get_clean();\n}", "function iin_panels_extras_blog_related_posts_content_type_render($subtype, $conf, $panel_args, $context) {\n $pane = new stdClass();\n $pane->content = '';\n $arg1 = arg(1);\n $node = node_load($arg1);\n $category = $node->field_blog_category['und'][0]['tid'];\n\n if (!empty($category)) {\n $terms = db_query('SELECT nid FROM {taxonomy_index} WHERE tid = :tid AND nid != :nid ORDER BY created DESC LIMIT 3',\n array(':tid' => $category, ':nid' => $node->nid));\n $pane->content .= ' <h3 class=\"blog-related-posts-title\">Related Posts:</h3>';\n\n foreach ($terms as $term) {\n $term_node = node_load($term->nid);\n $image = (empty($term_node->field_special_featured_image)) ? $term_node->field_featured_image['und'][0] : $term_node->field_special_featured_image['und'][0];\n $image_style = image_style_url('blog_mobile_list', $image['uri']);\n\n $pane->content .= ' <div class=\"blog-related-posts-wrapper\">';\n $pane->content .= ' <div class=\"blog-related-posts-image\">' .\n l('<img alt=\"' . $image['alt'] . '\" src=\"' . $image_style . '\">',\n 'node/' . $term_node->nid, array('html' => TRUE))\n . '</div>';\n $pane->content .= ' <div class=\"blog-related-posts-content\">\n ' . l('<p class=\"blog-related-posts-title\">' . $term_node->title . '</p>', 'node/' . $term_node->nid, array('html' => TRUE)) . '\n </div>';\n $pane->content .= '</div>';\n }\n }\n\n return $pane;\n}", "function euforia_multimedia() {\n\n $labels = array(\n 'name' => _x( 'Euforia Multimedia', 'Post Type General Name', 'euforia' ),\n 'singular_name' => _x( 'Euforia Multimedia', 'Post Type Singular Name', 'euforia' ),\n 'menu_name' => __( 'Euforia Multimedia', 'euforia' ),\n 'name_admin_bar' => __( 'Euforia Multimedia', 'euforia' ),\n 'archives' => __( 'Euforia Multimedia historico', 'euforia' ),\n 'attributes' => __( 'Euforia Multimedia atributos', 'euforia' ),\n 'parent_item_colon' => __( 'Euforia Multimedia padre:', 'euforia' ),\n 'all_items' => __( 'Euforia Multimedia todos', 'euforia' ),\n 'add_new_item' => __( 'agregar Nuevo Euforia Multimedia', 'euforia' ),\n 'add_new' => __( 'Agregar Euforia Multimedia', 'euforia' ),\n 'new_item' => __( 'Nuevo Euforia Multimedia', 'euforia' ),\n 'edit_item' => __( 'Editar Euforia Multimedia', 'euforia' ),\n 'update_item' => __( 'Actualizar Euforia Multimedia', 'euforia' ),\n 'view_item' => __( 'Ver Euforia Multimedia', 'euforia' ),\n 'view_items' => __( 'Ver todos Euforia Multimedia', 'euforia' ),\n 'search_items' => __( 'Buscar Euforia Multimedia', 'euforia' ),\n 'not_found' => __( 'No se encuentra', 'euforia' ),\n 'not_found_in_trash' => __( 'No se encuentra en papelera', 'euforia' ),\n 'featured_image' => __( 'Imagen destacada', 'euforia' ),\n 'set_featured_image' => __( 'Colocar imagen destacada', 'euforia' ),\n 'remove_featured_image' => __( 'Remover imagen destacada', 'euforia' ),\n 'use_featured_image' => __( 'Use como imagen destacada', 'euforia' ),\n 'insert_into_item' => __( 'Insertar en Euforia Multimedia', 'euforia' ),\n 'uploaded_to_this_item' => __( 'Subido a Euforia Multimedia', 'euforia' ),\n 'items_list' => __( 'Euforia Multimedia Listado', 'euforia' ),\n 'items_list_navigation' => __( 'Euforia Multimedia listado navegacion', 'euforia' ),\n 'filter_items_list' => __( 'Filtro Euforia Multimedia lista', 'euforia' ),\n );\n $rewrite = array(\n 'slug' => 'euforia-multimedia',\n 'with_front' => true,\n 'pages' => true,\n 'feeds' => true,\n );\n $args = array(\n 'label' => __( 'Euforia Multimedia', 'euforia' ),\n 'description' => __( 'Sección multimedia del sitio para Euforia', 'euforia' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'excerpt', 'thumbnail', 'post-formats' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => get_template_directory_uri() . '/images/favicon-16x16.png',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'query_var' => 'multimedia',\n 'rewrite' => $rewrite,\n 'capability_type' => 'post',\n );\n register_post_type( 'euforia_mm', $args );\n\n}", "function gallery_section_shortcode( $atts, $content = null ) {\t\n\t$output = '<li>';\n\t$output .= do_shortcode($content);\n\t$output .= '</li>';\n\treturn $output;\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div class=\"view-full-post\"><a href=\"'. get_permalink($post->ID) . '\" class=\"view-full-post-btn\">Skaityti</a></div>';\n}", "function display( array $atts , $content = '' ){\r\n\r\n ob_start();\r\n\r\n if( $atts['title'] && ! Better_Framework::widget_manager()->get_current_sidebar() && $atts['show_title'] ){\r\n $atts['element-type'] = $this->id;\r\n echo apply_filters( 'better-framework/shortcodes/title', $atts );\r\n }\r\n\r\n $height = 65;\r\n if( $atts['show_faces'] == true ){\r\n $height += 175;\r\n }\r\n if( $atts['show_posts'] == true ){\r\n $height += 350;\r\n }\r\n\r\n ?>\r\n <div class=\"bf-shortcode bf-shortcode-likebox style-<?php echo $atts['style']; ?>\">\r\n <div class=\"the-content\">\r\n <iframe src=\"https://www.facebook.com/plugins/likebox.php?href=<?php echo urlencode( $atts['url'] ) ?>&amp;width=270&amp;height=<?php echo $height; ?>&amp;show_faces=<?php echo $atts['show_faces']; ?>&amp;colorscheme=<?php echo $atts['style']; ?>&amp;stream=<?php echo $atts['show_posts']; ?>&amp;show_border=<?php echo $atts['show_border']; ?>&amp;header=<?php echo $atts['show_header']; ?>\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:100%; height:<?php echo $height; ?>px;\" allowTransparency=\"true\"></iframe>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n return ob_get_clean();\r\n }", "public function shortcode_display($atts, $contet = '', $tag){\n\t\t\n\t\t$html = '';\n\t\t//our main upcoming preview shortcode\n\t\tif($tag == 'upcoming_post_preview'){\n\t\t\t\t\n\t\t\t//define default arguments\n\t\t\t$arguments = shortcode_atts(array(\n\t\t\t\t'number_of_previews'\t=> 1,\n\t\t\t\t'post_id'\t\t\t\t=> false\n\t\t\t\t), $atts, $tag);\n\t\t\t\t\n\t\t\t//build output\n\t\t\t$html .= $this->get_upcoming_post_preview($arguments);\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "function historias_consultants_shortcode( $atts ) {\n ob_start();\n\n extract( shortcode_atts( array (\n 'type' => 'consultant',\n 'order' => 'ASC',\n 'orderby' => 'title',\n 'posts' => -1,\n ), $atts ) );\n\n $options = array(\n 'post_type' => $type,\n 'order' => $order,\n 'orderby' => $orderby,\n 'posts_per_page' => $posts,\n );\n\n $query = new WP_Query( $options );\n if ( $query->have_posts() ) { ?>\n <div class=\"media-container\">\n <?php while ( $query->have_posts() ) : $query->the_post(); ?>\n <div <?php post_class('media'); ?>>\n <?php if ( has_post_thumbnail() ) : ?>\n <div class=\"img\">\n <?php $thumbnail_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'medium' ); ?>\n <div class=\"consultant__avatar\" style=\"background-image:url(<?php echo $thumbnail_url[0] ?>)\">\n </div>\n </div>\n <?php endif ?>\n <div class=\"bd\">\n <h3 class=\"consultant__name\"><?php the_title(); ?></h3>\n <?php the_content(); ?>\n <?php edit_post_link( sprintf( __( '%s Edit', 'historias' ), '<i class=\"fa fa-pencil\"></i>' ) ); ?>\n </div>\n </div>\n <?php endwhile;\n wp_reset_postdata(); ?>\n </div>\n <?php $myvariable = ob_get_clean();\n return $myvariable;\n }\n}", "public function render_post_list( $atts ) {\n $id = $atts['id'];\n $meta = get_post_meta( $id );\n $post = get_post( $id );\n\n $context = $this->fetch_base_config( $id, $post );\n $context['selector'] = 'feed' . $id;\n $context = $this->fetch_module_config( $context, $id );\n $context = $this->fetch_btn_config( $context, $id, $meta );\n $context['post_list_layout'] = get_post_meta( $id, 'yali_cdp_post_list_layout', true);\n\n //$this->debug($context );\n return Twig::render( 'content_blocks/post-list.twig', $context );\n }", "function custom_loop_shortcode_get_posts($atts){\n\n // get global post variable\n global $post;\n\n // define shortcode variable\n extract(shortcode_atts(array(\n 'posts_per_page' => 5,\n 'orderby' => 'date'\n ), $atts));\n\n // define get_posts parameters\n $args = array(\n 'posts_per_page' => $posts_per_page,\n 'orderby' => $orderby\n );\n\n // get the posts\n $posts = get_posts($args);\n\n // begin output variable\n $output = '<h3>Custom Loop Example: get_posts()</h3>';\n $output .= '<ul>';\n\n // loop thru posts\n foreach($posts as $post){\n\n // prepare post data\n setup_postdata($post);\n\n // continue output\n $output .= '<li><a href=\"' . get_permalink() . '\">' . get_the_title() . '</a></li>';\n\n }\n\n // reset post data\n wp_reset_postdata();\n\n // complete output variable\n $output .= '</ul>';\n\n // return output\n return $output;\n}", "function _show_post_preview()\n {\n }", "function flatsome_single_page_header(){\n if(is_singular('post') && get_theme_mod('blog_post_style') == 'top'){\n\t\techo get_template_part( 'template-parts/posts/partials/single-featured', get_theme_mod('blog_post_style'));\n\t}\n}", "public function p_pub_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 4,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'wsuwp_uc_publication',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'polymeric-materials-publications'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "function sm_shortcode( $atts ) {\n\t$a = shortcode_atts( array(\n\t\t'post-id' => get_the_ID() ,\n\t\t'key' => '',\n\t\t'single' => false,\n ), $atts );\t\n \n return get_post_meta( $a[\"post-id\"], $a[\"key\"], $a[\"post-id\"] ) ;\n\n}", "function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}", "function pm_blog_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'number_of_post' => '',\n\t\t'exclude' \t\t => '',\n\t\t'class'\t\t\t => '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm-team';\n\n\t// Retrieving user define classes\n\t$classes = array( 'row about-content' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\t<div id=\"journal\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"twelve columns\">\n\t\t\t\t<div id=\"blog-wrapper\" class=\"bgrid-third s-bgrid-half mob-bgrid-whole group\">\n\t\t\t\t\t<?php \n\t\t\t\t\t$cat_exclude = str_replace(',', ' ', $exclude);\n\t\t\t\t\t$cat_excludes = explode( \" \", $cat_exclude );\n\t\t\t\t\t//start query..\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\t'post_type'\t\t\t\t=> 'post',\n\t\t\t\t\t\t'posts_per_page'\t\t=> $number_of_post,\n\t\t\t\t\t\t'post_status'\t\t\t=> 'publish',\n\t\t\t\t\t\t'order'\t\t\t\t\t=> 'DESC',\n\t\t\t\t\t\t'category__not_in' \t\t=> $cat_excludes\n\t\t\t\t\t);\n\n\t\t\t\t\t$count_posts = wp_count_posts();\n\t\t\t\t\t$published_posts = $count_posts->publish;\n\n\t\t\t\t\t$data = new WP_Query( $args );\n\n\t\t\t\t\tif( $data->have_posts() ) :\n\t\t\t\t\t\twhile( $data->have_posts() ) : $data->the_post(); ?>\n\n\t\t\t\t\t\t<article id=\"post-<?php the_ID(); ?>\" <?php post_class( 'bgrid' ); ?>>\n\t\t\t\t\t\t\t<h5> <?php the_time('F d, Y'); ?></h5>\n\t\t\t\t\t\t\t<h3><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></h3>\n\n\t\t\t\t\t\t\t<p><?php echo wp_trim_words( get_the_excerpt(), 37 ); ?></p>\n\t\t\t\t\t\t</article> \n\n\t\t\t\t<?php \n\t\t\t\t\t\tendwhile;\n\t\t\t\t\tendif;\n\t\t\t\t\twp_reset_postdata();\t\n\t\t\t\t ?>\n\t\t\t\t</div> <!-- /blog-wrapper -->\n\t\t\t\t<?php if( $published_posts > $number_of_post ) : ?>\n\t\t\t\t\t<p class=\"position-y\"><a href=\"<?php echo esc_url( get_permalink( get_option( 'page_for_posts' ) ) ); ?>\" class=\"button orange\">View More</a></p>\n\t\t\t\t<?php endif; ?>\n\t\t\t</div> <!-- /twelve -->\n\t\t</div> <!-- /row -->\n\t</div> <!-- /blog -->\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "function display( array $atts, $content = '' ) {\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-better-newsticker', $atts );\n\n\t\tpublisher_get_view( 'shortcodes', 'better-newsticker' );\n\n\t\tpublisher_clear_props();\n\t\tpublisher_clear_query();\n\n\t\treturn ob_get_clean();\n\t}", "function nt_mass_listing_shortcode( $atts ) {\n ob_start();\n\t\t$current_user = get_current_user_id();\n\n\n\t\t//Admin and editor users can view all notes\n\t\tif(current_user_can('edit_posts')) {\n\t\t\t$args = array(\n\t\t\t\t\t'post_type' => 'coursenote',\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'post_status' => array('draft'),\n\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t'orderby' => 'title',\n\n\t\t\t);\n\t\t}\n\t\t//Viewer can only see their notes\n\t\telse {\n\t\t\t$args = array(\n\t\t\t\t\t'post_type' => 'coursenote',\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'post_status' => array('draft'),\n\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t'orderby' => 'title',\n\t\t\t\t\t'author__in' => $current_user\n\t\t\t);\n\t\t}\n\n\n\n $query = new WP_Query($args);\n if ( $query->have_posts() ) { ?>\n <ul class=\"notes-listing\">\n <?php while ( $query->have_posts() ) : $query->the_post(); ?>\n <li id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\n <a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a>\n </li>\n <?php endwhile;\n wp_reset_postdata(); ?>\n </ul>\n <?php $nt_mass_list = ob_get_clean();\n return $nt_mass_list;\n }\n}", "function custom_loop_shortcode_get_posts( $atts ) {\n\t\n\t// get global post variable\n\tglobal $post;\n\t\n\t// define shortcode variables\n\textract( shortcode_atts( array( \n\t\t\n\t\t'posts_per_page' => 5,\n\t\t'orderby' => 'date',\n\t\t\n\t), $atts ) );\n\t\n\t// define get_post parameters\n\t$args = array( 'posts_per_page' => $posts_per_page, 'orderby' => $orderby );\n\t\n\t// get the posts\n\t$posts = get_posts( $args );\n\t\n\t// begin output variable\n\t$output = '<h3>Custom Loop Example: get_posts()</h3>';\n\t$output .= '<ul>';\n\t\n\t// loop thru posts\n\tforeach ( $posts as $post ) {\n\t\t\n\t\t// prepare post data\n\t\tsetup_postdata( $post );\n\t\t\n\t\t// continue output variable\n\t\t$output .= '<li><a href=\"'. get_permalink() .'\">'. get_the_title() .'</a></li>';\n\t\t\n\t}\n\t\n\t// reset post data\n\twp_reset_postdata();\n\t\n\t// complete output variable\n\t$output .= '</ul>';\n\t\n\t// return output\n\treturn $output;\n\t\n}", "function prefix_render_callback( $post ) {\n\t \n\t\tinclude( plugin_dir_path( __FILE__ ).'../../templates/partials/car-tease.php');\n\t \n\t}", "function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}", "function create_easyvideo_cpt() {\n\n $labels = array(\n 'name' => _x( 'Easy Videos', 'Post Type General Name', 'easycoupons' ),\n 'singular_name' => _x( 'Easy Video', 'Post Type Singular Name', 'easycoupons' ),\n 'menu_name' => _x( 'Easy Videos', 'AdminLoader Menu text', 'easycoupons' ),\n 'name_admin_bar' => _x( 'Easy Video', 'Add New on Toolbar', 'easycoupons' ),\n 'archives' => __( 'Easy Video Archives', 'easycoupons' ),\n 'attributes' => __( 'Easy Video Attributes', 'easycoupons' ),\n 'parent_item_colon' => __( 'Parent Easy Video:', 'easycoupons' ),\n 'all_items' => __( 'All Easy Videos', 'easycoupons' ),\n 'add_new_item' => __( 'Add New Easy Video', 'easycoupons' ),\n 'add_new' => __( 'Add New', 'easycoupons' ),\n 'new_item' => __( 'New Easy Video', 'easycoupons' ),\n 'edit_item' => __( 'Edit Easy Video', 'easycoupons' ),\n 'update_item' => __( 'Update Easy Video', 'easycoupons' ),\n 'view_item' => __( 'View Easy Video', 'easycoupons' ),\n 'view_items' => __( 'View Easy Videos', 'easycoupons' ),\n 'search_items' => __( 'Search Easy Video', 'easycoupons' ),\n 'not_found' => __( 'Not found', 'easycoupons' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'easycoupons' ),\n 'featured_image' => __( 'Featured Image', 'easycoupons' ),\n 'set_featured_image' => __( 'Set featured image', 'easycoupons' ),\n 'remove_featured_image' => __( 'Remove featured image', 'easycoupons' ),\n 'use_featured_image' => __( 'Use as featured image', 'easycoupons' ),\n 'insert_into_item' => __( 'Insert into Easy Video', 'easycoupons' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this Easy Video', 'easycoupons' ),\n 'items_list' => __( 'Easy Videos list', 'easycoupons' ),\n 'items_list_navigation' => __( 'Easy Videos list navigation', 'easycoupons' ),\n 'filter_items_list' => __( 'Filter Easy Videos list', 'easycoupons' ),\n );\n $args = array(\n 'label' => __( 'Easy Video', 'easycoupons' ),\n 'description' => __( '', 'easycoupons' ),\n 'labels' => $labels,\n 'menu_icon' => 'dashicons-video-alt3',\n 'supports' => array('title','thumbnail'),\n 'taxonomies' => array(),\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 100,\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => true,\n 'has_archive' => false,\n 'hierarchical' => false,\n 'exclude_from_search' => true,\n 'show_in_rest' => false,\n 'publicly_queryable' => false,\n 'capability_type' => 'post',\n );\n\n register_post_type( 'easy-video', $args );\n\n }", "function cah_news_display_post($post, $dept=0) {\r\n if (!is_object($post)) {\r\n return;\r\n }\r\n\r\n $title = $post->title->rendered;\r\n $excerpt = cah_news_excerpt($post->excerpt->rendered);\r\n \r\n $link = $post->link;\r\n if ($dept) {\r\n $link = add_query_arg(['dept' => $dept], $link);\r\n }\r\n $link = esc_url($link);\r\n \r\n $date = date_format(date_create($post->date), 'F d, Y');\r\n $thumbnail = '';\r\n // // $thumbnail = $post.embedded.{'wp:featuredmedia'}.media_details.sizes.thumbnail.source_url;\r\n if (isset($post->_embedded->{'wp:featuredmedia'}[0]->media_details->sizes->thumbnail->source_url))\r\n {\r\n $thumbnail = $post->_embedded->{'wp:featuredmedia'}[0]->media_details->sizes->thumbnail->source_url;\r\n }\r\n\t\r\n\t// Looking to see if it links to an outside page\r\n\t$links_to = (bool) get_post_meta( $post->id, '_links_to', true );\r\n\t$links_to_target = (bool) get_post_meta( $post->id, '_links_to_target', true) == \"_blank\";\r\n\r\n ?>\r\n\r\n <a class=\"cah-news-item\" href=\"<?=$link?>\"<?= $links_to && $links_to_target ? 'target=\"_blank\" rel=\"noopener\"' : ''?>>\r\n <div class=\"media py-3 px-2\">\r\n <?\r\n if ($thumbnail) {\r\n echo '<img data-src=\"' . $thumbnail . '\" class=\"d-flex align-self-start mr-3\" aria-label=\"Featured image\">';\r\n echo '<noscript><img src=\"' . $thumbnail . '\" width=\"150\" height=\"150\" class=\"d-flex align-self-start mr-3\" aria-label=\"Featured image\"></noscript>';\r\n }\r\n else {\r\n echo '<input type=\"hidden\" value=\"' . get_the_post_thumbnail_url( $post->ID ) . '\">';\r\n }\r\n ?>\r\n <div class=\"media-body\">\r\n <h5 class=\"mt-0\"><?=$title?></h5>\r\n <p>\r\n <span class=\"text-muted\"><?=$date?>&nbsp;</span>\r\n <span class=\"cah-news-item-excerpt\"><?=$excerpt?></span>\r\n </p>\r\n </div>\r\n </div>\r\n </a>\r\n <?\r\n}", "function single_post_title($prefix = '', $display = \\true)\n {\n }", "function quasar_frontend_init(){\n\tadd_post_type_support( 'post', 'excerpt');\n}", "function voyage_mikado_get_single_html() {\n\n $post_format = get_post_format();\n $supported_post_formats = array('audio', 'video', 'link', 'quote', 'gallery');\n if(in_array($post_format, $supported_post_formats)) {\n $post_format = $post_format;\n } else {\n $post_format = 'standard';\n }\n\t\t$params = array();\n\t\t$params['time_j'] = 'j';\n\t\t$params['time_m'] = 'M';\n\n //Related posts\n $related_posts_params = array();\n $show_related = (voyage_mikado_options()->getOptionValue('blog_single_related_posts') == 'yes') ? true : false;\n if($show_related) {\n $hasSidebar = voyage_mikado_sidebar_layout();\n $post_id = get_the_ID();\n $related_post_number = ($hasSidebar == '' || $hasSidebar == 'default' || $hasSidebar == 'no-sidebar') ? 4 : 3;\n $related_posts_options = array(\n 'posts_per_page' => $related_post_number\n );\n $related_posts_params = array(\n 'related_posts' => voyage_mikado_get_related_post_type($post_id, $related_posts_options)\n );\n }\n\n $single_options_template = voyage_mikado_options()->getOptionValue('blog_single_type');\n\n voyage_mikado_get_module_template_part('templates/single/post-formats/'.$post_format, 'blog', $single_options_template, $params);\n voyage_mikado_get_module_template_part('templates/single/parts/author-info', 'blog');\n voyage_mikado_get_single_post_navigation_template();\n if($show_related) {\n voyage_mikado_get_module_template_part('templates/single/parts/related-posts', 'blog', '', $related_posts_params);\n }\n comments_template('', true);\n\n }", "public function se_news_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 3,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'post',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'news-structural-engineering'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "function pageblock_func( $atts ) {\n\nextract( shortcode_atts( array(\n'pageid' => '{$pageid}',\n'displaytype' => '{$displaytype}',\n'showcontent' => '{$showcontent}',\n'colourthumbs' => '{$colourthumbs}',\n'css' => ''\n), $atts ) );\n$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $atts );\n\n$args = array(\n'page_id' => $pageid,\n);\n$output;\nglobal $post;\n$loop = new WP_Query( $args );\nif ( $loop->have_posts() ) {\n$isinternation = get_post_meta($post->ID, '_internationalPage', true);\n\n\t\n\t$output .= \"<div class='\".esc_attr( $css_class ).\"'>\";\nwhile ( $loop->have_posts() ) : $loop->the_post();\n\nif($isinternation == 1 && !empty(get_post_meta($post->ID, '_subheadtwo', true))) {\n$thetitle = get_post_meta($post->ID, '_subheadtwo', true);\t\n} else {\n$thetitle = get_the_title();\t\n}\n\tif (isset($GLOBALS['styles'])) {\n\t$GLOBALS['styles'] = $GLOBALS['styles'];\n\t } else {\n\t$GLOBALS['styles'] = '';\t\n\t}\n\t\n\t\n\t$colour = get_post_meta($post->ID, '_pagecolour', true);\n\t$GLOBALS['styles'] .= \".media.list.media-\".get_the_ID().\" .cover{ background:\".$colour.\";}\";\n\n\t$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );\n$url = $thumb['0'];\n$GLOBALS['styles'] .= \".media-\".get_post_type().\".media-\".get_the_ID().\" .media-left{ background:url(\".$url.\"); background-size:cover; background-position:center center;}\";\n\nif ('people' == get_post_type() || $displaytype == \"medialist\" ) {\n\trequire get_template_directory() . '/assets/inc/plugins/vc-intergration/modules/shortcode-templates/media-list.php';\n\t\n} elseif($displaytype == \"medialistnoimage\" ) {\n\trequire get_template_directory() . '/assets/inc/plugins/vc-intergration/modules/shortcode-templates/media-list-no-image.php';\n\n\t\n} elseif($displaytype == \"list\") { \n\n\trequire get_template_directory() . '/assets/inc/plugins/vc-intergration/modules/shortcode-templates/list.php';\n\n\n}else {\n\trequire get_template_directory() . '/assets/inc/plugins/vc-intergration/modules/shortcode-templates/overlay-grid.php';\n\t\t\n}\nendwhile;\n\t$output .= \"</div>\";\n\n}\nreturn $output;\n}", "function endcore_socialbuttons_shortcode($atts, $content = null) {\n if(is_admin()) {\n return;\n }\n\n\tob_start();\t\n\tget_template_part('parts/stuff/code', 'social');\n\t$output = ob_get_contents();\n\tob_end_clean();\n\treturn $output;\n}", "function render_post_item( $post, $in_pool=false ) {\n\t\t?>\n\t\t<div class=\"post\" data-id=\"<?php echo $post->ID; ?>\">\n\t\t\t<div class=\"actions\">\n\t\t\t\t<a data-action=\"remove\" class=\"remove\">&#8722;</a><a data-action=\"add\" class=\"add\">+</a>\n\t\t\t</div>\n\n\t\t\t<div class=\"minified-view\">\n\t\t\t\t<?php echo get_the_post_thumbnail( $post->ID, 'pr_advance_ui_thumb' ); ?>\n\t\t\t\t<h5 class=\"title\"><?php echo get_the_title( $post->ID ); ?></h5>\n\t\t\t\t<div class=\"meta\">\n\t\t\t\t\t<small class=\"post-type\"><?php \n\t\t\t$post_type = get_post_type_object( get_post_type( $post ) );\n\t\t\techo esc_html( $post_type->labels->singular_name ); ?></small>\n\t\t\t\t\t<span class=\"sep\">|</span>\n\t\t\t\t\t<small class=\"date\"><?php echo mysql2date(get_option('date_format'), $post->post_date); ?></small>\n\t\t\t\t\t<span class=\"sep\">|</span>\n\t\t\t\t\t<small class=\"expand\" data-action=\"toggle-expanded\" data-show-text=\"<?php esc_attr_e('Expand', 'post-relationships'); ?>\" data-hide-text=\"<?php esc_attr_e('Hide', 'post-relationships'); ?>\">Expand</small>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"expanded-view\"><div class=\"inner\">\n\t\t\t\t<?php echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); ?>\n\t\t\t\t<?php echo apply_filters('the_content', $post->post_content ); ?>\n\t\t\t</div></div>\n\t\t\t\n\t\t</div>\n\t\t<?php\n\t}", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n ?>\n\t\t<div class=\"happyden-feature-image\">\n\t\t\t\t<?php the_post_thumbnail( get_the_Id(), 'full' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "public function se_pub_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 4,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'wsuwp_uc_publication',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'structural-engineering-publications'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "function ucf_post_list_display_gallery_before($content, $posts, $atts)\n{\n ob_start();\n ?>\n <div class=\"ucf-post-list card-layout\" id=\"post-list-<?php echo $atts['list_id']; ?>\">\n <?php\n return ob_get_clean();\n}", "protected function render()\n {\n global $post;\n $page = get_post($post->ID);\n $path = '/wp-content/plugins/elementor-custom-widgets/';\n $settings = $this->get_settings_for_display();\n $this->add_inline_editing_attributes('paragraphText', 'none');\n\n $pageList = get_pages(\"child_of=\".$post->post_parent.\"&parent=\".$post->post_parent.\"&sort_column=menu_order&sort_order=asc\");\n ?>\n\n <div class=\"tabs tabs-article\" data-tabs=\"secondary\">\n <div data-tab=\"blog\" class=\"blog active\">\n <div class=\"hero\">\n </div>\n\n <div class=\"columnar\">\n <div class=\"columns-twelve\">\n <a href=\"<?php echo getTabLinkByCategoryId($page->post_parent); ?>\" class=\"article-category\">\n <?php echo get_the_title($page->post_parent); ?>\n </a>\n <h1><?php echo $page->post_title; ?></h1>\n <div class=\"subtitle-article\"><?php echo $settings['page_subtitle']; ?></div>\n </div>\n </div>\n\n <div class=\"columnar article-share\">\n <div class=\"share-social-info columns-four-one\">\n <div class=\"photo\">\n <?php\n $twitter = get_the_author_meta('twitter', $page->post_author);\n $avatar = get_avatar($page->post_author);\n echo $avatar;\n ?>\n </div>\n <div class=\"text-wrap\">\n <div class=\"text\"><?php echo get_the_author_meta('nicename'); ?></div>\n <a target=\"_blank\"\n href=\"https://twitter.com/<?php echo $twitter; ?>\">@<?php echo $twitter; ?></a>\n </div>\n </div>\n\n <div class=\"share-social-icons columns-four-nine\">\n <?php include plugin_dir_path( __FILE__ ) . 'share-social-icons-section.php'; ?>\n </div>\n </div>\n\n <div class=\"columnar article-img\">\n <div class=\"columns-twelve\">\n <img style=\"width: 100%\" src=\"<?php echo get_the_post_thumbnail_url($page->ID, 'large'); ?>\">\n <p>Source</p>\n </div>\n </div>\n\n <div class=\"columnar article-date\">\n <div class=\"columns-eight\">\n <?php\n $date = $page->post_date;\n $unixTimestamp = strtotime($date);\n $dayOfWeek = date(\"l\", $unixTimestamp);\n ?>\n <p>PUBLISHED\n <?php echo strtoupper($dayOfWeek);\n echo ' '.get_the_date('', $page->ID);\n echo ' / '.get_post_time('i:h A T', true, $page->ID);\n ?></p>\n </div>\n </div>\n <div class=\"columnar article-content\">\n <div class=\"columns-eight\">\n <p><?php echo $settings['blog_content_top']; ?></p>\n <div class=\"wp-block-considerable-quote left\">\n <div class=\"quote\"><?php echo $settings['the_quote']; ?></div>\n </div>\n\n <?php\n echo $settings['blog_content_middle'];\n $pages = [];\n foreach ($pageList as $page) {\n $pages[] = $page->ID;\n }\n $randPageIndex = array_rand($pages, 1);\n $randPage = $pages[$randPageIndex];\n $marker = true;\n $count = count($pages);\n\n if ($randPage === $post->ID && $count > 1) {\n while ($marker) {\n $randPageIndex = array_rand($pages, 1);\n $randPage = $pages[$randPageIndex];\n if ($randPage !== $post->ID) {\n $marker = false;\n }\n }\n }\n if ($count > 1) { ?>\n <div class=\"wp-block-article\">\n <div class=\"article-card-thumb\"><img\n src=\"<?php echo get_the_post_thumbnail_url($randPage, 'large'); ?>\">\n </div>\n <div class=\"blog-card-desc\">\n <div class=\"blog-card-excerpt single-page\">\n <?php echo get_the_title($randPage); ?>\n </div>\n <a href=\"<?php echo get_page_link($randPage); ?>\" class=\"blog-card-link\">\n Read More\n <img src=\"https://cdn.permission.io/apps/permissionbase/assets/icons/chevron-right.svg\">\n </a>\n </div>\n </div>\n <?php } ?>\n\n <?php echo $settings['blog_content_bottom']; ?>\n\n <?php\n $tags = get_post_meta($post->ID, 'tags', true);\n $allTags = explode(', ', $tags);\n $lastElement = end($allTags);\n ?>\n <div class=\"tags\">TAGS:\n <?php\n if (!empty($tags)) {\n foreach ($allTags as $tag) { ?>\n <?php\n if ($tag === $lastElement) { ?>\n <a href=\"/blog/tag/?tag=<?php echo strtolower($tag); ?>\"><?php echo $tag; ?></a>\n <?php } else { ?>\n <a href=\"/blog/tag/?tag=<?php echo strtolower($tag); ?>\"><?php echo $tag.','; ?></a>\n <?php }\n }\n } else {\n echo 'tags are not added yet';\n }\n ?>\n </div>\n <div class=\"share-social-icons\">\n <?php include plugin_dir_path( __FILE__ ) . 'share-social-icons-section.php'; ?>\n </div>\n </div>\n </div>\n\n\n <?php\n $current = array_search($post->ID, $pages, false);\n $prevID = $pages[$current - 1];\n $nextID = $pages[$current + 1];\n\n ?>\n <div class=\"columnar article-nav\">\n <div class=\"columns-four-two\">\n <div class=\"text\">Previous Post</div>\n <a href=\"<?php echo get_page_link($prevID); ?>\"><?php echo get_the_title($prevID); ?></a>\n </div>\n <div class=\"columns-four-eight\">\n <div class=\"text\">Next Post</div>\n <a href=\"<?php echo get_page_link($nextID); ?>\"><?php echo get_the_title($nextID); ?></a>\n </div>\n </div>\n\n\n <?php\n // hide temporarily by check on no-existing var\n $empty = '';\n\n if ($empty) { ?>\n <div class=\"columnar\">\n <div class=\"card blog-newsletter article-newsletter columns-twelve\">\n <div class=\"\">\n <h2 class=\"centered-text\">\n Get our newsletter in your inbox Monday through Friday.\n </h2>\n </div>\n <div class=\"blog-newsletter-email\">\n <div class=\"text-input marketing with-button\">\n <input type=\"text\" class=\"small-copy\" placeholder=\"Email Address\">\n <label>Email Address</label>\n <button class=\"salmon marketing\">Submit</button>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"article-video\">\n <div class=\"columnar\">\n <div class=\"columns-seven\">\n <h2>Watch This</h2>\n </div>\n <div class=\"columns-ten-three\">\n <a href=\"#\" class=\"all-articles\">\n All Videos\n <img src=\"<?php echo $path; ?>/assets/icons/chevron-right-big.svg\">\n </a>\n </div>\n <div class=\"columns-twelve video-block\">\n <a href=\"#\">\n <img src=\"<?php echo $path; ?>assets/icons/play.svg\">\n </a>\n <p><?php echo $page->post_title; ?></p>\n </div>\n </div>\n </div>\n <?php }\n\n include plugin_dir_path( __FILE__ ) . 'articles-blocks.php';\n ?>\n\n </div>\n </div>\n <?php\n }", "function prk_ac_single( $atts, $content = null ) {\n\t\t$defaults = array( 'title' => 'Tab' );\n\t\textract( shortcode_atts( $defaults, $atts ) );\n\t\t//MAKE TAB ID MATCH THE CONTENT TAB ID\n\t\treturn '<div class=\"prk_ac_single\">'. do_shortcode( $content ) .'</div>';\n\t}", "function hybrid_entry_meta() {\n\n\t$meta = '';\n\n\tif ( 'post' == get_post_type() )\n\t\t$meta = '<p class=\"entry-meta\">' . __( '[entry-terms taxonomy=\"category\" before=\"Posted in \"] [entry-terms taxonomy=\"post_tag\" before=\"| Tagged \"] [entry-comments-link before=\"| \"]', 'hybrid' ) . '</p>';\n\n\telseif ( is_page() && current_user_can( 'edit_page', get_the_ID() ) )\n\t\t$meta = '<p class=\"entry-meta\">[entry-edit-link]</p>';\n\n\techo apply_atomic_shortcode( 'entry_meta', $meta );\n}", "function segments_demo_actions() { \n echo get_template_part( 'templates/content', 'dashboard-action' );\n}", "function oet_featured_content_block_display($attributes, $ajax = false){\n $html = \"\";\n $shortcodeText = \"\";\n if (!empty($attributes)) {\n extract($attributes);\n \n if (!$ajax)\n $html = '<div class=\"oet-featured-content-block\">';\n\n $shortcodeText = \"[featured_content_box\";\n if (isset($title))\n $shortcodeText .= \" title='\".$title.\"'\";\n if (isset($topIcon))\n $shortcodeText .= \" top_icon='\".$topIcon.\"'\";\n if (isset($alignment))\n $shortcodeText .= \" align='\".$alignment.\"'\";\n $shortcodeText .= \"]\";\n if (isset($content))\n $shortcodeText .= $content;\n $shortcodeText .= \"[/featured_content_box]\";\n\n if (isset($shortcodeText)){\n $html .= do_shortcode($shortcodeText);\n }\n\n if (!$ajax)\n $html .= '</div>';\n }\n return $html;\n}", "function mt_shortcode_portfolio_customer_support_single($params, $content) {\n extract( shortcode_atts( \n array(\n 'order_element1' =>'',\n 'animation' =>'',\n ), $params ) );\n\n $html = ''; \n\n $active = '';\n if($order_element1 == 1) {\n $html .= '<div class=\"tab-content\">';\n $active = 'in active';\n }\n\tglobal $post;\n\t\n\t$post_id = $post->ID;\n\t\n\t\n\t\n $html .= '<div id=\"customer-support\" class=\"tab-pane fade '.$active.'\">';\n \n\t if(!empty(tikidocs('support_section'))) {\n $html .= '<div class=\"row\">';\n // $html .= tikidocs('support_section');\n\t\t $html .= get_field(\"screenshots\",$post_id);\n\t\t $html .= '</div>';\n }\n $html .= '</div>';\n if($order_element1 == 2) {\n $html .= '</div>';\n }\n\n return $html;\n}", "public function getPostContent($atts = []){\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n \n // override default attributes with user attributes\n $atts = shortcode_atts([\n 'taxo' => null,\n ], $atts);\n\n global $postid;\n $postid = get_the_ID();\n\n // get json data from db\n $databaseQuery = new DatabaseAPI();\n $data = $databaseQuery->getJsonBomb($postid, $atts['taxo'])->json;\n\n // send the data as an object to front end\n wp_localize_script(\n 'rdJsCore',\n 'rdJson',\n $data\n );\n\n // plugin structure\n $rdNodeContent = <<<EOT\n\n<div class=\"rd-container\">\n <div class=\"rd-header\">\n <span class=\"rd-menu dashicons dashicons-menu\"></span>\n <div class=\"rd-breadcrumb\">\n </div>\n <div class=\"rd-header-button-group\">\n <input id=\"rd-search\"></input>\n <button type=\"button\" class=\"rd-edit rd-button\">\n <span class=\"rd-edit-icon dashicons dashicons-edit\"></span>\n <span class=\"rd-edit-text\">Edit</span>\n </button>\n <button type=\"button\" class=\"rd-cancel rd-button\" style=\"display: none;\">\n <span class=\"rd-done-icon dashicons dashicons-no\"></span>\n <span class=\"rd-done-text\">Cancel</span>\n </button>\n </div>\n </div>\n <div class=\"rd-header\">\n <div class=\"rd-header-button-group rd-header-category-group\">\n <select name=\"category\" class=\"rd-category-select\" id=\"category\">\n </select>\n </div>\n <div class=\"rd-header-rhs\">\n <span class=\"rd-slider-icon dashicons dashicons-admin-users\"></span>\n <div class=\"rd-merge-slider\">\n <div class=\"rd-slider-handle rd-slider-handle-merge ui-slider-handle\"></div>\n </div>\n <span class=\"rd-slider-icon dashicons dashicons-groups\"></span>\n <div class=\"rd-overall-score\">\n <span></span>\n </div>\n </div>\n </div>\n <span class=\"rd-arrow rd-arrow-left dashicons dashicons-arrow-left-alt2\"></span>\n <div class=\"rd-node-area\"></div>\n <span class=\"rd-arrow rd-arrow-right dashicons dashicons-arrow-right-alt2\"></span>\n</div>\n\nEOT;\n\n ob_start();\n echo $rdNodeContent;\n\n if ( post_password_required($postid) ) {\n return;\n }\n\n // gather comments for a specific page/post \n $comments = get_comments(array(\n 'post_id' => $postid,\n 'status' => 'approve' // type of comments to be displayed\n ));\n\n $comment_count = count($comments);\n\n echo '<div class=\"rd-comment-area\">';\n\n // comment form\n echo <<<EOT\n <form style=\"display: none;\" action=\"/wp-comments-post.php\" method=\"post\" id=\"commentform\" class=\"comment-form\" novalidate=\"\">\n <div class=\"rd-comment-box\">\n\n <h5>Comment</h5>\n <div class=\"rd-topic-area\">\n <h5 style=\"display: none;\">Topics</h5>\n <ul class=\"rd-topics\">\n </ul>\n </div>\n <textarea id=\"comment\" name=\"comment\" aria-required=\"true\" rows=\"4\" cols=\"50\"></textarea>\n \n <p class=\"form-submit\">\n <input name=\"submit\" class=\"rd-done\" type=\"submit\" id=\"submit\" value=\"Done\">\nEOT;\n echo '<input type=\"hidden\" name=\"comment_post_ID\" value=\"'.$postid.'\" id=\"comment_post_ID\">';\n echo '<input type=\"hidden\" name=\"comment_parent\" id=\"comment_parent\" value=\"0\">';\n echo '</p></form></div>';\n\n\n if ($comment_count > 0) {\n echo '<ol class=\"rd-comment-list\">';\n // Display the list of comments via template function\n wp_list_comments(array(\n 'per_page' => 10,\n 'reverse_top_level' => false,\n 'type' => 'comment',\n 'callback' => array($this,'format_comment')\n ), $comments);\n echo '</ol>';\n\n echo '<span type=\"button\" id=\"rd-comment-dropdown\">('.($comment_count - 1).') Comment Toggle</span>';\n\n // If comments are closed and there are comments\n if ( ! comments_open($postid) && get_comments_number($postid) && post_type_supports( get_post_type($postid), 'comments' ) ) {\n echo '<p class=\"no-comments\">Comments are closed</p>';\n }\n }\n\n // end of comment area\n echo '</div>';\n return ob_get_clean();\n }", "function pm_portfolio_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t\t'number_of_portfolio'\t=> '',\n\t\t\t'class'\t=> '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm_portfolio';\n\n\t// Retrieving user define classes\n\t$classes = array( 'row items' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\n\t\t<div id=\"portfolio\" class=\"<?php echo esc_attr( implode( ' ', $master_class ) ); ?>\">\n\t\t\t<div class=\"<?php echo esc_attr( implode( ' ', $classes ) ); ?>\">\n\t\t\t\t<div class=\"twelve columns\">\n\t\t\t\t\t<div id=\"portfolio-wrapper\" class=\"bgrid-fourth s-bgrid-third mob-bgrid-half group\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\t//start wp query..\n\t\t\t\t\t\t$args = array(\n\t\t\t\t\t\t\t'post_type'\t\t\t=> 'portfolio',\n\t\t\t\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t\t\t\t'order'\t\t\t\t=> 'DESC',\n\t\t\t\t\t\t\t'posts_per_page'\t=> $number_of_portfolio\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$data = new WP_Query( $args );\n\t\t\t\t\t\t//Check post\n\t\t\t\t\t\tif( $data->have_posts() ) :\n\t\t\t\t\t\t\t//startloop here..\n\t\t\t\t\t\t\twhile( $data->have_posts() ) : $data->the_post();\n\n\t\t\t\t\t\t\t$term_list = wp_get_post_terms( get_the_ID(), 'field' ); \n\t\t\t\t\t\t\tglobal $post;\n\t\t\t\t $image = wp_prepare_attachment_for_js( get_post_thumbnail_id( $post->ID ) );\n\t\t\t\t $image_alt = ( !empty( $image['alt'] ) ) ? 'alt=\"' . esc_attr( $image['alt'] ) . '\"' : 'alt=\"' .get_the_title() . '\"';\n\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"bgrid item\">\n\t\t\t\t\t\t\t<div class=\"item-wrap\">\n\t\t\t\t\t\t\t\t<a href=\"<?php the_permalink(); ?>\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php esc_url( the_post_thumbnail_url('portfolio-small-thum') ); ?>\" alt=\"<?php echo esc_attr( $image_alt ); ?>\">\n\t\t\t\t\t\t\t\t\t<div class=\"overlay\"></div> \n\t\t\t\t\t\t\t\t\t<div class=\"portfolio-item-meta\">\n\t\t\t\t\t\t\t\t\t\t<h5><?php echo the_title(); ?></h5>\n\t\t\t\t\t\t\t\t\t\t<p><?php foreach ($term_list as $sterm) { echo $sterm->name.' '; } ?></p>\n\t\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div> <!-- /item -->\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tendwhile;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div> <!-- /portfolio-wrapper -->\n\t\t\t\t</div> <!-- /twelve -->\n\t\t\t</div> <!-- /row --> \n\t\t</div> <!-- /Portfolio -->\n\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "function classTools_post_type() {\n\n $labels = array(\n 'name' => _x( 'Ferramentas', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'ferramenta', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Ferramenta', 'text_domain' ),\n 'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n 'archives' => __( 'Item Archives', 'text_domain' ),\n 'attributes' => __( 'Item Attributes', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'all_items' => __( 'todas as ferramentas', 'text_domain' ),\n 'add_new_item' => __( 'Add novaferramenta', 'text_domain' ),\n 'add_new' => __( 'nova ferramenta', 'text_domain' ),\n 'new_item' => __( 'nova ferramenta', 'text_domain' ),\n 'edit_item' => __( 'Edit Item', 'text_domain' ),\n 'update_item' => __( 'Update Item', 'text_domain' ),\n 'view_item' => __( 'View Item', 'text_domain' ),\n 'view_items' => __( 'View Items', 'text_domain' ),\n 'search_items' => __( 'Search Item', 'text_domain' ),\n 'not_found' => __( 'não encontrado', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n 'featured_image' => __( 'Featured Image', 'text_domain' ),\n 'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n 'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n 'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n 'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'ferramentas', 'text_domain' ),\n 'description' => __( 'ferramentas', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'classTools_post_type', $args );\n\n}", "function RBTM_RelPost_display($content){\n\tif( is_single() && is_main_query() ) {\n\t $content .= RBTM_RelPost_baseline_html();\n\t}\n\treturn $content;\n}", "function absolvution_post_meta() {\n if ( get_post_type() == 'post' ) {\n echo sprintf(\n __( '<div class=\"meta-container date-posted\">Posted %s </div><div class=\"meta-container cat\"><span class=\"sep cat\"></span> %s </div><div class=\"meta-container tag \"><span class=\"sep tag\"></span> %s </div>', 'absolvution' ),\n get_the_time( get_option( 'date_format' ) ),\n get_the_category_list( ', ' ),\n get_the_tag_list( __( '', 'absolvution' ), ', ' )\n );\n }\n edit_post_link( __( ' (edit)', 'absolvution' ), '<span class=\"edit-link\">', '</span>' );\n}", "function echotheme_nivoslider_shortcode($atts)\n{\n\tob_start();\n\tget_template_part('part', 'nivo-slider');\n\treturn ob_get_clean();\n}", "function cpt_sedes() {\n \n $labels = array(\n 'name' => _x( 'sedes', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'sede', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Sedes', 'text_domain' ),\n 'name_admin_bar' => __( 'Sedes', 'text_domain' ),\n 'archives' => __( 'Archivo de Sedes', 'text_domain' ),\n 'attributes' => __( 'Atributos de sede', 'text_domain' ),\n 'parent_item_colon' => __( 'Sede padre', 'text_domain' ),\n 'all_items' => __( 'Todas las Sedes', 'text_domain' ),\n 'add_new_item' => __( 'Añadir nueva Sede', 'text_domain' ),\n 'add_new' => __( 'Añadir Sede', 'text_domain' ),\n 'new_item' => __( 'Nueva Sede', 'text_domain' ),\n 'edit_item' => __( 'Editar Sede', 'text_domain' ),\n 'update_item' => __( 'Actualizar Sede', 'text_domain' ),\n 'view_item' => __( 'Ver Sede', 'text_domain' ),\n 'view_items' => __( 'Ver Sedes', 'text_domain' ),\n 'search_items' => __( 'Buscar Sedes', 'text_domain' ),\n 'not_found' => __( 'No Encontrado', 'text_domain' ),\n 'not_found_in_trash' => __( 'No encontrado en papelera', 'text_domain' ),\n 'featured_image' => __( 'Imagen Destacada', 'text_domain' ),\n 'set_featured_image' => __( 'Configurar Imagen Destacada', 'text_domain' ),\n 'remove_featured_image' => __( 'Remover Imagen Destacada', 'text_domain' ),\n 'use_featured_image' => __( 'Usar como imagen destacada', 'text_domain' ),\n 'insert_into_item' => __( 'Intertar en la Sede', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Actualizar en esta sede', 'text_domain' ),\n 'items_list' => __( 'Listado de Sedes', 'text_domain' ),\n 'items_list_navigation' => __( 'Lista Navegable de Sedes', 'text_domain' ),\n 'filter_items_list' => __( 'Filtro de lista de Sedes', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'sede', 'text_domain' ),\n 'description' => __( 'Diferentes sedes con la que cuenta m&q', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes' ),\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-store',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n // genera el editor de codigo gutember\n 'show_in_rest' => true,\n\n );\n register_post_type( 'sedes', $args );\n \n }", "function placeholder_shortcode($attr) {\n $post = get_post();\n\n static $index = 0;\n static $component_cache = null;\n\n\n if($component_cache === null) {\n $component_cache = array();\n $story_content = get_field('story_content', $post->ID);\n\n if($story_content !== false) {\n foreach($story_content as $content) {\n $layout = $content['acf_fc_layout'];\n $component = array('type' => $layout);\n $fun = 'component_' . $layout;\n\n if(function_exists($fun)) {\n $component = call_user_func($fun, $content, $component);\n }\n\n $component_cache[] = $component;\n }\n }\n }\n\n $context = array();\n\n if($index < count($component_cache)) {\n $component = $component_cache[$index];\n if($component) {\n $context = $component;\n }\n $template = array('component-' . $component['type'] .'.twig', 'empty.twig');\n }\n else {\n $template = is_user_logged_in() ? 'component-extraneous.twig' : 'empty.twig';\n }\n\n // do not echo:\n ob_start();\n $output = Timber::render($template, $context);\n ob_end_clean();\n\n $index++;\n\n return $output;\n\n}", "function kstHelpWordpressBlogPosts_excerptsAndMoreTeasers() {\n ?>\n <p>\n Your theme uses the excerpt field as well as the &lt;--more--&gt; tag giving\n you many options for formatting your blog index. Many themes use either the\n excerpt or the &lt;--more--&gt; tag to control what content appears on your\n blog index.\n </p>\n <p>\n Posts are displayed on the index in one of these formats (and order shown):\n </p>\n <ol>\n <li>Title and excerpt (if you type anything in the excerpt field)</li>\n <li>Title and the post up to the &lt;--more--&gt; (if you insert &lt;--more--&gt; in the post)</li>\n <li>Title and the entire post (if you do not enter an excerpt or the &lt;--more--&gt; tag)</li>\n </ol>\n <p><em>i.e. If you enter an excerpt and include a &lt;--more--&gt; tag only the excerpt will display</em></p>\n <p>\n <strong>How to use the \"more\" tag:</strong>\n </p>\n <p>\n In \"Visual\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Click the button above the post editor that looks like\n a rectangle cut in two pieces (a small rectangle on top and a longer rectangle on the button).\n A line that says \"more\" will appear.\n </p>\n <p>\n In \"html\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Type &lt;--more--&gt; on it's own line.\n </p>\n <p>\n Note: You may also customize the \"more\" link text that is shown per post (only possible using \"html\" mode).<br />\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Simply type the text to use after \"more\" e.g. &lt;--more But wait, there's more! --&gt;\n </p>\n <?php\n}", "function partner_stories() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Partner Stories', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Partner Story', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Partner Stories', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Partner Story', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Partner Story', 'text_domain' ),\n\t\t'description' => __( 'Strategic Partner Features', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-id-alt',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'partner_stories', $args );\n\n}", "function omfg_mobile_pro_pagecontent () {\n\n\tglobal $post, $wp_query;\n\t\n\t// Post ID\n\t$postid = $wp_query->post->ID;\n\t$page_content = get_post_meta($postid, '_omfg_page_content', true);\n\t$page_content = do_shortcode($page_content);\n\t$page_content = wpautop($page_content, 1);\n\t\n\techo $page_content;\n\n}", "function chapel_hour_post_type() {\n\n $labels = array(\n 'name' => 'Chapel Hour Episodes',\n 'singular_name' => 'Chapel Hour Episode',\n 'menu_name' => 'Chapel Hour Episodes',\n 'name_admin_bar' => 'Chapel Hour Episode',\n 'archives' => 'Chapel Hour Archives',\n 'parent_item_colon' => 'Parent Chapel Hour Episode:',\n 'all_items' => 'All Chapel Hour Episodes',\n 'add_new_item' => 'Add New Chapel Hour Episode',\n 'add_new' => 'Add New',\n 'new_item' => 'New Chapel Hour Episode',\n 'edit_item' => 'Edit Chapel Hour Episode',\n 'update_item' => 'Update Chapel Hour Episode',\n 'view_item' => 'View Chapel Hour Episode',\n 'search_items' => 'Search Chapel Hour Episode',\n 'not_found' => 'Not found',\n 'not_found_in_trash' => 'Not found in Trash',\n 'featured_image' => 'Featured Image',\n 'set_featured_image' => 'Set featured image',\n 'remove_featured_image' => 'Remove featured image',\n 'use_featured_image' => 'Use as featured image',\n 'insert_into_item' => 'Insert into Chapel Hour Episode',\n 'uploaded_to_this_item' => 'Uploaded to this Chapel Hour Episode',\n 'items_list' => 'Chapel Hour Episodes list',\n 'items_list_navigation' => 'Chapel Hour Episodes list navigation',\n 'filter_items_list' => 'Filter Chapel Hour Episodes list',\n );\n $rewrite = array(\n 'slug' => 'resources/chapel-hour-weekly-radio-broadcast/all',\n 'with_front' => true,\n 'pages' => true,\n 'feeds' => true,\n );\n $args = array(\n 'label' => 'Chapel Hour Episode',\n 'description' => 'Chapel Hour Episodes',\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', ),\n 'taxonomies' => array(),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 30,\n 'menu_icon' => 'dashicons-clock',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => 'resources/chapel-hour-weekly-radio-broadcast/all',\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'rewrite' => $rewrite,\n 'capability_type' => 'page',\n );\n register_post_type( 'chapel_hour', $args );\n\n}", "function shortcode_posts( $atts ) {\n\t\textract( shortcode_atts( array(\n\t\t\t'title' => '',\n\t\t\t'type' => 'latest',\n\t\t\t'style' => 'style1',\n\t\t\t'count' => 10,\n\t\t\t'count_per_row' => 4,\n\t\t\t'post_ids' => '',\n\t\t\t'slide' => 'true',\n\t\t\t'before_list' => '',\n\t\t\t'after_list' => '',\n\t\t\t'before_item' => '',\n\t\t\t'after_item' => '',\n\t\t\t'animation_type' => '',\n\t\t\t'animation_duration' => '',\n\t\t\t'animation_delay' => '',\n\t\t), $atts) );\n\n\t\tif ( $slide == 'no' || $slide == 'false' ) { $slide = 'false'; }\n\t\t$styles = array( 'style1', 'style2', 'style3', 'style4' );\n\t\t$types = array( 'latest', 'popular', 'selected' );\n\t\tif ( ! in_array( $style, $styles ) ) $style = 'style1';\n\t\tif ( ! in_array( $type, $types ) ) $type = 'latest';\n\t\t$post_ids = explode( ',', $post_ids );\n\t\t$count = is_numeric( $count )?$count:10;\n\t\t$count_per_row = is_numeric( $count_per_row )?$count_per_row:4;\n\n\t\t$def_before_list = '';\n\t\t$def_after_list = '';\n\t\t$def_before_item = '';\n\t\t$def_after_item = '';\n\n\t\tif ( $style == 'style3' ) {\n\t\t\t$def_before_list = '<div>';\n\t\t\t$def_after_list = '</div>';\n\t\t} else {\n\t\t\tif ( $slide == 'false' ) {\n\t\t\t\t$def_before_list = '<div class=\"row image-box style10\">';\n\t\t\t\t$def_after_list = '</div>';\n\t\t\t\tif ( ( 2 == $count_per_row ) ) {\n\t\t\t\t\t$def_before_list = '<div class=\"row image-box style10\">';\n\t\t\t\t\t$def_before_item = \"<div class='col-sm-6'>\";\n\t\t\t\t\t$def_after_item = \"</div>\";\n\t\t\t\t} elseif ( 3 == $count_per_row ) {\n\t\t\t\t\t$def_before_list = '<div class=\"row image-box style10\">';\n\t\t\t\t\t$def_before_item = \"<div class='col-sm-4'>\";\n\t\t\t\t\t$def_after_item = \"</div>\";\n\t\t\t\t} else {\n\t\t\t\t\t$def_before_list = '<div class=\"row image-box style10\">';\n\t\t\t\t\t$def_before_item = \"<div class='col-sm-6 col-sms-6 col-md-3'>\";\n\t\t\t\t\t$def_after_item = \"</div>\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$def_before_list = '<div class=\"block image-carousel style2\" data-animation=\"slide\" data-item-width=\"370\" data-item-margin=\"30\"><ul class=\"slides image-box style10 listing-' . esc_attr( $style ) . '\">';\n\t\t\t\t$def_after_list = '</ul></div>';\n\t\t\t\t$def_before_item = '<li>';\n\t\t\t\t$def_after_item = '</li>';\n\t\t\t}\n\t\t}\n\t\tif ( empty( $before_list ) ) $before_list = $def_before_list;\n\t\tif ( empty( $after_list ) ) $after_list = $def_after_list;\n\t\tif ( empty( $before_item ) ) $before_item = $def_before_item;\n\t\tif ( empty( $after_item ) ) $after_item = $def_after_item;\n\n\t\t$posts = array();\n\t\tif ( $type == 'selected' ) {\n\t\t\tif ( is_array( $post_ids ) ) {\n\t\t\t\tforeach( $post_ids as $post_id ) {\n\t\t\t\t\t$post = get_post( $post_id );\n\t\t\t\t\tif ( ! empty( $post ) && ! is_wp_error( $post ) ) {\n\t\t\t\t\t\t$posts[] = $post;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ( $type == 'latest' ) {\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => $count,\n\t\t\t\t'orderby' => 'post_date',\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'suppress_filters' => 0,\n\t\t\t\t'post_status' => 'publish',\n\t\t\t);\n\t\t\t$posts = get_posts( $args );\n\t\t} elseif ( $type == 'popular' ) {\n\t\t\t$posts = get_posts('posts_per_page=' . $count . '&meta_key=trav_count_post_views&orderby=meta_value_num&order=DESC&suppress_filters=0&post_status=publish');\n\t\t}\n\n\t\tob_start();\n\t\tif ( ! empty( $title ) ) { echo '<h2>' . esc_html( $title ) . '</h2>'; }\n\t\techo ( $before_list );\n\t\t$i = 0;\n\t\tforeach ( $posts as $post ) {\n\t\t\t$animation = '';\n\t\t\tif ( ! empty( $animation_type ) ) { $animation .= ' class=\"animated\" data-animation-type=\"' . esc_attr( $animation_type ) . '\" data-animation-duration=\"' . esc_attr( $animation_duration ) . '\" data-animation-delay=\"' . esc_attr( $animation_delay * $i ) . '\" '; }\n\t\t\ttrav_get_post_list_sigle( $post->ID, $style, $before_item, $after_item, $animation );\n\t\t\t$i++;\n\t\t}\n\t\techo ( $after_list );\n\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $output;\n\t}", "function display_metaslider_by_slug() {\n\tif ( is_front_page() ) {\n\t\techo do_shortcode(\"[metaslider id=front-page]\");\n\t}\n\telseif ( is_page() ) {\n\t\techo do_shortcode(\"[metaslider id=page]\");\n\t}\n\telse {\n\t\techo do_shortcode(\"[metaslider id=default]\");\n\t}\n}", "function showpics_func($atts, $content = null) { ?>\n\t\t<?php\n extract(shortcode_atts(array(\n \"showpics\" => '',\n\t\t\t\t\"order\" => 'ASC',\n\t\t\t\t\"orderby\" => 'menu_order'\n ), $atts));\n global $post;\n $lrgpics = get_children('numberposts=-1&order='.$order.'&orderby='.$orderby.'&post_type=attachment&post_mime_type=image&post_parent='.$post->ID);\n\t\t$return='';\n foreach($lrgpics as $lrgpic) :\n\t\t\tif (strtoupper($lrgpic->post_name) != strtoupper($lrgpic->post_title)) { // If the picture hasn't been given a new name, it won't show up.\n\t\t\t$image = wp_get_attachment_image_src($lrgpic->ID, 'full'); \n\t\t\t$lrgimage = wp_get_attachment_image_src($lrgpic->ID, 'large');\n\t\t\t$imgwidth = $lrgimage[1] + 10;\n\t\t\t$theimage = wp_get_attachment_image($lrgpic->ID, 'large');\n\t $return.='<div style=\"width:'.$imgwidth.'px;\" id=\"attachment_'.$lrgpic->ID.'\" class=\"wp-caption alignnone\"><a href=\"'. $image[0].'\">'.$theimage.'</a>';\n\t\t\t\tif($lrgpic->post_content) {\n\t\t\t\t\t$return.='<p class=\"wp-caption-text\"><small>'.$lrgpic->post_content.'</small></p></div>';\n\t\t\t\t} else {\n\t\t\t\t\t$return.='<p class=\"wp-caption-text\">'.$lrgpic->post_title.'</p></div>';\n\t\t\t\t}\n\t\t\t// if title has been given, show title, if description has been given, show description\n\t\t\t// if no title has been given, just show the image\n \t} else { \n\t\t\t$image = wp_get_attachment_image_src($lrgpic->ID, 'full'); \n\t\t\t$theimage = wp_get_attachment_image($lrgpic->ID, 'large');\n\t $return.='<p class=\"imgcontainer\"><a href=\"'. $image[0].'\">'.$theimage.'</a></p>';\n\t\t\t} // end check to see if title has been given\n\t\tendforeach;\n return $return;\n}", "function fcc_norad_podcast_single_post_content( $content ) {\n\tif ( is_singular( 'podcasts' ) && ! is_admin() ) {\n\t\t$id = $GLOBALS['post']->ID;\n\t\t$content = '';\n\n\t\t# POST META\n\t\t$segment_1_title = get_post_meta( $id, 'segment_1_title', true );\n\t\t$segment_2_title = get_post_meta( $id, 'segment_2_title', true );\n\t\t$segment_3_title = get_post_meta( $id, 'segment_3_title', true );\n\n\t\t$segment_1_description = get_post_meta( $id, 'segment_1_description', true );\n\t\t$segment_2_description = get_post_meta( $id, 'segment_2_description', true );\n\t\t$segment_3_description = get_post_meta( $id, 'segment_3_description', true );\n\n\t\t$segment_1_link = get_post_meta( $id, 'segment_1_link', true );\n\t\t$segment_2_link = get_post_meta( $id, 'segment_2_link', true );\n\t\t$segment_3_link = get_post_meta( $id, 'segment_3_link', true );\n\n\t\t# Segment 1\n\t\tif ( $segment_1_link ) {\n\t\t\t$segment_1_title_link .= '<a href=\"' .\t$segment_1_link . '\" target=\"_blank\">' . $segment_1_title . '</a> &ndash; ';\n\t\t} else {\n\t\t\t$segment_1_title_link = '';\n\t\t}\n\n\t\t# Segment 2\n\t\tif ( $segment_2_link ) {\n\t\t\t$segment_2_title_link .= '<a href=\"' .\t$segment_2_link . '\" target=\"_blank\">' . $segment_2_title . '</a> &ndash; ';\n\t\t} else {\n\t\t\t$segment_2_title_link = '';\n\t\t}\n\n\t\t# Segment 3\n\t\tif ( $segment_3_link ) {\n\t\t\t$segment_3_title_link .= '<a href=\"' .\t$segment_3_link . '\" target=\"_blank\">' . $segment_3_title . '</a> &ndash; ';\n\t\t} else {\n\t\t\t$segment_3_title_link = '';\n\t\t}\n\n\t\t# The Content *****/\n\t\t$content .= '<ul>';\n\t\t$content .= '<li>' . $segment_1_title_link . $segment_1_description . '</li>';\n\t\t$content .= '<li>' . $segment_2_title_link . $segment_2_description . '</li>';\n\t\t$content .= '<li>' . $segment_3_title_link . $segment_3_description . '</li>';\n\t\t$content .= '</ul>';\n\t}\n\treturn $content;\n}", "public function wmel_pub_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 4,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'wsuwp_uc_publication',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'wmel-publications'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "function testimonials_shortcode(){\n\n global $post;\n $args = array(\n 'post_type' =>'testimonials',\n 'numberposts' => '-1',\n );\n $testimonials = get_posts($args);\n\n $count=0;\n foreach($testimonials as $post) : setup_postdata($post);\n $count++;\n\n $output = '<div class=\"testimonial-item one-third';\n \tif($count == '3') { echo 'column-last'; } \n $output .= '\"><div class=\"testimonial\">' .get_the_content(). '</div><!-- /testimonial -->';\n $output .= '<div class=\"testimonial-author\">' .get_the_title(). '</div></div><!-- /testimonial-item -->';\n if($count == '3') { \n \t$output .= '<div class=\"clear\"></div>'; \n $count=0; \n } \n endforeach; \n wp_reset_postdata();\n\n return $output;\n }", "function acf_shortcode($atts)\n{\n}", "function itstar_projects_in_cat( $atts, $content = null ) {\n global $wp_query;\n $a = shortcode_atts( array(\n 'cat' => '',\n 'qty' => -1,\n // ...etc\n ), $atts );\n\n$projects = get_posts(array(\n 'post_type' => 'project',\n 'posts_per_page' => $a['qty'],\n 'project_cat' => $a['cat'],\n )\n );\n\n \n if(!empty($projects)){ ?>\n \n <ul class=\"projects-list\">\n <li><span><?php echo __('Title','itstar'); ?></span></li>\n <?php foreach($projects as $project){\n setup_postdata( $project ) ;\n $project_date = get_post_meta($project->ID,'_itstar_project_date',1);?>\n \n <li class=\"project-link\">\n <a href=\"<?php echo get_the_permalink($project->ID); ?>\">\n <span><?php echo esc_html($project_date).' - '; ?></span>\n <span><?php echo $project->post_title; ?></span>\n </a>\n \n </li>\n <?php } ?>\n </ul>\n <?php } \n wp_reset_postdata();\n}", "protected function render()\n {\n $settings = $this->get_settings_for_display();\n\n $posts = get_posts(\n array(\n 'post_type' => 'post',\n 'numberposts' => $settings['posts'],\n 'orderby' => 'date',\n )\n );\n\n include PLUGIN_DIR . '/templates/widgets/recent-posts.php';\n }", "function howTo_post_type() {\n\n $labels = array(\n 'name' => _x( 'Como Funciona', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'Como Funciona', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Como Funciona', 'text_domain' ),\n 'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n 'archives' => __( 'Item Archives', 'text_domain' ),\n 'attributes' => __( 'Item Attributes', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'all_items' => __( 'todos os cards', 'text_domain' ),\n 'add_new_item' => __( 'Add novo card', 'text_domain' ),\n 'add_new' => __( 'novo card', 'text_domain' ),\n 'new_item' => __( 'novo card', 'text_domain' ),\n 'edit_item' => __( 'Edit Item', 'text_domain' ),\n 'update_item' => __( 'Update Item', 'text_domain' ),\n 'view_item' => __( 'View Item', 'text_domain' ),\n 'view_items' => __( 'View Items', 'text_domain' ),\n 'search_items' => __( 'Search Item', 'text_domain' ),\n 'not_found' => __( 'não encontrato', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n 'featured_image' => __( 'Featured Image', 'text_domain' ),\n 'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n 'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n 'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n 'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'Como Funciona', 'text_domain' ),\n 'description' => __( 'Como Funciona', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'howTo_post_type', $args );\n\n}", "function simple_bootstrap_display_post_meta($short=true) {\n?>\n\n <ul class=\"meta text-muted list-inline\">\n <li class=\"list-inline-item\">\n <a href=\"<?php the_permalink() ?>\">\n <i class=\"fas fa-clock\"></i>\n <span class=\"sr-only\"><?php echo __( 'Posted on', 'simple-bootstrap' ) ?></span>\n <?php echo get_the_date(); ?>\n </a>\n </li>\n <li class=\"list-inline-item\">\n <a href=\"<?php echo get_author_posts_url(get_the_author_meta('ID'));?>\">\n <i class=\"fas fa-user\"></i>\n <span class=\"sr-only\"><?php echo __( 'Posted by', 'simple-bootstrap' ) ?></span>\n <?php the_author(); ?>\n </a>\n </li>\n <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>\n <li class=\"list-inline-item\">\n <?php\n $sp = '<i class=\"fas fa-comment\"></i> ';\n comments_popup_link($sp . __( 'Leave a comment', \"simple-bootstrap\"), $sp . __( '1 Comment', \"simple-bootstrap\"), $sp . __( '% Comments', \"simple-bootstrap\"));\n ?>\n </li>\n <?php endif; ?>\n <?php if (! $short) : ?>\n\n <?php $categories_list = get_the_category_list(', '); ?>\n <?php if ( $categories_list ) : ?>\n <li class=\"list-inline-item\">\n <i class=\"fas fa-folder\"></i>\n <span class=\"sr-only\"><?php echo __( 'Posted in', 'simple-bootstrap' ) ?></span>\n <?php echo $categories_list ?>\n </li>\n <?php endif ?>\n <?php $tags_list = get_the_tag_list('', ', '); ?>\n <?php if ( $tags_list ) : ?>\n <li class=\"list-inline-item\">\n <i class=\"fas fa-tag\"></i>\n <span class=\"sr-only\"><?php echo __( 'Tags:', 'simple-bootstrap' ) ?></span>\n <?php echo $tags_list ?>\n </li>\n <?php endif ?>\n\n <?php edit_post_link(__( 'Edit', \"simple-bootstrap\"), '<li class=\"list-inline-item\"><i class=\"fas fa-pencil-alt\"></i> ', '</li>'); ?>\n <?php endif ?>\n </ul>\n\n<?php\n}", "public function display($data) {\n\t\t\tglobal $cfct_build;\t\t\t\n\t\t\n\t\t\t$cfct_build->loaded_modules[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_paths[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_urls[$this->basename] = $this->pluginUrl;\n\n\t\t\t$text = do_shortcode($data[$this->get_field_id('content')]);\n\t\t\treturn $this->load_view($data, compact('text'));\t\t\t\n\t\t}", "function projects_shortcode($atts) \n{\n\t//Options\n extract(shortcode_atts(array(\n 'limit' => '-1',\n 'location' => '',\n 'category' => '',\n ), $atts));\n\n global $post;\n \n //Query Options\n $args = array(\n 'posts_per_page' => $limit, \n 'orderby' => 'post_date',\n 'post_type' => 'projects',\n 'tax_query' => array(\n 'relation' => 'OR',\n array(\n 'taxonomy' => 'location',\n 'field' => 'slug',\n 'terms' => array($location)\n ),\n array(\n 'taxonomy' => 'category',\n 'field' => 'slug',\n 'terms' => array($category)\n ),\n ));\n \n //Query for projects \n $get_projects = NEW WP_Query($args);\n\t\n\t//Wrapper\n\t$output .= '<div class=\"row wrap-projects\">';\n\t\n\t//Loop\n while($get_projects->have_posts()) \n {\n $get_projects->the_post();\n $img_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), \"full\");\n\t\t$feat_img = $img_src[0];\n \n $output .= '<a href=\"#\" class=\"project-post one-third column\" data-url=\"'.get_permalink().'\" style=\"background-image:url('.$feat_img.');\"><div class=\"hover-wrap\">';\n $output .= '<h3>'.get_the_title().'</h3>';\n $output .= '<div class=\"post-excerpt\">'.get_the_excerpt().'</div>';\n $output .= '<div class=\"meta\">'.get_post_meta( $post->ID, 'Awards', true).'</div>';\n $output .= '</div></a>';\n };\n \n $output .= '</div>';\n \n //Important: Reset wp query\n wp_reset_query();\n \n return $output;\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div><a href=\"'. get_permalink($post->ID) . '\" > ... Click to View Full Post</a></div>;';\n}", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function htheme_blog_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_content_blog_split($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function lp_show_frontend( $attr, $content='' ){\r\n\t$attributes = shortcode_atts(array(\r\n\t\t\t\t\t'post_id'\t=> get_the_ID()\r\n\t\t\t\t),$attr);\r\n\tglobal $wpdb;\r\n\t$table_name = $wpdb->prefix.'like_post';\r\n\t$id = $attributes['post_id'];\r\n\t$cookie_like = 'lp_'.$id;\r\n\tif(!isset($_COOKIE[$cookie_like])){\r\n\t\t$lp_like_text = 'Like';\r\n\t}else{\r\n\t\t$lp_like_text = 'LIKED';\r\n\t}\r\n\t$selected_time = get_option('lp_showing_year');\r\n\t$selected_date_time = date('Y-m-d', strtotime(\"-$selected_time days\"));\r\n\t$like_time = date('Y-m-d',time());\r\n\t$wpdb->show_errors( true );\r\n\t$total_like = $wpdb->get_var(\"SELECT count(POST_ID) FROM $table_name WHERE POST_ID = $id AND STATUS = 1 AND LIKE_TIME BETWEEN '$selected_date_time' AND '$like_time' \");\r\n\r\n\t$output = \"<p class='li_like'>\";\r\n\t$output .= \"<a class='lp_like_btn' href='javascript:void(0)' data-total-like='\".$total_like.\"' data-post-id='\".$id.\"' >\".$lp_like_text.\"</a> \";\r\n\t$output .= \"<span class='lp_like_count'><strong>\".$total_like.\"</strong> Like</span>\";\r\n\t$output .= \"</p>\";\r\n\treturn $output;\r\n}", "function custom_post_portfolio() {\n\n $labels = array(\n 'name' => _x( 'Proyectos', 'Post Type General Name', 'ohmarketingtravel' ),\n 'singular_name' => _x( 'Proyecto', 'Post Type Singular Name', 'ohmarketingtravel' ),\n 'menu_name' => __( 'Portafolio', 'ohmarketingtravel' ),\n 'name_admin_bar' => __( 'Portafolio', 'ohmarketingtravel' ),\n 'archives' => __( 'Item Archives', 'ohmarketingtravel' ),\n 'attributes' => __( 'Item Attributes', 'ohmarketingtravel' ),\n 'parent_item_colon' => __( 'Parent Item:', 'ohmarketingtravel' ),\n 'all_items' => __( 'All Items', 'ohmarketingtravel' ),\n 'add_new_item' => __( 'Add New Item', 'ohmarketingtravel' ),\n 'add_new' => __( 'Add New', 'ohmarketingtravel' ),\n 'new_item' => __( 'New Item', 'ohmarketingtravel' ),\n 'edit_item' => __( 'Edit Item', 'ohmarketingtravel' ),\n 'update_item' => __( 'Update Item', 'ohmarketingtravel' ),\n 'view_item' => __( 'View Item', 'ohmarketingtravel' ),\n 'view_items' => __( 'View Items', 'ohmarketingtravel' ),\n 'search_items' => __( 'Search Item', 'ohmarketingtravel' ),\n 'not_found' => __( 'Not found', 'ohmarketingtravel' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'ohmarketingtravel' ),\n 'featured_image' => __( 'Featured Image', 'ohmarketingtravel' ),\n 'set_featured_image' => __( 'Set featured image', 'ohmarketingtravel' ),\n 'remove_featured_image' => __( 'Remove featured image', 'ohmarketingtravel' ),\n 'use_featured_image' => __( 'Use as featured image', 'ohmarketingtravel' ),\n 'insert_into_item' => __( 'Insert into item', 'ohmarketingtravel' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'ohmarketingtravel' ),\n 'items_list' => __( 'Items list', 'ohmarketingtravel' ),\n 'items_list_navigation' => __( 'Items list navigation', 'ohmarketingtravel' ),\n 'filter_items_list' => __( 'Filter items list', 'ohmarketingtravel' ),\n );\n $args = array(\n 'label' => __( 'Proyecto', 'ohmarketingtravel' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-schedule',\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'Portafolio', $args );\n\n}", "function flatsome_before_blog_comments(){\n if(get_theme_mod('blog_after_post')){\n echo '<div class=\"html-before-comments mb\">'.do_shortcode(get_theme_mod('blog_after_post')).'</div>';\n }\n}", "function accouk_display_post_meta() {\n\n global $main_category;\n echo '<div class=\"published-date\">Published on '; the_date();\n echo ' in <a href=\"' . $main_category['link'] . '\" class=\"breadcrumb\">' . $main_category['name'] . '</a></div>';\n\n}" ]
[ "0.69495827", "0.68045604", "0.6665211", "0.665168", "0.66338897", "0.6533469", "0.6522628", "0.6516861", "0.651139", "0.6507036", "0.6497266", "0.6439877", "0.6439621", "0.6423347", "0.63677406", "0.6331029", "0.6309264", "0.6308797", "0.6287056", "0.6278254", "0.62667036", "0.6253012", "0.62526643", "0.625068", "0.6243409", "0.6243323", "0.6240014", "0.6238617", "0.623136", "0.62246543", "0.62144893", "0.62063336", "0.6201299", "0.6199682", "0.6195171", "0.6191782", "0.6190615", "0.61795264", "0.6177848", "0.61744535", "0.6168643", "0.61639255", "0.6136653", "0.61273116", "0.61229944", "0.61224735", "0.6115255", "0.611036", "0.6106964", "0.6098969", "0.60954607", "0.60937655", "0.60828286", "0.6071302", "0.606869", "0.6068235", "0.6057004", "0.60520834", "0.6047743", "0.603992", "0.6037382", "0.60357434", "0.60289997", "0.6016994", "0.6013399", "0.6011683", "0.60092276", "0.60059786", "0.60048515", "0.600036", "0.59901756", "0.5988175", "0.5986292", "0.5981983", "0.59811836", "0.59750444", "0.59731305", "0.59681135", "0.5961696", "0.5952319", "0.595124", "0.59510314", "0.5950729", "0.5943548", "0.5943274", "0.59404534", "0.5938502", "0.5938468", "0.59379", "0.59328926", "0.5930267", "0.5929742", "0.59287214", "0.5928383", "0.59255195", "0.5925285", "0.59247", "0.5921934", "0.5921724", "0.59184575", "0.59160244" ]
0.0
-1
Display only sticky posts
function be_display_only_sticky_posts( $args, $atts ) { $sticky_variations = array( 'sticky_posts', 'sticky-posts', 'sticky posts' ); if( !empty( $atts['id'] ) && in_array( $atts['id'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__in'] = $sticky_posts; } if( !empty( $atts['exclude'] ) && in_array( $atts['exclude'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__not_in'] = $sticky_posts; } return $args; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onlyStickyPosts()\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\t// check if there are any\r\n\tif (!empty($sticky)) {\r\n\t\t// optional: sort the newest IDs first\r\n\t\trsort($sticky);\r\n\t\t// override the query\r\n\t\t$args = array(\r\n\t\t\t'post__in' => $sticky\r\n\t\t);\r\n\t\tquery_posts($args);\r\n\t\t// the loop\r\n\t\twhile (have_posts()) {\r\n\t\t\tthe_post();\r\n\t\t\t// your code\r\n\t\t\tget_template_part('article');\r\n\t\t}\r\n\t}\r\n\twp_reset_query();\r\n}", "function wpb_latest_sticky() { \n\n/* Get all sticky posts */\n$sticky = get_option( 'sticky_posts' );\n\n/* Sort the stickies with the newest ones at the top */\nrsort( $sticky );\n\n/* Get the 5 newest stickies (change 5 for a different number) */\n$sticky = array_slice( $sticky, 0, 5 );\n\n/* Query sticky posts */\n$the_query = new WP_Query( array( 'post__in' => $sticky, 'ignore_sticky_posts' => 2 ) );\n// The Loop\nif ( $the_query->have_posts() ) {\n\t$return = '<ul>';\n\twhile ( $the_query->have_posts() ) {\n\t\t$the_query->the_post();\n\t\t$return .= '<li><a href=\"' .get_permalink(). '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</a><br />' . get_the_excerpt(). '</li>';\n\t\t\n\t}\n\t$return .= '</ul>';\n\t\n} else {\n\t// no posts found\n}\n/* Restore original Post Data */\nwp_reset_postdata();\n\nreturn $return; \n\n}", "function areThereStickyPosts()\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\t// check if there are any\r\n\treturn !empty($sticky) ? true : false;\r\n}", "function simpleTheme_blog_loop() {\n\n $loop = new WP_Query( array( 'post__in' => get_option('sticky_posts') ) );\n echo '<ul class=\"stick-posts\">';\n while ( $loop->have_posts() ) : $loop->the_post();\n echo '<li class=\"simple-theme-sticky\"><a href=\"' . get_the_permalink() . '\">' . get_the_title() . '</a>';\n simpleTheme_date();\n echo '</li>';\n endwhile;\n echo '</ul>';\n\n}", "public function showsticky() {\n }", "function is_sticky() {\n\tglobal $discussion;\n\treturn $discussion['sticky'];\n}", "function getSticky()\n {\n \t$query = 'SELECT t.id, t.post_subject, t.topic_type, t.hits, ' .\n \t\t\t\t't.forum_id, t.post_time, t.post_user, t.post_username ' .\n \t\t\t'FROM #__ccb_topics AS t ' .\n \t\t\t'WHERE ((t.topic_type = 1 OR t.topic_type = 3) AND (t.hold=0)) ' .\n \t\t\t'ORDER BY t.topic_type, t.post_time DESC ';\n\n\t\t$sticky = ($sticky = $this->_getList($query))? $sticky :array();\n\n\t\treturn $sticky;\n }", "function ppo_posted_on() {\n if ( is_sticky() && is_home() && ! is_paged() ) {\n echo '<span class=\"featured-post\">' . __( 'Sticky post', SHORT_NAME ) . '</span>';\n }\n\n // Set up and print post meta information.\n printf( '<span class=\"entry-date\"><a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s\"><i class=\"fa fa-calendar\"></i> %3$s</time></a></span> <span class=\"byline\"><span class=\"author vcard\"><a class=\"url fn n\" href=\"%4$s\" rel=\"author\"><i class=\"fa fa-user\"></i> %5$s</a></span></span>',\n esc_url( get_permalink() ),\n esc_attr( get_the_date( 'c' ) ),\n esc_html( get_the_date() ),\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n get_the_author()\n );\n}", "public function homepage_ignore_sticky( $query ) {\n\t\t\tif ( $query->is_front_page() && $query->is_main_query() ) {\n\t\t\t\t$query->set( 'ignore_sticky_posts', 1 );\n\t\t\t}\n\t\t}", "function cc_get_sticky_page() {\n\tglobal $wpdb;\n\n\t$query = \"\n\t\tSELECT posts.*\n\t\tFROM $wpdb->posts posts, $wpdb->postmeta postmeta\n\t\tWHERE posts.ID = postmeta.post_id\n\t\tAND postmeta.meta_key = 'show_on_index'\n\t\tAND postmeta.meta_value = 'yes'\n\t\tAND posts.post_status = 'publish'\n\t\tAND posts.post_type = 'page'\n\t\tORDER BY posts.post_date ASC LIMIT 1\";\n\t$page = $wpdb->get_row ($query);\n\n\treturn $page;\n}", "function thinkup_input_sticky() {\n\tprintf( '<span class=\"sticky\"><a href=\"%1$s\" title=\"%2$s\">' . esc_html__( 'Sticky', 'ESTSB' ) . '</a></span>',\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_title() )\n\t);\n}", "public function isSticky()\n {\n return $this->sticky;\n }", "function horizon_theme_posted_on() {\n\t\tif ( is_sticky() && is_home() && ! is_paged() ) {\n\t\t\techo '<span class=\"featured-post\">' . __( 'Sticky', 'horizon-theme' ) . ' </span>';\n\t\t}\n\n\t\t// Set up and print post meta information.\n\t\tprintf( '<span class=\"entry-date\">%s <time class=\"entry-date\" datetime=\"%s\">%s</time></span> <span class=\"byline\">%s <span class=\"author vcard\"><a class=\"url fn n\" href=\"%s\" rel=\"author\">%s</a></span>.</span>',\n\t\t\t__( 'Posted in', 'horizon-theme' ),\n\t\t\tesc_attr( get_the_date( 'c' ) ),\n\t\t\tesc_html( get_the_date() ),\n\t\t\t__( 'by', 'horizon-theme' ),\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tget_the_author()\n\t\t);\n\t}", "function post_pagination($query)\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\tif ($query->is_home() && $query->is_main_query()) {\r\n\t\t$query->set('posts_per_page', '5');\r\n\t\t$query->set('post__not_in', get_option('sticky_posts'));\r\n\t}\r\n}", "public function getIsSticky()\n {\n return $this->isSticky;\n }", "public static function get_sticky_data()\n {\n /**\n * Put all results in the response array.\n */\n $response = [];\n\n /**\n * \n */\n $sticky = [\n 'id' => 0,\n 'title' => 'Uitgelicht',\n 'items' => [],\n 'hasMore' => false\n ];\n\n /**\n * Get all fragments with the sticky meta.\n */\n $args = [\n 'post_type' => 'fragment',\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n 'meta_query' => [\n [\n 'key' => 'fragment_sticky',\n 'value' => 1,\n 'compare' => '='\n ]\n ]\n ];\n\n $query = new \\WP_Query($args);\n if ($query->have_posts()) {\n while ($query->have_posts()) {\n $query->the_post();\n\n $fragment_id = get_the_id();\n $audio_file = get_field('fragment_audio_file');\n $still = get_field('fragment_still');\n\n $title = apply_filters('the_title', get_the_title());\n $title = html_entity_decode($title);\n\n /**\n * Only append items that have valid audio files.\n */\n if ($audio_file) {\n $sticky['items'][] = [\n 'id' => 'sticky-' . $fragment_id,\n 'title' => $title,\n 'category' => 0,\n 'thumbnail' => [\n '@1x' => $still['sizes']['fragment-thumbnail@1x'],\n 'alt' => $still['alt']\n ],\n 'audio' => [\n 'url' => $audio_file['url'],\n 'mimeType' => $audio_file['mime_type']\n ]\n ];\n }\n }\n\n wp_reset_postdata();\n }\n\n $response[] = $sticky;\n return $response;\n }", "public function index() {\n \n if (!Auth::check()) {\n return Redirect::to('login');\n }\n\n $results = Sticky::where('user_id', '=', Auth::user()->id)\n ->orderBy('id', 'DESC')\n ->skip(0)\n ->take(8)\n ->get();\n $count = Sticky::where('user_id', '=', Auth::user()->id)\n ->count();\n \n $this->layout->content = View::make('sticky.show')\n ->with(array('results'=>$results,'count'=>$count));\n }", "function ridizain_has_featured_posts() {\r\n\treturn ! is_paged() && (bool) ridizain_get_featured_posts();\r\n}", "function sticky_class($post_id = \\null)\n {\n }", "function tptn_pop_posts( $daily = false , $widget = false ) {\r\n\tglobal $wpdb, $siteurl, $tableposts, $id;\r\n\tif ($daily) $table_name = $wpdb->prefix . \"top_ten_daily\"; \r\n\t\telse $table_name = $wpdb->prefix . \"top_ten\";\r\n\t$tptn_settings = tptn_read_options();\r\n\t$limit = $tptn_settings['limit'];\r\n\r\n\tif (!$daily) {\r\n\t\t$sql = \"SELECT postnumber, cntaccess as sumCount, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t} else {\r\n\t\t$daily_range = $tptn_settings[daily_range] - 1;\r\n\t\t$current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\t\t$current_date = strtotime ( '-'.$daily_range. ' DAY' , strtotime ( $current_time ) );\r\n\t\t$current_date = date ( 'Y-m-j' , $current_date );\r\n\t\t\r\n\t\t$sql = \"SELECT postnumber, SUM(cntaccess) as sumCount, dp_date, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' AND dp_date >= '$current_date' \";\r\n\t\t$sql .= \"GROUP BY postnumber \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t}\r\n\t$results = $wpdb->get_results($sql);\r\n\t$output = '';\r\n\r\n\tif (!$widget) {\r\n\t\tif (!$daily) {\r\n\t\t\t$output .= '<div id=\"tptn_related\">'.$tptn_settings['title'];\r\n\t\t} else {\r\n\t\t\t$output .= '<div id=\"tptn_related_daily\">'.$tptn_settings['title_daily'];\r\n\t\t}\r\n\t}\r\n\t\r\n\tif ($results) {\r\n\t\t$output .= $tptn_settings['before_list'];\r\n\t\tforeach ($results as $result) {\r\n\t\t\t$title = trim(stripslashes(get_the_title($result->postnumber)));\r\n\t\t\t$output .= $tptn_settings['before_list_item'];\r\n\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='thumbs_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">';\r\n\t\t\t\tif ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($result->postnumber))) {\r\n\t\t\t\t\t$output .= get_the_post_thumbnail( $result->postnumber, array($tptn_settings[thumb_width],$tptn_settings[thumb_height]), array('title' => $title,'alt' => $title, 'class' => 'tptn_thumb', 'border' => '0'));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$postimage = get_post_meta($result->postnumber, $tptn_settings[thumb_meta], true);\t// Check \r\n\t\t\t\t\tif ((!$postimage)&&($tptn_settings['scan_images'])) {\r\n\t\t\t\t\t\tpreg_match_all( '|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $result->post_content, $matches );\r\n\t\t\t\t\t\t// any image there?\r\n\t\t\t\t\t\tif( isset( $matches ) && $matches[1][0] ) {\r\n\t\t\t\t\t\t\t$postimage = $matches[1][0]; // we need the first one only!\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$postimage) $postimage = $tptn_settings[thumb_default];\r\n\t\t\t\t\t$output .= '<img src=\"'.$postimage.'\" alt=\"'.$title.'\" title=\"'.$title.'\" width=\"'.$tptn_settings[thumb_width].'\" height=\"'.$tptn_settings[thumb_height].'\" border=\"0\" class=\"tptn_thumb\" />';\r\n\t\t\t\t}\r\n\t\t\t\t$output .= '</a> ';\r\n\t\t\t}\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='text_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">'.$title.'</a>';\r\n\t\t\t}\t\t\r\n\t\t\tif ($tptn_settings['show_excerpt']) {\r\n\t\t\t\t$output .= '<span class=\"tptn_excerpt\"> '.tptn_excerpt($result->post_content,$tptn_settings['excerpt_length']).'</span>';\r\n\t\t\t}\r\n\t\t\tif ($tptn_settings['disp_list_count']) $output .= ' ('.$result->sumCount.')';\r\n\t\t\t$output .= $tptn_settings['after_list_item'];\r\n\t\t}\r\n\t\tif ($tptn_settings['show_credit']) $output .= '<li>Popular posts by <a href=\"http://ajaydsouza.com/wordpress/plugins/top-10/\">Top 10 plugin</a></li>';\r\n\t\t$output .= $tptn_settings['after_list'];\r\n\t}\r\n\tif (!$widget) $output .= '</div>';\r\n\r\n\treturn $output;\r\n}", "function tptn_show_pop_posts() {\r\n\techo tptn_pop_posts(false,false);\r\n}", "function have_posts()\n {\n }", "function wp_bottom_featured_bar_post() {\n global $post;\n // show only if the post type is a blog post\n if($post && $post->post_type != \"post\")\n return null;\n\n // load categories \n $categories = wp_get_post_categories($post->ID);\n $args = array( 'posts_per_page' => 5, 'orderby' => 'rand', 'exclude' => $post->ID ); \n\n if ( $count = count($categories) > 0 ) {\n if ( $count == 1 && $categories[0] == 1) {\n // ignore the filter.\n } else {\n $args['category'] = implode($categories, \",\");\n }\n }\n\n $rand_posts = get_posts( $args );\n\n return $rand_posts[0];\n}", "function otm_show_featured_posts() {\n\n\t$my_query = new WP_Query( array( \n\t\t'meta_key' \t\t\t\t=> 'is_featured',\n\t\t'post_type'\t\t\t\t=> 'post',\n\t\t'meta_value'\t\t\t=> true,\n\t\t'numberposts' \t\t=> 3\n\t) );\n\n\t// If our query has posts\n\tif ( $my_query->have_posts() ) :\n\t\twhile ( $my_query->have_posts() ) : $my_query->the_post();\n\n\t\t\t// Get specific template-part\n\t\t\tget_template_part( 'template-parts/post/content-featured' );\n\n\t\tendwhile;\n\tendif;\n\n\twp_reset_query();\n}", "function tptn_show_daily_pop_posts() {\r\n\tglobal $tptn_url;\r\n\t$tptn_settings = tptn_read_options();\r\n\tif ($tptn_settings['d_use_js']) {\r\n\t\techo '<script type=\"text/javascript\" src=\"'.$tptn_url.'/top-10-daily.js.php?widget=1\"></script>';\r\n\t} else {\r\n\t\techo tptn_pop_posts(true,false);\r\n\t}\r\n}", "public function show() {\n $skip=Input::get('limit');\n $take=3;\n $results = Sticky::where('user_id', '=', Auth::user()->id)\n ->orderBy('id', 'DESC')\n ->skip($skip)\n ->take($take)\n ->get();\n \n return View::make('sticky.scroll')\n ->with('results', $results);\n }", "function show_posts(\n $thread, $forum, $start, $postid, $sort_style, $filter, $logged_in_user\n) {\n $n = 1;\n\n $num_to_show = 20;\n if ($logged_in_user && $logged_in_user->prefs->display_wrap_postcount > 0) {\n $num_to_show = $logged_in_user->prefs->display_wrap_postcount;\n }\n\n // let moderators see all posts, including hidden ones\n //\n if (is_moderator($logged_in_user, $forum)) {\n $show_hidden = true;\n } else {\n $show_hidden = false;\n }\n\n $posts = get_thread_posts($thread->id, $sort_style, $show_hidden);\n\n $latest_viewed = 0;\n $forum_log = null;\n if ($logged_in_user) {\n $forum_log = BoincForumLogging::lookup($logged_in_user->id, $thread->id);\n if ($forum_log) {\n $latest_viewed = $forum_log->timestamp;\n }\n }\n\n if ($sort_style == CREATE_TIME_OLD) {\n // show the last page\n //\n $nposts = sizeof($posts);\n if ($nposts) $nposts -= 1;\n $page = (int)($nposts/$num_to_show);\n $default_start = $page*$num_to_show;\n } else {\n $default_start = 0;\n }\n\n // jump to a specific post if needed\n //\n $jump_to_post = null;\n if ($start === null) {\n if ($postid) {\n // jump to a specific post\n //\n $i = 0;\n foreach ($posts as $post) {\n if ($post->id == $postid) {\n $start = $i - ($i % $num_to_show);\n $jump_to_post = $post;\n break;\n }\n $i++;\n }\n if ($start === null) {\n echo \"Post $postid not found.\";\n return;\n }\n } else if ($logged_in_user && $logged_in_user->prefs->jump_to_unread) {\n // jump to the first unread post\n //\n $i = 0;\n $ibest = 0;\n foreach ($posts as $post) {\n if ($post->timestamp > $latest_viewed) {\n if (!$jump_to_post || ($post->timestamp < $jump_to_post->timestamp)) {\n $jump_to_post = $post;\n $ibest = $i;\n }\n }\n $i++;\n }\n if ($jump_to_post) {\n $start = $ibest - ($ibest % $num_to_show);\n } else {\n $start = $default_start;\n }\n } else {\n $start = $default_start;\n }\n }\n\n $page_nav = page_links(\n \"forum_thread.php?id=$thread->id&sort_style=$sort_style\",\n sizeof($posts),\n $num_to_show,\n $start\n );\n\n echo $page_nav;\n\n $num_shown = 0;\n $num_skipped = 0;\n $headings = array(array(tra(\"Author\"),\"authorcol\"), array(tra(\"Message\"),\"\"));\n start_forum_table($headings, \"id=\\\"thread\\\" cellspacing=0\");\n\n $latest_shown_timestamp = 0;\n foreach ($posts as $post) {\n if ($num_skipped < $start) {\n $num_skipped++;\n continue;\n }\n if ($num_shown == $num_to_show) {\n break;\n }\n show_post(\n $post, $thread, $forum, $logged_in_user, $latest_viewed, $n,\n FORUM_CONTROLS, $filter\n );\n $n = ($n+1)%2;\n \n if ($post->timestamp > $latest_shown_timestamp) {\n $latest_shown_timestamp = $post->timestamp;\n }\n $num_shown++;\n }\n end_table();\n echo $page_nav;\n\n if ($jump_to_post) {\n echo \"<script>function jumpToUnread(){location.href='#\".$jump_to_post->id.\"';}</script>\";\n } else {\n echo \"<script>function jumpToUnread(){};</script>\";\n }\n\n if ($logged_in_user) {\n if (!$forum_log || $latest_shown_timestamp > $forum_log->timestamp) {\n BoincForumLogging::replace(\n $logged_in_user->id, $thread->id, $latest_shown_timestamp\n );\n }\n }\n}", "function twentyfourteen_has_featured_posts() {\n\treturn ! is_paged() && (bool) twentyfourteen_get_featured_posts();\n}", "function twentyfourteen_has_featured_posts() {\n\treturn ! is_paged() && (bool) twentyfourteen_get_featured_posts();\n}", "function wpex_has_sticky_header() {\n\n\t// Disable for custom header and in VC Live editor\n\tif ( wpex_has_custom_header() || wpex_vc_is_inline() ) {\n\t\treturn;\n\t}\n\n\t// Disabled by default\n\t$return = false;\n\n\t// Get current post id\n\t$post_id = wpex_get_current_post_id();\n\n\t// Check meta first it should override any filter!\n\tif ( $post_id && 'disable' == get_post_meta( $post_id, 'wpex_sticky_header', true ) ) {\n\t\treturn false;\n\t}\n\n\t// Get header style\n\t$header_style = wpex_header_style( $post_id );\n\n\t// Return true if header is not disabled and header style is either 1 or 2\n\tif ( 'disabled' != wpex_sticky_header_style() && ( 'one' == $header_style || 'five' == $header_style ) ) {\n\t\t$return = true;\n\t}\n\n\t// No sticky header for the vertical header\n\tif ( 'six' == $header_style ) {\n\t\t$return = false;\n\t}\n\n\t// Apply filters and return\n\treturn apply_filters( 'wpex_has_fixed_header', $return );\n\n}", "function oppen_pre_get_posts($query) {\n /*if ($_GET['infinity'] === 'scrolling' && !$query->is_category('blogg')) {\n return;\n }*/\n\n // If we're in the admin, don't modify the query\n if (is_admin()) {\n return;\n }\n\n // If we're on the front page, fetch the 3 latest blog posts\n if ($query->is_home() && $query->is_main_query()) {\n $query->set('is_category_blog', true);\n $query->set('category_name', 'blogg');\n $query->set('showposts', 3);\n return;\n }\n\n // If we're on the blog category page, increase the post\n // limit to 90 posts and order descending by date.\n if (!$query->is_home() && $query->is_category('blogg')) {\n $query->set('showposts', 9);\n $query->set('orderby', 'date');\n $query->set('order', 'desc');\n } else {\n // Otherwise, order ascending by title\n $query->set('orderby', 'title');\n $query->set('order', 'asc');\n }\n}", "function hkr_skip_featured_post() {\n global $post, $_hkr_displayed_ids;\n\n if ( in_array($post->ID, $_hkr_displayed_ids) ) {\n the_post(); // advance to the next post\n }\n}", "function getPublishedPostsOnly() {\n\tglobal $conn;\n\t$sql = \"SELECT * FROM posts WHERE published=true order by created_at DESC LIMIT 3\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch all posts as an associative array called $posts\n\t$posts = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t$final_posts = array();\n\tforeach ($posts as $post) {\n\t\t$post['topic'] = getPostTopic($post['id']); \n\t\tarray_push($final_posts, $post);\n\t}\n\treturn $final_posts;\n}", "function broadcast_content() {\n\t// Always print broadcast title\n\tbroadcast_archive_title();\n\t\n\tif ( have_posts() ) : \n\t\n\t\t/* Start the Loop */ \n\n\t\t// Set variable for first post\n\t\t$first_post = true;\n\n\t\t// Get paged variable\n\t\t$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;\n\n\t\twhile ( have_posts() ) : the_post();\n\n\t\t\t// Is it a specialpost?\n\t\t\t$specialpost = ( 1 === (int) get_post_meta( get_the_ID(), 'rabe_specialpost', true ) ) ? true : false;\n\t\t\t\n\t\t\t// Is it really first post on first page? Open a div with first-post class\n\t\t\tif ( $first_post && 1 === $paged ) {\n\t\t\t\t$first_post_div = true;\n\t\t\t\techo '<div class=\"first-post\">';\t\t\t\n\t\t\t} else {\n\t\t\t\t$first_post_div = false;\n\t\t\t}\n\t\t\t\n\t\t\t?>\n\t\t\t<article <?php omega_attr( 'post' ); ?>>\n\t\t\t<div class=\"entry-wrap\">\n\t\t\t\t<div class=\"text-wrap\">\n\t\t\t\t<?php\n\t\t\t\t// Display first post (full post, take the_content())\n\t\t\t\tif ( $first_post_div ) {\n\t\t\t\t\t$first_post = false; // Now we are in first post, set false for next loop\n\t\t\t\t\tdo_action( 'omega_before_entry' ); ?>\n\t\t\t\t\t<div <?php omega_attr( 'entry-content' ); ?>>\n\t\t\t\t\t\t<?php the_content(); ?>\n\t\t\t\t\t</div><?php\n\t\t\t\t\tdo_action( 'omega_after_entry' );\n\t\t\t\t// Only print title on specialposts\n\t\t\t\t} elseif ( $specialpost ) {\n\t\t\t\t\techo '<header class=\"entry-header\">';\n\t\t\t\t\tget_template_part( 'partials/entry', 'title' );\n\t\t\t\t\techo '</header><!-- .entry-header -->';\n\t\t\t\t// Normal posts\n\t\t\t\t} else {\n\t\t\t\t\tdo_action( 'omega_before_entry' );\n\t\t\t\t\tdo_action( 'omega_entry' );\n\t\t\t\t\tdo_action( 'omega_after_entry' );\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"hide-overflow\"></div>\n\t\t\t</div>\n\t\t\t</article>\n\t\t\t<?php\n\t\t\t// Close div of first post\n\t\t\tif ( $first_post_div ) {\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t\t\n\t\tendwhile; \n\t\t\n\t\tdo_action( 'omega_after_loop'); \n\tendif; \n}", "function cosmetro_sticky_label() {\n\n\tif ( ! is_sticky() || ! is_home() || is_paged() ) {\n\t\treturn;\n\t}\n\n\t$sticky_label = get_theme_mod( 'blog_sticky_label' );\n\n\tif ( empty( $sticky_label ) ) {\n\t\treturn;\n\t}\n\n\tprintf( '<span class=\"sticky__label\">%s</span>', cosmetro_render_icons( $sticky_label ) );\n}", "private function unsetStickyArticle()\n {\n\t\t$articles = $this->model->getArticles()->where('sticky', TRUE);\n\t\tforeach ($articles as $article) {\n\t\t\t$this->model->getArticles()->find($article->id)->update(array('sticky' => 0));\n\t\t}\n }", "function wgom_top_featured_posts($pinned_categories, $featured_tags) {\n\t// Query for last Cup of Coffee post (catid = 5) and Video post\n\t// (catid = 22).\n\t//$pinned_categories = array(5, 22);\n\n\t$pinned_categories_sql = implode(', ', $pinned_categories);\n\t$category_posts = array();\n\tforeach ($pinned_categories as $catid) {\n\t\t$post = get_posts(array(\n\t\t\t'fields' => 'ids',\n\t\t\t'numberposts' => 1,\n\t\t\t'category' => $catid,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t));\n\t\tif ($post) {\n\t\t\t$category_posts[] = $post[0];\n\t\t}\n\t}\n\n\t// Map the tag names to IDs. The get_posts function needs the tag ID.\n\t$featured_tag_ids = array();\n\t// Return sticky post ids if no tag name is set.\n\tforeach ($featured_tags as $tag_name => $num_posts) {\n\t\t$term = get_term_by('name', $tag_name, 'post_tag');\n\t\tif ($term) {\n\t\t\t$featured_tag_ids[$term->term_id] = $num_posts;\n\t\t}\n\t}\n\n\t$featured_tag_posts = array();\n\t// Query for featured tag posts.\n\tforeach ($featured_tag_ids as $featured_tag => $num_posts) {\n\t\t$tag_posts = get_posts( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'numberposts' => $num_posts,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t'taxonomy' => 'post_tag',\n\t\t\t\t\t'terms' => $featured_tag,\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\n\t\t$featured_tag_posts = array_merge($featured_tag_posts, $tag_posts);\n\t}\n\n\t$pinned_row_ids = array_merge($category_posts, $featured_tag_posts);\n\treturn $pinned_row_ids;\n}", "public function mostRecentPostsForSidebar()\n {\n return $this->where(['status' => 'active'])\n ->order(['date_created' => 'DESC'])\n ->limit(10);\n }", "function delivery_pre_get_posts( $query ) {\n\n\t// Bail if not home or not main query.\n\tif ( ! $query->is_home() || ! $query->is_main_query() ) {\n\t\treturn;\n\t}\n\n\t$page_on_front = get_option( 'page_on_front' );\n\n\t// Bail if the blog page is not the front page.\n\tif ( ! empty( $page_on_front ) ) {\n\t\treturn;\n\t}\n\n\t// Get the tag.\n\t$featured = get_theme_mod( 'delivery_featured_posts', 'featured' );\n\n\t// Bail if no featured posts.\n\tif ( ! $featured ) {\n\t\treturn;\n\t}\n\n\t// Get the tag name.\n\t$exclude = get_term_by( 'name', $featured, 'post_tag' );\n\n\t// Exclude the main query.\n\tif ( ! empty( $exclude ) ) {\n\t\t$query->set( 'tag__not_in', $exclude->term_id );\n\t}\n\n}", "function ridizain_get_featured_posts() {\r\n\t/**\r\n\t * Filter the featured posts to return in Ridizain.\r\n\t *\r\n\t * @since Ridizain 1.0\r\n\t *\r\n\t * @param array|bool $posts Array of featured posts, otherwise false.\r\n\t */\r\n\treturn apply_filters( 'ridizain_get_featured_posts', array() );\r\n}", "function block_core_calendar_has_published_posts()\n {\n }", "function caldol_no_replies_bbpress_topics_shortcode() {\n\n\t?>\n\n<!-- html custom-functions -->\n\n<h4 style=\"margin-top: 15px;\">Discussions with No Replies. Be the first to jump in!</h4>\n\n<?php\n\n\n\nif ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'meta_key' => '_bbp_reply_count', 'orderby' => 'post_date', 'meta_value' => '0', 'meta_compare' => '=', 'post_parent' => 'any', 'posts_per_page' => 10 ) ) )\n\nbbp_get_template_part( 'bbpress/loop', 'topics' );\n\n?>\n\n<!-- end -->\n\n<?php }", "function more_posts() \n{\n global $wp_query;\n return $wp_query->current_post + 1 < $wp_query->post_count;\n}", "function ajan_use_embed_in_forum_posts() {\n\treturn apply_filters( 'ajan_use_embed_in_forum_posts', !defined( 'AJAN_EMBED_DISABLE_FORUM_POSTS' ) || !AJAN_EMBED_DISABLE_FORUM_POSTS );\n}", "public function woo_single_product_sticky() {\n\n\t\t\tif ( ! astra_get_option( 'single-product-sticky-summary' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_action( 'woocommerce_before_single_product_summary', array( $this, 'sticky_content_wrapper_start' ), 10 );\n\t\t\tadd_action( 'woocommerce_after_single_product_summary', array( $this, 'sticky_content_wrapper_end' ), 9 );\n\t\t}", "function otm_get_featured_posts() {\n\n\t$my_query = new WP_Query( array( \n\t\t'meta_key' \t\t\t\t=> 'is_featured',\n\t\t'post_type'\t\t\t\t=> 'post',\n\t\t'meta_value'\t\t\t=> true,\n\t\t'numberposts' \t\t=> 3\n\t) );\n\n\t// If our query has posts\n\tif ( $my_query->have_posts() ) :\n\t\treturn true;\n\t\twp_reset_query();\n\telse :\n\t\twp_reset_query();\n\t\treturn;\n\tendif;\n}", "public function is_posts_page() {\n return ( is_home() && 'page' == get_option( 'show_on_front' ) );\n }", "public function toggleStickinessObject()\n\t{\n\t\tglobal $ilAccess;\n\t\t\n\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t{\n\t\t\tif ($this->objCurrentTopic->isSticky())\n\t\t\t{\n\t\t\t\t$this->objCurrentTopic->unmakeSticky();\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->objCurrentTopic->makeSticky();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->viewThreadObject();\n\t\t\n\t\treturn true;\n\t}", "function more_posts() {\n global $wp_query; // following the current one\n return $wp_query->current_post + 1 < $wp_query->post_count;\n}", "function ind_pre_get_posts(&$query) {\r\n\tif (\r\n\t\tisset( $query->query_vars['post_status'] ) && $query->query_vars['post_status'] == 'draft'\r\n\t\t&& isset( $query->query_vars['post_type'] ) && $query->query_vars['post_type'] == 'post'\r\n\t\t&& isset( $query->query_vars['author'] ) && $query->query_vars['author'] == $GLOBALS['current_user']->ID\r\n\t\t&& isset( $query->query_vars['posts_per_page'] ) && $query->query_vars['posts_per_page'] == 5\r\n\t\t&& isset( $query->query_vars['orderby'] ) && $query->query_vars['orderby'] == 'modified'\r\n\t\t&& isset( $query->query_vars['order'] ) && $query->query_vars['order'] == 'DESC'\r\n\t\t) {\r\n\t\t// show all post types\r\n\t\t$query->query_vars['post_type'] = 'any';\r\n\t\t// show 10 drafts\r\n\t\t$query->query_vars['posts_per_page'] = 10;\r\n\t\t// if admin or editor, show drafts of all users\r\n\t\tif ( current_user_can( 'administrator' ) || current_user_can( 'editor' ) ) {\r\n\t\t\tunset( $query->query_vars['author'] );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( $query->is_admin ) return;\r\n\r\n\tif ( !$query->is_main_query() ) return;\r\n\r\n\tif (!empty($query->query['post_type']) && ( $query->query['post_type'] == 'memberlevel' ) ) return;\r\n\r\n\tif ( $query->is_search ) {\r\n\t\t$query->set( 'posts_per_page', -1);\r\n\t \tif ( ! empty( $query->query_vars['filter'] ) ) {\r\n\t \t\t$query->set( 'post_type', $query->query_vars['filter'] );\r\n\t\t\tunset( $query->query['filter'] );\r\n \t\t} else if ( !empty( $_GET['filter'] ) ) {\r\n\t\t\t$query->set( 'post_type', $_GET['filter'] );\r\n\t \t} else {\r\n\t\t\t$query->set( 'post_type', array( 'hotel', 'restaurant', 'shop', 'activity', 'itinerary', 'library', 'article', 'offer', 'insidertrip' ) );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( is_archive() ) {\r\n\t\tif ( !empty($query->query['post_type']) && in_array($query->query['post_type'], array(\r\n\t\t\t\t\t\t'hotel',\r\n\t\t\t\t\t\t'restaurant',\r\n\t\t\t\t\t\t'shop',\r\n\t\t\t\t\t\t'activity',\r\n\t\t\t\t\t\t'offer'\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t) {\r\n\t\t\t$query->set('orderby', array( 'post_title' => 'ASC' ) );\r\n\r\n\t } else if ( !empty($query->query['post_type']) && $query->query['post_type'] == 'article' && getLastPathSegment($_SERVER['REQUEST_URI']) !== 'features' ) {\r\n\t\t // order articles by reverse date except features page\r\n\t\t$query->set( 'orderby', array( 'date' => 'DESC' ) );\r\n\t }\r\n\t}\r\n}", "function has_posts() {\n\tif(($posts = IoC::resolve('posts')) === false) {\n\t\t$params['sortby'] = 'id';\n\t\t$params['sortmode'] = 'desc';\n\t\t\n\t\t$posts = Posts::list_all($params);\n\t\tIoC::instance('posts', $posts, true);\n\t}\n\t\n\treturn $posts->length() > 0;\n}", "function block_core_calendar_update_has_published_posts()\n {\n }", "function accouk_homepage_latest_posts() {\n\n $args = array('post_type' => 'post', 'category_name' => 'blog', 'posts_per_page' => 4, 'orderby' => 'date', 'order' => 'DESC');\n $query = new WP_Query( $args );\n\n if ( $query->have_posts() ) {\n\n echo '<ul class=\"post-list homepage-post-list\">';\n\n \twhile ( $query->have_posts() ) {\n \t\t$query->the_post(); ?>\n\n <li>\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php the_title(); ?>\">\n <div class=\"main-tile-part\">\n <?php echo accouk_post_tile_image(); ?>\n <span><h3><?php the_title(); ?></h3></span>\n </div>\n <div class=\"sub-tile-part\">\n <span class=\"excerpt\"><?php the_excerpt(); ?></span>\n <span class=\"date\"><?php echo get_the_date(); ?></span>\n <span class=\"cta\">Read Now</span>\n </div>\n </a>\n </li>\n <?php\n \t}\n\n \techo '</ul>';\n\n } else {\n \techo \"<p>Sorry, an error has occurred</p>\";\n }\n\n}", "function tptn_daily_lists() {\r\n\tglobal $wpdb, $siteurl, $tableposts, $id;\r\n\t$table_name = $wpdb->prefix . \"top_ten_daily\";\r\n\t\r\n\t$is_widget = intval($_GET['widget']);\r\n\t\r\n\t$tptn_settings = tptn_read_options();\r\n\t$limit = $tptn_settings['limit'];\r\n\t$daily_range = $tptn_settings[daily_range]-1;\r\n\t$current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\t$current_date = strtotime ( '-'.$daily_range. ' DAY' , strtotime ( $current_time ) );\r\n\t$current_date = date ( 'Y-m-j' , $current_date );\r\n\t\r\n\t$sql = \"SELECT postnumber, SUM(cntaccess) as sumCount, dp_date, ID, post_type, post_status \";\r\n\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t$sql .= \"AND post_status = 'publish' AND dp_date >= '$current_date' \";\r\n\t$sql .= \"GROUP BY postnumber \";\r\n\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\r\n\t$results = $wpdb->get_results($sql);\r\n\t\r\n\t$output = '<div id=\"tptn_related_daily\">';\r\n\tif(!$is_widget) $output .= $tptn_settings['title_daily'];\r\n\r\n\tif ($results) {\r\n\t\t$output .= $tptn_settings['before_list'];\r\n\t\tforeach ($results as $result) {\r\n\t\t\t$title = trim(stripslashes(get_the_title($result->postnumber)));\r\n\t\t\t$output .= $tptn_settings['before_list_item'];\r\n\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='thumbs_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">';\r\n\t\t\t\tif ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($result->postnumber))) {\r\n\t\t\t\t\t$output .= get_the_post_thumbnail( $result->postnumber, array($tptn_settings[thumb_width],$tptn_settings[thumb_height]), array('title' => $title,'alt' => $title, 'class' => 'tptn_thumb', 'border' => '0'));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$postimage = get_post_meta($result->postnumber, $tptn_settings[thumb_meta], true);\t// Check \r\n\t\t\t\t\tif ((!$postimage)&&($tptn_settings['scan_images'])) {\r\n\t\t\t\t\t\tpreg_match_all( '|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $result->post_content, $matches );\r\n\t\t\t\t\t\t// any image there?\r\n\t\t\t\t\t\tif( isset( $matches ) && $matches[1][0] ) {\r\n\t\t\t\t\t\t\t$postimage = $matches[1][0]; // we need the first one only!\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$postimage) $postimage = $tptn_settings[thumb_default];\r\n\t\t\t\t\t$output .= '<img src=\"'.$postimage.'\" alt=\"'.$title.'\" title=\"'.$title.'\" width=\"'.$tptn_settings[thumb_width].'\" height=\"'.$tptn_settings[thumb_height].'\" border=\"0\" class=\"tptn_thumb\" />';\r\n\t\t\t\t}\r\n\t\t\t\t$output .= '</a> ';\r\n\t\t\t}\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='text_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">'.$title.'</a>';\r\n\t\t\t}\t\t\r\n\t\t\tif ($tptn_settings['show_excerpt']) {\r\n\t\t\t\t$output .= '<span class=\"tptn_excerpt\"> '.tptn_excerpt($result->post_content,$tptn_settings['excerpt_length']).'</span>';\r\n\t\t\t}\r\n\t\t\tif ($tptn_settings['disp_list_count']) $output .= ' ('.$result->sumCount.')';\r\n\t\t\t$output .= $tptn_settings['after_list_item'];\r\n\t\t}\r\n\t\tif ($tptn_settings['show_credit']) $output .= $tptn_settings['before_list_item'].'Popular posts by <a href=\"http://ajaydsouza.com/wordpress/plugins/top-10/\">Top 10 plugin</a>'.$tptn_settings['after_list_item'];\r\n\t\t$output .= $tptn_settings['after_list'];\r\n\t}\r\n\t\r\n\t$output .= '</div>';\r\n\r\n\techo \"document.write('\".$output.\"')\";\r\n}", "public function onPostShowing(Post $post)\n {\n $user = auth()->user();\n if (!isAdmin($user)) {\n $post->increment('view_count');\n }\n if (auth()->check()) {\n $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Model\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }\n }\n }", "function bones_related_posts() {\n\techo '<ul id=\"bones-related-posts\">';\n\tglobal $post;\n\t$tags = wp_get_post_tags( $post->ID );\n\tif($tags) {\n\t\tforeach( $tags as $tag ) {\n\t\t\t$tag_arr .= $tag->slug . ',';\n\t\t}\n\t\t$args = array(\n\t\t\t'tag' => $tag_arr,\n\t\t\t'numberposts' => 5, /* you can change this to show more */\n\t\t\t'post__not_in' => array($post->ID)\n\t\t);\n\t\t$related_posts = get_posts( $args );\n\t\tif($related_posts) {\n\t\t\tforeach ( $related_posts as $post ) : setup_postdata( $post ); ?>\n\t\t\t\t<li class=\"related_post\"><a class=\"entry-unrelated\" href=\"<?php the_permalink() ?>\" title=\"<?php the_title_attribute(); ?>\"><?php the_title(); ?></a></li>\n\t\t\t<?php endforeach; }\n\t\telse { ?>\n\t\t\t<?php echo '<li class=\"no_related_post\">' . __( 'No Related Posts Yet!', 'bonestheme' ) . '</li>'; ?>\n\t\t<?php }\n\t}\n\twp_reset_postdata();\n\techo '</ul>';\n}", "public function onPostShowing(Post $post)\n {\n $user = auth()->user();\n if (!isAdmin($user)) {\n $post->increment('view_count');\n }\n\n if (auth()->check()) {\n $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }\n }\n }", "function top_news_hot_post($title,$time_limit,$limit,$el_class){\n $unqID = uniqid();\n ?>\n <div id=\"post-widget-<?php echo esc_attr($unqID);?>\" data-content-id=\"post-widget-<?php echo esc_attr($unqID);?>\" class=\"posts-widget posts-lists archive-row x2 ajax block <?php echo esc_attr($el_class); ?>\">\n <?php if(! empty($title)) : ?>\n <h2 class=\"widget-title\"><span><?php echo esc_html($title); ?></span></h2>\n <div class=\"clearfix\"></div>\n <?php endif; ?>\n <div class=\"rp-ajax-row\">\n <?php\n $query_args = array(\n 'post_type' => 'post',\n 'posts_per_page' => $limit,\n 'meta_key' => 'post_views_count', \n 'orderby' => 'meta_value_num', \n 'ignore_sticky_posts' => true, \n 'date_query' => array(\n array(\n 'after' => esc_html($time_limit).' weeks ago',\n ),\n ),\n );\n\n $the_query = new WP_Query( $query_args );\n if ( $the_query->have_posts() ) :\n while ( $the_query->have_posts() ) : $the_query->the_post();\n $meta_data = get_post_meta( get_the_ID(), '_format-video', true );\n ?>\n <article class=\"post-item <?php echo ( has_post_thumbnail()) ? 'has-post-thumbnail' : '' ; ?>\">\n <?php if ( has_post_thumbnail() ) : ?>\n <div class=\"post-thumb\">\n <a href=\"<?php the_permalink();?>\">\n <?php the_post_thumbnail('top-news-thumbnail-x2'); ?>\n </a>\n <?php if( !empty($meta_data['embedded_link'])) : ?> \n <a href=\"<?php the_permalink(); ?>\" class=\"play-btn\"></a>\n <?php endif; ?> \n </div> <!--.thumbnail --> \n <?php endif; ?>\n\n <div class=\"content\">\n <h2 class=\"title\">\n <a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a>\n </h2>\n <div class=\"meta\">\n <?php top_news_block_meta() ?>\n </div> <!--/.meta--> \n <div class=\"excerpt\"> \n <?php\n $trimexcerpt = get_the_excerpt();\n $shortexcerpt = wp_trim_words( $trimexcerpt, $num_words = '20', $more = '&#8230;' );\n echo $shortexcerpt;\n ?>\n </div> <!--/.excerpt--> \n </div><!-- /.content -->\n </article><!-- /.post-item -->\n <?php endwhile; wp_reset_postdata(); ?> \n <?php else : ?>\n <p><?php esc_html__( 'Sorry, no posts matched your criteria.' , 'top-news'); ?></p>\n <?php endif; ?>\n </div>\n </div><!-- /.posts-lists --> \n<?php }", "function bones_related_posts() {\n\techo '<ul id=\"bones-related-posts\">';\n\tglobal $post;\n\t$tags = wp_get_post_tags($post->ID);\n\tif($tags) {\n\t\tforeach($tags as $tag) { $tag_arr .= $tag->slug . ','; }\n $args = array(\n \t'tag' => $tag_arr,\n \t'numberposts' => 5, /* you can change this to show more */\n \t'post__not_in' => array($post->ID)\n \t);\n $related_posts = get_posts($args);\n if($related_posts) {\n \tforeach ($related_posts as $post) : setup_postdata($post); ?>\n\t \t<li class=\"related_post\"><a href=\"<?php the_permalink() ?>\" title=\"<?php the_title_attribute(); ?>\"><?php the_title(); ?></a></li>\n\t <?php endforeach; }\n\t else { ?>\n <li class=\"no_related_post\">No Related Posts Yet!</li>\n\t\t<?php }\n\t}\n\twp_reset_query();\n\techo '</ul>';\n}", "function moments_qodef_like_latest_posts() {\n\t\treturn moments_qodef_like()->add_like();\n\t}", "public function showSoftDeleted()\n {\n $posts = Post::onlyTrashed()->get();\n return view('admin-posts', ['posts' => $posts]);\n }", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "function widget( $args, $instance )\r\n {\r\n $instance = wp_parse_args( (array) $instance, array(\r\n 'title' => esc_html__( 'Recent Posts', 'fastway' ),\r\n 'number' => 4,\r\n 'post_in' => '',\r\n 'layout' => '1',\r\n ) );\r\n\r\n $title = empty( $instance['title'] ) ? esc_html__( 'Recent Posts', 'fastway' ) : $instance['title'];\r\n $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );\r\n\r\n echo wp_kses_post($args['before_widget']);\r\n\r\n echo wp_kses_post($args['before_title']) . wp_kses_post($title) . wp_kses_post($args['after_title']);\r\n\r\n $number = absint( $instance['number'] );\r\n if ( $number <= 0 || $number > 10)\r\n {\r\n $number = 4;\r\n }\r\n $post_in = $instance['post_in'];\r\n $layout = $instance['layout'];\r\n $sticky = '';\r\n if($post_in == 'featured') {\r\n $sticky = get_option( 'sticky_posts' );\r\n }\r\n $r = new WP_Query( array(\r\n 'post_type' => 'post',\r\n 'posts_per_page' => $number,\r\n 'no_found_rows' => true,\r\n 'post_status' => 'publish',\r\n 'ignore_sticky_posts' => true,\r\n 'post__in' => $sticky,\r\n ) );\r\n\r\n if ( $r->have_posts() )\r\n {\r\n echo '<div class=\"posts-list layout-'.esc_attr($layout).'\">';\r\n\r\n while ( $r->have_posts() )\r\n {\r\n $r->the_post();\r\n global $post;\r\n echo '<div class=\"post-item row gutters-15\">';\r\n if (has_post_thumbnail($post->ID) && wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), false)):\r\n $thumbnail_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail', false); ?>\r\n <div class=\"entry-media col-auto\">\r\n <a href=\"<?php the_permalink(); ?>\"><img src=\"<?php echo esc_url($thumbnail_url[0]); ?>\" alt=\"<?php echo esc_attr(get_the_title($post->ID)); ?>\" /></a>\r\n </div>\r\n <?php endif; ?>\r\n <div class=\"entry-content col\">\r\n <?php switch ($layout) {\r\n case '2':\r\n ?>\r\n <?php printf(\r\n '<h6 class=\"entry-title text-uppercase\"><a href=\"%1$s\" title=\"%2$s\">%3$s</a></h6>',\r\n esc_url( get_permalink() ),\r\n esc_attr( get_the_title() ),\r\n get_the_title()\r\n ); ?>\r\n <ul class=\"entry-meta\">\r\n <li><?php fastway_post_author(); ?></li>\r\n <li><?php fastway_post_comment(['text' => '','cmt_with_text' => false]); ?></li>\r\n </ul>\r\n <?php\r\n break;\r\n \r\n default:\r\n ?>\r\n <div class=\"entry-meta\">\r\n <?php echo get_the_date(); ?>\r\n </div>\r\n <?php printf(\r\n '<h6 class=\"entry-title text-uppercase\"><a href=\"%1$s\" title=\"%2$s\">%3$s</a></h6>',\r\n esc_url( get_permalink() ),\r\n esc_attr( get_the_title() ),\r\n get_the_title()\r\n ); ?>\r\n <?php # code...\r\n break;\r\n } ?>\r\n </div>\r\n </div>\r\n <?php }\r\n\r\n echo '</div>';\r\n }\r\n\r\n wp_reset_postdata();\r\n wp_reset_query();\r\n\r\n echo wp_kses_post($args['after_widget']);\r\n }", "public function index()\n {\n $posts = Post::all()->take('300')->sortByDesc('id');\n $feed_posts = [];\n foreach($posts as $post){\n if($post->visible() === true){\n array_push($feed_posts,$post);\n }\n }\n\n return view('auth.dashboard', ['posts' => $feed_posts]);\n }", "public function myPinnedPost()\n {\n return $this->posts()\n ->get()\n ->firstWhere('pinned', 1);\n }", "function wpex_has_shrink_sticky_header() {\n\n\t// Disabled by default\n\t$bool = false;\n\n\t// Sticky header must be enabled\n\tif ( wpex_has_sticky_header() ) {\n\n\t\t// Get sticky header style\n\t\t$sticky_style = wpex_sticky_header_style();\n\n\t\t// Check if enabled via sticky style\n\t\tif ( 'shrink' == $sticky_style || 'shrink_animated' == $sticky_style ) {\n\n\t\t\t// Get header style\n\t\t\t$header_style = wpex_header_style();\n\n\t\t\t// Only enabled for header styles 1 and 5\n\t\t\tif ( 'one' == $header_style || 'five' == $header_style ) {\n\t\t\t\t$bool = true;\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// Apply filters and return\n\treturn apply_filters( 'wpex_has_shrink_sticky_header', $bool );\n\n}", "public function myposts() {\n\t\t$this->template->content = View::instance('v_posts_myposts');\n\t\t$this->template->title = \"My Posts\";\n\n\t\t# only select posts created by the logged in user\n\t\t# the latest modified one is on the top\n\t\t$q = \"SELECT *\n\t\t\tFROM posts where user_id = \" . $this->user->user_id .\n\t\t\t\" ORDER BY modified DESC\";\n\t\t\t\n// echo $q;\t\t\t\n\n\t\t# Run the query\n\t\t$posts = DB::instance(DB_NAME)->select_rows($q);\n\n\t\t# Pass data to the View\n\t\t$this->template->content->posts = $posts;\n\n\t\t# Render the View\n\t\techo $this->template;\n\t}", "public function showPosts() {\r\n\t\t$allposts = $this->renderPostTemplate();\r\n\t\tforeach($allposts as $post) {\r\n\t\t\techo $post;\r\n\t\t}\r\n\t}", "function previous_posts($display = \\true)\n {\n }", "public function onPostShowing(Post $post)\n {\n $is_viewed_already=(bool) View::where('user_id', \\Auth::id())\n ->where('post_id', $this->id)\n ->first();\n\n $user = auth()->user();\n if($is_viewed_already == false){\n \\Auth::user()->views()->attach($post->id);\n }\n \n /* $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }*/\n }", "function dg_display_home_posts( $query ) {\n\t\n if ( !is_admin() && $query->is_main_query() ) {\n\t \n if ( $query->is_home() ) {\n\t\t\n\t\t// POST TYPE\n\t\t// LANGUAGE\n\t\t// PAGINATION\n\t\t$query->set( 'posts_per_page', -1 );\n\t\t\n\t\t// ORDER: orders the post by post_type ASC and by date DESC\n\t\t$post_order = array(\n\t\t\t'post_type' => 'ASC',\n\t\t\t'date' => 'DESC',\n\t\t);\n\t\t$query->set( 'orderby', $post_order );\t\t\n }\n }\n}", "public function isFooterSticky()\r\n\t{\r\n\t\treturn $this->footerSticky;\r\n\t}", "function clix_uppe_post_display( $content ){\r\n\t$bail_out = ( ( defined( 'WP_ADMIN' ) && WP_ADMIN == true ) || ( strpos( $_SERVER[ 'PHP_SELF' ], 'wp-admin' ) !== false ) );\r\n\tif($bail_out){\r\n\t\treturn $content;\r\n\t\t}\r\n\tglobal $id, $clix_rss_fail, $clix_content_fail;\r\n\tif( !is_user_logged_in() && is_single() ){\r\n\t\tif( is_feed() && get_post_meta( $id, '_clix_uppe_disable_unlessshow', true )==1 ){\r\n\t\t\t$content=$clix_rss_fail;\r\n\t\t\t}\r\n\t\telseif( get_post_meta( $id, '_clix_uppe_disable_unlessshow', true )==1 ){\r\n\t\t\t$content=$clix_content_fail;\r\n\t\t\t}\r\n\t\t}\r\n\treturn $content;\r\n}", "public function isMainPost()\n\t{\n\t\t$topic = ForumTopic::with(['messages' => function($q) {\n\t\t\t$q->orderBy('created_at','asc');\n\t\t}])->find($this->topic_id);\n\n\t\tif($topic->messages[0]->id == $this->id) return true;\n\n\t\treturn false;\n\n\t}", "function cmdeals_front_page_featured_paging_fix() {\n\t\t\n\tif ( is_front_page() && is_page( get_option('cmdeals_featured_page_id') )) :\n\t\t\n\t\tquery_posts( array( 'page_id' => get_option('cmdeals_featured_page_id'), 'is_paged' => true ) );\n\t\t\n\t\tdefine('FEATURED_IS_ON_FRONT', true);\n\t\t\n\tendif;\n}", "public function index()\n {\n $number_posts = Post::where('visible', true)->count();\n return view('home', ['posts' => Post::where('visible', true)->orderBy('created_at', 'DESC')->take(3)->get(), 'number_posts' => $number_posts]);\n }", "public function isPublished()\n {\n return $this->postID > 0;\n }", "function remove_sticky_class( $classes ){\n\tif( in_array( 'sticky', $classes ) ){\n\t\t$classes = array_diff( $classes, array( \"sticky\" ) );\n\t\t$classes[] = 'wp-sticky';\n\t}\n\t\n\treturn $classes;\n}", "function tennis_pre_get_posts( $query ) {\n\t// check if the user is requesting an admin page \n\t// or current query is not the main query\n\tif ( is_admin() || ! $query->is_main_query() ){\n\t\treturn;\n\t}\n\n\t$my_post_types = array( 'tenniseventcpt' );\n\t \n\tif( ! is_singular( $my_post_types) && ! is_post_type_archive( $my_post_types ) ) {\n\t return $template;\n\t}\n\n\t$manage = get_query_var( 'manage' );\n\n\t// add meta_query elements\n\tif( !empty( $manage ) ){\n\t\t$query->set( 'meta_key', 'manage' );\n\t\t$query->set( 'meta_value', $manage );\n\t\t$query->set( 'meta_compare', '=' );\n\t}\n\n}", "public function has_remaining_posts() {\n\t\treturn $this->has_remaining_posts;\n\t}", "function show_posts_nav() {\n\tglobal $wp_query;\n\treturn ($wp_query->max_num_pages > 1);\n}", "public function showAllPosts()\n {\n foreach ($this->_postsArray as $post) {\n $post['content']= substr($post['content'], 0, 160).'...';\n echo postsTemplate($this->_view, $post);\n };\n }", "public function getDrafts()\n {\n $mostRecommended = Post::mostRecommended();\n $last = Post::lastPosts()\n ->orderBy('created_at')\n ->where('public', 0)\n ;\n\n $categories = PostCategory::all();\n\n $drafts = Post::where('public', 0)->get();\n\n $last = $last->paginate(4);\n\n return View('blog/index',\n array(\n 'title'=>\"News\",\n 'mostRecommended'=>$mostRecommended,\n 'last'=>$last,\n 'categories' => $categories,\n 'category' => \"Drafts\" , \n 'drafts' => $drafts\n )\n );\n }", "public function index()\n {\n\t\t$blog = BlogModel::where('pinned_featured', 'y')->first();\n\t\treturn view('front', array('featured' => $blog,'featured_sub' => [$blog, $blog],'blogs' => $blog ));\n }", "function show_post(\n $post, $thread, $forum, $logged_in_user, $latest_viewed, $n,\n $controls=FORUM_CONTROLS, $filter=true\n) {\n global $country_to_iso3166_2;\n\n $user = BoincUser::lookup_id($post->user);\n BoincForumPrefs::lookup($user);\n if (is_banished($user) && !is_moderator($logged_in_user, $forum)) {\n return;\n }\n\n // If the user no longer exists, skip the post\n //\n if (!$user){\n return;\n }\n\n $config = get_config();\n $no_forum_rating = parse_bool($config, \"no_forum_rating\");\n\n $tokens = \"\";\n $options = get_output_options($logged_in_user);\n\n // check whether the poster is on the list of people to ignore\n //\n $ignore_poster = false;\n if ($logged_in_user){\n $tokens = url_tokens($logged_in_user->authenticator);\n if (is_ignoring($logged_in_user, $user)){\n $ignore_poster = true;\n }\n }\n\n // The creator can edit the post, but only in a specified amount of time\n // (exception: a moderator can edit his/her posts at any time)\n //\n $can_edit = false;\n if ($logged_in_user) {\n if ($user->id == $logged_in_user->id) {\n if (is_moderator($logged_in_user, $forum)) {\n $can_edit = true;\n } else if (can_reply($thread, $forum, $logged_in_user)) {\n $time_limit = $post->timestamp+MAXIMUM_EDIT_TIME;\n $can_edit = time()<$time_limit;\n } else {\n $can_edit = false;\n }\n }\n }\n\n\n // Print the special user lines, if any\n //\n global $special_user_bitfield;\n $fstatus=\"\";\n $keys = array_keys($special_user_bitfield);\n $is_posted_by_special = false;\n for ($i=0; $i<sizeof($special_user_bitfield);$i++) {\n if ($user->prefs && $user->prefs->privilege($keys[$i])) {\n $fstatus.=$special_user_bitfield[$keys[$i]].\"<br>\";\n $is_posted_by_special = true;\n }\n }\n \n // Highlight special users if set in prefs;\n //\n if ($logged_in_user && $logged_in_user->prefs){\n $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special;\n } else {\n $highlight = $is_posted_by_special;\n }\n echo \"\n <tr>\n <td class=\\\"leftcol \".($highlight?\"highlighted_\":\"\").\"row$n\\\" rowspan=\\\"3\\\">\n <a name=\\\"$post->id\\\"></a>\n <div class=\\\"authorcol\\\">\n \";\n\n echo user_links($user);\n echo \"<br>\";\n if ($user->create_time > time()-ST_NEW_TIME) $fstatus.=ST_NEW.\"<br>\";\n if ($fstatus) echo \"<font size=\\\"-2\\\">$fstatus</font>\";\n\n echo \"<span class=\\\"authorinfo\\\">\";\n if (!$filter || !$ignore_poster){\n if ($user->prefs && $user->prefs->avatar!=\"\" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) {\n echo \"<img class=authorinfo width=\\\"\".AVATAR_WIDTH.\"\\\" height=\\\"\".AVATAR_HEIGHT.\"\\\" src=\\\"\".$user->prefs->avatar.\"\\\" alt=\\\"Avatar\\\"><br>\";\n }\n }\n \n $url = \"pm.php?action=new&amp;userid=\".$user->id;\n $name = $user->name;\n show_button($url, tra(\"Send&nbsp;message\"), tra(\"Send %1 a private message\",$name));\n echo \"<br>\".tra(\"Joined: %1\", gmdate('j M y', $user->create_time)), \"<br>\";\n\n if (!isset($user->nposts)) {\n $user->nposts = BoincPost::count(\"user=$user->id\");\n }\n \n if (function_exists('project_forum_user_info')){\n project_forum_user_info($user);\n } else {\n echo tra(\"Posts: %1\", $user->nposts).\"<br>\";\n // circumvent various forms of identity spoofing\n // by displaying the user id of the poster.\n //\n //echo \"ID: \".$user->id.\"<br>\";\n if (!no_computing()) {\n echo tra(\"Credit: %1\", number_format($user->total_credit)) .\"<br>\";\n echo tra(\"RAC: %1\", number_format($user->expavg_credit)).\"<br>\";\n }\n // to use this feature:\n // - get flags from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip\n // - put the .png's in html/user/flags/\n // - put define(COUNTRY_FLAGS, 1) in your html/project/project.inc\n //\n if (defined(\"COUNTRY_FLAGS\")) {\n if (array_key_exists($user->country, $country_to_iso3166_2)) {\n $code = $country_to_iso3166_2[$user->country];\n echo \"<img class=flag alt=\\\"$user->country\\\" title=\\\"$user->country\\\" src=flags/$code.png><br>\\n\";\n }\n }\n }\n echo \"</span></div></td>\";\n\n echo \"<td class=\\\"postheader\\\">\";\n if ($controls == FORUM_CONTROLS) {\n echo \"<form action=\\\"forum_rate.php?post=\", $post->id, \"\\\" method=\\\"post\\\">\";\n }\n\n if ($logged_in_user && $post->timestamp>$latest_viewed){\n //show_image(NEW_IMAGE, tra(\"You haven't read this message yet\"), tra(\"Unread\"), NEW_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-comment\"></i>\n\t\t\t\t\t\t<?\n\n }\n\n echo \" <a href=\\\"forum_thread.php?id=\".$thread->id.\"&amp;postid=$post->id\\\">\".tra(\"Message %1\", $post->id).\"</a> - \";\n if ($post->hidden) echo \"<font color=red>[\".tra(\"hidden\").\"] </font>\";\n echo tra(\"Posted: %1\", pretty_time_str($post->timestamp)), \" \";\n\n if ($post->parent_post) {\n echo tra(\" - in response to \").\"<a href=\\\"forum_thread.php?id=\".$thread->id.\"&amp;postid=\".$post->parent_post.\"\\\">\".tra(\"Message %1\", $post->parent_post).\"</a>.\";\n }\n if ($can_edit && $controls != NO_CONTROLS) {\n show_button(\"forum_edit.php?id=\".$post->id.\"$tokens\", tra(\"Edit\"), tra(\"Edit this message\"),\"btn btn\");\n }\n if (is_moderator($logged_in_user, $forum)) {\n show_post_moderation_links($config, $logged_in_user, $post, $forum, $tokens);\n }\n if ($post->modified) {\n echo \"<br>\".tra(\"Last modified: %1\", pretty_time_Str($post->modified));\n }\n if ($ignore_poster && $filter){\n echo \"<br>\".tra(\"This post is not shown because the sender is on your 'ignore' list. Click %1here%2 to view this post\",\"<a href=\\\"?id=\".$thread->id.\"&amp;filter=false#\".$post->id.\"\\\">\",\"</a>\");\n }\n if ($controls == FORUM_CONTROLS) {\n echo \"</form>\\n\";\n }\n echo \"</td>\n </tr>\n <tr class=\\\"\".($highlight?\"highlighted_\":\"\").\"row$n\\\">\n <td class=\\\"postbody\\\">\n \";\n\n if (!$filter || !$ignore_poster){\n $posttext = $post->content;\n\n // If the creator of this post has a signature and\n // wants it to be shown for this post AND the logged in\n // user has signatures enabled: show it\n //\n if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){\n $posttext.=\"\\n____________\\n\".$user->prefs->signature;\n }\n\n $posttext = output_transform($posttext, $options);\n \n echo \"<p>\", $posttext, \"</p>\";\n echo \"</td></tr><tr><td class=\\\"postfooter\\\">ID: \", $post->id;\n if ($no_forum_rating) {\n echo \" | <a href=\\\"forum_report_post.php?post=\".$post->id.\"\\\">\";\n show_image(REPORT_POST_IMAGE, tra(\"Report this post as offensive\"), tra(\"Report as offensive\"), REPORT_POST_IMAGE_HEIGHT);\n echo \"</a>\";\n } else {\n $rating = $post->rating();\n echo \" | \".tra(\"Rating: %1\", $rating).\" | \".tra(\"rate: \").\"\n <a href=\\\"forum_rate.php?post=\".$post->id.\"&amp;choice=p$tokens\\\">\n \";\n //show_image(RATE_POSITIVE_IMAGE, tra(\"Click if you like this message\"), tra(\"Rate +\"), RATE_POSITIVE_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-thumbs-up\"></i>\n\t\t\t\t\t\t<?\n echo \"</a> / <a href=\\\"forum_rate.php?post=\".$post->id.\"&amp;choice=n$tokens\\\">\";\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-thumbs-down\"></i>\n\t\t\t\t\t\t<?\n //show_image(RATE_NEGATIVE_IMAGE, tra(\"Click if you don't like this message\"), tra(\"Rate -\"), RATE_NEGATIVE_IMAGE_HEIGHT);\n echo \"</a> <a href=\\\"forum_report_post.php?post=\".$post->id.\"\\\">\";\n //show_image(REPORT_POST_IMAGE, tra(\"Report this post as offensive\"), tra(\"Report as offensive\"), REPORT_POST_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-warning-sign\"></i>\n\t\t\t\t\t\t<?\n echo \"</a>\";\n }\n if (($controls == FORUM_CONTROLS) && (can_reply($thread, $forum, $logged_in_user))) {\n echo \"&nbsp;&nbsp;&nbsp;&nbsp;<div class=\\\"btn-group\\\">\";\n $url = \"forum_reply.php?thread=\" . $thread->id . \"&amp;post=\" . $post->id . \"&amp;no_quote=1#input\";\n show_button($url, tra(\"Reply\"), tra(\"Post a reply to this message\"));\n $url = \"forum_reply.php?thread=\" . $thread->id . \"&amp;post=\" . $post->id . \"#input\";\n show_button($url, tra(\"Quote\"), tra(\"Post a reply by quoting this message\"));\n\t\t\t\t\t\techo \"</div>\";\n }\n echo \"</td></tr>\";\n } else {\n echo \"</td></tr><tr><td class=\\\"postfooter\\\">\";\n }\n //echo \"<tr class=\\\"postseparator\\\"><td colspan=2></td></tr>\";\n}", "function grve_print_recent_portfolio_items() {\n\n\t$exclude_ids = array( get_the_ID() );\n\t$args = array(\n\t\t'post_type' => 'portfolio',\n\t\t'post_status'=>'publish',\n\t\t'post__not_in' => $exclude_ids ,\n\t\t'posts_per_page' => 3,\n\t\t'paged' => 1,\n\t);\n\n\n\t$query = new WP_Query( $args );\n\n\tif ( $query->have_posts() && $query->found_posts > 1 ) {\n?>\n\t<div class=\"grve-related-post\">\n\t\t<h5 class=\"grve-related-title\"><?php _e( 'Recent Entries', GRVE_THEME_TRANSLATE ); ?></h5>\n\t\t<ul>\n\n<?php\n\n\t\tif ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();\n\t\t\techo '<li>';\n\t\t\tget_template_part( 'templates/portfolio', 'recent' );\n\t\t\techo '</li>';\n\t\tendwhile;\n\t\telse :\n\t\tendif;\n?>\n\t\t</ul>\n\t</div>\n<?php\n\t\twp_reset_postdata();\n\t}\n}", "function stick_post($post_id)\n {\n }", "function block_core_calendar_update_has_published_posts() {\n\tglobal $wpdb;\n\t$has_published_posts = (bool) $wpdb->get_var( \"SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1\" );\n\tupdate_option( 'wp_calendar_block_has_published_posts', $has_published_posts );\n\treturn $has_published_posts;\n}", "public function topicsPinnedFirst() {\n\t\treturn $this->hasMany(Forum::getTopicClass(), \"section_id\")->orderBy(\"is_pinned\", \"desc\")->orderBy(\"id\", \"desc\");\n\t}", "function torch_tabs_popular_posts($instance) \r\n{\r\n\textract( $instance );\r\n\t$popular = new WP_Query('orderby=comment_count&posts_per_page='.$popular_num);\r\n\r\n\twhile ($popular->have_posts()) : $popular->the_post();\r\n\t?>\r\n <li>\r\n <?php \r\n if ( has_post_thumbnail() ) {\r\n the_post_thumbnail(\"side-slider\");\r\n } \r\n ?>\r\n <div class=\"tab-inner-box\">\r\n <div><a title=\"<?php the_title(); ?>\" href=\"<?php the_permalink() ?>\"><?php the_title(); ?></a></div>\r\n <div><i class=\"fa fa-comments\"></i>&nbsp;&nbsp;<?php the_date(\"M d.Y\")?></div>\r\n </div>\r\n\t\t <div class=\"clear\"></div>\r\n </li>\r\n\t<?php\r\n\tendwhile; \r\n\twp_reset_postdata() ;\r\n}", "public function index()\n {\n return PostShort::collection(\n BlogPost::orderByRaw('(CASE WHEN publication = 0 THEN id END) DESC')\n ->orderBy('publication_date', 'desc')\n ->paginate(20)\n );\n }", "public function index() {\n $posts = $this->postModel->getPosts();\n\n // Check whether user like some post\n if (isLoggedIn()) {\n foreach ($posts as $post) {\n $likes = $this->postModel->getLikesByPostId($post->postId);\n\n foreach ($likes as $like) {\n if ($like->user_id === $_SESSION['user_id']) {\n // Add field with likes\n $post->isLiked = true;\n }\n }\n }\n }\n\n $data = [\n 'posts' => $posts\n ];\n\n $this->view('posts/index', $data);\n }", "function LatestPosts() {\n\t\treturn Post::get()\n\t\t\t->filter('AuthorID', (int)$this->urlParams['ID'])\n \t\t\t->limit(0,5)\n\t\t\t->sort(\"Created\", \"DESC\")\n\t\t\t->filterByCallback(function($post){\n\t\t\t\treturn $post->canView();\n\t\t\t});\n\t}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function flatsome_single_page_header(){\n if(is_singular('post') && get_theme_mod('blog_post_style') == 'top'){\n\t\techo get_template_part( 'template-parts/posts/partials/single-featured', get_theme_mod('blog_post_style'));\n\t}\n}", "public static function jetpack_infinite_scroll_render() {\n\n\t\t\tif ( is_home() ) {\n\t\t\t\t$layout = get_theme_mod( 'theme_slug_blog_content_posts_layout', 'classic' );\n\t\t\t} else {\n\t\t\t\t$layout = get_theme_mod( 'theme_slug_archives_content_posts_layout', 'classic' );\n\t\t\t}\n\n\t\t\twhile ( have_posts() ) {\n\t\t\t\tthe_post();\n\n\t\t\t\tif ( 'grid' === $layout || 'classic-grid' == $layout ) {\n\t\t\t\t\tget_template_part( 'template-parts/content/archive-entry-grid' );\n\t\t\t\t} elseif ( 'list' === $layout || 'classic-list' == $layout ) {\n\t\t\t\t\tget_template_part( 'template-parts/content/archive-entry-list' );\n\t\t\t\t} else {\n\t\t\t\t\tget_template_part( 'template-parts/content/archive-entry-classic' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function grav_related_posts() {\n\techo '<ul id=\"grav-related-posts\">';\n\tglobal $post;\n\t$tags = wp_get_post_tags($post->ID);\n\tif($tags) {\n\t\tforeach($tags as $tag) { $tag_arr .= $tag->slug . ','; }\n $args = array(\n \t'tag' => $tag_arr,\n \t'numberposts' => 5, /* you can change this to show more */\n \t'post__not_in' => array($post->ID)\n \t);\n $related_posts = get_posts($args);\n if($related_posts) {\n \tforeach ($related_posts as $post) : setup_postdata($post); ?>\n\t \t<li class=\"related_post\"><a href=\"<?php the_permalink() ?>\" title=\"<?php the_title_attribute(); ?>\"><?php the_title(); ?></a></li>\n\t <?php endforeach; } \n\t else { ?>\n <li class=\"no_related_post\">No Related Posts Yet!</li>\n\t\t<?php }\n\t}\n\twp_reset_query();\n\techo '</ul>';\n}", "function is_posts_page() {\r\n global $wp_query;\r\n return $wp_query->is_posts_page ? true : false;\r\n }", "function twentyfourteen_get_featured_posts() {\n\t/**\n\t * Filter the featured posts to return in Twenty Fourteen.\n\t *\n\t * @since Twenty Fourteen 1.0\n\t *\n\t * @param array|bool $posts Array of featured posts, otherwise false.\n\t */\n\treturn apply_filters( 'twentyfourteen_get_featured_posts', array() );\n}", "function twentyfourteen_get_featured_posts() {\n\t/**\n\t * Filter the featured posts to return in Twenty Fourteen.\n\t *\n\t * @since Twenty Fourteen 1.0\n\t *\n\t * @param array|bool $posts Array of featured posts, otherwise false.\n\t */\n\treturn apply_filters( 'twentyfourteen_get_featured_posts', array() );\n}" ]
[ "0.7932049", "0.7375507", "0.7180215", "0.7099434", "0.683806", "0.67774963", "0.6630844", "0.65019584", "0.6468794", "0.6466884", "0.640469", "0.6374649", "0.6162739", "0.6154045", "0.6144017", "0.60648507", "0.6064456", "0.60457355", "0.5959761", "0.59366274", "0.5935665", "0.5914284", "0.59112513", "0.5836461", "0.5833897", "0.5832001", "0.582627", "0.5819392", "0.5819392", "0.57889605", "0.5761027", "0.5709578", "0.57019895", "0.56996113", "0.56912124", "0.56893355", "0.5682753", "0.56823283", "0.56764084", "0.5640587", "0.5630742", "0.5621878", "0.56090564", "0.5603808", "0.56019974", "0.5571635", "0.5548749", "0.553642", "0.55232465", "0.5514297", "0.5503574", "0.547377", "0.54706377", "0.546839", "0.5468271", "0.5468172", "0.5455512", "0.5455129", "0.54524666", "0.54455334", "0.544123", "0.54397553", "0.5435144", "0.5429818", "0.54276985", "0.54227525", "0.54202056", "0.54055464", "0.5402208", "0.54001725", "0.5398158", "0.53969467", "0.5395933", "0.53869593", "0.53788865", "0.53777224", "0.53732693", "0.5371143", "0.5364727", "0.5360939", "0.5360505", "0.5355661", "0.5345877", "0.53409106", "0.5335038", "0.53280216", "0.5327698", "0.5320132", "0.53171295", "0.53168195", "0.5315521", "0.53119546", "0.5309944", "0.5307602", "0.53011376", "0.5300663", "0.5299915", "0.5294206", "0.52941453", "0.52941453" ]
0.76922
1
/ Test create consignee with incorrect parameters
public function testCreateConsigneeWithIncorrectParameters() { $this->expectException( WebException::class); // Give wrong/missing parameters to provoke an error response $builder = new ConsigneeBuilder(); $consignee = $builder->build(); $this->api->createConsignee( $consignee ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testQuarantineCreate()\n {\n\n }", "public function testCannotBeCreatedFromInvalidEmailAddress()\n {\n\n }", "function testCreate() {\n # fails due to not verified...\n $this->aRequest['email'] = '[email protected]';\n $this->assertFalse($this->oObject->create());\n\n # but verified users works\n $this->aRequest['email'] = '[email protected]';\n $this->assertTrue($this->oObject->create());\n $this->oObject->destroy(session_id());\n }", "public function testCanBeCreatedFromValidEmailAddress()\n {\n\n }", "public function testExcepcionSiSeCreaEmpleadoConDniQueContengaLetras(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null, \"4kh123l\");\n\t\t}", "public function testExcepcionSiSeCreaEmpleadoConDniVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null,$dni=\"\");\n\t\t}", "public function testExcepcionSiSeCreaEmpleadoConApellidoVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"Franco\", $Apellido=\"\");\n\t\t}", "public function testCreation()\n {\n $this->module->enableRegistration = false;\n\n $this->specify(\"we have create user if registration disabled\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'password' => 'password',\n 'name' => 'Test user',\n ]);\n expect(\"we can create user if registration disabled\", $user->create())->true();\n $this->tester->dontSeeEmailIsSent();\n //create() on existing user throw \\RuntimeException\n $user->create();\n }, ['throws' => new \\RuntimeException]);\n\n $this->module->enableRegistration = true;\n $this->specify(\"we have create user with register email\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'password' => 'password',\n 'name' => 'Test user 2',\n ]);\n expect(\"we can create user if registration disabled\", $user->create(true))->true();\n /** @var TestMailer $message */\n /** @var yii\\swiftmailer\\Message $message */\n $this->tester->seeEmailIsSent();\n $message = $this->tester->grabLastSentEmail();\n expect(\"we must see email\", $message)->notNull();\n expect(\"we must see email to user\", $message->getTo())->hasKey($user->email);\n expect(\"we must see registration email\", $message->getSubject())->contains('register');\n });\n\n $this->specify(\"we have create user wit autogenerated password\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'name' => 'Test user',\n ]);\n expect(\"we can create user with autogenerated password\", $user->create())->true();\n });\n\n $this->specify(\"we have create user without name\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'password' => 'password',\n ]);\n expect(\"we can't create user without name\", $user->create())->false();\n expect(\"we can see error `name`\", $user->getErrors())->hasKey('name');\n });\n }", "public function testCreateSuperfund()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function testCreateNetworkMerakiAuthUser()\n {\n }", "public function testFailNoCustomerNoForAccountCreate()\n {\n $card = new Card();\n $card->setToken('test-token');\n\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $data = new SinglePayData();\n\n $data->setCard($card)\n ->setExtras(array(\n 'method' => 'update'\n ));\n\n $transactionSetup = ExpressFactory::buildTransactionSetup($config, $data);\n }", "public function testExcepcionSiSeCreaEmpleadoConSalarioVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null, null,$Salario=\"\");\n\t\t}", "public function testShouldCreateANewUser()\n {\n $user = factory(User::class)->create();\n\n $role = Role::where(\"name\", \"admin\")->first();\n $user->attachRole($role);\n\n $this->actingAs($user);\n\n $invitationLink = (new CreateInvitationLinkService($user))->execute([\n \"type\" => \"STUDENT\",\n ]);\n\n $createdUser = (new CreateUserService())->execute([\n \"name\" => $this->faker->name,\n \"email\" => $this->faker->unique()->safeEmail,\n \"password\" => \"12345678\",\n \"hash\" => $invitationLink->hash,\n ]);\n\n $this->assertTrue(is_numeric($createdUser->id));\n }", "public function testProfileCreate()\n {\n\n }", "public function testExcepcionSiSeCreaEmpleadoConNombreVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"\");\n\t\t}", "public function testCreatingContactWithNegativeUserIdFails(): void\n {\n // Creates expectation.\n $this->expectException(\\InvalidArgumentException::class);\n\n // Create random attributes.\n $attributes = [\n 'id' => $this->faker->numberBetween(),\n 'user_id' => -1,\n 'token_id' => $this->faker->randomAscii,\n 'revoked' => $this->faker->boolean,\n 'expires_at' => $this->faker->dateTimeBetween('+10 days', '+20 days')->format('Y-m-d H:i:s'),\n ];\n\n // Performs test.\n new AccessToken($attributes);\n }", "public function testCreateCertificates()\n {\n }", "public function testIs20200519CustomerCreatableThrowInvalidArgumentException()\n {\n $this->expectException(\\Xendit\\Exceptions\\InvalidArgumentException::class);\n $params = [\n 'reference_id' => self::REFERENCE_ID\n ];\n\n Customers::createCustomer($params);\n }", "public function testCreateExpedicao()\n {\n }", "public function testRegisterNewContract()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(factory(User::class)->create());\n $property = factory(Property::class)->create([\n 'rented' => null,\n 'status' => Property::STATUS_ACTIVE\n ]);\n $lessee = factory(Lessee::class)->create();\n\n $browser\n ->visit(route('contrato.create'))\n ->on(new CreateContractPage())\n ->assertSee('Nuevo Contrato');\n\n\n\n\n\n $browser->selectLessor($property->lessor->id);\n $browser->selectProperty($property->id);\n $browser->selectLessee($lessee->id);\n $browser->typeSlowly('@years',1);\n // Contract dates\n $this->fillInputDate($browser,'periods[0][fecha_inicio]', now());\n $this->fillInputDate($browser,'periods[0][fecha_fin]', now()->addMonth());\n $browser->typeSlowly('input[name=\\'periods[0][cantidad]\\']', random_int(1000,1210));\n\n $browser->pause(500);\n $browser->screenshot('after');\n $browser->screenshot('test');\n $browser->type('@bonus',10);\n $browser->type('@deposit',5000);\n $browser->click('@submit');\n\n $browser->assertRouteIs('contrato.index');\n $browser->assertSee('Catalogo de Contratos');\n });\n }", "public function testProfilePrototypeCreateQuarantines()\n {\n\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutSource() {\n $this->expectException(\\PDOException::class);\n \n $entity = new Registration;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function test_user_can_create_despesa()\n {\n // Prepare User Login\n\n // $user = User::factory()->create();\n\n\n // $credentials = [\n // 'email' => $user->email,\n // 'password' => 'password'\n // ];\n\n // $response = $this->post(route('auth.user'), $credentials);\n\n\n // Create Despesa\n\n // $post = Despesas::factory()->create();\n\n // $data = $post->only(['descricao', 'valor', 'id_usuario']);\n // $data['data_criacao'] = Carbon::now();\n\n // Despesas::create($data);\n\n // $response = $this->post(route('new-post'), $data);\n\n // $response->assertStatus(302);\n }", "public function testBuildAccountCreateTransactionSetup()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $data = new SinglePayData();\n $data->setCustomerNo('112')\n ->setExtras(array(\n 'method' => 'create'\n ));\n\n $transactionSetup = ExpressFactory::buildTransactionSetup($config, $data);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Method\\TransactionSetup', $transactionSetup);\n $this->assertEquals($transactionSetup->transactionSetup->TransactionSetupMethod, 'PaymentAccountCreate');\n $this->assertEquals($transactionSetup->transactionSetup->ProcessTransactionTitle, 'Save Card');\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function testParticipantsMePasswordPut()\n {\n }", "public function test_crear_proceso_nombre_codigo_existentes()\n {\n\n Artisan::call('migrate:fresh');\n Artisan::call('db:seed');\n \n $user = factory(User::class)->create();\n $this->actingAs($user);\n\n $proceso1 = factory(Proceso::class)->create(['nombre'=>'Proceso 1','codigo'=>'AAAC']);\n\n $result = $this->post(route('procesos.store'),['nombre'=>'Proceso 1','codigo'=>'AAAC']);\n\n $result->assertSessionHasErrors();\n }", "public function testCreateChallengeTemplate()\n {\n }", "public function testCreateChallengeActivityTemplate()\n {\n }", "public function testNewPersonsOwnershipExistingCustomers() {\n $this->addProductToCart($this->product);\n $this->goToCheckout();\n $this->assertCheckoutProgressStep('Event registration');\n\n // Save first registrant.\n $this->clickLink('Add registrant');\n $this->submitForm([\n 'person[field_name][0][value]' => 'Person 1',\n 'person[field_email][0][value]' => '[email protected]',\n 'field_comments[0][value]' => 'No commments',\n ], 'Save');\n\n // Assert that this person profile is now owned by the current logged in\n // user.\n $person = Profile::load(1);\n // Assert that we are checking the expected person.\n $this->assertEquals('Person 1', $person->field_name->value);\n $this->assertEquals($this->adminUser->id(), $person->getOwnerId());\n }", "public function testItCreatesANewUserWithValidData()\n {\n $data = factory(User::class)->make([\n \"tenant_id\" => $this->user->tenant->id,\n \"address\" => [\n \"city\" => \"springfield\",\n \"country\" => \"united states of america\",\n \"state\" => \"missouri\",\n \"street\" => \"1742 evergreen terrace\",\n ]\n ]);\n\n $response = $this->actingAs($this->user)\n ->postJson(\n \"api/v1/users/\",\n $data->only([\n \"address\",\n \"email\",\n \"firstname\",\n \"lastname\",\n \"tenant_id\",\n ])\n )->assertOk();\n \n $user = User::all()->last();\n\n $response\n ->assertJson([\n \"id\" => $user->id,\n \"firstname\" => $user->firstname,\n \"lastname\" => $user->lastname,\n ]);\n }", "public function testCreateContador()\n {\n }", "public function testVolunteerHourCreateForContactFailure_BasicUser()\n {\n // Set test user as current authenticated user\n $this->be($this->basicUser);\n \n $this->session([\n 'username' => $this->basicUser->username, \n 'access_level' => $this->basicUser->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function test_create_user_invalid_email()\n {\n\n $response = $this->json('POST', '/user_create',\n [\n 'name' => $this->name,\n 'email' => 'test' . rand(1, 10), \n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_invalid_email,\n ]);\n }", "public function createInvoice()\n {\n //seccion para registrar certificaos relacionados con un RFC \n /* $params = [ \n 'Rfc' => 'AAA010101AAA',\n 'Certificate' => 'MIIF+TCCA+GgAwIBAgIUMzAwMDEwMDAwMDAzMDAwMjM3MDEwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNzA1MTgwMzU0NTFaFw0yMTA1MTgwMzU0NTFaMIHlMSkwJwYDVQQDEyBBQ0NFTSBTRVJWSUNJT1MgRU1QUkVTQVJJQUxFUyBTQzEpMCcGA1UEKRMgQUNDRU0gU0VSVklDSU9TIEVNUFJFU0FSSUFMRVMgU0MxKTAnBgNVBAoTIEFDQ0VNIFNFUlZJQ0lPUyBFTVBSRVNBUklBTEVTIFNDMSUwIwYDVQQtExxBQUEwMTAxMDFBQUEgLyBIRUdUNzYxMDAzNFMyMR4wHAYDVQQFExUgLyBIRUdUNzYxMDAzTURGUk5OMDkxGzAZBgNVBAsUEkNTRDEwX0FBQTAxMDEwMUFBQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIiV+76Q7p9i5Bj4G1YuYuPtf/cO/dyNX19o6y57CiKcgGYEqPqb88cJ/IPPyFPIFtBdxYJmqikxMwxDHTIsolI0GMvqEO1BsokcDOL4UfMZt7NmYaH1P8Nj/fO5xn0b1qSnSfQHGdPLMgXsLPhaR69HREsVEIowEMM5ucoNArSNzel4XJU8X/dnoumZvaOyCdvEC076NzB3UJA53ZD1xvvPEedUfAfj2eaUCQJYPnToyf7TAOGzzGkX5EGcjxC3YfcXGwG2eNdbSbxSiADPx6QACgslCu1vzmCzwQAmfeHWQvirpZccJyD/8shd7z7fv5A/G0g3aDloM5AXwA3nDVsCAwEAAaMdMBswDAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCBsAwDQYJKoZIhvcNAQELBQADggIBAJepSmoMRmasH1IyLe68oM6+Qpm/kXjwQw8ALMkhHTI3XmxjUVqpJ6k9zZQfwyTLc2UZIo8jdO4WH3bcRBDcYOkciW3KxhKAbLgJPHAieVOyObXViET0ktLL6xeDHnf5Au4LOi0m01E8IPFbxYKb+RU1xpOKqJuRHH5dfRBg4HV8y+OTa5lVZil+sAhwdyXFsPf9FqN1SNn9EuKjYc9+lkRiGcHPNb1ZAtDsaQdGzoAbR+Z6m9FdZB/XU+Huls+ePdkw1t2/37AJZkYqr3wVNKrrpQkax9DrnFT8E+7xKXLcbpw3YOYBoENj2+NuMn29sn3U97wKlpyn/GeMwbkCmOGBAMtK9O6+wRrcEmu9Js68asHd5JQSzA39BRAUjb/9aefmWTb6DNm22IUUSSOT9MK5yWGncdWxKrNtMvx7OyYlYV2/qG4p/rMlj6nZcIpwONhyLUwxr74kO0Jo3zus81t9S/J91jumiwyNVqJZ77vmAy6lQnr8Og9/YaIzDH5L/byJQJquDKEmLvuya4sQ2iJj+p282RNpBscO/iyma8T+bZjG2CFYUTwGtOEZ2aLqApJ4cCBW7Ip569B+g7mgG8fdij6E1OlJ8Y3+ovBMak8LtnFVxsfthdWOK+AU2hWGU88rfZkLJ0RJn8oAq/6ri0iJNCKym/mc9g0JpNw+asMM',\n 'PrivateKey' => 'MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIAgEAAoIBAQACAggAMBQGCCqGSIb3DQMHBAgwggS9AgEAMASCBMh4EHl7aNSCaMDA1VlRoXCZ5UUmqErAbucRBAKNQXH8tz2zJ7hdZaOZx7PEfMiWh5Nh6e8G8kxY+GW4YCSbLxslkhBtfTR6v5JYv3vhgH7XzMCwJPOfX6gxeeCYZ4HTdDNAyBVCjTbJpqbo778ri33o+I4yx7zgMqA3mzVE61re6MPrGXh1YT/K9zZeEdmwvXQfPs9VnioKUhiswoMcJ3kc3FxGLrEAsjQqv/ZVOHPY3NrbcfpQUyprsCKv3rRdxkIRdMPY4eiA720mffzvDqyzeQ8xfwHTE8Xjunja4KXvW/mV7ItTH0vRXHc3HJQ0dNnyawXmbC1FiYbCVdswoYuVQmslvq3QEXUGwP3KYfxQzKatnU7nprkmsipPqPBqDrzqc6NSN/8rxIc5zTAL4bFul+CEKz9VybwdavgewEy7u3fPnKPN+y4HilNgmlbtS7seWpbIgVPA+woG2Ph5hsgREXZCjGKSRuI77/FLcI5CMrZR+FvbnaqG+gXDBTz2lWhK9pmWlVawT2pvfiHOLzYRf2YyuVbJ79D2EgbUKyp3kCQ6fddMzspPhD/pvLQizExeyIxImb/kQXs2mmtDnyFIsj4Hcn5wCcs+SDIj+FJnwRiKB6YfdzjIig/ZMfpgMpl0u69LX649uL318o+Hy3d5t3wxgSkTaJ5McKhWyh9x9vlHZhYyM6HArBNfP9cGF86M3GwAMHAiJQl9UevyKe6rlvAIDlop6l3M02m5hHUXUpPjz4j7inFXZzvSv0tFoSbEqGgno0Pa+0gWHqRwBEGLGEwHVfyEy+Of8g4+0jzo0jNPIcurA5xRh9HSRSAd3kdEhx75eeVL7lBdLjRUkbtRtg7nelSjqAX7tQZK6Awp5C/17W96+f/vtjB+Y+ZgrSUjnQDADnZCnapIrzHgE3ZanhGAtnMMl+o4aLd1+74inG4jht/GJB60raSQfYrDrM3kBs0oyfpbEk5TI8ISzRlRmejv+mqpTogJaAqhnLP7rAli3d4pRhUjbACn/xQSFKxl2OURdmnMlvlbb6pleXviJHRxzPPQ25NVdWvmCYWrDfAZYn8X1sABOdyrth38BfmAVsyyPATYFB+5cXuNIZkPz1swz3859iZWTn5JRfPEAGICu5G6w6nrgOLYM9UqOPmxofzEdiEPafLQ5orMxdSWF6+3mD2Yw/VP+B43B/oYehgfrYjBUJt2D04VU/v8XK1ZUVgX/Co0odcdcszAP+ljQ7UVhW+uxVMd2sEprwepPPjYT3HvdI6RBB94yYBWfkoCSo/jsrrRpw2DVEyvoDp/hOXKyt8Y/8UGLCxJUhhv5fEiezYnlUAmwAGjgZfzfAErx0gkQFBgNKglEA7jz0Dqc2Z92pGVGTyPtXqRsqX3IYX5WsZVUoJim0wI7+LNmKpu147ePC0G4Sf4AGoZyPWVXq2SZSPpN261pIKSoLEDeA8WIKj2U5JG2DMMYokV0bZ1TsabrwHvwsp3muLnaP8L+n2fBplbhAEE2buBXvsATixMGu57ZI5WKFLnHn4KIBrZzALCtGehfFbCsdf1nBR6aAt+BpWhhZki54fZTurgMr6zuC5hAaP4rExW+LCc3upHMW7R9DcHWaZuZIfwnVDImnAQ9UOsz+A=',\n 'PrivateKeyPassword' => '12345678a'\n ];\n $lstNameIds = $this->facturama->post('api-lite/csds', $params ); */\n\n\n $params = [\n \"Issuer\" => [\n \"FiscalRegime\" => \"601\",\n \"Rfc\" => \"AAA010101AAA\",\n \"Name\" => \"EXPRESION EN SOFTWARE\"\n ],\n \"Receiver\" => [\n \"Name\" => \"Entidad receptora\",\n \"CfdiUse\" => \"P01\",\n \"Rfc\" => \"AAA010101AAA\"\n ],\n //agregado NO \n 'Folio' => '102',\n \"CfdiType\" => \"I\",\n \"NameId\" => \"1\",\n \"ExpeditionPlace\" => \"12345\",\n \"PaymentForm\" => \"03\",\n \"PaymentMethod\" => \"PUE\",\n \"Currency\" => \"MXN\",\n \"Date\" => \"2021-01-19T09:51:39\",\n \"Items\" => [\n [\n \"Quantity\" => \"100\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API folios adicionales\",\n \"IdentificationNumber\" => \"23\",\n \"UnitPrice\" => \"0.50\",\n \"Subtotal\" => \"50.00\",\n \"Discount\" => \"10\",\n \"DiscountVal\" => \"10\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"6.4\",\n \"Base\" => \"40\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"46.40\"\n ],\n [\n \"Quantity\" => \"1\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API Implementación \",\n \"IdentificationNumber\" => \"21\",\n \"UnitPrice\" => \"6000.00\",\n \"Subtotal\" => \"6000.00\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"960\",\n \"Base\" => \"6000\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"6960.00\"\n ]\n ]\n ];\n\n // $result = $this->facturama->post('2/cfdis', $params);\n // api-lite\n $result = $this->facturama->post('api-lite/2/cfdis', $params);\n return $result;\n }", "public function testProjectProjectIDInviteUserPost()\n {\n }", "public function create_unsigned_contract()\n {\n $contract_id = factory(Contract::class, 'testing_unsigned_legal')->create([\n 'value' => $value = self::$faker->numberBetween(5000, 100000),\n 'start_date' => '',\n 'end_date' => '',\n 'participants' => $participants = rand(12, 20),\n 'payments' => $payments = rand(0, 12),\n 'client_id' => $client_id = factory(Legal::class, 'accept_meeting')->create()->client_id\n ])->id;\n for ($i = 1; $i <= $participants; $i++) {\n $participant_id = factory(Participant::class)->create()->id;\n factory(ContractParticipant::class)->create([\n 'contract_id' => $contract_id,\n 'participant_id' => $participant_id\n ]);\n }\n for ($i = 1; $i <= $payments; $i++) {\n $payment_id = factory(Payment::class)->create([\n 'value_euro' => $value_euro = round($value/$payments),\n 'pay_date' => date('Y-m-d', strtotime(\"+\".$i.\" month\")),\n 'contract_id' => $contract_id\n ])->id;\n factory(Invoice::class)->create([\n 'value_euro' => $value_euro,\n 'paid_date' => date('Y-m-d', strtotime(\"+\".$i.\" month\")),\n 'payment_id' => $payment_id,\n 'contract_id' => $contract_id,\n 'client_id' => $client_id\n ]);\n }\n }", "public function testIs20201031CustomerCreatableThrowInvalidArgumentException()\n {\n $this->expectException(\\Xendit\\Exceptions\\InvalidArgumentException::class);\n $params = [\n 'reference_id' => self::REFERENCE_ID,\n 'api-version' => '2020-10-31'\n ];\n\n Customers::createCustomer($params);\n }", "public function testCreateChamado()\n {\n }", "public function testChannelsCreate()\n {\n }", "public function testRegistrationEmailAlreadyInUse(): void { }", "public function testCreate()\n {\n\n $data = array(\n 'achRoutingNumber' => '987654321',\n 'achAccountNumber' => '123456789',\n 'achAccountType' => 'CHECKING',\n 'foo' => 'bar'\n );\n\n $transaction = $this->client->transaction()->create($data);\n $this->assertEquals($data, get_object_vars($transaction->post), 'Passed variables are not correct');\n $this->assertEquals('POST', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions', $transaction->path, 'The path is incorrect');\n }", "public function testItDoesntCreateANewUserWithInvalidData()\n {\n $data = factory(User::class)->make([\n \"address\" => [\n \"city\" => \"springfield\",\n \"country\" => \"united states of america\",\n \"state\" => \"missouri\",\n \"street\" => \"1742 evergreen terrace\",\n ]\n ]);\n\n $this->actingAs($this->user)\n ->postJson(\n \"api/v1/users/\",\n $data->only([\n \"email\",\n \"address\",\n \"lastname\",\n \"tenant_id\",\n ])\n )\n ->assertStatus(422);\n }", "public function testCreateGrantExceptions()\n {\n $throws_missing_client_id_exception = false;\n try {\n self::$api->create('', self::$apiIdentifier, []);\n } catch (CoreException $e) {\n $throws_missing_client_id_exception = $this->errorHasString($e, 'Empty or invalid \"client_id\" parameter');\n }\n\n $this->assertTrue($throws_missing_client_id_exception);\n\n $throws_missing_audience_exception = false;\n try {\n self::$api->create(self::$env['APP_CLIENT_ID'], '', []);\n } catch (CoreException $e) {\n $throws_missing_audience_exception = $this->errorHasString($e, 'Empty or invalid \"audience\" parameter');\n }\n\n $this->assertTrue($throws_missing_audience_exception);\n }", "public function testCreateChallengeActivity()\n {\n }", "public function testCreatePayrun()\n {\n }", "public function testRegistrationEmailWrongFormat(): void { }", "public function testHandleCreateValidationError()\n {\n // Set parameter and remove dealer account name\n $params = $this->customDealerAccountData;\n unset($params['name']);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $params, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account/create');\n $this->assertSessionHasErrors();\n $this->assertHasOldInput();\n }", "public function testCreateChallenge()\n {\n }", "public function testCreateSiteMembershipRequestForPerson()\n {\n }", "public function canCreateAUser ()\n {\n\n $faker = Factory::create();\n\n $this->withoutExceptionHandling();\n\n\n $response = $this->json('POST', 'api/users', [\n 'name' => $name = $faker->company,\n 'surName' => $surName = $faker->company,\n 'email' => $email = $faker->company,\n 'password' => $password = $faker->company,\n 'entity' => $entity = $faker->company,\n 'street' => $street = $faker->company,\n 'number' => $number = random_int(0,9999),\n 'city' => $city = $faker->company,\n 'CP' => $CP = random_int(0,9999),\n ])\n ->assertStatus(201);\n\n $this->assertDatabaseHas('users', [\n 'name'=> $name,\n 'surName'=> $surName,\n 'email'=>$email,\n 'password'=>$password,\n 'entity'=>$entity,\n 'street'=>$street,\n 'number'=>$number,\n 'city'=>$city,\n 'CP'=>$CP,\n ]);\n }", "public function testAuthenticationsEmailIdPut()\n {\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testAuthenticationServiceAuthenticationCreate()\n {\n }", "public function testCreate() {\n\t$zc=new ZbootaClient(\"[email protected]\",\"dummy\",\"us-east-1\");\n\t$zc->connect();\n\tif(count($zc->entry)>0) {\n\t\t// delete the added entry so that the test can run \n\t\t$zc->client->deleteItem(array(\n\t\t 'TableName' => 'zboota-users',\n\t\t 'Key' => array( 'email' => array('S' => \"[email protected]\") )\n\t\t));\n\t}\n\n\t// create user\n\t$zc=new ZbootaClient(\"[email protected]\",\"\",\"us-east-1\");\n\t$zc->newUser();\n\n\t// test that user was created\n\t$zc->connect();\n\t$this->assertTrue(array_key_exists(\"email\",$zc->entry));\n\t$this->assertTrue(array_key_exists(\"pass\",$zc->entry));\n }", "public function testCreate()\n\t{\n\t\t$this->dispatchWithExpectedException(\"/comment/create\", 'Bootstrap_Service_Exception_Authorization');\n\t}", "public function testCreatePerson()\n {\n }", "public function test_user_can_create_an_address()\n {\n $this->actingAs(factory(User::class)->create())->post('/address', [\n 'street' => \"new\",\n 'city' => \"rneogr\",\n 'pincode' => 1233221,\n 'state' => 'penns',\n 'phone_number' => 8909456721\n ])->assertSuccessful();\n\n }", "public function testThatCreateUserRequestIsFormattedProperly()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->create( [\n 'connection' => '__test_connection__',\n 'email' => '__test_email__',\n 'password' => '__test_password__',\n ] );\n\n $this->assertEquals( 'POST', $api->getHistoryMethod() );\n $this->assertEquals( 'https://api.test.local/api/v2/users', $api->getHistoryUrl() );\n\n $headers = $api->getHistoryHeaders();\n $this->assertEquals( 'Bearer __api_token__', $headers['Authorization'][0] );\n $this->assertEquals( self::$expectedTelemetry, $headers['Auth0-Client'][0] );\n $this->assertEquals( 'application/json', $headers['Content-Type'][0] );\n\n $body = $api->getHistoryBody();\n $this->assertArrayHasKey( 'connection', $body );\n $this->assertEquals( '__test_connection__', $body['connection'] );\n $this->assertArrayHasKey( 'email', $body );\n $this->assertEquals( '__test_email__', $body['email'] );\n $this->assertArrayHasKey( 'password', $body );\n $this->assertEquals( '__test_password__', $body['password'] );\n }", "public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }", "public function testCouponCreation()\n {\n $this->Details=array( 'recipient_id' => \"13245245\",\n 'offerType' => \"4534234\",\n 'expringdate' => date(\"Y-m-d H:i:s\")\n );\n $this->Coupon = new Coupon();\n $this->assertContains('success', $this->Coupon->addCoupon($this->Details));\n\n }", "public function testAltaComercializador()\n {\n $data = $this->data();\n $service = new ABM_ComercializadorService();\n $service->crearComer($data);\n\n\n\n $user = ['usuario' => $data['usuario'], 'email' => $data['email']];\n $data['usuario'] = 2;\n unset($data['password']);\n $this->assertDatabaseHas('imputaciones', ['nombre' => 'Comisiones a pagar '.$data['nombre'].' '.$data['apellido'], 'codigo' => 311020001]);\n $this->assertDatabaseHas('saldos_cuentas', ['saldo' => 0, 'codigo' => 311020001, 'nombre' => 'Comisiones a pagar '.$data['nombre'].' '.$data['apellido']]);\n $this->assertDatabaseHas('users', $user);\n $this->assertDatabaseHas('role_users', ['user_id' => 2, 'role_id' => 2]);\n $this->assertDatabaseHas('comercializadores', $data);\n }", "public function testCreateUserWithInvalidPartsFails()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Invalid value: has_custom_certificate');\n\n $s = json_decode('{\"url\":\"https://www.test.net:8443/webhook\",\"has_custom_certificate\":1,\"pending_update_count\":0,\"max_connections\":40}');\n $t = new WebhookInfo($s);\n }", "public function testCreatedException()\n {\n $this->expectException(DomainException::class);\n County::create('County One',0, 200);\n }", "public function testAddToNewsLetterFailForIncompleteDetails()\n {\n $request = Request::create('/api/contact/subscribe', 'POST', $this->invalidSubscriber);\n $response = $this->contactController->addToNewsletter($request);\n $this->assertEquals(ResponseMessage::INPUT_ERROR, $response->getData()->message);\n $this->assertObjectHasAttribute('name',$response->getData()->data);\n $this->assertObjectHasAttribute('email',$response->getData()->data);\n $this->assertDatabaseMissing('newsletter_subscribers', $this->invalidSubscriber);\n }", "public function testCreateAccountTest()\n {\n $data = new Request();\n $data->name = $this->faker->name;\n $data->amount = rand(1000,9999) ;\n\n $banco = new BancoController();\n\n $nuevo = $banco->createAccount($data);\n\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testExample()\n\t{\n\t\t$factory->define(App\\User::class, function (Faker\\Generator $faker)\n\t\t{\n\t\t// \treturn [\n\t\t// \t\t'email' => $faker->email,\n\t\t// \t\t'name' => ,\n\t\t// \t\t'gmail_token' => ,\n\t\t// \t\t'created_at' => ,\n\t\t// \t\t'track_email' => 'yes',\n\t\t// \t\t'timezone' => 'America/New_York',\n\t\t// \t\t'referer' => '',\n\n\t\t// \t\t'paid' => 'yes',\n\t\t// \t\t'belongs_to' => ,\n\n\t\t// \t\t//admin?\n\t\t// \t];\n\t\t// });\n\n\t\t// factory(App\\Customer::class, 5)->create();\n\t\t// factory(App\\Email::class, 5)->create();\n\t\t// factory(App\\Message::class, 5)->create();\n\t\t// factory(App\\User::class, 5)->create();\n\n\t\t//post tests\n\t\t// $this->call('POST', '/returnFields', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/createTemplate', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/makePreviews', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/updatePreviews', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/saveSettings', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/upgrade', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/createTeam', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/useLicense', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/saveTemplate', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/copyTemplate', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/sendFeedback', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/revokeAccess', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/updateSubscription/{direction}', ['name' => 'Taylor'])->assertResponseOk();\n\n\t\t//get tests\n\t\t// $this->visit('/archive/{id}')->assertResponseOk();\n\t\t// $this->visit('/dearchive/{id}')->assertResponseOk();\n\t\t// $this->visit('/hubify/{id}/{status}')->assertResponseOk();\n\t\t// $this->visit('/sendEmail/{email_id}/{message_id}')->assertResponseOk();\n\n\t}\n}", "public function testCreationFailsWithoutUserInfo()\n {\n $cleanPDO = new cleanPDO([\n 'dbname'=>'unit_test'\n ]);\n }", "public function testSubuserWithExcessivelyLongEmailCannotBeCreated()\n {\n [$user, $server] = $this->generateTestAccount();\n\n $email = str_repeat(Str::random(20), 9) . '[email protected]'; // 191 is the hard limit for the column in MySQL.\n\n $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [\n 'email' => $email,\n 'permissions' => [\n Permission::ACTION_USER_CREATE,\n ],\n ]);\n\n $response->assertOk();\n\n $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [\n 'email' => $email . '.au',\n 'permissions' => [\n Permission::ACTION_USER_CREATE,\n ],\n ]);\n\n $response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);\n $response->assertJsonPath('errors.0.detail', 'The email must be between 1 and 191 characters.');\n $response->assertJsonPath('errors.0.meta.source_field', 'email');\n }", "public function testGenerateAddressAuthCodeById()\n {\n\n }", "public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }", "public function testCreateNotaEspelhoPatrimonio()\n {\n }", "public function create()\n\t{\n\t\treturn $this->fail(lang('RESTful.notImplemented', ['create']), 501);\n\t}", "public function testCustomerPaymentMethodCreateCustomerPaymentMethod()\n {\n }", "public function testCreateUser()\n {\n }", "public function testCreatePatrimonio()\n {\n }", "public function testParticipantsPost()\n {\n }", "function evel_construct_email($spec) {\n global $evel_client;\n $params = func_get_args();\n $result = $evel_client->call('EvEl.construct_email', $params);\n return $result;\n}", "public function testCreateIdentity()\n {\n }", "public function testUserCanCreated()\n {\n $user = factory(App\\UserMongo::create([\n \t'first_name' => 'agus',\n \t'last_name' => 'yusida',\n \t'email' => '[email protected]',\n \t]));\n \t$this->seeInDatabase('users',[\n \t\t'first_name' => 'agus',\n \t'last_name' => 'yusida',\n \t'email' => '[email protected]',\n \t\t]);\n }", "public function testFailNoCustomerNoForAccountUpdate()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $data = new SinglePayData();\n $data->setExtras(array(\n 'method' => 'create'\n ));\n\n $transactionSetup = ExpressFactory::buildTransactionSetup($config, $data);\n }", "public function testCanCreateCourse()\n {\n \n $response = $this->call('POST', '/course', [\n 'name' => 'Kursur PHP Advance',\n 'level' => 'Beginner',\n 'benefit' => 'Bisa membuat website sendiri'\n ]);\n $this->assertEquals(201, $response->status());\n }", "public function testCustomerInvoicesV2SendEmail()\n {\n }", "public function testCreatingContactWithEmptyTokenIdFails(): void\n {\n // Creates expectation.\n $this->expectException(\\InvalidArgumentException::class);\n\n // Create random attributes.\n $attributes = [\n 'user_id' => $this->faker->numberBetween(),\n 'token_id' => ' ',\n 'revoked' => $this->faker->boolean,\n 'expires_at' => $this->faker->dateTimeBetween('+10 days', '+20 days')->format('Y-m-d H:i:s'),\n ];\n\n // Performs test.\n new AccessToken($attributes);\n }", "public function test_crear_proceso_campos_vacios()\n {\n Artisan::call('migrate:fresh');\n Artisan::call('db:seed');\n \n $user = factory(User::class)->create();\n $this->actingAs($user);\n\n $result = $this->post(route('procesos.store'),['nombre'=>'','codigo'=>'']);\n\n $result->assertSessionHasErrors();\n }", "public function testCreaSolicitud($me_solicitud)\n\t{\n\t\t$id_version = 34;\n\t\t$id_proceso = 43;\n\t\t$edf = 1;\n\t\t$fecha = '2016-09-13';\n\t\t$jornadas = 2;\n\t\t$lab_actual = 0;\n\t\t$observacion = 'prueba desd el modelo '.time();\n\t\t$id_solicitud = $me_solicitud->crearSolicitud($id_version, $id_proceso, $edf, $fecha, $jornadas, $lab_actual, $observacion);\n\t\t$this->assertNotFalse($id_solicitud);\n\t\treturn $id_solicitud;\n\t}", "public function testParticipantsMePut()\n {\n }", "public function testChannelsInvite()\n {\n }", "public function testPointsCanSendByOnlyAuthorizedUsers()\n {\n $this->model = new \\app\\models\\SendForm([\n 'receiverName' => 'demo',\n 'amount' => 100\n ]);\n\n \\Yii::$app->user->identity = null;\n expect_not($this->model->validate());\n expect($this->model->errors)->hasKey('receiverName');\n }", "public function testCreateUnsuccessfulReason()\n {\n }", "public function testRequestEnrollment()\n {\n }", "public function test_create_user_success()\n {\n if( User::where('email',$this->email)->exists()){\n User::where('email',$this->email)->delete();\n }\n $response = $this->json('POST', '/user_create',\n [\n 'name' => $this->name,\n 'email' => $this->email,\n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_success,\n ]);\n }", "public function testQuarantineCreateChangeStreamPostQuarantinesChangeStream()\n {\n\n }", "public function create()\n {\n $this->sesClient->verifyEmailIdentity(\n [\n 'EmailAddress' => $this->identity->getIdentity(),\n ]\n );\n }", "public function testCreateClientWithoutName() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create', ['phone' => '0725433317'])\n ->seeJson(['success' => false]);\n\n }", "public function test_create_calledTwoTimes_resultShouldDifferent()\n {\n $expected = CastilloTicketId::create();\n $actual = CastilloTicketId::create();\n $this->assertNotEquals($expected,$actual);\n }", "public function testLinkCustomersToCertificate()\n {\n }", "public function testRefuseCreation()\n {\n $newActor = new \\eddie\\Models\\Actor();\n $newActor->save();\n }", "public function testContractorWithNewOrganisation()\n {\n\t\t$faker = \\Faker\\Factory::create('en_GB');\n\t\t$faker->seed(10060); // Seed\n\t\t$company = array();\n\t\t$company['name'] = $faker->company;\n\t\t$company['phone'] = $faker->phoneNumber;\n\t\t$company['email'] = $faker->email;\n\t\t$company['website'] = $faker->url;\n\t\t$company['address'] = $faker->streetAddress;\n\t\t$company['postcode'] = $faker->postcode;\n\t\t$company['town'] = $faker->city;\n\n\t\t$faker->seed(10070); // Seed\n\t\t$contact = array();\n\t\t$contact['name'] = $faker->firstName;\n\t\t$contact['surname'] = $faker->lastName;\n\t\t$contact['email'] = $faker->email;\n\t\t$contact['landline'] = $faker->phoneNumber;\n\t\t$contact['mobile'] = $faker->phoneNumber;\n\n\t\t$faker->seed(10071); // Seed\n\t\t$areas = array();\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\n \t$this->loginAs('admin');\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-add-contact')\n\t\t )\n\t\t);\n\n\t\t// Click in btn-add-contact\n\t\t$btnAddContact = $this->webDriver->findElement(\\WebDriverBy::id('btn-add-contact'))->click();\n\n\t\t$this->webDriver->wait(100)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('choose_contact_type')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('choose_contact_type'))->findElement(\\WebDriverBy::cssSelector(\"option[value='3']\"))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('btn-save-contractor')\n\t\t )\n\t\t);\n\n\t\t// Create organisation\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('a.btn:nth-child(2)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('organisation_name')\n\t\t )\n\t\t);\n\n\t\tsleep(1);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_type'))->findElement(\\WebDriverBy::cssSelector(\"option[value='2']\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_name'))->clear()->sendKeys($company['name']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_phone'))->clear()->sendKeys($company['phone']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_email'))->clear()->sendKeys($company['email']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_website'))->clear()->sendKeys($company['website']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_address'))->clear()->sendKeys($company['address']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_postcode'))->clear()->sendKeys($company['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_town'))->clear()->sendKeys($company['town']);\n\n\t\t// Save organisation\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('button.btn-success'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('contact_title')\n\t\t )\n\t\t);\n\n\t\tsleep(1);\n\n\t\t// Resto de campos\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_title'))->findElement(\\WebDriverBy::cssSelector(\"option[value='2']\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_name'))->sendKeys($contact['name']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_surname'))->sendKeys($contact['surname']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_email'))->sendKeys($contact['email']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_landline'))->sendKeys($contact['landline']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_mobile'))->sendKeys($contact['mobile']);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//label[contains(text(),'General')]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//label[contains(text(),'Electrician')]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//label[contains(text(),'Decorator')]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//input[@name='contact[require_certification]' and @value=0]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//input[@name='contact[liability_insurance]' and @value=1]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_status'))->findElement(\\WebDriverBy::cssSelector(\"option[value='1']\"))->click();\n\n\t\t// Editar Areas\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-start-edit-areas'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('a.btn-success:nth-child(2)')\n\t\t )\n\t\t);\n\n\t\t// Area #1\n\t\tsleep(1); // wait for knockout\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('.area-distance > option:nth-child(2)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('.area-postcode'))->sendKeys($areas[0]['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-1 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t// Area #2\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-new-area'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('#area-2 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\t\tsleep(1); // wait for knockout\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-2 > div:nth-child(1) > div:nth-child(4) > select:nth-child(1) > option:nth-child(3)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-2 > div:nth-child(1) > div:nth-child(5) > input:nth-child(1)'))->sendKeys($areas[1]['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-2 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t// Area #3\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-new-area'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('#area-3 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\t\tsleep(1); // wait for knockout\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-3 > div:nth-child(1) > div:nth-child(4) > select:nth-child(1) > option:nth-child(3)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-3 > div:nth-child(1) > div:nth-child(5) > input:nth-child(1)'))->sendKeys($areas[2]['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-3 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t// Area #4\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-new-area'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('#area-4 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\t\tsleep(1); // wait for knockout\n\n\t\t// Stop edit areas\n\t\t$this->stopEditAreas();\n\n\t\t$message = $this->webDriver->findElement(\\WebDriverBy::cssSelector('#modal-message > div:nth-child(1) > div:nth-child(1) > div:nth-child(2)'));\n\t\t$this->assertContains('There are unsaved changes. Please, save all the areas before continue.', $message->getText());\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('modal-box-btn-close'))->click();\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::invisibilityOfElementLocated(\n\t\t \\WebDriverBy::id('modal-message')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t\t\\WebDriverExpectedCondition::elementToBeClickable(\n\t\t\t\\WebDriverBy::cssSelector('#area-4 > div:nth-child(2) > div:nth-child(1) > a:nth-child(1)')\n\t\t\t)\n\t\t);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-4 > div:nth-child(2) > div:nth-child(1) > a:nth-child(1)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#btn-stop-edit-areas'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t\t\\WebDriverExpectedCondition::elementToBeClickable(\n\t\t\t\\WebDriverBy::id('btn-save-contractor')\n\t\t\t)\n\t\t);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-save-contractor'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('btn-add-contact')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::className('alert-success')\n\t\t )\n\t\t);\n\n\t\t$message = $this->webDriver->findElement(\\WebDriverBy::className('alert-success'));\n\n $this->assertContains('Congrats! The contact was created successfully', $message->getText());\n\n sleep(1); // reload table\n\n\t\t/**************************/\n /*** \tVerify record */\n /**************************/\n $this->assertContains($contact['name'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(2)\"))->getText());\n $this->assertContains($contact['surname'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(3)\"))->getText());\n\n\n // Verify show view\n $this->webDriver->findElement(\\WebDriverBy::cssSelector('#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(1)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::cssSelector('div.pull-right:nth-child(1) > a:nth-child(1)')\n\t\t )\n\t\t);\n\n\t\t$this->assertContains($contact['email'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#contact-details-fieldset > div:nth-child(2) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains($company['address'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#address-fieldset > div:nth-child(2) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains('Unapproved', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#administration-fieldset > div:nth-child(2) > div:nth-child(2)\"))->getText());\n\n\t\t$this->assertContains('General', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".form-horizontal > fieldset:nth-child(6) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains('Decorator', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".form-horizontal > fieldset:nth-child(6) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains('Electrician', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".form-horizontal > fieldset:nth-child(6) > div:nth-child(2)\"))->getText());\n\n\t\t// go to index\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('div.pull-right:nth-child(1) > a:nth-child(1)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::cssSelector('#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\n\t\t// Verify edit view\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-save-contractor')\n\t\t )\n\t\t);\n\n\t\t// Change status\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_status'))->findElement(\\WebDriverBy::cssSelector(\"option[value='2']\"))->click();\n\n\t\t// Save & verify\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-save-contractor'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-add-contact')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::className('alert-success')\n\t\t )\n\t\t);\n\n\t\t$message = $this->webDriver->findElement(\\WebDriverBy::className('alert-success'));\n\n $this->assertContains('Congrats! The contact was updated successfully', $message->getText());\n\n // Verify new status\n $this->assertContains('Pending Approval', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(5)\"))->getText());\n\n // Click delete\n $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(3)\"))->click();\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('modal-message')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-delete-contact')\n\t\t )\n\t\t);\n\n // Verify name in popup delete\n $this->assertContains(\"{$contact['name']} {$contact['surname']}\", $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".text-center\"))->getText());\n\n // Delete record\n $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#btn-delete-contact\"))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('.alert')\n\t\t )\n\t\t);\n\n\t\tsleep(1); // Wait popup is loaded\n\n\t\t$this->assertContains('Congrats! The contact was deleted successfully', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".alert\"))->getText());\n\n\t\tsleep(1); // wait table reload\n\n\t\t$elements = $this->webDriver->findElements(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(1)\"));\n\n\t\t// Verify record doesn't exist in table.\n\t\t$this->assertCount(0, $elements);\n\n }" ]
[ "0.6802849", "0.6537524", "0.64769465", "0.64532065", "0.6296269", "0.61695564", "0.6125048", "0.6089019", "0.60516536", "0.602815", "0.6021496", "0.5986568", "0.59795356", "0.5977144", "0.5974034", "0.5964491", "0.5945142", "0.5940745", "0.59194815", "0.5912024", "0.5876557", "0.58700484", "0.58488595", "0.58283174", "0.58201647", "0.5820042", "0.5819581", "0.581423", "0.5813121", "0.5812988", "0.58103526", "0.58074486", "0.57940453", "0.5793369", "0.57867396", "0.5765381", "0.5762747", "0.5762726", "0.57617795", "0.57542694", "0.57355195", "0.5733851", "0.572782", "0.5727503", "0.57263356", "0.57224673", "0.57212275", "0.5718871", "0.57143694", "0.5700326", "0.5700285", "0.5683942", "0.56785333", "0.56708753", "0.56666", "0.56664026", "0.565858", "0.5658412", "0.565041", "0.5649292", "0.5642163", "0.5625691", "0.56252205", "0.56232", "0.56222945", "0.5620396", "0.56195986", "0.5619382", "0.56091726", "0.5605144", "0.56032425", "0.5598713", "0.5596464", "0.5594103", "0.5587263", "0.55857843", "0.55805826", "0.5577699", "0.5569969", "0.55667895", "0.5565509", "0.5564995", "0.55589175", "0.555557", "0.55512345", "0.55499494", "0.55466354", "0.5543693", "0.55432403", "0.5537795", "0.55375427", "0.5537197", "0.5536934", "0.553452", "0.5527535", "0.552571", "0.5519274", "0.5516277", "0.5511534", "0.5495623" ]
0.7950649
0
return collection filled by query
public function reload() { return new static($this->ensureData(null), ['query'=>$this->query]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "public function getCollection() {\n return $this->gateway->find(\n $this->getFilter(),\n $this->order,\n $this->relations,\n $this->pager,\n !$this->excludeRepo\n );\n }", "public function getAll() : Collection;", "public function getCollectionQuery(): Builder;", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function get() : Collection\n {\n $records = $this->applyScopes()->query->get();\n $records = $this->getTree()->loadInto($records);\n\n return $this->mapper->makeEntities($records);\n }", "public function getCollection() ;", "protected function _getCollection()\n\t{\n\t\t//Check collection\n\t\tif($this->_collection)\n\t\t\treturn $this->_collection;\n\n\t\t//Get collection\n\t\t$this->_collection = new \\Framework\\Database\\Drivers\\Mongo\\CDatabaseModelCollection($this, $this->execute());\n\t\treturn $this->_collection;\n\t}", "public function getCollection()\n {\n $collection = trim(str_replace('\\\\', '_', $this->collection), '_');\n return $this->$collection()\n ->setDatabase($this->database)\n ->setTable($this->table)\n ->setModel($this->model)\n ->set($this->getRows());\n }", "public function collection()\n {\n return collect($this->all());\n }", "public function get()\n {\n return $this->getCollection($this->getRaw());\n }", "public function getAll()\n\t{\n\t\treturn new Collection($this->items);\n\t}", "protected function _getCollection()\n {\n if (!$this->_collection) {\n $websiteId = Mage::app()->getWebsite()->getId();\n $this->_collection = Mage::getModel('gri_reward/reward_history')->getCollection()\n ->addCustomerFilter(Mage::getSingleton('customer/session')->getCustomerId())\n ->addWebsiteFilter($websiteId)\n ->setExpiryConfig(Mage::helper('gri_reward')->getExpiryConfig())\n ->addExpirationDate($websiteId)\n ->skipExpiredDuplicates()\n ->setDefaultOrder()\n ;\n }\n return $this->_collection;\n }", "public function getAll()\n {\n $resultSet = $this->oMapper->getAll();\n\n $className = get_class($this);\n\n// $return = array();\n $dto = new EntityDTO($this->oDb, $this->oLogger);\n foreach ($resultSet as $key => $row) {\n $obj = new $className($dto);\n $obj->fillByObject($row);\n\n $this->aCollection[] = $obj;\n }\n unset($resultSet);\n\n return $this->aCollection;\n }", "protected function createCollection()\n {\n $model = $this->getModel();\n return $model->asCollection();\n }", "public function loadCollectionQuery(Collection $collection): Query;", "public function getAll(): Collection\n {\n return $this->model->newQuery()->orderBy('disporder')->all();\n }", "public function getCollection()\n {\n $collection = $this->createDefaultCollection();\n\n // find the refer attribute and try to join these table.\n /*\n XXX: since some refer column does not have a relationship, we can not join \n the table correctly.\n $joined = array();\n foreach ($model->getSchema()->getColumns() as $column ) {\n if ($ref = $column->refer) {\n if ( isset($joined[$ref]) )\n continue;\n $joined[ $ref ] = true;\n $collection->join(new $ref, 'LEFT');\n }\n }\n */\n foreach( $this->_toolbarItems as $controller ) {\n $controller->handleCollection($collection);\n }\n\n # support for lang query,\n # make sure the model has defined lang column for I18N\n $this->kernel->event->trigger('phifty.crud.collection_filter',$this,$collection);\n\n\n if ($this->quicksearchFields) {\n if ( $q = $this->request->param('_q') ) {\n $w = $collection->where();\n $c = 0;\n foreach( $this->quicksearchFields as $field ) {\n if ( $c++ < 1 ) {\n $w = $w->like( $field , '%' . $q . '%' );\n } else {\n $w = $w->or()->like( $field , '%' . $q . '%' );\n }\n }\n }\n }\n $this->orderCollection($collection);\n return $collection;\n }", "public function asCollection();", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function collection()\n\t{\n\t\t$startdate = Carbon::now()->subDays(7);\n \t$enddate = Carbon::now();\n\n\t\treturn Price::with('location','item','user')\n\t\t\t->whereBetween('created_at', [$startdate, $enddate])\n\t\t\t->where('item_id',$this->itemID)\n\t\t\t->get([\n\t\t\t\t\t'location_id',\n\t\t\t\t\t'item_id',\n\t\t\t\t\t'user_id',\n\t\t\t\t\t'value',\n\t\t\t\t\t'created_at'\n\t\t\t\t]);\n\t}", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "public function all()\n {\n $objects = SevDeskApi::getFromSevDesk($this->objectName);\n $this->collection = collect();\n\n foreach($objects as $object)\n $this->collection->push($this->newInstance($object));\n\n return $this->collection;\n }", "public function selectCollection(Query\\Select $query): Collection\n {\n /** @var Collection<TEntity> $collection */\n $collection = new Collection($this->db);\n\n $result = $this->select($query);\n\n $collection->fromIterable($result);\n\n return $collection;\n }", "abstract public static function create(Relation $query): Collection;", "public function entities(): Collection;", "public function all(): Collection\n {\n }", "public function getCriteriaCollection(): CriteriaCollection;", "public function all() : Collection;", "public function findBy(array $where): ICollection;", "protected function _getCollection()\n {\n if (!$this->_collection) {\n $websiteId = $this->_storeManager->getWebsite()->getId();\n $this->_collection = $this->_historyFactory->create()\n ->addCustomerFilter($this->currentCustomer->getCustomerId())\n ->addWebsiteFilter($websiteId)\n ->setExpiryConfig($this->_rewardData->getExpiryConfig())\n ->addExpirationDate($websiteId)\n ->skipExpiredDuplicates()\n ->setDefaultOrder();\n }\n return $this->_collection;\n }", "public function getCollection()\n {\n\n $State = State::select('tbl_state.*');\n return $State->get();\n }", "public function hydrate(): Collection\n\t{\n\t\t$className = get_class($this->model);\n\n\t\treturn $this->getRaw()->map(fn ($row) => (new $className())->forceFill($row));\n\t}", "public function collection()\n {\n return collect($this->toArray());\n }", "function get_all(){\n $this->load();\n return $this->query;\n }", "public static function search() {\r\n $result = new Collection();\r\n\t\t$key_name = static::getKeyName();\r\n $users = User::all()->toArray();\r\n\t\t$usersRoles = UserRole::all(['user_id', 'role_id'])->groupBy('user_id');\r\n\t\tforeach($users as &$user) {\r\n\t\t\t$user['roles'] = isset($usersRoles[$user[$key_name]]) ? array_pluck($usersRoles[$user[$key_name]], 'role_id') : [];\r\n $result[] = new static($user);\r\n\t\t}\r\n \r\n return $result;\r\n }", "protected function _prepareCollection()\n {\n $collection = $this->collectionFactory->create();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function collection()\n {\n return Product::all();\n }", "public function itemsQuery()\n {\n return $this->items(null);\n }", "public function getAllCollection() \n\n\t{\n\n\t\treturn $this->db->get('tb_collection')->result_array();\n\t}", "public function findByUserId(int $id) : Collection;", "protected function getCollection($result)\n {\n $collection = new Collection();\n foreach ($this->generateModels($result) as $model) {\n $collection->push($model);\n }\n return $collection;\n }", "public function listAll()\n {\n $collectionClassName = $this->getInstanceCollectionClassName();\n return $collectionClassName::create($this, $this->getTable());\n }", "public function getCollection()\n {\n if (!$this->_collection) {\n $this->_prepareCollection();\n }\n\n return $this->_collection;\n }", "public function from($collection)\n {\n return $this->connection->getCollection($collection);\n }", "public function getAll()\n {\n return $this->query()->get();\n }", "public function getAll()\n {\n return $this->query()->get();\n }", "public function fetchRecords() {\n return self::all();\n }", "protected function query() {\n\t\treturn new Query($this);\n\t}", "public function collection()\n\t{\n\t\t$finder = new Finder();\r\n\t\t$finder->files()->in($this->source);\n\t\tif($finder->files()->count()) {\n\n\t\t\t$parser = new Parser($finder, function ($file) use($filesystem) {\n\n\t\t\t\tif(!\\phpQuery::newDocumentFileXML($file)) {\n\t\t\t\t\tthrow new \\Exception('Can not create php query object');\n\t\t\t\t}\n\n\t\t\t\treturn (new Record())\n\t\t\t\t->setName(pq('task')->text())\n\t\t\t\t->setDate(pq('date')->text())\n\t\t\t\t->setDescription(\"<p>Status: \".pq('status')->text().\"</p>\".\n\t\t\t\t\t\t\"<p>Command: \".pq('command')->text().\"</p>\".\n\t\t\t\t\t\t\"<p>Error: \".pq('error')->text().\"</p>\");\n\t\t\t});\n\n\t\t\t$this->cache->refresh($parser->collection());\n\t\t}\n\n\t\treturn $this->cache->load();\n\t}", "public function getAll(): Collection\n {\n return $this->model->all();\n }", "public function query()\n {\n $query = xpsFoldsheet::select([\n\t\t'foldsheet_id as id',\n\t\t'foldsheet_id',\n\t\t'foldcat',\n\t\t'stand',\n\t\t'pag',\n\t\t'strook',\n\t\t'descr',\n\t\t'pag_in_breedte',\n\t\t'pag_in_hoogte',\n\t\t'afloop_l',\n\t\t'afloop_r',\n\t\t'afloop_b',\n\t\t'afloop_o',\n\t\t'kopwit_breed',\n\t\t'kopwit_hoog',\n\t\t'kruiswit_breed',\n\t\t'kruiswit_hoog',\n\t\t'freeswit_breed',\n\t\t'freeswit_hoog',\n\t\t'overslag_breed',\n\t\t'overslag_hoog'\n ]);\n\n return $this->applyScopes($query);\n }", "private function getFieldCollection()\n {\n $fields = $this->fields;\n $collection = new FieldCollection();\n\n foreach ($fields as $fieldKey => $fieldMeta) {\n $collection->add(new FieldVO($fieldKey, $fieldMeta));\n }\n\n return $collection;\n }", "public function all(): Collection\n {\n return $this->model->all();\n }", "public function getAll()\n {\n $model = new static::$model;\n\n $per_page = request('per_page');\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n if( $per_page ) $model->setPerPage($per_page);\n\n $perPage = $model->getPerPage();\n if ($perPage) {\n $paginator = $query->paginate($perPage);\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $collection->setOrder('ID','DESC');\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public static function all()\n {\n $instance = new static;\n\n return $instance->newQuery()->get();\n }", "public function collection()\n {\n $list = Expenditure::all();\n\n// dd($list);\n\n return $list;\n }", "public function all()\n {\n return $this->query()->get();\n }", "protected function createEmptyCollection(): Collection\n {\n /** @var Collection<TEntity> $emptyCollection */\n $emptyCollection = new Collection($this->db);\n return $emptyCollection;\n }", "public function fetchCollection($criteria = null);", "public function collection()\n {\n $name = \"$this->db.$this->name.$this->gridFS\";\n if( ! isset(self::$collections[$name]))\n {\n $selectMethod = ($this->gridFS ? 'getGridFS' : 'selectCollection');\n self::$collections[$name] = $this->db()->db()->$selectMethod($this->name);\n }\n return self::$collections[$name];\n }", "protected function _prepareCollection()\n {\n $collection = $this->_createCollection()->addCustomerIdFilter($this->_getCustomer()->getId())\n ->resetSortOrder()\n ->addDaysInWishlist()\n ->addStoreData();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function all()\n {\n return $this->resource::collection(\n $this->repository->all()\n );\n }", "static function collection()\n {\n return new Collection();\n }", "public function books(): Collection;", "public function query()\n {\n $query = Unit::select(['id','code','name']);\n\n return $this->applyScopes($query);\n }", "public function query()\n {\n $query = Ciudad::query();\n\n return $this->applyScopes($query);\n }", "public function getCollection(){\r\n\t\treturn $this->_collection;\r\n\t}", "public function query()\n {\n /**\n * Create your query\n */\n $query = newsItem::select(\n 'news_items.news_item_id as id' ,\n 'news_items.sequence as sequence' ,\n 'news_items.title as title' ,\n 'news_items.content as content' ,\n 'news_items.visible_from_date as visible_from_date' ,\n 'news_items.visible_until_date as visible_until_date'\n //'users_create.name as created_by',\n //'news_items.id as created_by_id',\n //'users_update.name as updated_by',\n //'news_items.id as updated_by_id'\n );\n //->orderBy('news_items.sequence')\n //->leftJoin('users as users_create', 'users_create.id', '=', 'news_items.created_by')\n //->leftJoin('users as users_update', 'users_update.id', '=', 'news_items.updated_by');\n return $this->applyScopes($query);\n }", "public function Query() {\n return FactoryService::ProjectService()->GetList()->ToList();\n }", "public function findAll()\n\t{\n\t\t$aTableSource = array_merge($this->_acceptedFields, $this->_cascadeFields);\n\t\t\n\t\t$aTables\t= $this->extractTables($aTableSource);\n\t\t$sSelect\t= implode(', ', $this->_acceptedFields);\n\t\t$sWhere \t= $this->compileClauseStrings($this->_cascadeFields);\n\t\t\n\t\t$this->_adapter->select($aTables, $sWhere, $sSelect);\n\t\t\n\t\t$collection = $this->buildCollection();\n\t\t\n\t\twhile($data = $this->_adapter->fetch())\n\t\t{\n\t\t\t$collection->add(null, $this->buildEntity($data));\n\t\t}\n\t\t\n\t\treturn $collection;\n\t}", "public function getList(): Collection\n {\n return User::with(['match1', 'match2'])->get();\n }", "protected function all(): Collection\n {\n return parent::all()->map(function ($coupon) {\n return new self($coupon);\n });\n }", "public function fetch(): ItemCollection\n {\n $result = $this->connection->getClient()->{$this->fetchMode}($this->toArray());\n\n return $this->processor->processItems($result);\n }", "public function getCollection(){\n\t\treturn $this->_collection;\n\t}", "public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }", "protected function _prepareCollection()\n {\n /** @var $collection ChazkiExpressCollection */\n $collection = $this->_collectionFactory->create();\n $collection->setWebsiteFilter($this->getWebsiteId());\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function query()\n {\n $tujuan_id = $this->tujuan_id;\n $query = tDisposisiDokumen::with('tujuan','tujuan.direksi')->whereIn('dest_doc_id',$tujuan_id);\n \n return $this->applyScopes($query);\n }", "protected function _getQueueCollection() : \\Pulchritudinous\\Queue\\Model\\ResourceModel\\Labour\\Collection\n {\n $collection = $this->_objectManager->create('Pulchritudinous\\Queue\\Model\\ResourceModel\\Labour\\Collection')\n ->addFieldToFilter('status', ['eq' => Labour::STATUS_PENDING])\n ->addFieldToFilter('execute_at', ['lteq' => time()])\n ->setOrder('priority', 'ASC')\n ->setOrder('execute_at', 'ASC');\n\n return $collection;\n }", "public function findById($id): Collection\n {\n }", "public function populate();", "public function get()\n {\n return self::fetchAll();\n }", "public function getCollection()\n {\n $store = Mage::app()->getRequest()->getParam('store');\n $website = Mage::app()->getRequest()->getParam('website');\n if ($store) {\n /** @var Mage_Core_Model_Config_Element $cfg */\n $storeId = Mage::getConfig()->getNode('stores')->{$store}->{'system'}->{'store'}->{'id'}->asArray();\n } elseif ($website) {\n /** @var Mage_Core_Model_Config_Element $cfg */\n $storeId =\n array_values(Mage::getConfig()->getNode('websites')->{$website}->{'system'}->{'stores'}->asArray());\n } else {\n $storeId = 0;\n }\n\n return Mage::getModel('cms/mysql4_page_collection')\n ->addStoreFilter($storeId)\n ->addFieldToFilter('is_active', 1)\n ->addFieldToFilter('identifier', array(array('nin' => array('no-route', 'enable-cookies'))));\n\n }", "public function getCollection()\n {\n return $this->collection;\n }", "private function packageResults(Result $result, $query)\n {\n // Create an empty collection to store results in\n $collection = new Collection;\n\n $collection->totalRows = $this->foundRows();\n\n // Loop through the query results\n while (($data = $result->fetch_assoc()) !== null) {\n // Prepare the row data for storage within a model\n $prepared = $this->prepareData($data);\n\n // Package the row into a model\n $this->packageModel($prepared, $collection, $query);\n }\n\n return $collection;\n }", "public function getCollection($name) {}", "public function all(): ResultSetContract;", "public function getCollection() {\n return $this->collection;\n }", "public function getItems(): CollectionInterface;", "public function query()\n {\n return Customer::query();\n }", "public function query()\n {\n return (new Query($this))->entity($this->getEntityName());\n }", "public function query()\n {\n $query = Fieldagent::query()->select($this->getColumns());\n\n return $this->applyScopes($query);\n }", "public function query()\n {\n $pagamentos = Pagamento::query()\n ->select([\n 'pagamentos.id',\n 'pagamentos.contrato_id',\n 'pagamentos.numero_documento',\n 'pagamentos.data_emissao',\n 'pagamentos.valor',\n 'pagamentos.notas_fiscal_id',\n 'pagamentos.enviado_integracao',\n 'pagamentos.integrado',\n 'obras.nome as obra',\n 'fornecedores.nome as fornecedor',\n 'pagamento_condicoes.codigo',\n 'documento_financeiro_tipos.codigo_mega',\n ])\n ->join('obras','obras.id','pagamentos.obra_id')\n ->join('fornecedores','fornecedores.id','pagamentos.fornecedor_id')\n ->join('pagamento_condicoes','pagamento_condicoes.id','pagamentos.pagamento_condicao_id')\n ->join('documento_financeiro_tipos','documento_financeiro_tipos.id','pagamentos.documento_financeiro_tipo_id')\n ;\n\n return $this->applyScopes($pagamentos);\n }", "public function getCollection() {\n return $this->collection;\n }" ]
[ "0.77946985", "0.71978587", "0.7181632", "0.70548844", "0.6956379", "0.6956379", "0.6956379", "0.6956379", "0.6894177", "0.6851158", "0.6834142", "0.68207747", "0.6783044", "0.6718015", "0.6669781", "0.66068554", "0.65497637", "0.6536523", "0.6529247", "0.64960474", "0.64583004", "0.6452578", "0.64475304", "0.64475304", "0.64475304", "0.64475304", "0.6411453", "0.64087886", "0.6382825", "0.6367235", "0.6365985", "0.63643", "0.63563347", "0.63550574", "0.6336384", "0.6333639", "0.6329949", "0.63220215", "0.6319617", "0.6312977", "0.627656", "0.62681174", "0.62653416", "0.62493384", "0.6243653", "0.6219761", "0.6212517", "0.6203893", "0.61920303", "0.619182", "0.6191733", "0.6183924", "0.6183924", "0.6176414", "0.6175375", "0.6159935", "0.61359185", "0.6131386", "0.61157024", "0.61110806", "0.60947144", "0.6090364", "0.6086179", "0.60834855", "0.6057218", "0.60511917", "0.60494536", "0.6031164", "0.60309416", "0.6027874", "0.6017862", "0.60145247", "0.60103995", "0.6004739", "0.5994544", "0.59890765", "0.5987626", "0.5985416", "0.59837896", "0.59831005", "0.5982663", "0.59823835", "0.5977834", "0.59746504", "0.5963626", "0.59573436", "0.59545994", "0.59468234", "0.59462875", "0.59404045", "0.59373593", "0.59330976", "0.59315956", "0.5927806", "0.592755", "0.592748", "0.5925281", "0.5922014", "0.5914201", "0.5912127", "0.59089136" ]
0.0
-1
TODO relational operations like link() and unlink() sync() TODO addToRelation() by checking if query is a relation
public function findWith($with) { if (!$this->query) { throw new InvalidCallException('This collection was not created from a query, so findWith() is not possible.'); } $this->ensureAllInstanceOf(BaseActiveRecord::class); $models = $this->getData(); $this->query->findWith($with, $models); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function _relations() {\n\n\t}", "abstract function relations();", "abstract public static function create(Relation $query): Collection;", "public function clearRelationCache();", "function query() {\n dpm($this);\n $this->ensure_my_table();\n\n // First, relate our current table to the link table via the field\n $first = array(\n 'left_table' => $this->table_alias,\n 'left_field' => $this->field, // @TODO real_field?\n 'table' => $this->definition['link table'],\n 'field' => $this->definition['link field'],\n );\n\n if (!empty($this->options['required'])) {\n $first['type'] = 'INNER';\n }\n\n if (!empty($this->definition['link_join_extra'])) {\n $first['extra'] = $this->definition['link_join_extra'];\n }\n\n if (!empty($this->definition['join_handler']) && class_exists($this->definition['join_handler'])) {\n $first_join = new $this->definition['join_handler'];\n }\n else {\n $first_join = new views_join();\n }\n $first_join->definition = $first;\n $first_join->construct();\n $first_join->adjusted = TRUE;\n\n $this->first_alias = $this->query->add_table($this->definition['link table'], $this->relationship, $first_join);\n\n // Second, relate the link table to the entity specified using\n // the specified base fields on the base and link tables.\n $second = array(\n 'left_table' => $this->first_alias,\n 'left_field' => $this->definition['base link field'],\n 'table' => $this->definition['base'],\n 'field' => $this->definition['base field'],\n );\n\n if (!empty($this->options['required'])) {\n $second['type'] = 'INNER';\n }\n\n if (!empty($this->definition['base_join_extra'])) {\n $second['extra'] = $this->definition['base_join_extra'];\n }\n\n if (!empty($this->definition['join_handler']) && class_exists($this->definition['join_handler'])) {\n $second_join = new $this->definition['join_handler'];\n }\n else {\n $second_join = new views_join();\n }\n $second_join->definition = $second;\n $second_join->construct();\n $second_join->adjusted = TRUE;\n\n // use a short alias for this:\n // @TODO real_field?\n $alias = $this->field . '_' . $this->definition['base'];\n\n $this->alias = $this->query->add_relationship($alias, $second_join, $this->definition['base'], $this->relationship);\n }", "public function has_or_relation()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function getRelationQuery()\r\n\t{\r\n\t\treturn $this->relationQuery;\r\n\t}", "public function isRelated();", "private function createRelation()\n {\n $this->createBuilder();\n }", "public function isAddToRelationship();", "public function isRelation()\n {\n return $this instanceof Relation;\n }", "protected function createRelationHandlerInstance() {}", "public function testAddRelationViaObject()\n {\n $resource = new Entry($this->createFakeNode());\n $resource->setEntityType('Foo');\n $resource->addLink('FooSet(123)', 'self');\n\n $entry = new Entry($this->createFakeNode());\n $entry->addRelation($resource);\n\n static::assertEquals(\n '<entry>' .\n '<link type=\"application/atom+xml;type=entry\" ' .\n 'href=\"FooSet(123)\" ' .\n 'rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Foo\" ' .\n 'title=\"Foo\"/>' .\n '</entry>',\n $this->getXML($entry)\n );\n }", "public function onRelationManageAdd()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n\n /*\n * Add\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n /*\n * Remove existing relations from the array\n */\n $existingIds = $this->findExistingRelationIds($checkedIds);\n $checkedIds = array_diff($checkedIds, $existingIds);\n $foreignKeyName = $this->relationModel->getKeyName();\n\n $models = $this->relationModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->add($model, $sessionKey);\n }\n }\n\n }\n /*\n * Link\n */\n elseif ($this->viewMode == 'single') {\n if ($recordId && ($model = $this->relationModel->find($recordId))) {\n\n $this->relationObject->add($model, $sessionKey);\n $this->viewWidget->setFormValues($model->attributes);\n\n /*\n * Belongs to relations won't save when using add() so\n * it should occur if the conditions are right.\n */\n if (!$this->deferredBinding && $this->relationType == 'belongsTo') {\n $parentModel = $this->relationObject->getParent();\n if ($parentModel->exists) {\n $parentModel->save();\n }\n }\n\n }\n }\n\n return $this->relationRefresh();\n }", "public function test_rel(){\n\t\t//$data1 = array('name'=>'jack','age'=>24);\n\t\t//$a->data($data1)->save();\n\n\t\t//$a = new article();\n\t\t//$a->data(array('title'=>'art1','content'=>'test'))->save();\n\t\t//$a = new user_article_author();\n\t\t//$a->data(array('user_id'=>1,'article_id'=>1,'status'=>'open'))->save();\n\t\t$a = new user_article_author();\n\t\t$b = $a->rel();\n\t\tdump ($b->where('user.user_id = 1')->select());\n\t\tdump($b->sql);\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelation()\n {\n $this->buildForeignRelation($this->getRelationName());\n $this->buildLocalRelation('Record');\n }", "abstract public function included(): ?JsonApiParser\\Collections\\Relations;", "public function load($relation);", "function _save_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Check if relation already exists\r\n\t\t\t$query = $this->db->get_where($relationship_table, $data, NULL, NULL);\r\n\r\n\t\t\tif ($query->num_rows() == 0)\r\n\t\t\t{\r\n\t\t\t\t// If this object has a \"has many\" relationship with the other object\r\n\t\t\t\tif (in_array($object->model, $this->has_many))\r\n\t\t\t\t{\r\n\t\t\t\t\t// If the other object has a \"has one\" relationship with this object\r\n\t\t\t\t\tif (in_array($this->model, $object->has_one))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($object->model . '_id' => $object->id), 1, 0);\r\n\r\n\t\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t\t$this->db->where($object->model . '_id', $object->id);\r\n\t\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (in_array($this->model, $object->has_many))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// We can add the relation since this specific relation doesn't exist, and a \"has many\" to \"has many\" relationship exists between the objects\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If this object has a \"has one\" relationship with the other object\r\n\t\t\t\telse if (in_array($object->model, $this->has_one))\r\n\t\t\t\t{\r\n\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t$this->db->where($this->model . '_id', $this->id);\r\n\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Relationship already exists\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "public function testReusableRelation()\n {\n $this->specify(\n 'Reusing relations does not work correctly',\n function () {\n $customers = Customers::find([\n 'document_id = :did: AND status = :status: AND customer_id <> :did:',\n 'bind' => ['did' => 1, 'status' => 'A']\n ]);\n\n expect($customers)->isInstanceOf(Simple::class);\n expect(count($customers))->equals(2);\n\n expect($customers[0]->user)->isInstanceOf(Users::class);\n expect($customers[0]->user)->isInstanceOf(Users::class);\n expect($customers[0]->user)->isInstanceOf(Users::class);\n\n expect($customers[1]->user)->isInstanceOf(Users::class);\n expect($customers[1]->user)->isInstanceOf(Users::class);\n expect($customers[1]->user)->isInstanceOf(Users::class);\n\n expect($customers->getFirst())->isInstanceOf(Customers::class);\n\n expect($customers[1]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[1]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[1]->user->name)->equals('Nikolaos Dimopoulos');\n\n expect($customers->getFirst()->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers->getFirst()->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers->getFirst()->user->name)->equals('Nikolaos Dimopoulos');\n\n expect($customers[0]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[0]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[0]->user->name)->equals('Nikolaos Dimopoulos');\n }\n );\n }", "public function followRelation($relation) {\n\n $field = $this->getModelField($relation);\n $table = $this->getModelTableName();\n $relatedModel = $field->getOption('model', $relation);\n $fieldAsID = to_id($field->getFieldName());\n\n $relatedSet = new Octopus_Model_ResultSet($relatedModel);\n $relatedTable = $relatedSet->getModelTableName();\n $relatedPrimaryKey = $relatedSet->getModelPrimaryKey();\n\n $dummySelect = new Octopus_DB_Select();\n $params = array();\n $whereClause = $this->getFullWhereClause($dummySelect, $params);\n if (strlen($whereClause)) $whereClause = \"WHERE $whereClause\";\n\n return $relatedSet->whereSql(\n \"`$relatedTable`.`$relatedPrimaryKey` IN (SELECT `$table`.`$fieldAsID` FROM `$table` $whereClause)\",\n $params\n );\n\n }", "function _delete_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Delete relation\r\n\t\t\t$this->db->delete($relationship_table, $data);\r\n\r\n\t\t\t// Clear related object so it is refreshed on next access\r\n\t\t\t$this->{$object->model} = NULL;\r\n\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "public function getRelation($relation);", "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "public function isRelationshipData();", "public function relation()\n {\n// exit();\n return \"this is relation mwthod\";\n // $user = User::find(2);\n // return $user->phone();\n\n // $phone = Phone::find(3);\n // return $phone->user;\n\n\n // return $post->comments();\n\n // $post = Post::find(1);\n // foreach($post->comments as $comment)\n // {\n // echo $comment->brief;\n // }\n\n // $comment = Comment::find(2);\n // return $comment->post->discription;\n\n // $user = User::find(1);\n // return $user->roles;\n\n // $roles = User::find(2)->roles()->orderBy('role_name')->get();\n // return $roles;\n\n // $role = Role::find(1);\n // return $role->users;\n\n\n //morph\n\n\n // $post = Post::find(1);\n // $image = $post->image;\n // return $image;\n\n // $image = Image::find(1);\n\n // $imageable = $image->imageable;\n\n\n // $image = Image::find(1);\n // $imageable = $image->imageable;\n // return $imageable;\n\n // $post = Post::find(1);\n\n // foreach ($post->comments as $comment) {\n // echo $comment->brief;\n // }\n\n // $comment = Comment::find(1);\n // $commentable = $comment->commentable;\n // echo $commentable->title;\n\n\n // $post = Post::find(1);\n // foreach ($post->tags as $tag) {\n // echo $tag->name;\n // echo '<br>';\n // ?\n\n // $user = User::find(1);\n // return $user->posts()->where('active', 1)->get();\n\n // return User::find(1)->posts()\n // ->where('active', 1)\n // ->orWhere('votes', '>=', 100)\n // ->get();\n\n // return User::find(4)->posts()\n // ->where(function (Builder $query) {\n // return $query->where('active', 1)\n // ->orWhere('votes', '>=', 100);\n // })\n // ->get();\n\n // return $posts = Post::has('comments')->get();\n\n // return $posts = Post::has('comments', '>=', 1)->get();\n\n // return $posts = Post::has('comments.image')->get();\n\n\n // return Post::whereHas('comments', function (Builder $query) {\n // $query->where('brief', 'like', 'y%');\n // })->get();\n\n // return $posts = Post::whereHas('comments', function (Builder $query) {\n // $query->where('brief', 'like', 'y%');\n // }, '>=', 2)->get();\n\n // return $posts = Post::doesntHave('comments')->get();\n\n // return $posts = Post::whereHas('comments', function (Builder $query) {\n // $query->where('brief', 'like','y%');\n // })->get();\n\n\n // return $comments = Comment::whereHasMorph(\n // 'commentable',\n // [Post::class, Video::class],\n // function (Builder $query) {\n // $query->where('title', 'like', 'php%');\n // }\n // )->get();\n\n\n // return $comments = Comment::whereHasMorph(\n // 'commentable',\n // [Post::class, Video::class],\n // function (Builder $query, $type) {\n // $column = $type === Post::class ? 'discription' : 'title';\n // $query->where($column, 'like', 'l%');\n // }\n // )->get();\n\n\n // return $comments = Comment::whereHasMorph('commentable', '*', function (Builder $query) {\n // $query->where('title', 'like', 'p%');\n // })->get();\n\n // $posts = Post::withCount('comments')->get();\n // foreach ($posts as $post) {\n // echo $post->comments_count;\n // }\n\n // return $posts = Post::withCount(['comments' => function (Builder $query) {\n // $query->where('brief', 'like', 'y%');\n // }])->get();\n\n // return $posts = Post::withCount([\n // 'comments',\n // 'comments as pending_comments_count' => function (Builder $query) {\n // $query->where('approved', false);\n // },\n // ])->get();\n\n // $post = Post::find(4);\n // return $post->loadCount(['comments' => function ($query) {\n // $query->where('approved', '=', 1);\n // }]);\n\n\n // return $posts = Post::withAvg('comments', 'votes')->get();\n\n // $post = Post::find(4);\n // return $post->loadSum('comments', 'votes');\n\n // return $activities = ActivityFeed::with([\n // 'parentable' => function (MorphTo $morphTo) {\n // $morphTo->morphWithCount([\n // Post::class => ['comments'],\n // Video::class => ['tags'],\n // ]);\n // }\n // ])->get();\n\n // $activities = ActivityFeed::with('parentable')->get();\n // return $activities->loadMorphCount('parentable', [\n // Video::class => ['tags'],\n // Post::class => ['comments'],\n // ]);\n\n\n // $users = User::all();\n\n // foreach ($users as $user) {\n // dump($user->roles);\n // }\n\n\n // return Contact::with('user.roles')->get();\n\n\n // return $activities = ActivityFeed::query()\n // ->with(['parentable' => function (MorphTo $morphTo) {\n // $morphTo->morphWith([\n // Video::class => ['tags'],\n // Post::class => ['comments'],\n // ]);\n // }])->get();\n\n // return User::with('phone:id,user_id,number')->get();\n\n // return User::without('phone')->find(1);\n\n // return $users = User::with(['roles' => function ($query) {\n // $query->whereIn('role_name', ['editor', 'content writer']);\n // }])->get();\n\n // $comment = new Comment(['brief' => 'Command is working']);\n // $post = Post::find(4);\n // $post->comments()->save($comment);\n\n // $post = Post::find(2);\n // $post->comments()->saveMany([\n // new Comment(['brief' => 'A new comment.']),\n // new Comment(['brief' => 'Another new comment.']),\n // ]);\n\n\n // $user = User::with('posts')->where('id', 3)->first();\n // $user->posts()->saveMany([\n // new Post(['title' => 'Bird nest', 'discription' => 'Various types of bird nests']),\n // new Post(['title' => 'Authors', 'discription' => 'Authors of Italy']),\n // ]);\n\n // $user->refresh();\n // return $user->posts;\n\n\n // $user = User::find(4);\n // $user->name = \"ALia Bhatt\";\n // $user->posts[0]->title = 'Trump has left whitehouse';\n // $user->posts[0]->comments[0]->brief = 'Biden take charge';\n // $user->push();\n\n // $post = Post::find(4);\n // $post->user()->associate(User::find(4));\n // $post->save();\n\n // $user = User::find(1);\n // $user->roles()->attach(2);\n // $user->roles()->attach(2, ['priority' => 2]);\n\n\n // $user = User::find(1);\n // $user->roles()->detach();\n\n // $user = User::find(1);\n // $user->roles()->attach([\n // 2 => ['priority' => 4],\n // 3 => ['priority' => 5],\n // ]);\n\n // $user = User::find(1);\n // $user->roles()->sync([1, 3]);\n\n // $user = User::find(1);\n // $user->roles()->sync([2 => ['priority' => 5], 1]);\n\n // $user = User::find(1);\n // $user->roles()->syncWithoutDetaching([3]);\n\n // $user = User::find(1);\n // $user->roles()->updateExistingPivot(2, [\n // 'priority' => 2,\n // ]);\n\n\n // $post = Post::find(8);\n // $post->title = \"Ind vs Aus\";\n // $post->save();\n\n // $post = Post::find(8);\n // $post->discription = \"Author of germany\";\n // $post->save();\n\n // return redirect('qbuilder');\n\n\n }", "public function setRelations() {}", "function joinQuery()\n {\n }", "private static function relations()\n {\n $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];\n $folder = static::$root.'MVC/Relations'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyRelationException', 'ModelNotFindedException'];\n $folder = static::$root.'MVC/Relations/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function newQueryWithoutRelationships();", "public function getWithRelations();", "private function makeRelationBetweenCategoryAndDummyTable() {}", "function addContentObjectRelation( $FromObjectID, $FromObjectVersion, $ContentClassAttributeID, $ToObjectID )\n\t{\n\t\t$db =& eZDB::instance();\n\t\t\n\t\t//prevent sql injection\n $FromObjectID=(int) $FromObjectID;\n $ContentClassAttributeID=(int) $ContentClassAttributeID;\n $FromObjectVersion=(int) $FromObjectVersion;\n\t\t$ToObjectID=(int) $ToObjectID;\n\n\t\t$db->query( \"INSERT INTO ezcontentobject_link ( from_contentobject_id, from_contentobject_version, contentclassattribute_id, to_contentobject_id )\t\tVALUES ( '$FromObjectID', '$FromObjectVersion', '$ContentClassAttributeID', '$ToObjectID' )\" );\n\t}", "public function scopeInRelation(EloquentBuilder $query, $relation, Authenticatable $user = null);", "abstract public function query();", "public function getRelation()\r\n {\r\n return $this->relation;\r\n }", "protected function relationship() {\n \n $this->message(__METHOD__);\n\n $t = $this->peek();\n if ($t != EPL_T_HAS && $t != EPL_T_COMPOSED_OF) {\n $this->syntax_error(\"'has' or 'composed_of' is expected\");\n return false;\n }\n $this->next();\n\n // fix bug 179: allow date type keywords to be class names\n $this->_lexer->toggleDataTypeTokens();\n\n // get type\n $type = epFieldMap::DT_HAS;\n if ($t == EPL_T_COMPOSED_OF) {\n $type = epFieldMap::DT_COMPOSED_OF;\n }\n\n // create a relationship field map\n $this->map['type'] = $type;\n $this->map['params'] = array();\n\n // one?\n $this->map['params']['is_many'] = false;\n if ($this->peek() == EPL_T_ONE) {\n $this->next();\n } \n // many?\n else if ($this->peek() == EPL_T_MANY) {\n $this->next();\n $this->map['params']['is_many'] = true;\n }\n\n // class\n $this->map['params']['class'] = false;\n if ($this->peek() == EPL_T_IDENTIFIER) {\n $this->next();\n $this->map['params']['class'] = $this->t->value;\n } else {\n $this->syntax_error(\"Class name is expected\");\n return false;\n }\n \n // toggle data types back\n $this->_lexer->toggleDataTypeTokens();\n\n // inverse\n $this->map['params']['inverse'] = false;\n if ($this->peek() == EPL_T_INVERSE) {\n \n // consume inverse\n $this->next();\n \n // get inverse parameters\n $params = $this->params();\n if (!$params || count($params) != 1) {\n $this->syntax_error(\"Invalid parameters for inverse\");\n return false;\n }\n $this->map['params']['inverse'] = $params[0];\n }\n\n return true;\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function getRelation(string $name) {\n // We want to run a relationship query without any constrains so that we will\n // not have to remove these where clauses manually which gets really hacky\n // and error prone. We don't want constraints because we add eager ones.\n try {\n /** @var Relation $relation */\n $relation = $this->getModel()->{$name}();\n } catch (\\Exception $e) {\n throw $e;\n };\n\n $nested = $this->relationsNestedUnder($name);\n\n // If there are nested relationships set on the query, we will put those onto\n // the query instances so that they can be handled after this relationship\n // is loaded. In this way they will all trickle down as they are loaded.\n if (count($nested) > 0) {\n $relation->getQuery()->with($nested);\n }\n\n return $relation;\n }", "public function loadRelated()\n {\n return;\n }", "public function getRelationList();", "public function isReplaceRelationship();", "protected static function guardIsRelationObject($query = null)\n {\n if ( ! ($query instanceof Relation || $query instanceof Builder || $query instanceof QueryBuilder)) {\n throw new \\InvalidArgumentException('Wrong type of object: $query');\n }\n }", "public static function isRelation($type)\n {\n return in_array($type, ['ref-one', 'ref-many', 'oneToMany', 'manyToOne', 'manyToMany', 'optionSet']);\n }", "function userelation($relation) { atkuse(\"relation\" , $relation); }", "function Borrow_model()\n\t{\n\t\tparent::Query();\n\t}", "public function addRelations(One_Model $model, One_Relation_Adapter $link)\n\t{\n\t\treturn null;\n\t}", "public function getRelation()\n {\n return $this->relation;\n }", "public function hasRelation($model, $foreignKey, $localKey);", "public function query() {\n if (!empty($this->value)) {\n $this->ensureMyTable();\n $field = \"$this->tableAlias.nid\";\n\n $configuration = array(\n 'type' => 'INNER',\n 'table' => 'menu_link_content_data',\n 'field' => 'link__uri',\n 'left_table' => 'node_field_data',\n 'left_field' => 'nid',\n 'operator' => '=',\n );\n $join = Views::pluginManager('join')->createInstance('standard', $configuration);\n $this->query->addRelationship('my_uu', $join, 'node_field_data');\n $this->query->addWhere($this->options['group'], $field, $this->value, '=');\n }\n }", "private function _has_one($request)\n {\n $relation = $this->_relationships[$request];\n $this->_database->join($relation['foreign_table'], $relation['foreign_table'].'.'.$relation['foreign_key'].' = '.$this->table.'.'.$relation['local_key'], 'left');\n return TRUE;\n }", "public static function workflowRelations();", "public function eagerLoadsRelation(): bool\n {\n return $this->eagerLoadsRelation;\n }", "public static function make(){\n return new Relation();\n }", "abstract public static function relations() : ? array;", "function addQuery() {}", "public function bidirectional_relation_exists() {\n $this->db->query(\"SELECT * FROM user_relation WHERE (`from` = ? AND `to` = ?) OR (`from` = ? AND `to` = ?)\",\n array(\n $this->from,\n $this->to,\n $this->to,\n $this->from,\n ));\n\n if($this->db->count() > 0) {\n return $this->db->results()[0]->status;\n } else {\n return false;\n }\n }", "public function addRelation(RelationInterface $relation);", "public function isModifyRelationship();", "public function index(): Relation;", "public function fetchRelatedEagerReturnsNullForEmptyRelationHasOne() {}", "public abstract function getCustomizedRelationList();", "public function canPopulateRelationTest()\n {\n $relationTest = new Relation(['test' => 'super']);\n\n $this->assertArrayHasKey('test', $relationTest->getData());\n }", "public function getRelations();", "public function getRelations();", "protected function applyRelationExistsFilter(\n QueryBuilder|EloquentBuilder $query,\n FilterContract $filter\n ): void {\n $relation = $filter->getAttr()->getName();\n $args = [$relation];\n\n if ($subFilters = $filter->getValue()) {\n $args[] = fn($q) => $this->applyFilters($q, $subFilters);\n }\n\n $query->whereHas(...$args);\n }", "abstract protected function relationName(): string;", "public function isReadRelationship();", "public function getQueueableRelations();", "public function getQueueableRelations();", "public function hasRelationship() {\n return $this->_has(1);\n }", "function build_context_rel() {\n \n global $db;\n $savedb = $db->debug;\n \n // total number of records\n $total = count_records('context');\n // processed records\n $done = 0;\n print_progress($done, $total, 10, 0, 'Processing context relations');\n $db->debug = false;\n if ($contexts = get_records('context')) {\n foreach ($contexts as $context) {\n // no need to delete because it's all empty\n insert_context_rel($context, false, false);\n $db->debug = true;\n print_progress(++$done, $total, 10, 0, 'Processing context relations');\n $db->debug = false;\n }\n }\n \n $db->debug = $savedb;\n}", "function dbplus_rzap($relation)\n{\n}", "function _related($query, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($query) && ! empty($arguments))\r\n\t\t{\r\n\t\t\t$object = $field = $value = $option = NULL;\r\n\r\n\t\t\t// Prepare model\r\n\t\t\tif (is_object($arguments[0]))\r\n\t\t\t{\r\n\t\t\t\t$object = $arguments[0];\r\n\r\n\t\t\t\t// Prepare field and value\r\n\t\t\t\t$field = (isset($arguments[1])) ? $arguments[1] : 'id';\r\n\t\t\t\t$value = (isset($arguments[2])) ? $arguments[2] : $object->id;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$model = ucfirst($arguments[0]);\r\n\t\t\t\t$object = new $model();\r\n\r\n\t\t\t\t// Prepare field and value\r\n\t\t\t\t$field = (isset($arguments[1])) ? $arguments[1] : 'id';\r\n\t\t\t\t$value = (isset($arguments[2])) ? $arguments[2] : NULL;\r\n\t\t\t}\r\n\r\n\t\t\t// Ignore if field and value is invalid\r\n\t\t\tif ($field == 'id' && empty($value) OR $field != 'id' && $this->table == $object->table)\r\n\t\t\t{\r\n\t\t\t\t// For method chaining\r\n\t\t\t\treturn $this;\r\n\t\t\t}\r\n\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t// Retrieve related records\r\n\t\t\tif (empty($this->db->ar_select))\r\n\t\t\t{\r\n\t\t\t\t$this->db->select($this->table . '.*');\r\n\t\t\t}\r\n\r\n\t\t\t// Check if self referencing\r\n\t\t\tif ($this->table == $object->table)\r\n\t\t\t{\r\n\t\t\t\t// Add join if not already included\r\n\t\t\t\tif ( ! in_array($object->model, $this->query_related))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->db->join($relationship_table, $object->table . '.id = ' . $relationship_table . '.' . $this->model . '_id', 'left');\r\n\r\n\t\t\t\t\t$this->query_related[] = $object->model;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add query clause\r\n\t\t\t\t$this->db->{$query}($relationship_table . '.' . $object->model . '_id', $value);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Add join if not already included\r\n\t\t\t\tif ( ! in_array($object->model, $this->query_related))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->db->join($relationship_table, $this->table . '.id = ' . $relationship_table . '.' . $this->model . '_id', 'left');\r\n\r\n\t\t\t\t\t$this->query_related[] = $object->model;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add join if not already included\r\n\t\t\t\tif ( ! in_array($object->table, $this->query_related))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->db->join($object->table, $object->table . '.id = ' . $relationship_table . '.' . $object->model . '_id', 'left');\r\n\r\n\t\t\t\t\t$this->query_related[] = $object->table;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add query clause\r\n\t\t\t\t$this->db->{$query}($object->table . '.' . $field, $value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// For method chaining\r\n\t\treturn $this;\r\n\t}", "public function isRel() {\n return substr($this->model, -3) == \"Rel\";\n }", "public function beforeFind($query) {\n\t\t//$this->idがある場合、登録処理として判断する\n\t\t$recursive = isset($query['recursive'])\n\t\t\t? $query['recursive']\n\t\t\t: null;\n\t\tif ($recursive > -1 && ! $this->id) {\n\t\t\t$belongsTo = $this->Category->bindModelCategoryLang('Link.category_id');\n\t\t\t$this->bindModel($belongsTo, true);\n\t\t}\n\t\treturn parent::beforeFind($query);\n\t}", "public function testApplyToQueryWhere()\n {\n $mapper = $this->makeMockDatabase();\n\n // Relation with no constraints\n $relation = User::posts();\n $query = $mapper->model(User::class);\n $relation->applyToQueryWhere($query);\n $this->assertEquals(10, $query->count());\n\n // Related with specified model\n $post = $mapper->model(Post::class)->find(8);\n $query = $mapper->model(User::class);\n $relation->applyToQueryWhere($query, $post);\n $users = $query->get();\n $this->assertCount(1, $users);\n $this->assertEquals('Quentin', $users[0]->name);\n\n // Related with one of the given models\n $posts = $mapper->model(Post::class)->find([5, 14]);\n $query = $mapper->model(User::class);\n $relation->applyToQueryWhere($query, $posts);\n $users = $query->orderBy('id')->get();\n $this->assertCount(2, $users);\n $this->assertEquals('Charlie', $users[0]->name);\n $this->assertEquals('Frank', $users[1]->name);\n\n // Related with one of the given models (empty models list)\n $query = $mapper->model(User::class);\n $relation->applyToQueryWhere($query, []);\n $users = $query->get();\n $this->assertCount(0, $users);\n\n // Relation with clause\n $query = $mapper->model(User::class);\n $relation->applyToQueryWhere($query, function (ModelQuery $query) {\n $query->where('created_at', '>=', mktime(19, 0, 0, 11, 7, 2017));\n });\n $users = $query->orderBy('id')->get();\n $this->assertCount(3, $users);\n $this->assertEquals('Charlie', $users[0]->name);\n $this->assertEquals('Frank', $users[1]->name);\n $this->assertEquals('Jack', $users[2]->name);\n\n // Self relation\n $relation = Category::children();\n $query = $mapper->model(Category::class);\n $relation->applyToQueryWhere($query, function (ModelQuery $query) {\n $query->where('title', 'Hockey');\n });\n $categories = $query->orderBy('id')->get();\n $this->assertCount(1, $categories);\n $this->assertEquals('Sport', $categories[0]->title);\n\n // Wrong specified model\n $relation = User::posts();\n $query = $mapper->model(User::class);\n $this->assertException(IncorrectModelException::class, function () use ($relation, $query) {\n $relation->applyToQueryWhere($query, new Category());\n });\n\n // Wrong argument\n $this->assertException(InvalidArgumentException::class, function () use ($relation, $query) {\n $relation->applyToQueryWhere($query, 'foo');\n }, function (InvalidArgumentException $exception) {\n $this->assertStringStartsWith('The constraint argument expected to be ', $exception->getMessage());\n });\n\n // Query without model\n $query = new ModelQuery(new class extends Query {\n public function __construct() {}\n });\n $this->assertException(IncorrectQueryException::class, function () use ($relation, $query) {\n $relation->applyToQueryWhere($query);\n }, function (IncorrectQueryException $exception) {\n $this->assertEquals('The given query doesn\\'t have a context model', $exception->getMessage());\n });\n }", "abstract public function newQuery();", "function link_storage(){\n\t\t\n\t\t$query =\n\t\t\t\"ALTER TABLE `$this->table_name`\" .\n\t\t\t\" ADD CONSTRAINT `{$this->table_name}_ibfk_1`\" .\n\t\t\t' FOREIGN KEY (`parent_node_id`)' .\n\t\t\t' REFERENCES `nodes` (`node_id`)' .\n\t\t\t' ON DELETE CASCADE' .\n\t\t\t';';\n\t\t$result = $this->database->execute($query);\n\t\t\n\t\treturn $result;\n\t}", "public function canAutoJoin()\n {\n return ($this instanceof SingleRelation);\n }", "public function isRelationship($name);", "public function hasRelations()\r\n {\r\n return !empty($this->relations);\r\n }", "private function unary_relation_track($build) {\n\n $params = $this->buildToParams($build);\n\n $theVal = $params['value'];\n $theUser = $params['user_id'];\n\n unset($params['value']);\n unset($params['user_id']);\n\n // Get Object\n $objectExists = $this->database->get('*', 'shadow_objects', $params);\n $objectExists = count($objectExists) == 1 ? $objectExists[0] : $objectExists;\n\n \n\n if (!$objectExists) {\n\n // Create Object\n $params['count'] = 0;\n $this->database->create('shadow_objects', $params);\n $theID = $this->database->lastID();\n } else {\n\n // Retain Object\n $theID = $objectExists->id;\n }\n\n // User Has a Relationship?\n $usersRelationship = $this->database->get('*', 'shadow_object_relations', array('user_id' => $theUser, 'real_object_id' => $theID));\n\n // If Liking\n if ($theVal) {\n\n // If No Relationship\n if (!$usersRelationship) {\n\n // Add relationship and Update Object\n $this->database->update('count = count+1', 'shadow_objects', $params);\n $this->database->create('shadow_object_relations', array('user_id' => $theUser, 'real_object_id' => $theID, 'value' => 1));\n }\n\n } elseif (!$theVal && $usersRelationship) {\n\n // Remove relationship and Update Object\n $this->database->update('count = count-1', 'shadow_objects', $params);\n $this->database->remove('shadow_object_relations', array('user_id' => $theUser, 'real_object_id' => $theID, 'value' => 1));\n\n } else {\n // Unliking something you never liked\n }\n\n }" ]
[ "0.6499432", "0.6242411", "0.605474", "0.60528326", "0.58611745", "0.5826134", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5773435", "0.57543164", "0.57439363", "0.5739356", "0.5737649", "0.57365423", "0.56735426", "0.5672061", "0.56666934", "0.55792165", "0.55792165", "0.55792165", "0.55792165", "0.55792165", "0.55792165", "0.55792165", "0.55792165", "0.55722207", "0.5494758", "0.5461581", "0.54499143", "0.54474425", "0.5434685", "0.542796", "0.54267406", "0.54136777", "0.5356305", "0.5344877", "0.5334806", "0.533245", "0.53299826", "0.5325878", "0.5314371", "0.53083867", "0.5301104", "0.5278085", "0.5272352", "0.5268951", "0.5262023", "0.52450746", "0.52450746", "0.52446127", "0.52409726", "0.5235629", "0.5231355", "0.52264845", "0.5213813", "0.51985335", "0.5196509", "0.5195558", "0.5195372", "0.51916105", "0.51907724", "0.51877105", "0.51838833", "0.51810133", "0.51776266", "0.517662", "0.51757324", "0.5170808", "0.5168851", "0.5152712", "0.5151277", "0.514683", "0.51442987", "0.51441276", "0.5140925", "0.5140925", "0.51233435", "0.51188374", "0.5117916", "0.5113112", "0.5113112", "0.51075923", "0.5103213", "0.50962067", "0.5087831", "0.50687987", "0.50670964", "0.5060284", "0.505213", "0.50454456", "0.5027879", "0.50272274", "0.5021105", "0.5020348" ]
0.0
-1
AR specific stuff TODO add transaction support
public function deleteAll($useTransaction = false, $db = 'db') { $this->ensureAllInstanceOf(BaseActiveRecord::class); if($useTransaction === true){ return $this->runTransaction($db, 'deleteAll'); } foreach($this->getModels() as $model) { $model->delete(); } // return $this ? }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function determineTransaction();", "public function transaction();", "public function transaction();", "abstract protected function _start_transaction();", "abstract public function InTransaction();", "abstract protected function doTransload();", "abstract public function startTransaction();", "public function inTransaction();", "public function inTransaction();", "public function createTransaction()\n {\n }", "function yy_r17(){ $this->_retvalue = new SQL\\BeginTransaction; }", "public abstract function beginTransaction();", "function handleArrearsERP(\n $tid, $created, $serialnumber, $paymentmethod_id, $paying_amount, $arrearsfees, $exclusive, $vat\n ) {\n debug_print(\"Entry: handleArrearsERP ( tid = $tid, created = $created, serialnumber = $serialnumber, paymentmethod_id = $paymentmethod_id, paying_amount = $paying_amount, arrearsfees - $arrearsfees, exclusive = $exclusive, vat = $vat )\");\n\n if ($arrearsfees == 0)\n return true;\n\n debug_print(\"Creating debtor transaction record\");\n\n $paymentmethod = loadPaymentMethod($paymentmethod_id);\n if ($paymentmethod === false)\n return false;\n\n $meter = loadMeterInformation($serialnumber);\n if ($meter === false)\n return false;\n\n $account = loadAccount($meter['account_id']);\n if ($account === false)\n return false;\n\n $branch = loadCustomerBranch($account['customerbranch_id']);\n if ($branch === false)\n return false;\n\n $branchcode = $branch['code'];\n $new_date = date('Y-m-d', strtotime($created));\n $period_id = fgetPeriod_id($new_date, __FILE__, __LINE__);\n $reference = substr($paymentmethod['code'], 0, 7) . ' ' . $tid;\n $salesorder_id = 0;\n $gst = 0.00;\n $freight = 0.00;\n $rate = 1.00;\n $invtext = '';\n $settled = 0;\n $discount = 0;\n $invtext = 'ReceivedMeter:' . $serialnumber . '(' . $branchcode . ')';\n $invtextevent = 'Received';\n $invtextserialnumber = $serialnumber;\n $invtextbranchcode = $branchcode;\n $meter_id = $meter['meter_id'];\n $posted = 1;\n\n $dtid = insertDebtorTrans(\n $tid, 4, $account['customerbranch_id'], $created, $period_id, $reference, $salesorder_id, ($arrearsfees), $gst, $freight, $rate, $invtext, $settled, $discount, $invtextevent, $invtextserialnumber, $invtextbranchcode, $meter_id\n );\n\n debug_print(\"Returning transaction id $dtid\");\n debug_print(\"Exit: handleArrearsERP\");\n return $dtid;\n }", "public function transactional();", "function yy_r21(){ $this->_retvalue = new SQL\\RollbackTransaction; }", "function yy_r19(){ $this->_retvalue = new SQL\\CommitTransaction; }", "public function beginTransaction();", "public function beginTransaction();", "public function beginTransaction();", "abstract protected function getTransactions();", "function yy_r18(){ $this->_retvalue = new SQL\\BeginTransaction($this->yystack[$this->yyidx + 0]->minor); }", "public function getTransaction();", "function UPDSAR()\n{\n $aropen_rows = db::fetchRows($sql, 'DTSDATA.AROPEN'); /* #251 */\n if ($aropen\n ) {\n if ($billpay->BPPAY_ < $billpay->BPNET_\n && $billpay->BPRTN_ === 0\n && $billpay->BPOIN_ > 0\n ) {\n $aropen->AROPPD += $billpay->BPPAY_; /* #258 */\n $aropen->ARONPD += $billpay->BPPAY_; /* #259 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #260 */\n $aropen->update(); /* #261 update record */\n $receipts->CRCID = $aropen->AROCID; /* #263 */\n $receipts->CRPER = $PERIOD; /* #264 */\n $receipts->CRCUST = $aropen->AROCUS; /* #265 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #266 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #267 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #268 */\n $receipts->CRINV_ = $aropen->AROINV; /* #269 */\n $receipts->CRTYPE = '1'; /* #270 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #271 */\n $receipts->CRGLDP = ''; /* #272 */\n $receipts->CRGLAC = ''; /* #273 */\n $receipts->CRDESC = ''; /* #274 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #275 */\n $receipts->CRDUS = 0; /* #276 */\n $receipts->CRSTCM = ''; /* #277 */\n $receipts->CRSTGL = ''; /* #278 */\n $receipts->CRSTS = ''; /* #279 */\n $receipts->CRDST = ''; /* #280 */\n $receipts->insert(); /* #281 insert record */\n $customer_rows = db::fetchRows($sql, 'DTSDATA.MFCUST'); /* #283 */\n $customer->CULRDT = $billpay->BPPDAT; /* #284 */\n $customer->CUREC->update(); /* #285 update record */\n } /* #286 end if */\n } /* #288 end if */\n}", "public function beginTransaction():void;", "public function startTransaction(): void;", "public static function beginTransaction()\n {\n }", "function transaction_check(){\n }", "function yy_r20(){ $this->_retvalue = new SQL\\CommitTransaction($this->yystack[$this->yyidx + 0]->minor); }", "protected function beginTrans(){\r\n $this->transaction=$this->dba->beginTransaction();\r\n $this->isTransactionBegun=true;\r\n }", "protected function saveAR($account_id,$employee_id,$receiving_id,$purchase_amount,$trans_date,$trans_code,$currency_code)\n {\n $account_receivable = new AccountReceivableSupplier;\n $account_receivable->account_id=$account_id;\n $account_receivable->employee_id=$employee_id;\n $account_receivable->trans_id=$receiving_id;\n $account_receivable->trans_amount=$purchase_amount;\n $account_receivable->trans_code=$trans_code;\n $account_receivable->trans_datetime=$trans_date;\n $account_receivable->currency_code=$currency_code;\n $account_receivable->save();\n\n }", "abstract public function commitTransaction();", "abstract protected function doRollback();", "function realstate_call_after_install() {\n // for example you might want to create a table or modify some values\n // In this case we'll create a table to store the Example attributes\n $conn = getConnection() ;\n $conn->autocommit(false) ;\n try {\n $path = osc_plugin_resource('realstate_attributes/struct.sql');\n $sql = file_get_contents($path);\n $conn->osc_dbImportSQL($sql);\n $conn->commit();\n } catch (Exception $e) {\n $conn->rollback();\n echo $e->getMessage();\n }\n $conn->autocommit(true);\n}", "public function execute() {\n ///////////////////////////////////RAAS Linking Interface////////////////////////////////////////\n /** @var \\Magento\\Framework\\App\\ObjectManager $om */\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n /** @var \\Magento\\Framework\\App\\Http\\Context $context */\n $context = $objectManager->get('Magento\\Framework\\App\\Http\\Context');\n /** @var bool $isLoggedIn */\n $isLoggedIn = $context->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n $customerSession = $objectManager->get('Magento\\Customer\\Model\\Session');\n\n $redirectPage = 'customer/account';\n if ($isLoggedIn) {\n $providerid = isset($_REQUEST['providerid']) && !empty($_REQUEST['providerid']) ? trim($_REQUEST['providerid']) : '';\n $provider = isset($_REQUEST['provider']) && !empty($_REQUEST['provider']) ? trim($_REQUEST['provider']) : '';\n $redirectPage = '';\n if (!empty($providerid) && !empty($provider)) {\n $this->_helperActivation = $this->_objectManager->get('LoginRadius\\Activation\\Model\\Helper\\Data');\n $customerRegistrationHelper = $this->_objectManager->get('LoginRadius\\CustomerRegistration\\Model\\Helper\\Data');\n if ($customerRegistrationHelper->enableRaas() == '1') {\n $accountAPI = new \\LoginRadiusSDK\\CustomerRegistration\\AccountAPI($this->_helperActivation->siteApiKey(), $this->_helperActivation->siteApiSecret(), array('authentication' => true, 'output_format' => 'json'));\n try {\n $accountUnlink = $accountAPI->accountUnlink($customerSession->getLoginRadiusUid(), $providerid, $provider);\n } catch (\\LoginRadiusSDK\\LoginRadiusException $e) {\n //$this->_eventManager->dispatch('lr_logout_sso', array('exception' => $e));\n }\n }else{\n $linkedAccounts = $customerRegistrationHelper->selectSocialLinkingData($customerSession->getId());\n if (is_array($linkedAccounts) && count($linkedAccounts) > 0) {\n foreach ($linkedAccounts as $linkedAccount) {\n if(($linkedAccount['sociallogin_id'] == $providerid) && ($linkedAccount['provider'] == $provider)){\n $accountUnlink = new \\stdClass();\n $accountUnlink->isPosted = true;\n }\n }\n } \n }\n $this->_messageManager = $this->_objectManager->get('Magento\\Framework\\Message\\ManagerInterface');\n if (isset($accountUnlink) && $accountUnlink->isPosted == true) {\n $this->removeSocialLinkingData($providerid);\n $customerSession->setLoginRadiusStatus('Success');\n $customerSession->setLoginRadiusMessage('Your Account has been Removed successfully.');\n } else { \n $customerSession->setLoginRadiusStatus('Error');\n $customerSession->setLoginRadiusMessage('You can not remove this account.');\n }\n $redirectPage = 'customerregistration/accounts/linking';\n }\n if (empty($redirectPage)) {\n $resultPage = $this->_resultPageFactory->create();\n $resultPage->getConfig()->getTitle()->set('');\n \n $block = $resultPage->getLayout()->getBlock('accountlinking');\n if ($block) {\n $block->setRefererUrl($this->_redirect->getRefererUrl());\n }\n }\n }\n if (!empty($redirectPage)) {\n $resultPage = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n $resultPage->setPath($redirectPage);\n }\n return $resultPage;\n }", "function yy_r22(){ $this->_retvalue = new SQL\\RollbackTransaction($this->yystack[$this->yyidx + 0]->minor); }", "public function processTransactionsDb(){\n $wrapper = new fpgrowth\\PrestashopWrapper();\n $levels = $wrapper->getProductAssociationRules();\n $wrapper->saveProductAssociationRules($levels);\n }", "public function doTransaction()\n {\n \t// getting the db adapter\n \t$dbAdapter = \\Zend\\Db\\TableGateway\\Feature\\GlobalAdapterFeature::getStaticAdapter();\n\n \t$stack = $this->transactionStack;\n\n \tif (count($stack)) {\n \t\t/*\n \t\t * begin transaction\n \t\t */\n \t\t$dbAdapter->getDriver()->getConnection()->beginTransaction();\n\n \t\t$overAllSuccess = true;\n\n \t\tforeach ($stack as $action) {\n \t\t\t$serviceObject = $action[\"object\"];\n \t\t\t$serviceMethod = $action[\"method\"];\n\n \t\t\t$actionResult = $serviceObject->$serviceMethod();\n\n \t\t\tif ($actionResult) {\n \t\t\t\tcontinue;\n \t\t\t}else {\n \t\t\t\t$overAllSuccess = false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n\n \t\t// check for overall success\n \t\tif ($overAllSuccess) {\n \t\t\t/*\n \t\t\t * commit\n \t\t\t */\n \t\t\t$dbAdapter->getDriver()->getConnection()->commit();\n\n \t\t\t// clearing stack\n \t\t\tunset($this->transactionStack);\n \t\t\t$this->transactionStack = array();\n\n \t\t\treturn true;\n \t\t}else {\n \t\t\t/*\n \t\t\t * rollback\n \t\t\t */\n \t\t\t$dbAdapter->getDriver()->getConnection()->rollback();\n\n \t\t\treturn false;\n \t\t}\n \t}else {\n \t\t// there is no any method in transaction to call\n \t\treturn false;\n \t}\n }", "public function action_account_transaction() {\n $package = Model::factory('package');\n $invoice_id = explode('/', $_SERVER['REQUEST_URI']);\n $transaction_info = $package->account_transaction($invoice_id[3]);\n $this->template->title = CLOUD_SITENAME . ' | Account';\n $this->template->page_title = __('account_transaction_details');\n $this->meta_description = \"\";\n $this->template->content = View::factory(\"admin/package_plan/account_transaction\")\n ->bind('transaction_info', $transaction_info);\n }", "protected function runTransactionBuild()\n {\n $this->request->transaction = new Transaction($this->request); /* Write the transaction record to disk */\n }", "protected function saveAccountAR($employee_id, $receiving_id, $supplier_id, $sub_total,$trans_date,$trans_mode,$currency_code)\n {\n if ($trans_mode=='receive' || $trans_mode=='return') {\n $sub_total = $trans_mode=='receive' ? $sub_total : -$sub_total;\n // Updating current_balance in account table\n $account=$this->updateAccount($supplier_id, $sub_total,$currency_code);\n if ($account) {\n // Saving to Account Receivable (Payment, Sale Transaction ..)\n $trans_code = $this->transactionCode($trans_mode);\n $this->saveAR($account->id, $employee_id, $receiving_id, $sub_total,$trans_date,$trans_code,$currency_code);\n }\n }\n }", "function addarform() {\n $newlogin = new userlogin;\n $newlogin->dbconnect();\n $sql = \"start transaction\";\n $result = mysql_query($sql);\n $sql = \"select nxtnum from seqnum where tablename = 'arform' for update\";\n //echo \"$sql\";\n $result = mysql_query($sql);\n if(!$result)\n {\n //header(\"Location:errorMessage.php?validate=Inv1\");\n die(\"Seqnum access failed..Please report to Sysadmin. \" . mysql_error());\n }\n $myrow = mysql_fetch_row($result);\n $seqnum = $myrow[0];\n $objid = $seqnum +1;\n //$ar3num=$seqnum -22 +1;\n //echo$seqnum.\"---------***\".$objid.\"------\";\n $prefix = \"AR3A\";\n //$suffix = \"/12-13\";\n //$suffix = \"/14-15\";\n // $suffix = \"/15-16\";\n $suffix = \"/16-17\";\n $ar3num=$seqnum - 168 +1;\n\n\n\t$strrecnum=sprintf(\"%d\",$ar3num);\n $ar3anum=$prefix.$strrecnum.$suffix;\n \n $exchange_rate = $this->exchange_rate?$this->exchange_rate:0.0;\n $gross_weight = $this->gross_weight?$this->gross_weight:0.0;\n $tot_payableamt = $this->tot_payableamt?$this->tot_payableamt:0.0;\n $tot_amt_rs = $this->tot_amt_rs?$this->tot_amt_rs:0.0;\n $tot_amt = $this->tot_amt?$this->tot_amt:0.0;\n $tot_qty = $this->tot_qty?$this->tot_qty:0;\n $ar3adate= $this->ar3adate?\"'\" . $this->ar3adate . \"'\":'0000-00-00';\n //$ar3anum = \"'\" . $this->ar3anum . \"'\";\n $link2invoice =$this->link2invoice;\n $fob_words = \"'\" . $this->fob_words . \"'\";\n $duty_inwords = \"'\" . $this->duty_inwords . \"'\";\n $nopackage = \"'\" . $this->nopackage . \"'\";\n $link2ship = $this->link2ship;\n $vatsubtotal= $this->vatsubtotal ? $this->vatsubtotal : 0;\n\n $sql = \"select * from arform where recnum = $objid\";\n //echo $sql;\n $result = mysql_query($sql);\n if (!(mysql_fetch_row($result))) {\n $sql = \"INSERT INTO\n arform\n (\n recnum,\n\t\t\t\t\t\t\tlink2invoice,\n\t\t\t\t\t\t\tar3anum,\n\t\t\t\t\t\t\tar3adate,\n\t\t\t\t\t\t\texchangerate,\n\t\t\t\t\t\t\tvalueinwords,\n\t\t\t\t\t dutyinwords,\n totalrupees,\n totalusd,\n totqty,\n numpkgs,\n grosswt,\n total_payableamt,\n create_date,\n\t\t\t\t\t\t\tlink2ship,\n vatsubtotal\n )\n VALUES\n (\n $objid,\n \t\t\t\t\t\t\t$link2invoice,\n\t\t\t\t\t\t\t'$ar3anum',\n\t\t\t\t\t\t\t$ar3adate,\n $exchange_rate,\n\t\t\t\t\t $fob_words,\n $duty_inwords,\n $tot_amt_rs,\n $tot_amt,\n $tot_qty,\n $nopackage,\n $gross_weight,\n\t\t\t\t\t\t\t$tot_payableamt,\n now(),\n\t\t\t\t\t\t\t $link2ship,\n $vatsubtotal\n )\";\n //echo \"\\n\" . $sql;\n $result = mysql_query($sql);\n // Test to make sure query worked\n if(!$result)\n {\n //header(\"Location:errorMessage.php?validate=Inv2\");\n die(\"Insert to arform didn't work..Please report to Sysadmin. \" . mysql_error());\n }\n }\n else {\n //header(\"Location:errorMessage.php?validate=Inv3\");\n die(\"AR3A\" . $objid . \" already exists. \");\n }\n\n $sql = \"update seqnum set nxtnum = $objid where tablename = 'arform'\";\n // echo $sql;\n $result = mysql_query($sql);\n // Test to make sure query worked\n if(!$result)\n {\n //header(\"Location:errorMessage.php?validate=Inv4\");\n die(\"Seqnum insert query didn't work..Please report to Sysadmin. \" . mysql_error());\n }\n return $objid;\n }", "public function bookItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->bookingError->_value = 'authentication_error';\n else {\n $agencyId = self::strip_agency($param->agencyId->_value);\n $targets = $this->config->get_value('ruth', 'ztargets');\n if ($tgt = $targets[$agencyId]) {\n $book = &$booking->Booking->_value;\n $book->LibraryNo->_value = $agencyId;\n $book->BorrowerTicketNo->_value = $param->userId->_value;\n $book->BookingNote->_value = $param->bookingNote->_value;\n $book->StartDate->_value = self::to_zruth_date($param->bookingStartDate->_value);\n $book->EndDate->_value = self::to_zruth_date($param->bookingEndDate->_value);\n $book->NumberOrdered->_value = $param->bookingTotalCount->_value;\n $book->ServiceCounter->_value = $param->agencyCounter->_value;\n $book->MRID->_value->ID->_value = $param->itemId->_value;\n $book->MRID->_value->TitlePartNo->_value = ($param->itemSerialPartId->_value ? $param->itemSerialPartId->_value : 0);\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($booking));\n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n//echo 'error: ' . $z->get_errno();\n//print_r($xml);\n//print_r($xml_ret);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = $dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err'));\n if (!($res->bookingError->_value = $this->errs[$err->getAttribute('Err')])) \n $res->bookingError->_value = 'unspecified error (' . $err->getAttribute('Err') . '), order not possible';\n } elseif ($err = $dom->getElementsByTagName('Error')->item(0)->nodeValue) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err);\n if (!($res->bookingError->_value = $this->errs[$err])) \n $res->bookingError->_value = 'unspecified error (' . $err . '), order not possible';\n } else {\n $res->bookingOk->_value->bookingId->_value = $dom->getElementsByTagName('BookingID')->item(0)->nodeValue;\n if ($sd = self::from_zruth_date($dom->getElementsByTagName('StartDate')->item(0)->nodeValue))\n $res->bookingOk->_value->bookingStartDate->_value = $sd;\n else\n $res->bookingOk->_value->bookingStartDate->_value = $param->bookingStartDate->_value;\n if ($ed = self::from_zruth_date($dom->getElementsByTagName('EndDate')->item(0)->nodeValue))\n $res->bookingOk->_value->bookingEndDate->_value = $ed;\n else\n $res->bookingOk->_value->bookingEndDate->_value = $param->bookingEndDate->_value;\n }\n } else {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') loadXML error of: ' . $xml_ret['xmlUpdateDoc']);\n $res->bookingError->_value = 'system error';\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->bookingError->_value = 'system error';\n }\n } else\n $res->bookingError->_value = 'unknown agencyId';\n }\n\n $ret->bookItemResponse->_value = $res;\n //var_dump($param); print_r($res); die();\n return $ret;\n }", "function purchaseTicket($ar){\n\nif (isset($GLOBALS['RRTESTSTA'])){\n XLogs::critical(get_class($this), '::purchaseTicket RRTESTSTA');\n throw new Exception('Coucou');\n $ta = new StdClass();\n $ta->NPOSNO = 0;\n $ta->NJOURNALNO = sprintf('%05d', '1'.date('ms'));\n $ta->NSERIALNO = sprintf('%05d', '2'.date('ms'));\n $ta->NPROJECTNO = 444;\n return $ta;\n}\n\n $wtpsi = $this->getAWTPSI();\n $pt= $ar['tapt'];\n $pool = $ar['pool'];\n $tt = $ar['tatt'];\n $prj = $ar['projectno'];\n $firstname = $ar['firstname'];\n $lastname = $ar['lastname'];\n $dob = $ar['dob'];\n\n $pur = array();\n\n list($chipid, $crc, $accno) = explode('-', $ar['wtpno']);\n $pur[0]['NPERSONTYPENO'] = $pt;\n $pur[0]['NPOOLNO'] = $pool;\n $pur[0]['NTICKETTYPENO'] = $tt;\n $pur[0]['NPROJECTNO'] = $prj;\n $pur[0]['SZVALIDFROM'] = $ar['validfrom'];\n\n // jcp 28/12/11, preco support TA : ne transmettre que le CHIPID\n // $pur[1]['SZACCEPTANCENO'] = $accno;\n // $pur[1]['SZCHIPIDCRC'] = $crc;\n $pur[1]['SZCHIPID'] = $chipid;\n \n // person data\n $pur[2]['SZLASTNAME'] = $lastname;\n $pur[2]['SZFIRSTNAME'] = $firstname;\n $pur[2]['SZDATEOFBIRTH'] = $dob;\n $pur[2]['SZSEX'] = NULL;\n $pur[2]['SZTITLE'] = NULL;\n $pur[2]['SZSALUTATION'] = NULL;\n \n // pas d'adress data\n $pur[3] = NULL; // adress data\n \n // articles -> faire un purchaseProduct\n if (isset($ar['articlesData'])){\n $pur[4] = $ar['articlesData'];\n $soapfunc = 'doPurchaseProduct';\n } else {\n $soapfunc = 'doPurchaseTicket';\n }\n\n $cc = '';\n foreach($pur as $foo=>$block){\n $c = $foo . ' : ';\n if (isset($block)){\n foreach($block as $name=>$value){\n $c .= ' '.$name.'=>'.$value;\n }\n }\n $cc .= $c;\n XLogs::notice(get_class($this), get_class($this).\"::purchaseTicket $c\");\n }\n // purchaseProduct / purchaseTicket\n $r = $wtpsi->$soapfunc(array('purchasedata'=>$pur));\n\n return $r;\n }", "function arcProduct($dt) {\n $payload = $dt;\n\n $this->sql = \"UPDATE inventory_tb SET is_Archive = 1 WHERE item_id =$dt->item_id\";\n\n $this->conn->query($this->sql);\n\n $this->data = $payload;\n\n return array(\n 'status'=>$this->status,\n 'payload'=>$this->data,\n 'prepared_by'=>'Inventory Admin',\n 'timestamp'=>date('D M j, Y h:i:s e')\n );\n }", "public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }", "protected function saveAR($account_id, $employee_id, $receiving_id, $purchase_amount, $trans_date, $trans_code)\n {\n $account_receivable = new AccountReceivableSupplier;\n $account_receivable->account_id = $account_id;\n $account_receivable->employee_id = $employee_id;\n $account_receivable->trans_id = $receiving_id;\n $account_receivable->trans_amount = $purchase_amount;\n $account_receivable->trans_code = $trans_code;\n $account_receivable->trans_datetime = $trans_date;\n $account_receivable->save();\n\n }", "public function starttrans(){\n\t\t$this->transaction = true;\n\t\t$this->query(\"START TRANSACTION\");\n\t}", "protected function _initTransactionRegistry() {\n $collection = Mage::getResourceModel('globalthinking_inventory/stock_transaction_collection')->clear();\n Mage::register(self::REGISTRY_TXN_KEY,$collection);\n }", "public function isUnderTransaction();", "public function delegateTransactionSupport(array &$connection_options = []);", "function insert_transaction($subscriptionid = 0, $projectid = 0, $buynowid = 0, $user_id = 0, $p2b_user_id = 0, $storeid = 0, $orderid = 0, $description = '', $amount, $paid, $status, $invoicetype, $paymethod, $createdate, $duedate, $paiddate, $custommessage, $archive, $ispurchaseorder = 0, $returnid = 0, $transactionidx = '', $isdeposit = 0, $iswithdraw = 0, $dontprocesstax = 0)\n {\n global $ilance, $ilconfig;\n $subscriptionid = isset($subscriptionid) ? intval($subscriptionid) : '0';\n $projectid = isset($projectid) ? intval($projectid) : '0';\n $buynowid = isset($buynowid) ? intval($buynowid) : '0';\n $user_id = isset($user_id) ? intval($user_id) : '0';\n $p2b_user_id = isset($p2b_user_id) ? intval($p2b_user_id) : '0';\n $storeid = isset($storeid) ? intval($storeid) : '0';\n $orderid = isset($orderid) ? intval($orderid) : '0';\n $description = isset($description) ? $description : 'No transaction description provided';\n $amount = isset($amount) ? $amount : '0.00';\n $paid = isset($paid) ? $paid : '0.00';\n $status = isset($status) ? $status : 'unpaid';\n $invoicetype = isset($invoicetype) ? $invoicetype : 'debit';\n $paymethod = isset($paymethod) ? $paymethod : 'account';\n $ipaddress = IPADDRESS;\n $referer = REFERRER;\n $createdate = DATETIME24H;\n $duedate = isset($duedate) ? $duedate : DATETIME24H;\n $paiddate = isset($paiddate) ? $paiddate : '';\n $custommessage = isset($custommessage) ? $custommessage : 'No memo or administrative comments';\n $archive = isset($archive) ? intval($archive) : '0';\n $ispurchaseorder = isset($ispurchaseorder) ? $ispurchaseorder : '0';\n // withdraw and deposit related transactions\n $iswithdraw \t = isset($iswithdraw) \t ? intval($iswithdraw) : '0';\n $isdeposit \t = isset($isdeposit) \t ? intval($isdeposit) : '0';\n $totalamount = '0.00';\n $transactionid = (isset($transactionidx) AND !empty($transactionidx)) ? $transactionidx : $ilance->accounting_payment->construct_transaction_id();\n $currencyid = $this->currencyid == '0' ? $ilconfig['globalserverlocale_defaultcurrency'] : $this->currencyid;\n $ilance->db->query(\"\n INSERT INTO \" . DB_PREFIX . \"invoices\n (invoiceid, currency_id, subscriptionid, projectid, buynowid, user_id, p2b_user_id, storeid, orderid, description, amount, paid, totalamount, status, paymethod, ipaddress, referer, createdate, duedate, paiddate, custommessage, transactionid, archive, ispurchaseorder, isdeposit, iswithdraw)\n VALUES(\n NULL,\n '\" . intval($currencyid) . \"',\n '\" . intval($subscriptionid) . \"',\n '\" . intval($projectid) . \"',\n '\" . intval($buynowid) . \"',\n '\" . intval($user_id) . \"',\n '\" . intval($p2b_user_id) . \"',\n '\" . intval($storeid) . \"',\n '\" . intval($orderid) . \"',\n '\" . $ilance->db->escape_string($description) . \"',\n '\" . $ilance->db->escape_string($amount) . \"',\n '\" . $ilance->db->escape_string($paid) . \"',\n '\" . $ilance->db->escape_string($totalamount) . \"',\n '\" . $ilance->db->escape_string($status) . \"',\n '\" . $ilance->db->escape_string($paymethod) . \"',\n '\" . $ilance->db->escape_string($ipaddress) . \"',\n '\" . $ilance->db->escape_string($referer) . \"',\n '\" . $ilance->db->escape_string($createdate) . \"',\n '\" . $ilance->db->escape_string($duedate) . \"',\n '\" . $ilance->db->escape_string($paiddate) . \"',\n '\" . $ilance->db->escape_string($custommessage) . \"',\n '\" . $ilance->db->escape_string($transactionid) . \"',\n '\" . $ilance->db->escape_string($archive) . \"',\n '\" . intval($ispurchaseorder) . \"',\n '\" . intval($isdeposit) . \"',\n '\" . intval($iswithdraw) . \"')\n \", 0, null, __FILE__, __LINE__); \n // fetch new last invoice id\n $invoiceid = $ilance->db->insert_id();\n \n // do we skip the taxation support for this transaction?\n // we do this in some situations where the tax needs to be applied before the txn is created\n // for situations like escrow fees that we must already know how much to charge the customer for taxes\n // if we don't do this then the txn may have double taxes added to the overall amount\n // and situations like this usually mean that an unpaid transaction is being created (and tax) is\n // auto-applied\n \n // taxation support: is user taxable for this invoice type?\n // this code block will run if a transaction being created is unpaid waiting for payment from the customer\n if ($ilance->tax->is_taxable($user_id, $invoicetype) AND isset($dontprocesstax) AND $dontprocesstax == 0)\n {\n // fetch tax amount to charge for this invoice type\n $taxamount = $ilance->tax->fetch_amount($user_id, $amount, $invoicetype, 0);\n // fetch total amount to hold within the \"totalamount\" field\n $totalamount = ($amount + $taxamount);\n // fetch tax bit to display when outputing tax infos\n $taxinfo = $ilance->tax->fetch_amount($user_id, $amount, $invoicetype, 1);\n // portfolio invoicetypes are actually debit payments so treat it like so\n if ($invoicetype == 'portfolio')\n {\n $invoicetype = 'debit';\n }\n // in cases where an escrow payment is being made, and taxes are involved for commission fees,\n // we will update our paid amount to the (total amount w/taxes) if our total amount is not the same\n // as the amount we're paying. we do this because the invoice overview menu will show something like:\n // Amount Paid: $250.00 but the Total Amount is $300.00 (taxes already applied and paid via escrow)\n $extra = '';\n if ($totalamount != $paid AND $totalamount > 0 AND $status == 'paid')\n {\n $extra = \"paid = '\" . $totalamount . \"',\";\n }\n // member is taxable for this invoice type\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET istaxable = '1',\n $extra\n totalamount = '\" . sprintf(\"%01.2f\", $totalamount) . \"',\n taxamount = '\" . sprintf(\"%01.2f\", $taxamount) . \"',\n taxinfo = '\" . $ilance->db->escape_string($taxinfo) . \"',\n invoicetype = '\" . $invoicetype . \"'\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($user_id) . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else\n {\n // portfolio invoicetypes are actually debit payments so treat it like so\n if ($invoicetype == 'portfolio')\n {\n $invoicetype = 'debit';\n }\n // in cases where an escrow payment is being made, and taxes are involved for commission fees,\n // we will update our paid amount to the (total amount w/taxes) if our total amount is not the same\n // as the amount we're paying. we do this because the invoice overview menu will show something like:\n // Amount Paid: $250.00 but the Total Amount is $300.00 (taxes already applied and paid via escrow)\n $extra = '';\n if ($totalamount != $paid AND $totalamount > 0 AND $status == 'paid')\n {\n $extra = \"paid = '\".$totalamount.\"',\";\n }\n // customer not taxable > update totalamount value\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET totalamount = '\" . sprintf(\"%01.2f\", $amount) . \"',\n $extra\n invoicetype = '\" . $invoicetype . \"'\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($user_id) . \"'\n \", 0, null, __FILE__, __LINE__);\n } \n if (isset($returnid) AND $returnid > 0)\n {\n return intval($invoiceid);\n }\n }", "protected static function beginTransaction()\n\t{\n\t\tAbstractUnit::beginTransaction();\n\t}", "public function save_transaction($transaction)\r\n {\r\n\r\n $rcontact_id = DB::select('remote_contact_id')\r\n ->from(Model_Remoteaccounting::TABLE_RCONTACTS)\r\n ->where('local_contact_id', '=', $transaction['contact_id'])\r\n ->and_where('remote_api', '=', Model_Bigredcloud::API_NAME)\r\n ->execute()\r\n ->get('remote_contact_id');\r\n\r\n $params = array();\r\n $params['acEntries'] = [\r\n ['accountCode' => Settings::instance()->get('bigredcloud_account_invoice'), 'analysisCategoryId' => 319228, 'value' => $transaction['total']]\r\n ];\r\n $params['customFields'] = [];\r\n $params['customerId'] = $rcontact_id;\r\n $params['details'] = $transaction['details'];\r\n $params['entryDate'] = $transaction['created'];\r\n $params['note'] = @$transaction['note'] ?: '';\r\n $params['procDate'] = $transaction['created'];\r\n $params['reference'] = null;\r\n $params['total'] = $transaction['total'];\r\n $params['totalVAT'] = 0;\r\n $params['vatEntries'] = [['amount' => $transaction['total'], 'vatRateId' => '86010', 'vatTypeId' => 1]];\r\n $params['netGoods'] = 0;\r\n $params['netServices'] = 0;\r\n $params['vatTypeId'] = 1;\r\n $params['vatRateId'] = '86010';\r\n\r\n //print_r($params);exit;\r\n $this->request(\r\n 'POST',\r\n 'salesEntries',\r\n $params\r\n );\r\n $remote_id = null;\r\n if ($this->last_id) {\r\n $remote_id = $this->last_id;\r\n }\r\n\r\n if ($remote_id) {\r\n DB::insert(Model_Remoteaccounting::TABLE_RTRANSACTIONS)\r\n ->values(\r\n array(\r\n 'local_transaction_id' => $transaction['id'],\r\n 'local_transaction_table' => $transaction['table'],\r\n 'remote_transaction_id' => $remote_id,\r\n 'remote_api' => Model_Bigredcloud::API_NAME\r\n )\r\n )->execute();\r\n return $remote_id;\r\n }\r\n return null;\r\n }", "public function trasnaction(){\n\n\t}", "private function _populateArco()\n {\n return $this->promotor->create(\n $this->promotorData['dealer_ID'], \n $this->promotorData['phone'], \n Hash::make($this->promotorData['password']), \n $this->promotorData['name'], \n $this->promotorData['gender'], \n 'arco', \n $this->promotorData['parent_ID']\n );\n }", "public function transactionStart()\n\t{\n\t\treturn;\n\t}", "public function transaction_process()\n {\n $this->_post_vars = array_merge($_GET, $_POST);\n\n if (!isset($this->_post_vars['cart_order_id'])) {\n //process as an INS signal\n return $this->_processINS();\n }\n //Need to add <base ...> tag so it displays correctly\n geoView::getInstance()->addBaseTag = true;\n\n //VARIABLES PASSED-BACK\n //order_number - 2Checkout order number\n //card_holder_name\n //street_address\n //city\n //state\n //zip\n //country\n //email\n //phone\n //cart_order_id\n //credit_card_processed\n //total\n //ship_name\n //ship_street_address\n //ship_city\n //ship_state\n //ship_country\n //ship_zip\n trigger_error('DEBUG TRANSACTION: Top of transaction_process.');\n\n if (!$this->get('testing_mode')) {\n //check the hash\n $hash = $this->_genHash(false);\n if (!$hash || ($this->_post_vars['key'] !== $hash)) {\n //NOTE: if testing mode turned on, it will skip the normal demo mode checks.\n trigger_error('DEBUG TRANSACTION: Payment failure, secret word/MD5 hash checks failed.');\n self::_failure($transaction, 2, \"No response from server, check vendor settings\");\n return;\n }\n //gets this far, the md5 hash check passed, so safe to proceed.\n }\n\n //true if $_SERVER['HTTP_REFERER'] is blank or contains a value from $referer_array\n trigger_error('DEBUG TRANSACTION: MD5 hash check was successful.');\n\n trigger_error('DEBUG TRANSACTION: 2checkout vars: ' . print_r($this->_post_vars, 1));\n //get objects\n $transaction = geoTransaction::getTransaction($this->_post_vars['cart_order_id']);\n if (!$transaction || $transaction->getID() == 0) {\n //failed to reacquire the transaction, or transaction does not exist\n trigger_error('DEBUG TRANSACTION: Could not find transaction using: ' . $this->_post_vars['cart_order_id']);\n self::_failure($transaction, 2, \"No response from server\");\n return;\n }\n $invoice = $transaction->getInvoice();\n $order = $invoice->getOrder();\n\n //store transaction data\n $transaction->set('twocheckout_response', $this->_post_vars);\n //transaction will be saved when order is saved.\n\n if (($this->_post_vars[\"order_number\"]) && ($this->_post_vars[\"cart_order_id\"])) {\n //if ($this->_post_vars[\"credit_card_processed\"] == \"Y\")\n if (strcmp($this->_post_vars[\"credit_card_processed\"], \"Y\") == 0) {\n //CC processed ok, now do stuff on our end\n //Might want to add further checks, like to check MD5 hash (if possible),\n //or check that the total is correct.\n trigger_error('DEBUG TRANSACTION: Payment success!');\n //let the objects do their thing to make this active\n self::_success($order, $transaction, $this);\n } else {\n //error in transaction, possibly declined\n trigger_error('DEBUG TRANSACTION: Payment failure, credit card not processed.');\n self::_failure($transaction, $this->_post_vars[\"credit_card_processed\"], \"2Checkout: Card not approved\");\n }\n } else {\n trigger_error('DEBUG TRANSACTION: Payment failure, no order number or cart order ID.');\n self::_failure($transaction, 2, \"No response from server\");\n }\n }", "public function beginTransaction() {\r\n\t\t// TODO: Implement transaction stuff.\r\n\t\t//$this->query('BEGIN TRANSACTION');\r\n\t}", "function execute()\n{\n\t\n\n\n\n\n\t$arr = array_merge($this->amount,$this->customer,$this->creditCard,$this->options);\n\t\n\t$collection = Braintree_Transaction::search(array(\n Braintree_TransactionSearch::customerId()->is($arr['customer']['id']),\n));\nif($collection->maximumCount() > 0)\n{\n\n$result = Braintree_Transaction::sale(\n array(\n 'customerId' => $arr['customer']['id'],\n 'amount' => $arr['amount']\n )\n);\nif ($result->success) {\necho json_encode(array('type'=>'success','response'=>'payment amount: '.$arr['amount'].' Your transaction id : '.$result->transaction->id));\n\tdo_action('payment_made',array('message'=>'payment amount: '.$arr['amount'].' transaction id : '.$result->transaction->id));\n\n}elseif ($result->transaction) \n{\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n} else {\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n\t\n}\n}else{\n\n$result = Braintree_Transaction::sale($arr);\n\nif ($result->success) {\n\tdo_action('payment_made',array('message'=>'payment amount: '.$arr['amount'].' transaction id : '.$result->transaction->id));\n\t\necho json_encode(array('type'=>'success','response'=>'Payment Amount : '.$arr['amount'].'Your transaction id : '.$result->transaction->id));\n}elseif ($result->transaction) \n{\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n} else {\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n\t\n}\n\n\n\n\t\n}\n\t\n}", "function _processSale() {\n\t\t$this->autoload();\t\t\n\t\tJbPaymentxxsourcexxLib::write_log('xxsourcexx.txt', 'IPN: '.json_encode($_REQUEST));\n\t\t\n\t\t$input = jfactory::getApplication()->input;\t\t\n\t\t$status = $input->getString('xxsourcexx_transactionStatus');\n\t\t\n\t\t$success_status = array('CO','PA');\n\t\t\n\t\tif(in_array($status, $success_status)){\n\t\t\t$order_number = $input->getString('_itemId');\n\t\t\t$order_jb = JbPaymentxxsourcexxLib::getOrder($order_number);\n\t\t\t$order_jb->pay_status = 'SUCCESS';\n\t\t\t$order_jb->order_status = 'CONFIRMED';\n\t\t\t$order_jb->tx_id = $tnxref;\n\t\t\t$order_jb->store ();\n\t\t\treturn $order_jb;\t\n\t\t}else{\n\t\t\texit;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function testParallelAtomicTransaction(): void {\n $cfg = yaml_parse_file(__DIR__ . '/../config.yaml');\n $cfg['transactionController']['enforceCompleteness'] = true;\n yaml_emit_file(__DIR__ . '/../config.yaml', $cfg);\n\n $tx = $this->beginTransaction();\n $loc1 = $this->createMetadataResource(null, $tx);\n $req1 = new Request('get', \"$loc1/metadata\");\n $headers = [\n self::$config->rest->headers->transactionId => $tx,\n 'Content-Type' => 'application/n-triples',\n 'Eppn' => 'admin',\n ];\n $resp1 = self::$client->send($req1);\n $this->assertEquals(200, $resp1->getStatusCode());\n\n $meta2 = (new Graph())->resource(self::$baseUrl);\n $meta2->addResource(self::$config->schema->id, $loc1);\n $body2 = $meta2->getGraph()->serialise('application/n-triples');\n $req2 = new Request('post', self::$baseUrl . 'metadata', $headers, $body2);\n\n $meta3 = (new Graph())->resource(self::$baseUrl);\n $body3 = $meta3->getGraph()->serialise('application/n-triples');\n $req3 = new Request('post', self::$baseUrl . 'metadata', $headers, $body3);\n\n $requests = [$req2, $req3, $req3, $req3, $req3, $req3, $req3, $req3, $req3,\n $req3];\n $delays = [100, 10000, 10000, 50000, 100000, 100000, 100000, 200000, 200000];\n $responses = $this->runConcurrently($requests, $delays);\n\n $resp1 = self::$client->send($req1);\n $this->assertEquals(404, $resp1->getStatusCode());\n\n $this->assertEquals(409, $responses[0]->getStatusCode());\n $allowed = [201, 409, 400];\n $allowed400 = [\n \"Transaction $tx doesn't exist\",\n \"Wrong transaction state: rollback\",\n ];\n for ($i = 1; $i < count($responses); $i++) {\n $sc = $responses[$i]->getStatusCode();\n if ($sc !== 201) {\n $allowed = [409, 400];\n if ($sc !== 409) {\n $allowed = [400];\n }\n }\n $this->assertContains($sc, $allowed);\n if ($sc === 409) {\n $this->assertEquals(\"Transaction $tx is in rollback state and can't be locked\", (string) $responses[$i]->getBody());\n } else if ($sc === 400) {\n $this->assertContains((string) $responses[$i]->getBody(), $allowed400);\n }\n }\n $this->assertEquals(\"Transaction $tx doesn't exist\", (string) $responses[$i - 1]->getBody());\n sleep(1);\n }", "function testTransactions() {\n $rcv_num = \n // Create a transaction as the vendor\n $tr = Transaction::create(self::$vendor, 5.0, true);\n // Send code back to vendor\n SMSHelper::send(SMSHelper::smsUrl($tr));\n // Receive code from client\n\n $tr2 = Transaction::find($tr->code);\n // Accept the transaction on behalf of the client\n $tr2->accept(self::$client);\n // Check balances are updated OK\n $this->assertEquals(self::$vendor->balance(), 47.0);\n $this->assertEquals(self::$client->balance(), 37.0);\n }", "public abstract function Ataca();", "function _auto_trans_begin()\r\n\t{\r\n\t\t// Begin auto transaction\r\n\t\tif ($this->auto_transaction)\r\n\t\t{\r\n\t\t\t$this->trans_begin();\r\n\t\t}\r\n\t}", "public function __construct(){\r\n //Get db access object\r\n $this->dba=Yii::app()->db;\r\n $this->transaction=new CDbTransaction($this->dba); \r\n }", "public function supportsTransaction(): bool;", "protected function saveAccountAR($employee_id, $receiving_id, $supplier_id, $total, $trans_date, $trans_mode)\n {\n if ($trans_mode == 'receive' || $trans_mode == 'return') {\n\n $sub_total = $trans_mode == 'receive' ? $total : -$total;\n // Updating current_balance in account table\n $account = $this->updateAccount($supplier_id, $total);\n if ($account) {\n // Saving to Account Receivable (Payment, Sale Transaction ..)\n $trans_code = $this->transactionCode($trans_mode);\n $this->saveAR($account->id, $employee_id, $receiving_id, $total, $trans_date, $trans_code);\n }\n }\n }", "final private function __isTransaction()\n\t{\n\t\tif( ! $this->transaction )\n\t\t{\n\t\t\tthrow new \\Exception('Do not using transaction.', 421);\n\t\t}\n\t}", "abstract public function getTransactionStatus();", "public function __construct() {\n\t\t\t$this->databaseTransaction = new DatabaseTransaction();\n\t\t}", "public function __construct() {\n\t\t\t$this->databaseTransaction = new DatabaseTransaction();\n\t\t}", "function UPDCAR()\n{\n $aropen_rows = db::fetchRows($sql, 'DTSDATA.AROPEN'); /* #539 */\n if ($aropen\n ) {\n if ($billpay->BPOIN_ < 0\n ) {\n $aropen->AROPPD += $billpay->BPPAY_; /* #544 */\n $aropen->ARONPD += $billpay->BPPAY_; /* #545 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #546 */\n $aropen->update(); /* #547 update record */\n $receipts->CRCID = $aropen->AROCID; /* #549 */\n $receipts->CRPER = $PERIOD; /* #550 */\n $receipts->CRCUST = $aropen->AROCUS; /* #551 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #552 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #553 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #554 */\n $receipts->CRINV_ = $aropen->AROINV; /* #555 */\n $receipts->CRTYPE = '1'; /* #556 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #557 */\n $receipts->CRGLDP = ''; /* #558 */\n $receipts->CRGLAC = ''; /* #559 */\n $receipts->CRDESC = ''; /* #560 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #561 */\n $receipts->CRDUS = 0; /* #562 */\n $receipts->CRSTCM = ''; /* #563 */\n $receipts->CRSTGL = ''; /* #564 */\n $receipts->CRSTS = ''; /* #565 */\n $receipts->CRDST = ''; /* #566 */\n $receipts->insert(); /* #567 insert record */\n } /* #568 end if */\n if ($billpay->BPOIN_ === 0\n && $billpay->BPPAY_ < 0\n && $billpay->BPPRV_ > 0\n ) {\n $billpay->BPPAY_ *= -1; /* #573 */\n $aropen->AROAMT += $billpay->BPPAY_; /* #574 */\n $aropen->ARONAM += $billpay->BPPAY_; /* #575 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #576 */\n $aropen->update(); /* #577 update record */\n $billpay->BPPAY_ *= -1; /* #579 */\n $receipts->CRCID = $aropen->AROCID; /* #580 */\n $receipts->CRPER = $PERIOD; /* #581 */\n $receipts->CRCUST = $aropen->AROCUS; /* #582 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #583 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #584 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #585 */\n $receipts->CRINV_ = $aropen->AROINV; /* #586 */\n $receipts->CRTYPE = '1'; /* #587 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #588 */\n $receipts->CRGLDP = ''; /* #589 */\n $receipts->CRGLAC = ''; /* #590 */\n $receipts->CRDESC = ''; /* #591 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #592 */\n $receipts->CRDUS = 0; /* #593 */\n $receipts->CRSTCM = ''; /* #594 */\n $receipts->CRSTGL = ''; /* #595 */\n $receipts->CRSTS = ''; /* #596 */\n $receipts->CRDST = ''; /* #597 */\n $receipts->insert(); /* #598 insert record */\n } /* #599 end if */\n if ($billpay->BPOIN_ === 0\n && $billpay->BPPAY_ > 0\n && $billpay->BPPRV_ < 0\n ) {\n $billpay->BPPAY_ *= -1; /* #604 */\n $aropen->AROAMT += $billpay->BPPAY_; /* #605 */\n $aropen->ARONAM += $billpay->BPPAY_; /* #606 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #607 */\n $aropen->update(); /* #608 update record */\n $billpay->BPPAY_ *= -1; /* #610 */\n $receipts->CRCID = $aropen->AROCID; /* #611 */\n $receipts->CRPER = $PERIOD; /* #612 */\n $receipts->CRCUST = $aropen->AROCUS; /* #613 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #614 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #615 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #616 */\n $receipts->CRINV_ = $aropen->AROINV; /* #617 */\n $receipts->CRTYPE = '1'; /* #618 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #619 */\n $receipts->CRGLDP = ''; /* #620 */\n $receipts->CRGLAC = ''; /* #621 */\n $receipts->CRDESC = ''; /* #622 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #623 */\n $receipts->CRDUS = 0; /* #624 */\n $receipts->CRSTCM = ''; /* #625 */\n $receipts->CRSTGL = ''; /* #626 */\n $receipts->CRSTS = ''; /* #627 */\n $receipts->CRDST = ''; /* #628 */\n $receipts->insert(); /* #629 insert record */\n } /* #630 end if */\n if ($billpay->BPOIN_ > 0\n ) {\n $aropen->AROPPD += $billpay->BPPAY_; /* #633 */\n $aropen->ARONPD += $billpay->BPPAY_; /* #634 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #635 */\n $aropen->update(); /* #636 update record */\n $receipts->CRCID = $aropen->AROCID; /* #638 */\n $receipts->CRPER = $PERIOD; /* #639 */\n $receipts->CRCUST = $aropen->AROCUS; /* #640 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #641 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #642 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #643 */\n $receipts->CRINV_ = $aropen->AROINV; /* #644 */\n $receipts->CRTYPE = '1'; /* #645 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #646 */\n $receipts->CRGLDP = ''; /* #647 */\n $receipts->CRGLAC = ''; /* #648 */\n $receipts->CRDESC = ''; /* #649 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #650 */\n $receipts->CRDUS = 0; /* #651 */\n $receipts->CRSTCM = ''; /* #652 */\n $receipts->CRSTGL = ''; /* #653 */\n $receipts->CRSTS = ''; /* #654 */\n $receipts->CRDST = ''; /* #655 */\n $receipts->insert(); /* #656 insert record */\n } /* #657 end if */\n } /* #659 end if */\n}", "public function __construct()\n {\n $this->Transaction = new Transaction;\n }", "public function projectContractPrepared()\n\t{\n\n\t}", "public function ajaxgenerateamazonorderAction(){\r\n global $user;\r\n if(!$user->uid){\r\n \t\tgotoUrl('');\r\n \t}\r\n \t$amazon_orders = $this->_orderInstance->getAmazonOrders();\r\n \t$amazonStockInstance = Amazonstock_Model::getInstance();\r\n \t$siteInstance = Site_Model::getInstance();\r\n \t$areaInstance = Area_Model::getInstance();\r\n \t$orderRecords = array();\r\n \t$orderRecords[] = array('MerchantFulfillmentOrderID','DisplayableOrderID','DisplayableOrderDate','MerchantSKU','Quantity',\r\n \t\t\t\t\t\t\t'MerchantFulfillmentOrderItemID','GiftMessage','DisplayableComment','PerUnitDeclaredValue',\r\n \t\t\t\t\t\t\t'DisplayableOrderComment','DeliverySLA','AddressName','AddressFieldOne','AddressFieldTwo','AddressFieldThree',\r\n \t\t\t\t\t\t\t'AddressCity','AddressCountryCode','AddressStateOrRegion','AddressPostalCode','AddressPhoneNumber','NotificationEmail');\r\n \tforeach ($amazon_orders as $oid=>$amazon_order){\r\n \t\tforeach($amazon_order->items as $orderItem){\r\n\t \t\t$orderRecord = array();\r\n\t \t\t$orderRecord[] = $amazon_order->number;\r\n\t \t\t$orderRecord[] = $amazon_order->number;\r\n\t \t\t$orderRecord[] = date('Y-m-d\\Th:i:s', TIMESTAMP);\r\n\t \t\t$amazon_sku = $amazonStockInstance->composeSKU($orderItem->p_sn, $orderItem->data);\r\n\t \t\t$orderRecord[] = $amazon_sku;\r\n\t \t\t$orderRecord[] = $orderItem->qty;\r\n\t \t\t$orderRecord[] = $amazon_sku . '-'.strval($orderItem->oiid);\r\n\t \t\t$orderRecord[] = '';\r\n\t \t\t$orderRecord[] = '';\r\n\t \t\t$orderRecord[] = '';\r\n\t \t\t$siteInfo = $siteInstance->getSite($orderItem->sid);\r\n\t \t\tif($siteInfo == false){\r\n\t \t\t\t$siteInfo = new stdClass();\r\n\t \t\t\t$siteInfo->name = 'Lingeriemore.com';\r\n\t \t\t}\r\n\t \t\t$orderRecord[] = 'Thank you for ordering from '.$siteInfo->name .'!';\r\n\t \t\t$orderRecord[] = 'Standard';\r\n\t \t\t$orderRecord[] = $amazon_order->delivery_first_name . ' '.$amazon_order->delivery_last_name;\r\n\t \t\t$orderRecord[] = $amazon_order->delivery_address;\r\n\t \t\t$orderRecord[] = '';\r\n\t \t\t$orderRecord[] = '';\r\n\t \t\t$orderRecord[] = $amazon_order->delivery_city;\r\n\t \t\t$orderRecord[] = $areaInstance->getAreaCode($amazon_order->delivery_country);\r\n\t \t\t$orderRecord[] = $areaInstance->getAreaCode($amazon_order->delivery_province);\r\n\t \t\t$orderRecord[] = $amazon_order->delivery_postcode;\r\n\t \t\t$orderRecord[] = $amazon_order->delivery_mobile;\r\n\t \t\t$orderRecord[] = '[email protected]';\r\n\t \t\t\r\n\t \t\t$orderRecords[] = $orderRecord;\r\n \t\t}\r\n \t}\r\n \t//generate csv file.\r\n $filename = 'amazon_order-'.strval(TIMESTAMP).'.txt';\r\n download_send_headers($filename);\r\n $outputBuffer = fopen(\"php://output\", 'w');\r\n foreach($orderRecords as $orderRecord) {\r\n \tfwrite($outputBuffer, implode(\"\\t\", $orderRecord) .\"\\r\\n\");\r\n }\r\n fclose($outputBuffer);\r\n }", "function AddCreditPurchaseRMA($arryDetails)\r\n\t\t{ \r\n\t\t\tglobal $Config;\r\n\t\t\textract($arryDetails);\r\n\r\n\t\t\tif(empty($Currency)) $Currency = $Config['Currency'];\r\n\t\t\tif(empty($ClosedDate)) $ClosedDate = $Config['TodayDate'];\r\n\r\n if($OrderType == 'Dropship'){ $CustCode=$CustCode;} else{ $CustCode = ''; }\r\n $Status = \"Open\"; \r\n $Module = \"RMA\"; \r\n\t\t\t$strSQLQuery = \"insert into p_order(Module, OrderType, OrderDate, PurchaseID, QuoteID, InvoiceID, ReturnID, wCode, Approved, Status, DropShip, DeliveryDate, ClosedDate, Comment, SuppCode, SuppCompany, SuppContact, Address, City, State, Country, ZipCode, Currency, SuppCurrency, Mobile, Landline, Fax, Email, wName, wContact, wAddress, wCity, wState, wCountry, wZipCode, wMobile, wLandline, wEmail, TotalAmount, Freight, CreatedBy, AdminID, AdminType, PostedDate, UpdatedDate, ReceivedDate, ExpiryDate, InvoicePaid, InvoiceComment, PaymentMethod, ShippingMethod, PaymentTerm, AssignedEmpID, AssignedEmp, Taxable, SaleID, taxAmnt , tax_auths, TaxRate,CustCode) values('\".$Module.\"', '\".$OrderType.\"', '\".$OrderDate.\"', '\".$PurchaseID.\"', '\".$QuoteID.\"', '\".$InvoiceID.\"', '\".$ReturnID.\"', '\".$wCode.\"', '\".$Approved.\"','\".$Status.\"', '\".$DropShip.\"', '\".$DeliveryDate.\"', '\".$ClosedDate.\"', '\".addslashes(strip_tags($Comment)).\"', '\".addslashes($SuppCode).\"', '\".addslashes($SuppCompany).\"', '\".addslashes($SuppContact).\"', '\".addslashes($Address).\"' , '\".addslashes($City).\"', '\".addslashes($State).\"', '\".addslashes($Country).\"', '\".addslashes($ZipCode).\"', '\".$Currency.\"', '\".addslashes($SuppCurrency).\"', '\".addslashes($Mobile).\"', '\".addslashes($Landline).\"', '\".addslashes($Fax).\"', '\".addslashes($Email).\"' , '\".addslashes($wName).\"', '\".addslashes($wContact).\"', '\".addslashes($wAddress).\"' , '\".addslashes($wCity).\"', '\".addslashes($wState).\"', '\".addslashes($wCountry).\"', '\".addslashes($wZipCode).\"', '\".addslashes($wMobile).\"', '\".addslashes($wLandline).\"', '\".addslashes($wEmail).\"', '\".addslashes($TotalAmount).\"', '\".addslashes($Freight).\"', '\".addslashes($_SESSION['UserName']).\"', '\".$_SESSION['AdminID'].\"', '\".$_SESSION['AdminType'].\"', '\".$Config['TodayDate'].\"', '\".$Config['TodayDate'].\"', '\".$ReceivedDate.\"', '\".$ExpiryDate.\"', '\".$InvoicePaid.\"', '\".addslashes(strip_tags($InvoiceComment)).\"', '\".addslashes($PaymentMethod).\"', '\".addslashes($ShippingMethod).\"', '\".addslashes($PaymentTerm).\"', '\".addslashes($EmpID).\"', '\".addslashes($EmpName).\"', '\".addslashes($Taxable).\"', '\".addslashes($SaleID).\"', '\".addslashes($taxAmnt).\"', '\".addslashes($tax_auths).\"', '\".addslashes($MainTaxRate).\"','\".$CustCode.\"')\";\r\n //echo $strSQLQuery;exit;\r\n\t\t\t\r\n\t\t\t$this->query($strSQLQuery, 0);\r\n\t\t\t$OrderID = $this->lastInsertId();\r\n\r\n\t\t\tif(empty($arryDetails[$ModuleID])){\r\n\t\t\t\t$ModuleIDValue = $PrefixPO.'000'.$OrderID;\r\n\t\t\t\t$strSQL = \"update p_order set \".$ModuleID.\"='\".$ModuleIDValue.\"' where OrderID='\".$OrderID.\"'\"; \r\n\t\t\t\t$this->query($strSQL, 0);\r\n\t\t\t}\r\n \r\n\t\t\treturn $OrderID;\r\n\r\n\t\t}", "public function beginTransaction() {\n\t\t//noop\n\t}", "function execute()\n {\n global $ar;\n $player = $ar->p->getPlayer($this->caller);\n if ($this->commandAllowed())\n {\n $required_level = $this->getRequiredLevel();\n \n // make sure the caller's access level is either equal to or lower than the required level\n if ($this->access_level <= $required_level)\n {\n if ($this->command == \"/rload\")\n {\n \n }\n elseif ($this->command == \"/save\")\n { \n if ($player)\n {\n // save the collected information\n $ar->r->saveRecords();\n $ar->q->saveQueuers();\n \n $ar->game->cpm($player->screen_name, \"race_data_saved\");\n }\n }\n elseif ($this->command == \"/edit\")\n\t\t\t\t{\n\t\t\t\t\t//\tcode later, maybe...\n // still having doubts whether to code or not\n\t\t\t\t}\n\t\t\t\telseif ($this->command == \"/queue\")\n\t\t\t\t{\n $item = \"\";\n if (contains($this->params, \" \"))\n {\n $ext = explode($this->params, \" \");\n $item = $ext[0];\n }\n else\n $item = $this->params;\n \n // if item is blank, don't continue\n if ($item == \"\")\n return;\n \n $itemsFound = array();\n // making sure item actually exists within the rotation list\n if (count($ar->rotation->items) > 0)\n {\n foreach ($ar->rotation->items as $selItem)\n {\n if (contains($selItem, $item))\n {\n $itemsFound[] = $selItem;\n }\n }\n }\n \n // if no matches were found with that item in rotation\n if (count($itemsFound) == 0)\n {\n if ($player)\n {\n $ar->game->cpm($player->screen_name, \"race_queue_item_notfound\", array($item));\n }\n }\n // if matches were found from the rotation related to the item\n else\n {\n // oh good, only one item found\n if (count($itemsFound) == 1)\n {\n if ($player)\n {\n // if queue allows copies\n if ($ar->queue_copies)\n {\n $queuer = $player->queuer;\n if ($queuer)\n {\n if ($queuer->current > 0)\n {\n // add item to the queue list\n $ar->queue_items[] = $item;\n \n // announcing the addition of the item and the one responsible for it\n $ar->game->cm(\"race_queue_item_added\", array($player->screen_name, $item));\n \n // deplete the number of queues they can perform\n $queuer->current--;\n }\n }\n }\n // if queue doesn't allow for copies\n else\n {\n if (count($ar->queue_items) > 0)\n {\n $itemFound = false;\n foreach ($ar->queue_items as $qItem)\n {\n if ($qItem == $item)\n $itemFound = true;\n }\n \n if (!$itemFound)\n {\n $queuer = $player->queuer;\n if ($queuer)\n {\n if ($queuer->current > 0)\n {\n $ar->queue_items[] = $item;\n \n $ar->game->cm(\"race_queue_item_added\", array($player->screen_name, $item));\n \n $queuer->current--;\n }\n }\n }\n else\n {\n $ar->game->cpm($player->screen_name, \"race_queue_item_nocopies\", array($item));\n }\n }\n else\n {\n $queuer = $player->queuer;\n if ($queuer)\n {\n if ($queuer->current > 0)\n {\n $ar->queue_items[] = $item;\n \n $ar->game->cm(\"race_queue_item_added\", array($player->screen_name, $item));\n \n $queuer->current--;\n }\n }\n }\n }\n }\n }\n // wow, many items were found\n else\n {\n if ($player)\n {\n $ar->game->cpm($player->screen_name, \"race_queue_item_manyfound\", array($item));\n }\n }\n }\n\t\t\t\t}\n }\n }\n // send player a message about the valid commands to use\n else\n {\n if ($player)\n {\n $commands = array_keys($this->commands);\n \n // should have from \\1 to \\4 in lagnuage command string\n $ar->game->cpm($player->screen_name, \"race_valid_commands\", $commands);\n }\n }\n }", "public function inTransaction(): bool;", "public function beginTransaction() {\n parent::beginTransaction();\n $this->activeTransaction = true;\n }", "abstract public function prepareToStore();", "function selectArchive($table, $filter_data) {\n\t\t\t$this->sql = \"SELECT * FROM $table WHERE is_Archive = 1\";\n\n\t\t\t\n\t\t\tif($result = $this->conn->query($this->sql)){\n\t\t\t\tif($result->num_rows>0){\n\t\t\t\t\twhile($res = $result->fetch_assoc()){\n\t\t\t\t\t\tarray_push($this->data, $res);\n\t\t\t\t\t}\n\t\t\t\t\t$this->status = $this->success_stat;\n\t\t\t\t\thttp_response_code(200);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn array(\n\t\t\t\t'status'=>$this->status,\n\t\t\t\t'payload'=>$this->data,\n\t\t\t\t'prepared_by'=>'Inventory bois',\n\t\t\t\t'timestamp'=>date('D M j, Y G:i:s T')\n\t\t\t);\n\t\t}", "function _getTransactions()\n {\n $pr = new PostingRules();\n $pr->getTransactions(&$this);\n }", "function createTransaction( $db, $tx_data, $wallet_id ) {\r\n // Insert the transaction data\r\n $db->insert( 'transactions', $tx_data );\r\n // TODO: Record this transaction in the logs\r\n // Now get the current wallet balance\r\n $current_balance = $db->get( 'wallets','balance',[ 'id' => $wallet_id ]);\r\n // Update the wallet with the new Balance\r\n $db->update( 'wallets',\r\n [\r\n 'balance[+]' => $tx_data['amount'],\r\n 'activated' => 1\r\n ],\r\n [ 'id' => $wallet_id ]\r\n );\r\n // If all went well, return an array with the transaction status\r\n return [\r\n 'success' => true,\r\n 'data' => [\r\n 'ref_no' => $tx_data['ref_no'],\r\n 'prev_bal' => $current_balance,\r\n 'currency' => $tx_data['currency'],\r\n 'new_bal' => ( $current_balance + $tx_data['amount'] )\r\n ]\r\n ];\r\n}", "function beginTransaction(){\n\t\ttry {\n\t\t\t$this->dbconn->beginTransaction();\n\t\t}catch(Exception $e){\n\t\t\t$this->logger->error($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function transactionAction() {\n try {\n $this->datasource->beginTransaction();\n\n $article_id = $this->datasource->insertArticle('John Smith', 'Nice writing');\n\n $this->datasource->deleteArticle($article_id);\n\n $this->datasource->commit();\n\n return ['success' => true];\n\n } catch(Exception $ex) {\n $this->datasource->rollBack();\n throw $ex;\n }\n }", "public function __construct(){\n $arModuleVersion = [];\n include(__DIR__ . \"/version.php\");\n\n $this->MODULE_ID = 'almaybee.addstorestoorderproducts';\n $this->MODULE_VERSION = $arModuleVersion[\"VERSION\"];\n $this->MODULE_VERSION_DATE = $arModuleVersion[\"VERSION_DATE\"];\n $this->MODULE_NAME = Loc::getMessage(\"AL_MAYBEE_STORES_MODULE_NAME\");\n $this->MODULE_DESCRIPTION = Loc::getMessage(\"AL_MAYBEE_STORES_MODULE_DESCRIPTION\");\n $this->PARTNER_NAME = Loc::getMessage(\"AL_MAYBEE_STORES_MODULE_PARTNER_NAME\");\n// $this->PARTNER_URI = Loc::getMessage(\"CRM_GENESIS_SLOTS_PARTNER_URI\");\n }", "function _processSale() {\n// \t\tAndroidHelper::write_log('braintree.txt', 'Payment_method_nonce: '.$_POST['payment_method_nonce']);\t\n\t\t$this->autoload();\n\t\t$input = JFactory::getApplication()->input;\n\t\t$order_id = $input->getString('order_number');\n\t\t\n\t\t$orderComplex = AndroidHelper::getOrderDetail($order_id);\n\t\tAImporter::classes('order');\n\t\t$order = new BookproOrder();\n\t\t\n\t\t$this->setConfig();\n\t\tif($this->sale($orderComplex)){\n\t\t\t$result = array(\n\t\t\t\t\t'status'=>1,\n\t\t\t\t\t'tx_id'=>$paymentId,\n\t\t\t\t\t'desc'=>$transaction[0]->description,\n\t\t\t\t\t'total'=>$transaction[0]->getAmount()->getTotal(),\n\t\t\t\t\t'currency'=>$transaction[0]->getAmount()->getCurrency(),\n\t\t\t\t\t'created'=>$payment->getCreateTime(),\n\t\t\t\t\t'method'=>$payment->getPayer()->getPaymentMethod()\n\t\t\t);\n\t\t\t$cardinfo = $payment->getPayer()->getFundingInstruments();\n\t\t\tif($cardinfo[0]){\n\t\t\t\t$result['card_info']['type'] = $cardinfo[0]->getCreditCardToken()->getType();\n\t\t\t\t$result['card_info']['last4'] = $cardinfo[0]->getCreditCardToken()->getLast4();\n\t\t\t}\n\t\t\treturn $result;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function isInTransaction();", "function BeginTransaction() {\r\n $this->con->autoCommit(false);\r\n \r\n }", "public function trans()\n {\n $transaction = new Transaction;\n $transaction_last = $transaction->orderBy('id', 'desc')->first();\n\n $transaction_type = $transaction_last->payment_type;\n $transaction_last_id = $transaction_last->id;\n $current_transaction = $transaction->find($transaction_last_id);\n $current_transaction->payment_status = true;\n $current_transaction->save();\n\n sleep(3);\n\n $transaction_last = $transaction->orderBy('id', 'desc')->first();\n\n return $transaction_last->toJson();\n\n // if($transaction_type == \"ewallet\"){\n // $transaction_last = $transaction->orderBy('id', 'desc')->first();\n\n // return $transaction_last->toJson();\n // }\n // else{\n // // Update status to true\n // $transaction_last_id = $transaction_last->id;\n // $current_transaction = $transaction->find($transaction_last_id);\n // $current_transaction->payment_status = true;\n // $current_transaction->save();\n\n // sleep(3);\n\n // $transaction_last = $transaction->orderBy('id', 'desc')->first();\n\n // return $transaction_last->toJson();\n // }\n }", "function commit() ;", "public function getTransactionService();", "protected static function commitTransaction()\n\t{\n\t\tAbstractUnit::commitTransaction();\n\t}", "function beginTransaction()\n\t\t{\n\t\t\t$this->conn->beginTransaction();\n\t\t}", "private function __construct() {\n $this->_applicationName = 'Billing';\n $this->_backend = new Billing_Backend_SepaMandate();\n $this->_modelName = 'Billing_Model_SepaMandate';\n $this->_currentAccount = Tinebase_Core::getUser();\n $this->_purgeRecords = FALSE;\n $this->_doContainerACLChecks = FALSE;\n $this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array());\n }", "function TransactionRecordLoad( &$data ) {\n\t\t$table = BIT_DB_PREFIX.\"task_transaction\";\n\t\t\n\t\t$pDataHash['data_store']['ticket_id'] = $data[0];\n\t\t$pDataHash['data_store']['transact_no'] = $data[1];\n\t\t$pDataHash['data_store']['transact'] = $data[2];\n\t\t$pDataHash['data_store']['ticket_ref'] = $data[3];\n\t\t$pDataHash['data_store']['staff_id'] = $data[4];\n\t\t$pDataHash['data_store']['previous'] = $data[5];\n\t\t$pDataHash['data_store']['room'] = $data[6];\n\t\t$pDataHash['data_store']['applet'] = $data[7];\n\t\t$pDataHash['data_store']['office'] = $data[8];\n\t\t$pDataHash['data_store']['ticket_no'] = $data[9];\n\t\tif ( $data[10] == '[null]' )\n\t\t\t$pDataHash['data_store']['proom'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['proom'] = $data[10];\n\t\tif ( $data[11] == '[null]' )\n\t\t\t$pDataHash['data_store']['tags'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['tags'] = $data[11];\n\t\tif ( $data[12] == '[null]' )\n\t\t\t$pDataHash['data_store']['clearance'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['clearance'] = $data[12];\n\t\t$result = $this->mDb->associateInsert( $table, $pDataHash['data_store'] );\n\t}", "public function updateOrder($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->updateOrderError->_value = 'authentication_error';\n else {\n $agencyId = self::strip_agency($param->agencyId->_value);\n $targets = $this->config->get_value('ruth', 'ztargets');\n if ($tgt = $targets[$agencyId]) {\n $ord = &$order->ReservationUpdate->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->DisposalID->_value = $param->orderId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n//echo 'error: ' . $z->get_errno();\n//print_r($xml);\n//print_r($xml_ret);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = $dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err'));\n if (!($res->updateOrderError->_value = $this->errs[$err->getAttribute('Err')])) \n $res->updateOrderError->_value = 'unspecified error (' . $err->getAttribute('Err') . '), order not possible';\n } else {\n $res->updateOrderOk->_value = $param->orderId->_value;\n }\n } else {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') loadXML error of: ' . $xml_ret['xmlUpdateDoc']);\n $res->updateOrderError->_value = 'system error';\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->updateOrderError->_value = 'system error';\n }\n } else\n $res->updateOrderError->_value = 'unknown agencyId';\n }\n\n $ret->updateOrderResponse->_value = $res;\n //var_dump($param); print_r($res); die();\n return $ret;\n }", "function autorizar_pm_acumulado_servicio_tecnico($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen from movimiento_material where id_movimiento_material = $id_mov\"; \r\n $res = sql($sql) or fin_pagina();\r\n $id_deposito_oriden = $res->fields[\"deposito_origen\"];\r\n \t \r\n //traigo el detalle de los movimientos a liberar \t \r\n $sql=\"select * from detalle_movimiento where id_movimiento_material=$id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\r\n $comentario = \" Autorizacion de PM acumulado de servicio tecnico nro: $id_mov\";\r\n $id_tipo_movimiento = 7;\r\n\r\n //por cada detalle voy liberando las reservas del pm autorizado \r\n for($i=0;$i<$res->recordcount();$i++) {\r\n \t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n $cantidad = $res->fields[\"cantidad\"];\r\n $id_detalle_movimiento = $res->fields[\"id_detalle_movimiento\"];\r\n descontar_reserva($id_prod_esp,$cantidad,$id_deposito_oriden,$comentario,$id_tipo_movimiento,\"\",$id_detalle_movimiento,\"\");\r\n $res->movenext(); \r\n }//del for\r\n \t \r\n \t \r\n //Inserto la Mercaderia entrante en el stock de RMA \r\n $sql = \"select * from mercaderia_entrante where id_movimiento_material = $id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\t\t\t \r\n\t\t\t \r\n $comentario = \"Producto de lista de mercaderia entrante del PM nro: $id_mov\";\r\n\t\t\t \r\n for($i=0;$i<$res->recordcount();$i++){\r\n\t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n\t $cantidad = $res->fields[\"cantidad\"];\r\n\t $descripcion = $res->fields[\"descripcion\"]; \t\r\n\t incrementar_stock_rma($id_prod_esp,$cantidad,\"\",$comentario,1,\"\",$descripcion,1,\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",$id_mov);\r\n\t $res->movenext();\r\n }//del \r\n $db->completetrans();\r\n\r\n }", "public function transaction_process()\n {\n //treat as a robot, to avoid redirection or cookie issues.\n //shouldn't need to do this anymore\n //define('IS_ROBOT',true);\n\n //transId\n //transStatus\n // Y - successful\n // C - cancelled\n //transTime\n //authAmount\n //authCurrency\n //authAmountString\n //rawAuthMessage\n //rawAuthCode\n //callbackPW\n //cardType\n //countryString\n //countryMatch\n // Y - match\n // N - no match\n // B - comparison not available\n // I - contact country not supplied\n // S - card issue country not available\n //AVS\n // 1234\n // 1 - card verification\n // 2 - postcode AVS check\n // 3 - address AVS check\n // 4 - country comparison check\n // values\n // 0 - not supported\n // 1 - not checked\n // 2 - matched\n // 4 - not matched\n // 8 - partially matched\n //cartId\n //M_sessionId\n //M_customerId\n //name\n //address\n //postcode\n //country\n //tel\n //fax\n //email\n //amount\n //currency\n //description\n\n trigger_error('DEBUG TRANSACTION: start worldpay transaction process');\n\n $response = $_POST;\n\n //Check to make sure this is valid\n if (!($response[\"cartId\"]) && ($response[\"M_customerId\"])) {\n //Not stuff returned\n return;\n }\n\n if (strlen(trim($this->get(\"callback_password\"))) > 0) {\n if ($this->get(\"callback_password\") != $response[\"callbackPW\"]) {\n //password does not match\n return false;\n }\n }\n\n //transaction id is saved by \"cartId\"\n $trans_id = intval($response[\"cartId\"]);\n $transaction =& geoTransaction::getTransaction($trans_id);\n trigger_error('DEBUG TRANSACTION: paypal:transaction_process() - right AFTER - transaction: ' . print_r($transaction, 1));\n\n //save response data\n $transaction->set('worldpay_response', $response);\n $transaction->save();\n\n //make sure all of transaction info matches with what was passed back.\n if ($transaction->getUser() != $response[\"M_customerId\"]) {\n //something is wrong, do not proceed\n trigger_error('ERROR TRANSACTION: Invalid user set for transaction: ' . $trans_id);\n return;\n }\n if ($transaction->getGatewayTransaction() != $response[\"M_sessionId\"]) {\n //something is wrong, do not proceed\n trigger_error('ERROR TRANSACTION: Invalid session id set for transaction: ' . $trans_id);\n return;\n }\n if ($transaction->getAmount() != $response[\"authAmount\"] || $transaction->getStatus()) {\n //something is wrong, do not proceed\n trigger_error('ERROR TRANSACTION: Invalid transaction data returned for transaction: ' . $trans_id);\n return;\n }\n\n //worldpay transloads whatever result page is shown onto their own server, and displays it without CSS for \"security.\"\n //it *does* complete this POST, though, so we can go ahead right now and mark the transaction as success/failed in the database\n //but set our normal success/failure functions to not render the page -- instead echo just a redirect to transaction_result.php to return the user fully to the local site\n\n if ($response[\"transStatus\"] == \"C\") {\n //cancelled -- fail\n self::_failure($transaction, $response[\"transStatus\"], \"Worldpay said: \" . $response['rawAuthMessage'], true);\n } elseif ($response[\"transStatus\"] != \"Y\") {\n //fail\n self::_failure($transaction, $response[\"transStatus\"], \"Worldpay said: \" . $response['rawAuthMessage'], true);\n } else {\n //success\n self::_success($transaction->getInvoice()->getOrder(), $transaction, geoPaymentGateway::getPaymentGateway(self::getType()), true);\n }\n\n $db = DataAccess::getInstance();\n $target = str_replace($db->get_site_setting('classifieds_file_name'), 'transaction_result.php?transaction=' . $transaction->getId(), $db->get_site_setting('classifieds_url'));\n echo '<meta http-equiv=\"refresh\" content=\"1; url=' . $target . '\">';\n }", "public function + aire()\n {\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:00000000000009A4 begin\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:00000000000009A4 end\n }" ]
[ "0.64128536", "0.6009279", "0.6009279", "0.5870317", "0.5721116", "0.5681329", "0.5670584", "0.56173563", "0.56173563", "0.5604873", "0.55604297", "0.55549586", "0.55044866", "0.5483697", "0.54754734", "0.54464006", "0.54387593", "0.54387593", "0.54387593", "0.54120475", "0.5372999", "0.53556854", "0.52924085", "0.52742374", "0.5256059", "0.5222858", "0.52173764", "0.5197301", "0.517725", "0.51417845", "0.51290596", "0.5099422", "0.50983685", "0.50920004", "0.50767213", "0.5070345", "0.5036129", "0.5026205", "0.4998659", "0.49919608", "0.49830034", "0.4972007", "0.4966917", "0.49649793", "0.49611887", "0.49486044", "0.49388704", "0.49241254", "0.49226892", "0.49212137", "0.49130875", "0.49028844", "0.48990506", "0.48956245", "0.4895493", "0.48950088", "0.48931992", "0.4876355", "0.4870057", "0.4858378", "0.48520944", "0.4850841", "0.48476732", "0.48334455", "0.48241037", "0.48202556", "0.4810253", "0.4807367", "0.48022085", "0.4799208", "0.4799208", "0.47895044", "0.47735247", "0.47710353", "0.4766926", "0.47630534", "0.47622883", "0.47574747", "0.4757019", "0.4748789", "0.47390267", "0.4736718", "0.4732769", "0.472881", "0.47255254", "0.47196457", "0.4715248", "0.4714716", "0.4710977", "0.470969", "0.46975222", "0.4695782", "0.46937606", "0.46924588", "0.46824473", "0.4670109", "0.4664238", "0.46641693", "0.4664041", "0.46588624", "0.4651506" ]
0.0
-1
Fill all models with common attributes
public function fillAll($attributes, $safeOnly = true, $scenario = null) { $this->ensureAllInstanceOf(BaseActiveRecord::class); if(!empty($attributes)){ foreach($this->getModels() as $model) { if($scenario){ $model->scenario = $scenario; } $model->setAttributes($attributes, $safeOnly); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function populateModels()\n {\n }", "public function _set_model_fields(){\n // set fields only when they have not been set for this object\n if($this->_fields_loaded===FALSE){\n\n foreach ($this->_meta() as $meta) {\n\n $this->{$meta->name} = '';\n }\n }\n }", "abstract protected function prepareModels();", "protected function init()\n {\n if (!isset($this['fields'])) {\n $model = $base = [];\n if (isset($this->options['base_model']) && $this->options['base_model']) {\n $base = static::getTableInfo($this->options['base_model']) ? : [];\n }\n if (isset($this->options['table_name']) && (!$base || $this->options['table_name'] != $base['table_name'])) {\n $model = $this->getTableInfo($this->options['table_name']) ? : [];\n }\n \n if ($model && $base) {\n $model['ext_table'] = $model['table_name'];\n $model['ext_fields'] = isset($model['master_fields']) ? $model['master_fields'] : array_keys($model['fields']);\n \n $model['master_table'] = $base['table_name'];\n $model['master_fields'] = isset($base['master_fields']) ? $base['master_fields'] : array_keys($base['fields']);\n }\n \n // merge\n $model = ArrayHelper::merge($base, $model);\n $this->setOption($model);\n }\n }", "public function fillModelAttributes($model, $request, $fields)\n {\n }", "function init()\n {\n foreach ($GLOBALS['_PX_models'] as $model=>$val) {\n if (isset($val['relate_to'])) {\n foreach ($val['relate_to'] as $related) {\n if ($this->_model == $related) {\n // The current model is related to $model\n // through one or more foreign key. We load\n // the $model to check on which fields the\n // foreign keys are set, as it is possible in\n // one model to have several foreign keys to\n // the same other model.\n if ($model != $this->_model) {\n $_m = new $model();\n $_fkeys = $_m->getForeignKeysToModel($this->_model);\n } else {\n $_fkeys = $this->getForeignKeysToModel($this->_model);\n }\n foreach ($_fkeys as $_fkey=>$_fkeyval) {\n //For each foreign key, we add the\n //get_xx_list method that can have a\n //custom name through the relate_name\n //value.\n if (isset($_fkeyval['relate_name'])) {\n $mname = $_fkeyval['relate_name'];\n } else {\n $mname = strtolower($model);\n }\n $this->_methods_list['get_'.$mname.'_list'] = array($model, $_fkey);\n }\n break;\n }\n }\n }\n if (isset($val['relate_to_many']) && \n in_array($this->_model, $val['relate_to_many'])) {\n $this->_methods_list['get_'.strtolower($model).'_list'] = $model;\n $this->_manytomany[$model] = 'manytomany';\n }\n }\n foreach ($this->_cols as $col=>$val) {\n $field = new $val['type']($col);\n if ($field->type == 'foreignkey') {\n $this->_methods_get['get_'.strtolower($col)] = array($val['model'], $col);\n $this->_fk[$col] = 'foreignkey';\n }\n if ($field->type == 'manytomany') {\n $this->_methods_list['get_'.strtolower($col).'_list'] = $val['model'];\n $this->_manytomany[$val['model']] = 'manytomany';\n }\n foreach ($field->add_methods as $method) {\n $this->_methods_extra[$method[0]] = array(strtolower($col), $method[1]);\n }\n }\n }", "public function fill()\n {\n $relationships = $this->relationships;\n $modelRelations = $this->loadRequiredRelationships();\n\n return collect($relationships)->transform(function($relations, $key) use($modelRelations) {\n $merge = array_get($modelRelations, $key);\n return $merge ? $this->mergeRelations($merge, $relations) : $relations;\n })->all();\n }", "private static function _loadModels(){\n if (self::$_models == null){\n $sql = 'SELECT id, uuid, name, description, version_id, created FROM v_model WHERE 1';\n $models = Mysql::query($sql);\n if ($models){\n $_models = array();\n foreach($models as $model){\n $sql = \"SELECT id, model_id, uuid, name, description, type, list, instance_model_id, version_id, created FROM v_property WHERE model_id = '{$model->id}'\";\n $properties = Mysql::query($sql);\n if ($properties){\n $model->properties = $properties;\n $_models[] = $model;\n }\n }\n self::$_models = $_models;\n }\n }\n }", "function _ci_assign_to_models()\n {\n if (count($this->_ci_models) == 0)\n {\n return;\n }\n\n $CI =& get_instance();\n foreach ($this->_ci_models as $model)\n {\n $CI->$model->_assign_libraries();\n }\n }", "static public function fillModels()\n {\n $firms = Firms::all();\n //$firms = Firms::take(6)->get(); // audi & bmw\n foreach ($firms as $firm) {\n $models = Models::where('firm', $firm->id)->get();\n if (count($models)) {\n //echo \"skip '\" . $firm->title . \"'\\n\";\n continue;\n }\n\n echo \"take '\" . $firm->title . \"'\\n\";\n\n $params = [\n 'company_id' => $firm->id,\n 'model_types' => [0, 1, 2],\n 'avail_only' => false\n ];\n\n try {\n $models = json_decode(self::get('/company/models', $params));\n } catch (\\Exception $e) {\n Log::error('amtel fillModels(\"' . $firm->title . '\") error: ' . $e->getMessage());\n echo \"error load '\" . $firm->title . \"':\" . $e->getMessage();\n continue;\n }\n\n foreach ($models->model_list as $el) {\n $model = Models::firstOrNew(['id' => $el->model_id]);\n $id = $el->model_id;\n $model->id = $el->model_id;\n $model->firm = $firm->id;\n $model->title = mb_strtolower(str_replace('/', '-', $el->model_name));\n $model->start = $el->model_year_start == null ? '' : $el->model_year_start;\n $model->end = $el->model_year_end == null ? '' : $el->model_year_end;\n $model->url = mb_strtolower(self::sanitaryze($model->title . '_' . $model->start . '-' . $model->end));\n $model->group = mb_strtolower(explode('_', explode(' ', explode('/', explode('(', $el->model_name)[0])[0])[0])[0]);\n\n try {\n $model->img = $models->model_image_list->$id[0]->url;\n } catch (\\Exception $e) {\n }\n\n $model->save();\n }\n\n //echo \"sleep\\n\";\n sleep(1);\n }\n }", "protected function setup_models()\n\t{\n\t}", "public function fill(Identifiable $model, array $attributes);", "protected static function boot()\n {\n /** We MUST call the parent boot...\n */\n parent::boot();\n\n static::saving(function ($model) {\n $model->attributeValues()->delete();\n\n foreach ($model->attributable as $key => $attribute)\n {\n\n $value = new AttributeValue([\n 'value' => $model->attributes[$key],\n ]);\n \n $model->attributable_records[] = Attribute::find($attribute['id'])->values()->save($value);\n \n unset($model->attributes[$key]);\n }\n });\n\n static::saved(function ($model) {\n \n /** Save all variables.\n * \n */\n foreach ($model->attributable_records as $key => $record)\n {\n $model->attributeValues()->save($record);\n \n unset($model->attributable_records[$key]);\n }\n });\n\n static::retrieved(function ($model) {\n if (config('attributable.cache') && !Cache::tags(['neon-attributes'])->has('neon-aval-'.$model->id)) {\n Cache::tags(['neon-attributes'])\n ->put(\n 'neon-aval-'.$model->id,\n $model->attributeValues,\n now()->addMinutes(2)\n );\n }\n \n $attributeValues = (config('attributable.cache') && Cache::tags(['neon-attributes'])->has('neon-aval-'.$model->id)) ? Cache::tags(['neon-attributes'])->get('neon-aval-'.$model->id) : $model->attributeValues;\n \n foreach ($attributeValues as $attributeValue)\n {\n $model->setAttribute($attributeValue->attribute->slug, $attributeValue->value);\n }\n });\n }", "private function loadModels()\n {\n $this->use = ( ! isset($this->use)) ? [$this->class] : $this->use;\n\n if ($this->use) {\n foreach ($this->use as $model) {\n self::load('model', $model);\n }\n }\n }", "public function init()\n {\n\t\t$this->user_model = new Application_Model_Users;\n\t\t$this->request_model = new Application_Model_Requests;\n\t\t$this->material_model = new Application_Model_Materials;\n\t\t$this->course_model = new Application_Model_Courses;\n\t\t$this->comment_model = new Application_Model_Comments;\n\t\t$this->category_model = new Application_Model_Categories;\n \t$this->assoc_rules_model = new Application_Model_Assocrules;\n }", "private function _load_models()\r\n {\r\n foreach ($this->models as $model)\r\n {\r\n $this->load->model($this->_model_name($model), $model);\r\n }\r\n }", "private function _load_models()\n {\n foreach ($this->models as $model)\n {\n $this->load->model($this->_model_name($model), $model);\n }\n }", "public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }", "public function testModels()\n {\n foreach(array('PushMessage', 'PushMessageIos', 'PushMessageAndroid', 'PushProject', 'PushAction', 'PushLocation', 'PushDevice') as $className){\n $this->className = $className;\n $this->allByDocExample();\n }\n }", "abstract protected function getModelAttributes();", "public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n Apps::class,\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->setSource('users_associated_apps');\n }", "public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }", "public function initialize()\n {\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_periodo', 'CobPeriodo', 'id_periodo', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_contrato', 'CobActaconteo', 'id_contrato', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_ajuste_reportado', 'CobAjusteReportado', 'id_ajuste_reportado', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actaconteo_persona_facturacion', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona_facturacion', array(\n \t\t\t'reusable' => true\n \t));\n }", "protected function add_common_attribute_classes(){\n\t\tparent::add_common_attribute_classes();\n\t}", "public function __construct () {\n\t\tparent::__construct ();\n\t\t\n\t\tif ($this->models)\n\t\tforeach ($this->models as $model) {\n\t\t\tunset ($this->models[$model]);\n\t\t\t$this->models[$model] = $this->session->getModel ($model,$this);\n\t\t\t$this->$model = $this->models[$model];\n\t\t}\n\t}", "private function setAutofillFields() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof AutofillField) {\n $this->values[$field_name] = $field->fill();\n }\n }\n }", "public function __construct()\n {\n // All of my models are like this\n parent::__construct(get_class($this));\n // Calling methods to get the relevant data\n $this->generateNewsData();\n $this->generateAnalyticsData();\n $this->generatePostsData();\n }", "public function initialize()\n {\n $this->skipAttributes([\n \"question_id\",\n ]);\n\n $this->skipAttributesOnCreate([\n \"question_status\"\n ]);\n\n $this->skipAttributesOnUpdate([\n \"question_creation_time\"\n ]);\n\n $this->hasMany('question_id', 'QaApp\\Models\\Answer', 'question_id', array('alias' => 'Answers'));\n }", "protected function hydrate()\n {\n $state = $this->_payload->state();\n foreach ($state as $key => $value) {\n $type = null;\n try {\n $type = optional((new \\ReflectionProperty($this, $key))->getType())->getName();\n } catch(\\Exception $e) {\n }\n if ($type) {\n $model_key = optional(new $type)->getKeyName();\n if (optional($value)[$model_key]) {\n $model = (new $type)->find(optional($value)[$model_key]);\n if ($model && ! is_null($value)) {\n $this->hydrate_model_attributes($model, (array) $value);\n $this->{$key} = $model;\n } else {\n $model = (new $type);\n $this->hydrate_model_attributes($model, (array) $value);\n $this->{$key} = $model;\n }\n } else {\n $model = (new $type);\n $this->hydrate_model_attributes($model, (array) $value);\n $this->{$key} = $model;\n }\n } else {\n $this->{$key} = $value;\n }\n }\n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }", "public function init()\n {\n //Get all all authors with their articles\n\t $query = Proyecto::find();\n $query->select('proyecto.*, Nombre AS nombre')\n ->leftJoin('categoriaproyecto','categoriaProyecto_idcategoriaProyecto=idcategoriaProyecto')\n ->groupBy('idProyecto')\n ->with('categoriaProyectoIdcategoriaProyecto');\n\t\tforeach($query->all() as $pro) {\n\t\t\t//Add rows with the Author, # of articles and last publishing date\n\t\t\t$this->allModels[] = [\n\t\t\t\t'IdProyecto' => $pro->idProyecto,\n\t\t\t\t'Titulo' => $pro->Titulo,\n\t\t\t\t'Descripcion' => $pro->Descripcion,\n\t\t\t\t'Url' => $pro->Url,\n\t\t\t\t'Imagen' => $pro->Imagen,\n\t\t\t\t'UserID' => $pro->user_id,\n\t\t\t\t'Fecha' => $pro->Fecha,\n\t\t\t\t'Categoria' =>$pro->nombre,\n\t\t\t];\n\t\t}\n\t}", "abstract public function populate();", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_dl('');\n $this->setDl('');\n $this->setRegion('');\n $this->setNombre_dl('');\n $this->setGrupo_estudios('');\n $this->setRegion_stgr('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }", "protected function _populateMetas()\n {\n $nodes = $this->_catalog->getModel('nodes');\n $metas = $this->_catalog->getModel('metas');\n $collection = $nodes->fetchAll();\n foreach ($collection as $node) {\n $meta = $metas->fetchNew();\n $meta->node_id = $node->id;\n $meta->save();\n }\n }", "public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }", "protected function fillMandatoryModelsFields(&$model, $body)\n {\n $fields = array_keys($this->getMandatoryModelsFields());\n foreach ($fields as $field)\n {\n $model->$field = $body[$field];\n }\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setId_tarifa('');\n $this->setYear('');\n $this->setCantidad('');\n $this->setObserv('');\n $this->setId_serie('');\n $this->setPrimary_key($aPK);\n }", "public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_enc('');\n $this->setId_nom('');\n $this->setModo('');\n $this->setF_ini('');\n $this->setF_fin('');\n $this->setId_nom_new('');\n $this->setPrimary_key($aPK);\n }", "abstract protected function setDataEachCanvass(Model $model);", "public function onConstruct()\n {\n $this->useDynamicUpdate(true); // set for all, without this phalcon sometimes will re-select from database and overwrite your changes if you call save() more than 1 time\n $this->keepSnapshots(true);\n $modelRelationAlias = $this->getModelsManager()->getRelations(get_called_class());\n foreach ($modelRelationAlias as $alias)\n {\n $this->modelRelations[$alias->getType()][] = $alias->getOption('alias');\n }\n }", "public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n 'Canvas\\Models\\Companies',\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n 'Canvas\\Models\\Apps',\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n 'Canvas\\Models\\Users',\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'system_modules_id',\n 'Canvas\\Models\\SystemModules',\n 'id',\n ['alias' => 'systemModule']\n );\n\n $this->setSource('email_templates_variables');\n }", "protected function typicalSetup()\n {\n $class = $this->class;\n $static = new $class;\n\n if ($static instanceof Model) {\n $this->_id (\"ID\", FieldBlueprint::PRIMARY, null);\n $this->_uid (\"UID\", FieldBlueprint::UID, null);\n }\n }", "public function initialize()\n {\n $this->hasMany('id', 'MapsScore', 'map_id', array('alias' => 'MapsScore'));\n $this->hasMany('id', 'Matchs', 'current_map', array('alias' => 'Matchs'));\n $this->hasMany('id', 'PlayerKill', 'map_id', array('alias' => 'PlayerKill'));\n $this->hasMany('id', 'Players', 'map_id', array('alias' => 'Players'));\n $this->hasMany('id', 'PlayersHeatmap', 'map_id', array('alias' => 'PlayersHeatmap'));\n $this->hasMany('id', 'Round', 'map_id', array('alias' => 'Round'));\n $this->hasMany('id', 'RoundSummary', 'map_id', array('alias' => 'RoundSummary'));\n $this->belongsTo('match_id', 'Matchs', 'id', array('alias' => 'Matchs'));\n }", "public function fill($model, $setPrimaryKey = true) {\r\n if($setPrimaryKey)\r\n $this->primaryKey = $model->id;\r\n $this->attributes = [\r\n 'title' => $model->header1,\r\n 'content' => $model->text,\r\n ];\r\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setF_gasto('');\n $this->setTipo('');\n $this->setCantidad('');\n $this->setPrimary_key($aPK);\n }", "public function loadModel(){\n\t\t$className = get_class($this);\n\t\tforeach(func_get_args() as $model){\n\t\t\t$entity = EntityManager::getEntityInstance($model);\n\t\t\tself::$_settingLock[$className] = true;\n\t\t\t$this->$model = $entity;\n\t\t\tself::$_settingLock[$className] = false;\n\t\t}\n\t}", "protected function fillAttributesToModel($model, array $attributes)\n {\n foreach ($this->form->getRegisteredFields() as $field) {\n if (! array_key_exists($field->id, $attributes)) {\n continue;\n }\n\n $fill = [$field->local_key];\n if ($field instanceof ModifiesMultipleAttributes) {\n $fill = $field->getModifiedAttributes();\n $attributes = $attributes[$field->id];\n }\n\n foreach ($fill as $attribute) {\n $field->fillModel($model, $attribute, $attributes[$attribute]);\n }\n }\n }", "public function initialize()\n {\n $this->hasMany('idmov', 'App\\Models\\MovEstoque', 'movimentacao_manual_estoque_idmov', array('alias' => 'MovEstoque'));\n $this->hasMany('idmov', 'App\\Models\\MovimentacaoManualEstoqueItem', 'idmov', array('alias' => 'MovimentacaoManualEstoqueItem'));\n $this->belongsTo('cd_ordem_servico_reparo', 'App\\Models\\OrdemServicoReparo', 'cd_ordem_servico', array('alias' => 'OrdemServicoReparo'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('requerente', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->belongsTo('usuario_responsavel', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }", "static public function fillFirms()\n {\n $params = [\n 'vehicle_model_types' => [0, 1, 2],\n 'avail_only' => false\n ];\n\n $res = json_decode(self::get('/v2/company', $params));\n Log::info('fillFirms res =' . print_r($res, 1));\n\n foreach ($res->companies as $firmInfo) {\n $firm = Firms::firstOrNew(['title' => $firmInfo->company_name]);\n\n $firm->title = mb_strtolower($firmInfo->company_name);\n $firm->id = $firmInfo->company_id;\n //dd($firm);\n $firm->save();\n }\n }", "public function prepAttributesForSave()\n\t{\n\t\t$attributes = $this->defineAttributes();\n\t\t$attributes['dateUpdated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\t\t$attributes['dateCreated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\t\t\t$value = $this->getAttribute($name);\n\n\t\t\t$this->setAttribute($name, ModelHelper::packageAttributeValue($config, $value, true));\n\t\t}\n\n\t\t// Populate dateCreated and uid if this is a new record\n\t\tif ($this->isNewRecord())\n\t\t{\n\t\t\t$this->dateCreated = DateTimeHelper::currentTimeForDb();\n\t\t\t$this->uid = StringHelper::UUID();\n\t\t}\n\n\t\t// Update the dateUpdated\n\t\t$this->dateUpdated = DateTimeHelper::currentTimeForDb();\n\t}", "public function initialize()\n {\n $this->hasMany('cd', 'ShouhinMrs', 'shu_souko_mr_cd', array('alias' => 'ShouhinMrs'));\n $this->hasMany('cd', 'ShiireMeisaiDts', 'souko_mr_cd', array('alias' => 'ShiireMeisaiDts'));\n $this->hasMany('cd', 'UriageMeisaiDts', 'souko_mr_cd', array('alias' => 'UriageMeisaiDts'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_asignatura('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_situacion('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setActa('');\n $this->setPrimary_key($aPK);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_asignatura('');\n $this->setId_situacion('');\n // la fecha debe estar antes del acta por si hay que usar la funcion inventarActa.\n $this->setF_acta('');\n $this->setActa('');\n $this->setDetalle('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setEpoca('');\n $this->setId_activ('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setTipo_acta('');\n $this->setPrimary_key($aPK);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_situacion('');\n $this->setDescripcion('');\n $this->setSuperada('');\n $this->setBreve('');\n $this->setPrimary_key($aPK);\n }", "public function initialize() {\n\n // Relation to DasUsers\n $this->belongsTo('id', 'Aiden\\Models\\DasUsers', 'users_id', ['alias' => 'DasUsers']);\n\n // Relation to Phrases\n $this->hasMany('id', 'Aiden\\Models\\UsersPhrases', 'users_id', [\"alias\" => \"Phrases\"]);\n\n // Relation to Das\n $this->hasManyToMany('id', 'Aiden\\Models\\DasUsers', 'users_id', 'das_id', 'Aiden\\Models\\Das', 'id', ['alias' => 'Das']);\n\n // Relation to Councils\n $this->hasManyToMany('id', 'Aiden\\Models\\UsersCouncils', 'users_id', 'councils_id', 'Aiden\\Models\\Councils', 'id', ['alias' => 'Councils']);\n\n }", "public function initialize() {\n $this->setSource('article');\n\n $this->belongsTo('author_id', Article::class, 'author_id', [\n 'alias' => 'author',\n 'reusable' => true,\n ]);\n\n $this->hasMany('article_id', ArticleTag::class, 'article_id', [\n 'alias' => 'tagRelation',\n ]);\n\n $this->hasMany('article_id', Comment::class, 'article_id', [\n 'alias' => 'comments',\n ]);\n }", "private static function loadItems()\n\t{\n\t\tself::$_items=array();\t\t\t\t\t\t//FIXME Сделать критерию с селект где не будет лишних полей\n\t\t$models=self::model()->findAll();\n\t\tforeach($models as $model)\n\t\t\tself::$_items[$model->code]=$model->value;\n\t}", "private function shareCrudModelsClassesToView(): void\n {\n $models = static::getCrudModels();\n View::share('modelsClasses', $models);\n }", "public function initialize()\n {\n parent::initialize();\n $this->belongsTo('users_id', Users::class, 'id', array('alias' => 'users'));\n $this->belongsTo('companies_id', Companies::class, 'id', array('alias' => 'company'));\n }", "public function initModel(Application $app)\n {\n $this->vetementModel = new VetementModel($app);\n $this->typeModel = new TypeModel($app);\n }", "public function fill(array $attributes = [])\n {\n $this->attributes = array_merge($this->attributes, $attributes);\n foreach($this->attributes['items'] as $key => $item) {\n if(is_array($item)) {\n $className = '\\App\\Items\\\\'.ucfirst($item['slug']);\n if(class_exists($className)) {\n $this->attributes['items'][$key] = new $className($item);\n }\n } elseif($item instanceof Item) {\n $this->attributes['items'][$key] = $item;\n }\n }\n foreach($this->attributes['systems'] as $key => $system) {\n if(is_array($system)) {\n $className = '\\App\\Systems\\\\'.ucfirst($system['slug']);\n if(class_exists($className)) {\n $this->attributes['systems'][$key] = new $className($system);\n }\n } elseif($system instanceof Item) {\n $this->attributes['systems'][$key] = $system;\n }\n }\n }", "public function initialize()\n {\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', array('alias' => 'Cargaestudiantes'));\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', array('alias' => 'Datosprofesiona'));\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', NULL);\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', NULL);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_region('');\n $this->setRegion('');\n $this->setNombre_region('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }", "public function loadModel()\n {\n $data = Contest::find($this->modelId);\n $this->title = $data->title;\n $this->description = $data->description;\n $this->image = $data->image;\n $this->featured_image = $data->featured_image;\n\n }", "function __construct(){\n foreach(glob(\"model/*.php\") as $file){\n require_once $file;\n }\n\n }", "public function populate();", "public function testModels()\n {\n foreach(array('TextPageCategory') as $className){\n $this->className = $className;\n $this->allByDocExample();\n }\n }", "public function initialize()\n {\n $this->belongsTo('kousin_user_id', 'Users', 'id', array('alias' => 'Users'));\n $this->belongsTo('tanni_mr1_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr1s'));\n $this->belongsTo('tanni_mr2_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr2s'));\n $this->belongsTo('utiwake_kbn_cd', 'UtiwakeKbns', 'cd', array('alias' => 'UtiwakeKbns'));\n $this->belongsTo('denpyou_mr_cd', 'DenpyouMrs', 'cd', array('alias' => 'DenpyouMrs'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n $this->belongsTo('hinsitu_kbn_cd', 'HinsituKbns', 'cd', array('alias' => 'HinsituKbns'));\n $this->belongsTo('souko_mr_cd', 'SoukoMrs', 'cd', array('alias' => 'SoukoMrs'));\n\n //納入先、気付先を取得するため。 Add By Nishiyama 2019/2/14\n $this->belongsTo('denpyou_mr_cd','UriageDts','cd',array('alias' => 'UriageDts'));\n }", "public function __construct(){\n if(count($this->fillable) == 0){\n foreach($this->attributes as $key => $attr){\n array_push($this->fillable, $key);\n }\n }\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setNivel_stgr('');\n $this->setDesc_nivel('');\n $this->setDesc_breve('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }", "public function _setProps() {\n $dataController = get_called_class();\n $dataController::_getMapper();\n $dataController::_getModel();\n }", "public function loadFields()\n\t{\n\t\t// Get only the fields from the class instance, not its descendants\n\t\t$getFields = create_function('$obj', 'return get_object_vars($obj);');\n\t\t$fields = $getFields($this);\n\n\t\t// Field defaults\n\t\t$defaults = array(\n\t\t\t'primary' => false,\n\t\t\t'relation' => false\n\t\t);\n\n\t\t// Go through and set up each field\n\t\tforeach ($fields as $name => $options)\n\t\t{\n\t\t\t// Merge the defaults\n\t\t\t$options = array_merge($defaults, $options);\n\n\t\t\t// Is this the primary field?\n\t\t\tif ($options['primary'] === true)\n\t\t\t{\n\t\t\t\t$this->primaryKeyField = $name;\n\t\t\t}\n\n\t\t\t// Is this a relation?\n\t\t\tif ($options['relation'] !== false)\n\t\t\t{\n\t\t\t\t$this->relations[$name] = $options;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->fields[$name] = array();\n\t\t}\n\t}", "public function fill(array $attributes = [])\n {\n // start_measure('fill-model', 'Création de l\\'objet '.static::class);\n foreach ($attributes as $key => $value) {\n if (is_array($value) && method_exists($this, $key)) {\n $this->setRelation($key,\n $this->$key()->getRelationsFromArray($value)\n );\n } else {\n $this->setAttribute($key, $value);\n }\n }\n // stop_measure('fill-model');\n\n return $this;\n }", "public function __construct(){\n require_once 'EntidadBase.php'; // Incluye el archivo EntidadBase\n require_once 'BaseModel.php'; // Incluye el archivo BaseModel\n foreach(glob('Model/*.php') as $file){ // Recorre todos los archivos de la carpeta Model con la extensión PHP.\n require_once($file); // Incluye el archivo\n }\n }", "public function initialize()\n {\n $this->setSchema(\"\");\n $this->hasMany(\n 'id',\n 'App\\Models\\Flats',\n 'house_id',\n array('alias' => 'Flats', \"reusable\" => true)\n );\n\n $this->belongsTo(\n \"street_id\",\n \"App\\Models\\Streets\",\n \"id\",\n array(\"alias\" => \"Streets\", \"reusable\" => true)\n );\n }", "public function initialize() {\n\n $this->belongsTo(\"users_id\", \"Aiden\\Models\\Users\", \"id\", [\"alias\" => \"User\"]);\n $this->belongsTo(\"councils_id\", \"Aiden\\Models\\Councils\", \"id\", [\"alias\" => \"Council\"]);\n\n }", "public function initialize()\n {\n $this->hasMany('id', 'AppCustomer', 'app_id', NULL);\n $this->hasMany('id', 'AppPrivileges', 'app_id', NULL);\n }", "public function unifyOnBase()\n {\n $mergeModel = $this->merge();\n\n $this->modelA->fill($mergeModel->toArray());\n\n $this->modelA->save();\n\n $this->modelB->delete();\n\n return $this->modelA;\n }", "public function set_attributes()\n {\n $this->id = 0;\n $this->set_process();\n $this->set_decomposition();\n $this->set_technique();\n $this->set_applicability();\n $this->set_input();\n $this->set_output();\n $this->set_validation();\n $this->set_quality();\n $this->score = 0;\n $this->matchScore = 0;\n $this->misMatch = \"\";\n }", "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "public function initialize()\n {\n $this->belongsTo('torihikisaki_cd', 'TokuisakiMrs', 'cd', array('alias' => 'TorihikisakiMrs'));\n $this->belongsTo('shouhin_mr_cd', 'ShouhinMrs', 'cd', array('alias' => 'ShouhinMrs'));\n $this->belongsTo('tanni_mr1_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr1s'));\n $this->belongsTo('tanni_mr2_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr2s'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n $this->belongsTo('souko_mr_cd', 'SoukoMrs', 'cd', array('alias' => 'SoukoMrs'));\n $this->belongsTo('denpyou_mr_cd', 'DenpyouMrs', 'cd', array('alias' => 'DenpyouMrs'));\n $this->belongsTo('utiwake_kbn_cd', 'UtiwakeKbns', 'cd', array('alias' => 'UtiwakeKbns'));\n $this->belongsTo('hinsitu_kbn_cd', 'HinsituKbns', 'cd', array('alias' => 'HinsituKbns'));\n $this->belongsTo('sakusei_user_id', 'Users', 'id', array('alias' => 'Users'));\n $this->belongsTo('meisai_id', 'UriageMeisaiDts', 'id', array('alias' => 'UriageMeisaiDts'));\n $this->hasMany('shukka_kbn_max', 'UriageShukkaMaxs', 'shouhin_mr_cd', array('alias' => 'UriageShukkaMaxs'));\n }", "private function shareModelPropsToView(): void\n {\n $model = static::${'modelClass'};\n View::share('props', (new $model())->getEditableProperties());\n }", "public function generateModels () {\r\n $modelParam = \\app\\lib\\router::getModel();\r\n $ModelPath = \\app\\lib\\router::getPath();\r\n $ModelName = \"app\\model\\\\\" . end($ModelPath);\r\n $this->model =new $ModelName;\r\n }", "public function sync_all_model_nos() {\n\t\tglobal $sync_taxonomies;\n\t\t$sync_taxonomies = [];\n\t\tedgenet()->debug->notice( \"\\n\" );\n\t\tedgenet()->debug->notice( \"\\n\" );\n\t\tedgenet()->debug->notice( str_repeat( '*', 32 ) );\n\t\tedgenet()->debug->notice( __( 'Start SYNC_ALL_CUSTOM_FIELDS_ATTRIBUTES', 'edgenet' ) );\n\t\tedgenet()->debug->notice( str_repeat( '*', 32 ) );\n\n\t\t// Get array of all product IDs\n\t\t$args = [\n\t\t\t'post_type' => 'product',\n\t\t\t'post_status' => 'all',\n\t\t\t'posts_per_page' => - 1,\n\t\t\t'fields' => 'ids',\n\t\t];\n\n\t\t$product_ids = new \\WP_Query( $args );\n\n\t\tedgenet()->debug->notice( __( sprintf( 'Syncing %s products', $product_ids->post_count ), 'edgenet' ) );\n\n\t\tforeach ( $product_ids->posts as $product_id ) {\n\t\t\tedgenet()->debug->notice( __( sprintf( 'Starting sync for Product ID: %s', $product_id ), 'edgenet' ) );\n\t\t\t$this->sync_product_model_no( $product_id );\n\t\t\tedgenet()->debug->notice( __( sprintf( 'Stopping sync for Product ID: %s', $product_id ), 'edgenet' ) );\n\t\t}\n\n\t\tedgenet()->debug->notice( str_repeat( '*', 32 ) );\n\t\tedgenet()->debug->notice( __( 'End SYNC_ALL_CUSTOM_FIELDS_ATTRIBUTES', 'edgenet' ) );\n\t\tedgenet()->debug->notice( str_repeat( '*', 32 ) );\n\t\tedgenet()->debug->notice( \"\\n\" );\n\t\tedgenet()->debug->notice( \"\\n\" );\n\t}", "public function initialize()\n {\n $this->hasMany('cd_upload', 'App\\Models\\Empresa', 'logo', array('alias' => 'Empresa'));\n $this->hasMany('cd_upload', 'App\\Models\\EmpresaHasArquivos', 'cd_upload', array('alias' => 'EmpresaHasArquivos'));\n $this->hasMany('cd_upload', 'App\\Models\\EmpresaHasLinkCentralcompras', 'cd_upload', array('alias' => 'EmpresaHasLinkCentralcompras'));\n $this->hasMany('cd_upload', 'App\\Models\\LancamentoHasUpload', 'cd_upload', array('alias' => 'LancamentoHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\LiquidacaoHasUpload', 'cd_upload', array('alias' => 'LiquidacaoHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\NfentradaHasUpload', 'cd_upload', array('alias' => 'NfentradaHasUpload'));\n $this->hasMany('cd_upload', 'App\\Models\\UploadHas', 'upload_cd_upload', array('alias' => 'UploadHas'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n }", "public function initialize()\n {\n $this->keepSnapshots(true);\n $this->addBehavior(new Blameable());\n $this->useDynamicUpdate(true);\n $this->hasMany(\"id\", \"models\\Formentrys\", \"form_id\", ['alias' => 'Entries']);\n $this->hasMany(\"id\", \"models\\Formfields\", \"form_id\", ['alias' => 'Formfields']);\n $this->belongsTo(\"user_id\", \"models\\Users\", \"id\", ['alias' => 'Users']);\n }", "public function fill(array $attributes)\n {\n $existingAttributes = get_object_vars($this);\n\n foreach ($existingAttributes as $attributeName => $oldAttributeValue) {\n array_key_exists($attributeName, $attributes) ? $this->$attributeName = $attributes[$attributeName] : NULL;\n }\n }", "private function instantiateAll() {\n $this->Corporations = new Corporations($this);\n $this->MemberTracking = new MemberTracking($this);\n $this->Characters = new Characters($this);\n $this->Stations = new Stations($this);\n $this->Facilities = new Facilities($this);\n $this->Industry = new Industry($this);\n $this->Markets = new Markets($this);\n $this->Universe = new Universe($this);\n $this->Contracts = new Contracts($this);\n $this->Wallet = new Wallet($this);\n $this->Assets = new Assets($this);\n $this->Killmails = new Killmails($this);\n $this->Status = new Status($this);\n $this->Usage = new Usage($this);\n }", "protected function mergeTranslationsWithAttributes()\n\t{\n\t\t$this->attributes = array_merge($this->attributes, $this->translatedAttributes);\n\t}", "public function initialize()\n {\n $this->belongsTo('id_categoria_gastos', 'CategoriaGastos', 'id_categoria_gastos', array('alias' => 'CategoriaGastos'));\n $this->belongsTo('id_presupuesto', 'Presupuesto', 'id_presupuesto', array('alias' => 'Presupuesto'));\n }", "private function _populate()\n {\n // populate Rgion\n foreach ($this->regionData as $region)\n {\n $this->region->create(\n $region['name'],\n $region['promotor_ID']\n );\n }\n \n // Populate branch\n foreach ($this->branchData as $branch)\n {\n $this->branch->create(\n $branch['name'],\n $branch['region_ID'],\n $branch['promotor_ID']\n );\n }\n\n // Popular Dealer \n foreach ($this->dealerData as $dealer)\n { \n $data = [\n 'region_ID' => $dealer['region_ID'],\n 'branch_ID' => $dealer['branch_ID'],\n 'dealer_account_ID' => $dealer['dealer_account_ID'],\n 'dealer_channel_ID' => $dealer['dealer_channel_ID'],\n 'dealer_type_ID' => $dealer['dealer_type_ID'],\n 'code' => $dealer['code'],\n 'name' => $dealer['name'],\n 'company' => $dealer['company'],\n 'address' => $dealer['address']\n ];\n\n $this->dealer->create($data);\n }\n\n foreach ($this->dealerChannelData as $dealerChannel)\n {\n $this->dealerChannel->create(\n $dealerChannel['name']\n );\n }\n\n // Populate dealer account\n foreach ($this->dealerAccountData as $dealerAccount)\n {\n $this->dealerAccount->create(\n $dealerAccount['name'],\n $dealerAccount['branch_ID'],\n $dealerAccount['promotor_ID']\n );\n }\n\n //Populate token\n foreach ($this->tokenData as $token)\n {\n $this->token->create(\n $token['dashboard_account_ID'],\n $token['token']\n );\n }\n\n // Populate promotor\n foreach ($this->promotorData as $promotor)\n { \n $this->promotor->create(\n $promotor['dealer_ID'],\n $promotor['phone'],\n $promotor['password'],\n $promotor['name'],\n $promotor['gender'],\n $promotor['type'],\n $promotor['parent_ID']\n );\n }\n\n // Populate report\n foreach ($this->reportData as $data)\n {\n return $this->report->create($data);\n\n }\n \n // Populate dashboard \n $accountIDs = [];\n\n foreach ($this->accountData as $account)\n {\n $accountIDs[] = $this->account->create(\n $account['email'],\n $account['name'],\n $account['last_access']\n );\n }\n\n return $accountIDs;\n }", "protected static function resolveFillable()\n\t{\n\t\tstatic::getAttributeDefinitions()->each->applyFillable($fillable = collect());\n\t\tstatic::$resolvedFillable[static::class] = $fillable->all();\n\t}", "public function initialize()\n {\n $this->hasMany('cd_desconto', 'App\\Models\\PdvVendasHasItens', 'cd_desconto', array('alias' => 'PdvVendasHasItens'));\n $this->belongsTo('cd_caixa', 'App\\Models\\PdvCaixa', 'cd_caixa', array('alias' => 'PdvCaixa'));\n $this->belongsTo('cd_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('cd_unidade_negocio', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('cd_usuario_criacao', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }", "public function __construct() {\n parent::__construct();\n $this->load->model('Website_model');\n $this->load->model('mall_model');\n }", "public function initialize()\n {\n $this->setSchema(\"gxc\");\n $this->hasMany('id', 'App\\Models\\YztIntegral', 'user_id', ['alias' => 'YztIntegral']);\n $this->hasMany('id', 'App\\Models\\YztShopCart', 'user_id', ['alias' => 'YztShopCart']);\n $this->hasMany('id', 'App\\Models\\YztShopComment', 'user_id', ['alias' => 'YztShopComment']);\n $this->hasMany('id', 'App\\Models\\YztShopCommentPraise', 'user_id', ['alias' => 'YztShopCommentPraise']);\n $this->hasMany('id', 'App\\Models\\YztShopLog', 'user_id', ['alias' => 'YztShopLog']);\n $this->hasMany('id', 'App\\Models\\YztShopOrder', 'user_id', ['alias' => 'YztShopOrder']);\n }", "public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}", "protected function addModelConfigs()\n {\n // TODO: add model configs\n }", "protected function getDefaultModelObject() : void\n {\n return;\n }" ]
[ "0.6589959", "0.63192636", "0.6293153", "0.6268316", "0.6259478", "0.61891127", "0.6115323", "0.60772526", "0.6034286", "0.5942314", "0.58796734", "0.58476424", "0.5836441", "0.58320445", "0.5803977", "0.5797133", "0.5763414", "0.57618904", "0.57439065", "0.5728828", "0.5707994", "0.5706232", "0.56971157", "0.56898534", "0.56654507", "0.5663774", "0.5619893", "0.56077176", "0.5577137", "0.55668247", "0.5541196", "0.55313784", "0.5529004", "0.5526796", "0.5526258", "0.5525673", "0.5523468", "0.5506353", "0.5503666", "0.54951674", "0.54938823", "0.54929394", "0.54912686", "0.54685134", "0.54546726", "0.5451043", "0.54502577", "0.5449836", "0.5446441", "0.544004", "0.54363775", "0.54335797", "0.5416911", "0.5408796", "0.5405678", "0.53744084", "0.5372654", "0.53723437", "0.53672874", "0.53649676", "0.53627694", "0.5361029", "0.5358112", "0.53567576", "0.53532", "0.53354025", "0.53279376", "0.5322123", "0.5322073", "0.53144765", "0.53138804", "0.53109", "0.53062886", "0.52953815", "0.52934253", "0.528754", "0.52844554", "0.52835435", "0.52830666", "0.5270331", "0.52697384", "0.52669173", "0.52662444", "0.5265512", "0.52652043", "0.52550745", "0.5252978", "0.524843", "0.52413666", "0.5228824", "0.52231663", "0.5221936", "0.521419", "0.5213797", "0.520576", "0.5205056", "0.52027214", "0.5191464", "0.51799273", "0.5171183" ]
0.5819359
14
Encodes the collected models into a JSON string.
public function toJson($options = 320) { return Json::encode($this->toArray()->getModels(), $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonize()\n {\n return json_encode($this->toArray());\n }", "public function toJson($options = 320)\n {\n return Json::encode($this->toArray()->_models, $options);\n }", "public function json(){ return json_encode( $this->objectify() ); }", "public function toJson() : string\n {\n return json_encode($this->all());\n }", "public function serialize()\n {\n $models = [];\n foreach ($this->all() as $id => $model) {\n $models[$id] = $model->serialize();\n }\n return $models;\n }", "public function toJson() {\n\t\t\treturn json_encode(array(\n\t\t\t\t'id' => $this->id,\n\t\t\t\t'model' => $this->model,\n\t\t\t\t'type' => json_decode($this->type->toJson()),\n\t\t\t\t'description' => $this->description,\n\t\t\t\t'area' => json_decode($this->area->toJson()),\n\t\t\t\t'status' => $this->status\n\t\t\t));\n\t\t}", "public function Encode()\r\n {\r\n if (!is_array($this->data))\r\n {\r\n $this->data = array();\r\n }\r\n return json_encode($this->data);\r\n }", "public function toJson();", "public function toJson();", "public function jsonify()\n {\n $attributes = array();\n $attributes[\"name\"] = $this->name;\n $attributes[\"description\"] = $this->description;\n $attributes[\"brand\"] = $this->brand->name;\n $attributes[\"id\"] = $this->id;\n $attributes[\"barcode\"] = $this->barcode;\n\n return json_encode($attributes);\n }", "public function toJson() {\n\t\t$data = $this->getSerializeData();\n\n\t\treturn json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\t}", "public function jsonSerialize()\n {\n return $this->toWei();\n }", "public function toJson()\n\t{\n\t\t$blocks = array();\n\n\t\tforeach ($this as $k => $item) {\n\n\t\t\tif ($item instanceof Clib_Object) {\n\t\t\t\t$json = $item->toJson();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$json = json_encode($item);\n\t\t\t}\n\n\t\t\t$blocks[] = sprintf('\"%d\":%s', $k, $json);\n\t\t}\n\n\t\treturn '{' . implode(',', $blocks) . '}';\n\n\t}", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function serialize()\n\t{\n\t\treturn json_encode(array(\n\t\t\t'data' => $this->data,\n\t\t\t'this' => $this->getArrayCopy(),\n\t\t\t'name' => $this->name,\n\t\t\t'merged' => $this->merged,\n\t\t));\n\t}", "public function stringify(){\n $datas = $this->getDatas();\n\n return json_encode($datas, JSON_PRETTY_PRINT);\n }", "public function toJson(){\n\t\t$array = $this->toArray();\n\t\treturn json_encode($array);\n\t}", "public function toJSON( ) {\n\n\t\t$data = $this->_toJsonOrXMLDataPrepare();\n\n\t\treturn json_encode( $data );\n\t}", "public function encode() {\n\t\treturn CJSON::encode($this);\n\t}", "public function makeJSON()\n {\n return(json_encode($this));\n }", "public function makeJSON()\n {\n return(json_encode($this));\n }", "public function toJson(): string\n {\n $array = $this->toArray();\n return json_encode($array);\n }", "public function jsonSerialize()\n {\n return $this->all();\n }", "public function jsonSerialize()\n {\n return $this->all();\n }", "public function jsonSerialize()\n {\n return $this->all();\n }", "public function serialize()\n {\n return json_encode($this);\n }", "public function serialize()\n {\n if (method_exists($this, 'toArray')) {\n return json_encode($this->toArray());\n }\n\n return json_encode([]);\n }", "public function toJson() : string\n {\n return json_encode( $this->toArray() );\n }", "public function serialize() {\r\n return json_encode($this);\r\n }", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function jsonSerialize()\n {\n }", "public function jsonSerialize()\n {\n }", "public function toJson(): string\n {\n return json_encode($this->toArray(), JSON_THROW_ON_ERROR | JSON_FORCE_OBJECT | JSON_INVALID_UTF8_IGNORE);\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "function toJSON()\n {\n return json_encode($this->toArray());\n }", "public function json_encode() {\n try{\n return json_encode((array)array_values(self::get_items()));\n }catch(Exception $e){\n throw $e;\n }\n }", "public function export() {\n return json_encode(\n $this->manager->all()->toArray()\n );\n }", "public function toJSON()\n {\n return json_encode( $this->toArray() );\n }", "public function jsonString(){\n return json_encode($this->createRequestsArray());\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function _jsonSerialize();", "public function __toString() {\n\t\t$data = array();\n\t\tforeach ($this->fields as $name => $field) {\n\t\t\t$data += [$name => $field->toJson()];\n\t\t}\n\t\t$top = array(\"success\"=>$this->success,\"data\"=>$data,\"text\"=>$this->text);\n\t\treturn json_encode($top);\n\t}", "public function serialize()\n {\n return serialize(\n [\n 'packagesClasses' => $this->packagesClasses,\n ]\n );\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function jsonSerialize()\n {\n return $this->toJson();\n }", "public function toJSON(){\n return json_encode($this);\n }", "public function toJson()\n {\n return Json::encode($this->toArray(), false, array(\n 'enableJsonExprFinder' => TRUE,\n ));\n }", "public function toJson() {\n\t\treturn json_encode($this->toArray());\n\t}", "public function buildJson();", "public function toJson() {\n\t\treturn json_encode($this->jsonSerialize());\n\t}", "public function toJSON() {\n return json_encode($this->data);\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function toJson()\n {\n return json_encode( $this->toArray() );\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function jsonSerialize()\n {\n $this->serializeWithId($this->resolveFields(\n resolve(Request::class)\n ));\n }", "public function toJson()\r\n {\r\n return json_encode($this->toArray());\r\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson() {\n return json_encode($this->toArray());\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function actionGetmodels(){\n $models = ArrayHelper::map(models::find()->joinwith('brand')->where(['brand_id' => $_POST['brandId'],'equip_id' => $_POST['equipId'],'status'=>1])->all(), 'id_model', 'modelName');\n return json_encode($models);\n }", "public function toJson() : string\n {\n return json_encode($this->toArray(), http_response_code(200));\n }", "public function toJson(): string;", "public function toJson(): string;", "public function toJson()\n {\n return json_encode($this->toArray(), JSON_FORCE_OBJECT | JSON_NUMERIC_CHECK);\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function toJson()\n {\n return json_encode($this->toArray(), true);\n }", "public function toJson() {\r\n\t\t// Returns:\t\tReturns JSON encoded string\r\n\t\treturn json_encode($this);\r\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function toJson()\n\t{\n\t\treturn json_encode($this->toArray(), \\JSON_PARTIAL_OUTPUT_ON_ERROR);\n\t}", "final public function jsonSerialize() {}", "public function jsonSerialize()\n\t{\n\t\treturn array(\n\t\t\t'count' => $this->count, \n\t\t\t'objects' => $this->tableObjects\n\t\t\t);\n }", "public function toJson()\n\t{\n\t\treturn json_encode($this->data());\n\t}" ]
[ "0.6597288", "0.6450716", "0.6405772", "0.63457286", "0.6283658", "0.6264811", "0.6263853", "0.6173094", "0.6173094", "0.6135969", "0.6121925", "0.6113843", "0.61096567", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6069211", "0.6061954", "0.60616136", "0.60439456", "0.60352826", "0.602382", "0.602382", "0.60112464", "0.60074997", "0.60074997", "0.60074997", "0.59715736", "0.596552", "0.59561217", "0.5947589", "0.5941357", "0.5941357", "0.59319663", "0.59319663", "0.5922998", "0.5922013", "0.5922013", "0.5922013", "0.5922013", "0.5922013", "0.5922013", "0.5922013", "0.5922013", "0.5922013", "0.5895885", "0.58934355", "0.58918214", "0.5881346", "0.5867561", "0.584659", "0.58401996", "0.58345014", "0.5831694", "0.58303875", "0.5828187", "0.58126307", "0.5800131", "0.5796225", "0.5792781", "0.57914835", "0.57894385", "0.5788694", "0.5788128", "0.57812864", "0.57794005", "0.577452", "0.5772335", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.5748638", "0.57485735", "0.5744964", "0.57349586", "0.5732479", "0.5730048", "0.5730048", "0.5729874", "0.5721018", "0.5721018", "0.57199883", "0.5715407", "0.5712103", "0.5709514", "0.57033396", "0.5701084", "0.5699978" ]
0.61128986
12
Processing line by line where each line is a variable that must be expanded if does not exist.
public static function ev_encode(Array &$curr_pos, Array $keys, Array $values){ if(!sizeof($keys)) throw new \Exception('Empty keys', 400); if(!sizeof($values)) throw new \Exception('Empty values', 400); if(!strcmp(current($keys),'*')) throw new \Exception('First elt cannot be a *', 400); if(!strcmp(current($keys),'')) throw new \Exception('Keys cannot be empty', 400); if(!strcmp(current($values),'')) throw new \Exception('Keys cannot be empty', 400); do{ $current = current($keys); $next = next($keys); $curr_pos =& self::ev_next($curr_pos, $next, $current, $values); }while($next !== false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function parseEnvVar($_line) {\n // Only process the line if it is not empty/null.\n if( $_line !== PHP_EOL && $_line !== null && $_line != '' ) {\n\n // If the line is a comment, ignore it as well.\n if( $_line[0] === '#' ){\n return;\n }\n\n // Parse the name and value into seperate variables.\n $name = trim( strtok($_line, '=') );\n $value = trim( strtok(PHP_EOL) );\n\n // Put the name value pairs into env and $_ENV\n putenv(\"$name=$value\");\n $_ENV[$name] = $value;\n }\n }", "private function resolveVariables(string $lineIn): string\n {\n $line = $lineIn;\n while (preg_match_all('/\\$\\{(?:([a-zA-Z0-9_-]+)\\.)([a-zA-Z0-9_-]+)\\}/', $line, $out)) {\n\n foreach($out[0] as $num => $var) {\n $env = $out[1][$num];\n $keyword = $out[2][$num];\n $value = null;\n\n if (!isset($this->envConfig[$env][$keyword])) {\n if ($env == \"sysenv\") {\n $value = getenv($keyword);\n }\n }\n else {\n $value = $this->envConfig[$env][$keyword];\n }\n\n if ($value === null) {\n throw new \\RuntimeException(\"Variable '$var' does not exist\");\n }\n $line = str_replace($var, $value, $line);\n }\n }\n return $line;\n }", "protected function parse(): void\n {\n $lines = preg_split('/\\r\\n|\\r|\\n/', $this->content);\n\n foreach ($lines as $line) {\n if (mb_strlen(trim($line)) && ! (mb_strpos(trim($line), '#') === 0)) {\n [$key, $value] = explode('=', (string) $line);\n $this->variables[$key] = $this->formatValue($value);\n }\n }\n }", "function getEnvVariables($line,$envVar)\n{\n $returnVal='';\n //remove all blanks from the string.\n $line=str_replace(' ','',$line);\n $tempArray=explode($envVar,$line);\n //index 1 of array should have value - if it is set. \n if (isset($tempArray[1])) {\n $returnVal=$tempArray[1]; \n }\n \n return $returnVal;\n}", "protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }", "function haira_setup_scss_vars ($contents, $custom_vars) {\n $linenum = 0;\n foreach($contents as $key=>$line)\n {\n if (preg_match('/[ ]*([\\/]{2})?[ ]*(.*?):(.*?);/is', $line, $matches))\n { \n $varName = trim(substr($matches[2], 1));\n $varValue = $matches[3];\n \n if ( isset ( $custom_vars[$varName] ) && $custom_vars[$varName] != '' ) {\n $contents[ $key ] = '$' . $varName . ': ' . $custom_vars[ $varName ] . \";\\n\";\n }\n \n }\n }\n\n return implode($contents);\n\n}", "function mawk_process_var (&$expr) {\n \n switch ($expr[0]) {\n \n case OP_RUN_VAR :\n \n $val = @$GLOBALS['mawk_vars'][$expr[1]];\n $start = 2;\n break;\n \n case OP_FIELD_VAR :\n \n $val = @$GLOBALS['mawk_data'][$expr[1]][$expr[2]];\n $start = 3;\n break;\n \n case OP_INDEX_VAR :\n \n \n # get the values\n \n $source_idx = $expr[1];\n $index_idx = $expr[2];\n \n $key = $opd1[3];\n \n if (is_array ($key))\n $key = mawk_process_expression ($key);\n\n $field_idx = $opd1[4];\n \n if (is_array ($field_idx))\n $field_idx = mawk_process_expression ($field_idx);\n \n \n # process values\n \n if (!(is_string ($key) || is_numeric ($key)))\n mawk_error (\"index var key is not a string or a number\");\n \n if (!is_integer ($field_idx)) {\n \n $field_name = $field_idx;\n \n if (!is_string ($field_name))\n mawk_error (\"index var field index is not an integer or a string\");\n \n $field_idx = @$GLOBALS['mawk_fields'][$source_idx][$index_idx][$field_name];\n \n if (!is_int ($field_idx))\n mawk_error (\"index var field '$field_name' does not exist\");\n }\n \n $val = $GLOBALS['mawk_indexes'][$source_idx][$index_idx][$key][$field_idx];\n $start = 5;\n }\n \n \n # get sub arrays\n \n $expr_count = count ($expr);\n \n for ($i=$start; $i<$expr_count; $i++) {\n \n $key = mawk_process_expression ($expr[$i]);\n $val = @$val[$key];\n \n if ($val === null)\n return null;\n }\n \n return $val;\n}", "public function formatVariable(){\r\n\t\t\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+\\$(\\w+)}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\$(\\w+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\s+\\$(\\w+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'{}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function find_member_variables($file_contents, array &$line_matches = null) {\r\n $b=0;\r\n $variables = array();\r\n \r\n if (!is_array($file_contents))\r\n $file_contents = explode(\"\\r\\n\", $file_contents);\r\n \r\n $count = count($file_contents);\r\n \r\n for ($i=0; $i<$count; $i++) {\r\n $line = $file_contents[$i];\r\n if (strstr($line, \"{\")) {\r\n ++$b;\r\n }\r\n if (strstr($line, \"}\")) {\r\n --$b;\r\n }\r\n if ($b == 1) {\r\n $matches = array();\r\n\r\n if ( (preg_match('/^[^=]*\\s+([a-zA-Z0-9_]+)\\s*;/', $line, $matches) ||\r\n preg_match('/([a-zA-Z0-9_]+)\\s*=/', $line, $matches)) &&\r\n !preg_match('/static/', $line) ) {\r\n $variables[$i] = $matches[1];\r\n \r\n if (isset($line_matches))\r\n $line_matches[$i] = $file_contents[$i];\r\n }\r\n\r\n }\r\n } \r\n return $variables;\r\n}", "public function parse(&$line)\n {\n foreach ($this->_pattern as $key => $magicConstant) {\n $line = str_replace($key, $magicConstant, $line);\n }\n\n return $line;\n }", "public function injectAtCurrentScope( $asLineNumber, $line ) {\n $line = str_repeat( \" \", $this->context->Scope->WhitespaceDepth ) . $line;\n $this->internalParse( $asLineNumber, $line );\n }", "function xthreads_sanitize_eval(&$s, &$fields) {\r\n\t// the following won't work properly with array indexes which have non-alphanumeric and underscore chars; also, it won't do ${var} syntax\r\n\t// also, damn PHP's magic quotes for preg_replace - but it does assist with backslash fun!!!\r\n\t$s = preg_replace(\r\n\t\tarray(\r\n\t\t\t'~\\\\{\\\\\\\\\\\\$([a-zA-Z_][a-zA-Z_0-9]*)((-\\\\>[a-zA-Z_][a-zA-Z_0-9]*|\\\\[(\\'|\\\\\\\\\"|)[a-zA-Z_ 0-9]+\\\\4\\\\])*)\\\\}~e',\r\n\t\t\t'~\\{\\\\\\\\\\$forumurl\\\\\\\\\\$\\}~i',\r\n\t\t\t'~\\{\\\\\\\\\\$forumurl\\?\\}~i',\r\n\t\t\t'~\\{\\\\\\\\\\$threadurl\\\\\\\\\\$\\}~i',\r\n\t\t\t'~\\{\\\\\\\\\\$threadurl\\?\\}~i'\r\n\t\t), array(\r\n\t\t\t'\\'{$GLOBALS[\\\\\\'$1\\\\\\']\\'.strtr(\\'$2\\', array(\\'\\\\\\\\\\\\\\\\\\\\\\'\\' => \\'\\\\\\'\\', \\'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\' => \\'\\\\\\'\\')).\\'}\\'', // rewrite double-quote to single quotes, cos it's faster\r\n\t\t\t'{$GLOBALS[\\'forumurl\\']}',\r\n\t\t\t'{$GLOBALS[\\'forumurl_q\\']}',\r\n\t\t\t'{$GLOBALS[\\'threadurl\\']}',\r\n\t\t\t'{$GLOBALS[\\'threadurl_q\\']}',\r\n\t\t), strtr($s, array('\\\\' => '\\\\\\\\', '$' => '\\\\$', '\"' => '\\\\\"'))\r\n\t);\r\n\t\r\n\t// replace conditionals\r\n\t@include_once MYBB_ROOT.'inc/xthreads/xt_phptpl_lib.php';\r\n\tif(function_exists('xthreads_phptpl_parsetpl')) {\r\n\t\txthreads_phptpl_parsetpl($s, $fields);\r\n\t}\r\n\t\r\n\t// replace value tokens at the end\r\n\t$do_value_repl = false;\r\n\t$tr = array();\r\n\tforeach($fields as &$f) {\r\n\t\t$tr['{'.$f.'}'] = '{$vars[\\''.$f.'\\']}';\r\n\t\t\r\n\t\tif($f == 'VALUE') $do_value_repl = true;\r\n\t}\r\n\tif($do_value_repl) $s = preg_replace('~\\{((?:RAW)?VALUE)\\\\\\\\?\\$(\\d+)\\}~', '{$vars[\\'$1$\\'][$2]}', $s);\r\n\t$s = strtr($s, $tr);\r\n}", "private function processline($line)\n {\n\t\t\t\t\t//save data from parsed inputstring to array\n\t\t\t\t\t$productname=$line[1];\n\t\t\t\t\t$object=Fetcher::fetchOne(\"Product\",array('name'=>'\"'.$productname.'\"'));\n\t\t\t\t\t$producttype=$this->main->producttypedata->items[$line[3]][\"object\"];\n\t\t\t\t\t\n\t\t\t\t\t$this->hydrate($productname, $line, $object, $producttype);\n }", "function import_record_vars() {\r\n while (list($key, $val) = each($this->Record))\r\n if (ereg(\"[A-Za-z][A-Za-z0-9_]*\", $key)) {\r\n $field_name = strtoupper($key); \r\n\t global $$field_name;\r\n\t $$field_name=$val;\r\n }; \r\n }", "function ParseInput($vars,&$a_values,$s_line_feed)\n{\n global $SPECIAL_FIELDS,$SPECIAL_VALUES,$FORMATTED_INPUT;\n\n $output = \"\";\n //\n // scan the array of values passed in (name-value pairs) and\n // produce slightly formatted (not HTML) textual output\n //\n while (list($name,$raw_value) = each($vars))\n {\n if (is_string($raw_value))\n //\n // truncate the string\n //\n \t$raw_value = substr($raw_value,0,MAXSTRING);\n $value = trim(Strip($raw_value));\n if (in_array($name,$SPECIAL_FIELDS))\n $SPECIAL_VALUES[$name] = $value;\n\t\telse\n\t\t{\n\t\t\t$a_values[$name] = $raw_value;\n \t$output .= \"$name: $value\".$s_line_feed;\n\t\t}\n array_push($FORMATTED_INPUT,\"$name: '$value'\");\n }\n return ($output);\n}", "private function parse_variables_simple(&$package, &$variable)\n {\n $name = $variable['@attributes']['name'];\n $value = $variable['@attributes']['value'];\n $os = isset($variable['@attributes']['os']) ? $variable['@attributes']['os'] : null;\n $arch = isset($variable['@attributes']['architecture']) ? $variable['@attributes']['architecture'] : null;\n\n $package->withVariable($name, $value, $os, $arch);\n }", "function getFromDefine($line)\n {\n $line = \"<?php $line\"; // Trick the parser that we are in PHP file, instead of analyzing a single line\n\n $state = 0;\n $key = $value = '';\n\n $tokens = token_get_all($line);\n $token = reset($tokens);\n\n while ($token) {\n if (is_array($token)) {\n if ($token[0] == T_WHITESPACE || $token[0] == T_COMMENT || $token[0] == T_DOC_COMMENT) {\n // do nothing\n } else {\n if ($token[0] == T_STRING && strtolower($token[1]) == 'define') {\n $state = 1;\n } else {\n if ($state == 2 && $this->isConstantToken($token[0])) {\n $key = $token[1];\n $state = 3;\n } else {\n if ($state == 4 && $this->isConstantToken($token[0])) {\n $value = $token[1];\n $state = 5;\n }\n }\n }\n }\n } else {\n $symbol = trim($token);\n if ($symbol == '(' && $state == 1) {\n $state = 2;\n } else {\n if ($symbol == ',' && $state == 3) {\n $state = 4;\n } else {\n if ($symbol == ')' && $state == 5) {\n $state = 0;\n\n yield [$this->stripQuotes($key), $this->getNativeValueFromDefinition($value)];\n }\n }\n }\n }\n $token = next($tokens);\n }\n }", "private function closureFeeding( Line$line )\n\t{\n\t\t$this->checkIndentAndProcess(...[\n\t\t\t$line,\n\t\t\tfunction( Line$line ){\n\t\t\t\tswitch( $line->getChar(0) )\n\t\t\t\t{\n\t\t\t\t\tcase ' ':{\n\t\t\t\t\t\t$this->currentClosure->feed($line->subIndentLine);\n\t\t\t\t\t}break;\n\t\t\t\t\tcase '}':{\n\t\t\t\t\t\tif( $line->content==='}' ){\n\t\t\t\t\t\t\t$this->closeClosure();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthrow new Exception('Syntax error');\n\t\t\t\t\t\t}\n\t\t\t\t\t}break;\n\t\t\t\t\tdefault:{\n\t\t\t\t\t\tdd($line->content);\n\t\t\t\t\t\tthrow new Exception('Syntax error');\n\t\t\t\t\t}break;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( Line$line ){\n\t\t\t\t$this->parseLine($line);\n\t\t\t},\n\t\t\tfunction( Line$line ){\n\t\t\t\tthrow new Exception('Indent error');\n\t\t\t},\n\t\t]);\n\t}", "function setVariables($value) {\n \tif(is_array($value)) {\n \t return parent::setVariables(implode(\"\\n\", $value));\n \t} else {\n \t return parent::setVariables($value);\n \t} // if\n }", "function global_parse($handle, $tplvar)\n {\n $this->global_assign(array($tplvar => yats_getbuf($this->mBlockHandles[$handle], $this->default_locale, $this->default_domain, $this->default_dir)));\n }", "function process_variables($input, $graph_item, $graph_start = 0, $graph_end = 0) {\n\n\t$matches = array();\n\t$match = \"\";\n\n\t/* Get graph items for the graph */\n\t$graph_items = db_fetch_assoc(\"SELECT\n\t\tgraph_templates_item.id AS graph_templates_item_id,\n\t\tgraph_templates_item.cdef_id,\n\t\tgraph_templates_item.text_format,\n\t\tgraph_templates_item.value,\n\t\tgraph_templates_item.hard_return,\n\t\tgraph_templates_item.consolidation_function_id,\n\t\tgraph_templates_item.graph_type_id,\n\t\tgraph_templates_gprint.gprint_text,\n\t\tcolors.hex,\n\t\tdata_template_rrd.id as data_template_rrd_id,\n\t\tdata_template_rrd.local_data_id,\n\t\tdata_template_rrd.rrd_minimum,\n\t\tdata_template_rrd.rrd_maximum,\n\t\tdata_template_rrd.data_source_name,\n\t\tdata_template_rrd.local_data_template_rrd_id\n\t\tFROM graph_templates_item\n\t\tLEFT JOIN data_template_rrd ON (graph_templates_item.task_item_id=data_template_rrd.id)\n\t\tLEFT JOIN colors ON (graph_templates_item.color_id=colors.id)\n\t\tLEFT JOIN graph_templates_gprint on (graph_templates_item.gprint_id=graph_templates_gprint.id)\n\t\tWHERE graph_templates_item.local_graph_id=\" . $graph_item[\"local_graph_id\"] . \"\n\t\tORDER BY graph_templates_item.sequence\");\n\n\t/* find the step and how often this graph is updated with new data */\n\t$ds_step = db_fetch_cell(\"select\n\t\tdata_template_data.rrd_step\n\t\tfrom (data_template_data,data_template_rrd,graph_templates_item)\n\t\twhere graph_templates_item.task_item_id=data_template_rrd.id\n\t\tand data_template_rrd.local_data_id=data_template_data.local_data_id\n\t\tand graph_templates_item.local_graph_id=\" . $graph_item[\"local_graph_id\"] . \"\n\t\tlimit 0,1\");\n\t$ds_step = empty($ds_step) ? 300 : $ds_step;\n\n\tif ((empty($graph_start)) || (empty($graph_end))) {\n\t\t$rra[\"rows\"] = 600;\n\t\t$rra[\"steps\"] = 1;\n\t\t$rra[\"timespan\"] = 86400;\n\t}else{\n\t\t/* get a list of RRAs related to this graph */\n\t\t$rras = get_associated_rras($graph_item[\"local_graph_id\"]);\n\n\t\tif (sizeof($rras) > 0) {\n\t\t\tforeach ($rras as $unchosen_rra) {\n\t\t\t\t/* the timespan specified in the RRA \"timespan\" field may not be accurate */\n\t\t\t\t$real_timespan = ($ds_step * $unchosen_rra[\"steps\"] * $unchosen_rra[\"rows\"]);\n\n\t\t\t\t/* make sure the current start/end times fit within each RRA's timespan */\n\t\t\t\tif ( (($graph_end - $graph_start) <= $real_timespan) && ((time() - $graph_start) <= $real_timespan) ) {\n\t\t\t\t\t/* is this RRA better than the already chosen one? */\n\t\t\t\t\tif ((isset($rra)) && ($unchosen_rra[\"steps\"] < $rra[\"steps\"])) {\n\t\t\t\t\t\t$rra = $unchosen_rra;\n\t\t\t\t\t}else if (!isset($rra)) {\n\t\t\t\t\t\t$rra = $unchosen_rra;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!isset($rra)) {\n\t\t\t$rra[\"rows\"] = 600;\n\t\t\t$rra[\"steps\"] = 1;\n\t\t}\n\t}\n\t$seconds_between_graph_updates = ($ds_step * $rra[\"steps\"]);\n\n\t/* override: graph start time */\n\tif ((!isset($graph_start)) || ($graph_start == \"0\")) {\n\t\t$graph_start = -($rra[\"timespan\"]);\n\t}\n\t/* override: graph end time */\n\tif ((!isset($graph_end)) || ($graph_end == \"0\")) {\n\t\t$graph_end = -($seconds_between_graph_updates);\n\t}\n\n\t/* Nth percentile */\n\tif (preg_match_all(\"/\\|([0-9]{1,2}):(bits|bytes):(\\d):(current|total|max|total_peak|all_max_current|all_max_peak|aggregate_max|aggregate_sum|aggregate_current|aggregate):(\\d)?\\|/\", $input, $matches, PREG_SET_ORDER)) {\n\t\tforeach ($matches as $match) {\n\t\t\t$input = str_replace($match[0], variable_nth_percentile($match, $graph_item, $graph_items, $graph_start, $graph_end), $input);\n\t\t}\n\t}\n\n\t/* bandwidth summation */\n\tif (preg_match_all(\"/\\|sum:(\\d|auto):(current|total|atomic):(\\d):(\\d+|auto)\\|/\", $input, $matches, PREG_SET_ORDER)) {\n\t\tforeach ($matches as $match) {\n\t\t\t$input = str_replace($match[0], variable_bandwidth_summation($match, $graph_item, $graph_items, $graph_start, $graph_end, $rra[\"steps\"], $ds_step), $input);\n\t\t}\n\t}\n\n\treturn $input;\n\n}", "function drupal_parse_info_file($filename) {\n\n $info = array();\n if (!file_exists($filename)) {\n return $info;\n }\n\n $data = file_get_contents($filename);\n if (preg_match_all('\n @^\\s* # Start at the beginning of a line, ignoring leading whitespace\n ((?:\n [^=;\\[\\]]| # Key names cannot contain equal signs, semi-colons or square brackets,\n \\[[^\\[\\]]*\\] # unless they are balanced and not nested\n )+?)\n \\s*=\\s* # Key/value pairs are separated by equal signs (ignoring white-space)\n (?:\n (\"(?:[^\"]|(?<=\\\\\\\\)\")*\")| # Double-quoted string, which may contain slash-escaped quotes/slashes\n (\\'(?:[^\\']|(?<=\\\\\\\\)\\')*\\')| # Single-quoted string, which may contain slash-escaped quotes/slashes\n ([^\\r\\n]*?) # Non-quoted string\n )\\s*$ # Stop at the next end of a line, ignoring trailing whitespace\n @msx', $data, $matches, PREG_SET_ORDER)) {\n foreach ($matches as $match) {\n // Fetch the key and value string\n $i = 0;\n foreach (array('key', 'value1', 'value2', 'value3') as $var) {\n $$var = isset($match[++$i]) ? $match[$i] : '';\n }\n $value = stripslashes(substr($value1, 1, -1)) . stripslashes(substr($value2, 1, -1)) . $value3;\n\n // Parse array syntax\n $keys = preg_split('/\\]?\\[/', rtrim($key, ']'));\n $last = array_pop($keys);\n $parent = &$info;\n\n // Create nested arrays\n foreach ($keys as $key) {\n if ($key == '') {\n $key = count($parent);\n }\n if (!isset($parent[$key]) || !is_array($parent[$key])) {\n $parent[$key] = array();\n }\n $parent = &$parent[$key];\n }\n\n // Handle PHP constants\n if (defined($value)) {\n $value = constant($value);\n }\n\n // Insert actual value\n if ($last == '') {\n $last = count($parent);\n }\n $parent[$last] = $value;\n }\n }\n\n return $info;\n}", "protected function applyVars()\n\t{\n\t\tforeach ($this->data as $key => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t$this->parseToElement($key, $value);\n\t\t\t} else {\n\t\t\t\t$results = @$this->xpath->query(\"//*[@c.\" . $key . \"]\");\n\t\t\t\tif ($results->length > 0) {\n\t\t\t\t\t// Get HTML\n\t\t\t\t\t$node = $results->item(0);\n\t\t\t\t\tif ($node->hasAttribute('c.if')) {\n\t\t\t\t\t\t$expression = $node->getAttribute('c.if');\n\t\t\t\t\t\t$node->removeAttribute('c.if');\n\t\t\t\t\t\t$condition_control = new Condition($expression, $this->data, $value);\n\t\t\t\t\t\tif (!$condition_control->getResult()) {\n\t\t\t\t\t\t\t$node->parentNode->removeChild($node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$node->removeAttribute('c.' . $key);\n\t\t\t\t\t$this->setElementContent($node, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function prepare_vars_for_template_usage()\n {\n }", "function checkifxPathVariables($chkVarSendline,$chkVarLines,$chkSendDecLine_num,$xPathson)\n{\n \n// print_r($chkVarSendline);\n \n $noofelelments=count($chkVarSendline);\n \n \n for($i=1;$i<$noofelelments;$i++)\n {\n $tempCut=substr($chkVarSendline[$i],0,1);\n \n if(strcmp($tempCut,'$')==0)\n {\n// echo \"<br>Trimmed Var \".$chkVarSendline[$i];\n// $Token = new Tokenizer();\n// $Token->\n printXpathDeclaration($chkVarSendline[$i],$chkVarLines,$chkSendDecLine_num,$xPathson);\n }\n \n else\n {\n $tempCutQuot1=substr($chkVarSendline[$i],7,-7); //Substr for getting values in db \".$value.\" => to $value trimming both sides symbols\n $tempCut=substr($tempCutQuot1,0,1);\n \n if($tempCut=='$')\n {\n echo $tempCutQuot1;\n \n printXpathDeclaration($tempCutQuot1,$chkVarLines,$chkSendDecLine_num,$xPathson); //Send the value decleared in th sql string since it has uni characters like \" ' . they are trimmed first and then sent\n }\n \n \n }\n \n \n// $GLOBALS['countTemp']++;\n }\n \n// $GLOBALS['sessionVar']++;\n \n// echo \"<br>\"; \n}", "function token_rules_input_evaluator_apply($text, $used_vars, &$state) {\r\n static $token_cache = array();\r\n\r\n if ($used_vars) {\r\n $vars = rules_get_variables(drupal_map_assoc($used_vars), $state);\r\n if (!$vars) {\r\n //there not all needed variables available!\r\n return FALSE;\r\n }\r\n\r\n foreach ($used_vars as $name) {\r\n $type = _token_rules_map_type($state['variables'][$name]->info['type']);\r\n if ($type) {\r\n $token_id = _token_get_id($type, $vars[$name]);\r\n if (isset($token_cache[$token_id]) && $token_cache[$token_id] != $name) {\r\n // this is the same variable in another state\r\n // so we need to flush the token cache to get the fresh values\r\n token_get_values('global', NULL, TRUE);\r\n }\r\n\r\n $text = token_replace($text, $type, $vars[$name], TOKEN_PREFIX. $name .':', TOKEN_SUFFIX);\r\n\r\n // remember that this variable has been used and got cached\r\n $token_cache[$token_id] = $name;\r\n }\r\n }\r\n }\r\n\r\n return $text;\r\n}", "function processGetVars()\n {\n //assignGetIfExists ( $fullList, NULL, 'full' );\n //$this->fullList = (bool) $fullList;\n self::dumpThis();\n }", "private function parseVariables($expression, $variables) {\n foreach ($variables as $variable => $value) {\n $newVariable = (count($this->variables) + 1) . '_' . $variable;\n\n $expression = str_replace('%' . $variable . '%', '%' . $newVariable . '%', $expression);\n\n $this->variables[$newVariable] = $value;\n }\n\n return $expression;\n }", "protected function injectVariables($args) {\n\t\t$this->pushEnv();\n\t\t$parser = new lessc_parser($this, __METHOD__);\n\t\tforeach ($args as $name => $str_value) {\n\t\t\tif (strlen((string)$str_value) > 0) {\n\t\t\t\tif ($name{0} != '@') $name = '@'.$name;\n\t\t\t\t$parser->count = 0;\n\t\t\t\t$parser->buffer = (string)$str_value;\n\t\t\t\tif (!$parser->propertyValue($value)) {\n\t\t\t\t\tthrow new Exception(\"failed to parse passed in variable $name: $str_value\");\n\t\t\t\t}\n\n\t\t\t\t$this->set($name, $value);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected function addParsedFile($file) {\n\t\tif (file_exists($file)) {\n\t\t\t$this->allParsedFiles[realpath($file)] = @filemtime($file);\n\t\t} else {\n\t\t\t$this->allParsedFiles[realpath($file)] = 0;\n\t\t}\n\t}\n\n\t/**\n\t * Execute lessphp on a .less file or a lessphp cache structure\n\t *\n\t * The lessphp cache structure contains information about a specific\n\t * less file having been parsed. It can be used as a hint for future\n\t * calls to determine whether or not a rebuild is required.\n\t *\n\t * The cache structure contains two important keys that may be used\n\t * externally:\n\t *\n\t * compiled: The final compiled CSS\n\t * updated: The time (in seconds) the CSS was last compiled\n\t *\n\t * The cache structure is a plain-ol' PHP associative array and can\n\t * be serialized and unserialized without a hitch.\n\t *\n\t * @param mixed $in Input\n\t * @param bool $force Force rebuild?\n\t * @param array $vars Variables to pass in\n\t * @return array lessphp cache structure\n\t */\n\tpublic static function cexecute($in, $force = false, $vars = array()) {\n\n\t\t// assume no root\n\t\t$root = null;\n\n\t\tif (is_string($in)) {\n\t\t\t$root = $in;\n\t\t} elseif (is_array($in) and isset($in['root'])) {\n\t\t\tif ($force or !isset($in['files'])) {\n\t\t\t\t// If we are forcing a recompile or if for some reason the\n\t\t\t\t// structure does not contain any file information we should\n\t\t\t\t// specify the root to trigger a rebuild.\n\t\t\t\t$root = $in['root'];\n\t\t\t\tvar_dump('one');\n\t\t\t} elseif (isset($in['vars']) and $vars !== $in['vars']) {\n\t\t\t\t// If the variables we're passing in have changed\n\t\t\t\t// we should look at the incoming root to trigger a rebuild.\n\t\t\t\t$root = $in['root'];\n\t\t\t\tvar_dump('two');\n\t\t\t} elseif (isset($in['files']) and is_array($in['files'])) {\n\t\t\t\tforeach ($in['files'] as $fname => $ftime ) {\n\t\t\t\t\tif (file_exists($fname) and (strpos('.php', $fname < 0) or filemtime($fname) > $ftime)) {\n\t\t\t\t\t\t// One of the files we knew about previously has changed\n\t\t\t\t\t\t// so we should look at our incoming root again.\n\t\t\t\t\t\t$root = $in['root'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// TODO: Throw an exception? We got neither a string nor something\n\t\t\t// that looks like a compatible lessphp cache structure.\n\t\t\treturn null;\n\t\t}\n\n\t\tif ($root !== null) {\n\t\t\t// We have a root value which means we should rebuild.\n\t\t\t$less = new less($root);\n\t\t\t$out = array();\n\t\t\t$out['root'] = $root;\n\t\t\t$out['compiled'] = $less->parse(null, $vars);\n\t\t\t$out['files'] = $less->allParsedFiles();\n\t\t\t$out['updated'] = time();\n\t\t\t$out['vars'] = $vars;\n\t\t\treturn $out;\n\t\t} else {\n\t\t\t// No changes, pass back the structure\n\t\t\t// we were given initially.\n\t\t\treturn $in;\n\t\t}\n\n\t}\n}", "function extract_tag_contents($line) {\n if (preg_match(self::REGEX_TEXT, $line)) {\n $text = preg_replace(self::REGEX_TEXT, '\\2', $line);\n return $this->evaluate_variables($text);\n }\n }", "private function compileLine ($line) {\n foreach ($line as $i => $token) {\n if (is_array($token)) {\n $line[$i] = chop($this->compileLine($token), ';');\n }\n }\n \n $last = current(array_slice($line, -1, 1)) ?: '';\n $first = current(array_slice($line, 0, 1)) ?: '';\n $second = current(array_slice($line, 1, 1)) ?: '';\n \n $length = count($line);\n $code = '';\n \n /* Comments */\n if ($first === 'shh') {\n $code .= \"// $second\";\n }\n \n if ($first === 'quiet') {\n $code .= '/*' . ($second === 'dogeblock' ? '*' : '');\n }\n \n if ($first === 'loud') {\n $code .= '*/';\n }\n \n /* Variable assignment */\n if ($first === 'very') {\n $last = implode(' ', array_slice($line, 3));\n \n $code .= \"$second = $last;\";\n }\n \n if ($second === 'is') {\n $last = implode(' ', array_slice($line, 2));\n \n $code .= \"$first = $last;\";\n }\n \n /* Use statement */\n if ($first === 'so' && $length > 1) {\n $code .= \"use $second\";\n \n if ($length > 2) {\n $code .= \" as $last\";\n }\n \n $code .= ';';\n }\n \n /* Comparison structures */\n if ($first === 'but') {\n $code .= 'else ';\n }\n \n if ($first === 'rly' || $second === 'rly') {\n $index = $first === 'rly' ? 1 : 2;\n $code .= 'if (' \n . $this->compileBoolean(implode(' ', array_slice($line, $index, -1))) \n . ') ';\n }\n \n if ($first === 'notrly') {\n $code .= 'if (!(' \n . $this->compileBoolean(implode(' ', array_slice($line, 1, -1))) \n . ')) ';\n }\n \n /* Loops */\n if ($first === 'many') {\n $code .= 'while ('\n . $this->compileBoolean(implode(' ', array_slice($line, 1, -1)))\n . ') ';\n }\n \n if ($first === 'much') {\n $code .= 'for ('\n . $this->compileBoolean(implode(' ', array_slice($line, 1, -1)))\n . ') ';\n }\n \n if ($first === '4lulz') {\n $with = array_search('with', $line);\n $arguments = array_slice($line, 1, $with - 1);\n \n $arguments = count($arguments) > 1 \n ? \"{$arguments[0]} => {$arguments[1]}\"\n : \"{$arguments[0]}\";\n \n $with = $line[$with + 1];\n \n $code .= \"foreach ($with as $arguments) \";\n }\n \n /* Operators */\n if ($second === 'more') {\n $third = $line[2];\n $code .= \"$first += $third;\";\n }\n \n if ($second === 'less') {\n $third = $line[2];\n $code .= \"$first -= $third;\";\n }\n \n if ($second === 'lots') {\n $third = $line[2];\n $code .= \"$first *= $third;\";\n }\n \n if ($second === 'few') {\n $third = $line[2];\n $code .= \"$first /= $third;\";\n }\n \n /* Functions */\n if ($first === 'plz') {\n $arguments = '';\n \n if ($length > 2) {\n $arguments = implode(', ', array_slice($line, 3));\n }\n \n $code .= \"$second($arguments);\";\n }\n \n if ($first === 'such') {\n $arguments = '';\n \n if ($length > 2) {\n $arguments = implode(', ', array_slice($line, 3, -1));\n }\n \n $code .= \"function $second ($arguments) \";\n }\n \n /* Block statements */\n if ($last === 'so') {\n $code .= '{';\n }\n \n if ($first === 'wow') {\n if ($length > 1) {\n $code .= 'return ' . implode(' ', array_slice($line, 1)) . \";\\n\";\n }\n \n $code .= \"}\";\n }\n \n if ($first === 'amaze') {\n $code .= 'return ' . implode(' ', array_slice($line, 1)) . ';';\n }\n \n if ($code) {\n return $code;\n }\n \n return $length === 1 ? implode(' ', $line) : '';\n }", "public function parseLine($line) {\n\t\t// Comment or empty line\n\t\tif ( $line === '' || preg_match('/^[\\\\t ]*?(?:\\#.*)?$/', $line) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tpreg_match(\n\t\t\t'/^\\s*?(?:(?:declare|export|local)\\s+?)?(\\S+?)=(.*)\\s*$/',\n\t\t\t$line,\n\t\t\t$matches\n\t\t);\n\n\t\tif ( empty($matches) ) {\n\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t'Unexpected character in line: %s',\n\t\t\t\t$line\n\t\t\t));\n\t\t}\n\n\t\t$name = $matches[1];\n\t\t$value = $matches[2];\n\n\t\tif ( ! $this->isLegalName($name) ) {\n\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t\"Illegal variable name '%s' in line: %s\",\n\t\t\t\t$name,\n\t\t\t\t$line\n\t\t\t));\n\t\t}\n\n\t\t// Empty value\n\t\tif ( $value === '' || $value === '\"\"' || $value === \"''\" ) {\n\t\t\treturn [$name, ''];\n\t\t}\n\n\t\t$chars = preg_split('//u', $value, -1, \\PREG_SPLIT_NO_EMPTY);\n\t\t$charsLen = count($chars);\n\n\t\t// Quoted value\n\t\tif ( $chars[0] === '\"' || $chars[0] === \"'\" ) {\n\t\t\t$quote = $chars[0];\n\t\t\t$end = -1;\n\n\t\t\t// Scan for end of value\n\t\t\tfor ( $i = 1; $i < $charsLen; $i++ ) {\n\t\t\t\tif ( $chars[$i] === '\\\\' ) {\n\t\t\t\t\t$i++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} elseif ( $chars[$i] === $quote ) {\n\t\t\t\t\t$end = $i - 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$after = implode('', array_slice($chars, $end + 2));\n\n\t\t// Unquoted value\n\t\t} else {\n\t\t\t$quote = null;\n\t\t\t$end = -1;\n\n\t\t\t// Scan for end of value\n\t\t\tfor ( $i = 0; $i < $charsLen; $i++ ) {\n\t\t\t\tif ( $chars[$i] === '\\\\' ) {\n\t\t\t\t\t$i++;\n\t\t\t\t} elseif ( in_array($chars[$i], static::UNQUOTED_MUST_ESCAPE, true) ) {\n\t\t\t\t\t$end = $i - 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$end = $i;\n\t\t\t}\n\n\t\t\t$after = implode('', array_slice($chars, $end + 1));\n\n\t\t\t// Illegal line continuation\n\t\t\tif ( $end >= $charsLen ) {\n\t\t\t\t$end = -1;\n\t\t\t}\n\t\t}\n\n\t\t// End not found\n\t\tif ( $end < 0 ) {\n\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t'End of value not found on line: %s',\n\t\t\t\t$line\n\t\t\t));\n\t\t}\n\n\t\t// Garbage found after end\n\t\tif ( $after !== '' && ! preg_match('/^(?:\\s*;(?:\\s*#.*)?|\\s+#.*)?\\s*$/', $after) ) {\n\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t'Garbage found after value on line: %s',\n\t\t\t\t$line\n\t\t\t));\n\t\t}\n\n\t\t$chars = array_slice($chars, $quote ? 1 : 0, $end + ($quote ? 0 : 1));\n\n\t\t// Single-quoted value — easy because everything is literal\n\t\tif ( $quote === \"'\" ) {\n\t\t\t$value = implode('', $chars);\n\n\t\t\t// The value must not contain single-quotes though\n\t\t\tif ( strpos($value, \"'\") !== false ) {\n\t\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t\t'Illegal single-quote in single-quoted value on line: %s',\n\t\t\t\t\t$line\n\t\t\t\t));\n\t\t\t}\n\n\t\t\tif ( ! $this->isLegalValue($value) ) {\n\t\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t\t'Illegal character in value on line: %s',\n\t\t\t\t\t$line\n\t\t\t\t));\n\t\t\t}\n\n\t\t\treturn [$name, $value];\n\t\t}\n\n\t\t$newValue = '';\n\t\t$escape = false;\n\n\t\tforeach ( $chars as $c ) {\n\t\t\t// Back-slash — start escape\n\t\t\tif ( ! $escape && $c === '\\\\' ) {\n\t\t\t\t$escape = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Certain special characters must be escaped in double-quotes in\n\t\t\t// bash if they're to be treated literally. Since we don't support\n\t\t\t// functionality like variable expansion here, we'll say that they\n\t\t\t// always need to be escaped — otherwise the variables would have\n\t\t\t// different values here vs in bash. Note that bash does allow some\n\t\t\t// special characters, notably $, to go unescaped if it can deduce\n\t\t\t// that the following character isn't going to trigger expansion;\n\t\t\t// we're going to make it simple here and just be strict about it\n\t\t\tif ( $quote === '\"' && in_array($c, static::DOUBLE_QUOTED_MUST_ESCAPE, true) ) {\n\t\t\t\tif ( ! $escape ) {\n\t\t\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t\t\t'Unescaped special character in double-quoted value on line: %s',\n\t\t\t\t\t\t$line\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\t$newValue .= $c;\n\t\t\t\t$escape = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Unquoted values have some additional characters that need\n\t\t\t// escaped; otherwise our rationale is the same as above\n\t\t\tif ( $quote === null && in_array($c, static::UNQUOTED_MUST_ESCAPE, true) ) {\n\t\t\t\t// This should never happen — our scan above would have blown up\n\t\t\t\tif ( ! $escape ) {\n\t\t\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t\t\t'Unescaped special character in unquoted value on line: %s',\n\t\t\t\t\t\t$line\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\t$newValue .= $c;\n\t\t\t\t$escape = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Escaped non-special character\n\t\t\tif ( $escape ) {\n\t\t\t\t// Treat back-slash literally if double-quoted\n\t\t\t\tif ( $quote === '\"' ) {\n\t\t\t\t\t$newValue .= '\\\\' . $c;\n\t\t\t\t// Strip it out back-slash if unquoted\n\t\t\t\t} else {\n\t\t\t\t\t$newValue .= $c;\n\t\t\t\t}\n\n\t\t\t\t$escape = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$newValue .= $c;\n\t\t}\n\n\t\tif ( ! $this->isLegalValue($newValue) ) {\n\t\t\tthrow new \\UnexpectedValueException(sprintf(\n\t\t\t\t'Illegal character in value on line: %s',\n\t\t\t\t$line\n\t\t\t));\n\t\t}\n\n\t\treturn [$name, $newValue];\n\t}", "private function parse_variables(&$package, $variables)\n {\n if (count($variables) > 1) {\n foreach ($variables as $variable) {\n $this->parse_variables_simple($package, $variable);\n }\n } else {\n $this->parse_variables_simple($package, $variables);\n }\n }", "protected static function handle_vars($content) {\n\t\treturn preg_replace('/{\\- VAR ([a-z_]+)\\: (.*?) \\-}/', '<?php \\$$1 = $2; ?>', $content);\n\t}", "function yy_r109()\n {\n $var = trim($this->yystack[$this->yyidx + - 2]->minor, '\\'');\n $this->_retvalue = \"\\$_scope->_tpl_vars->___config_var_{$var}\" . $this->yystack[$this->yyidx + 0]->minor;\n }", "function yy_r175(){ \n if ($this->yystack[$this->yyidx + 0]->minor instanceof Stmt\\VariablePlaceholder) {\n $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n } else if (is_array($this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = new Stmt\\Expr('column', $this->yystack[$this->yyidx + 0]->minor[0], $this->yystack[$this->yyidx + 0]->minor[1]); \n } else {\n $this->_retvalue = new Stmt\\Expr('column', $this->yystack[$this->yyidx + 0]->minor);\n }\n }", "function yy_r4(){\n $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor);\n $this->_retvalue = null;\n }", "function process_variable( $variable_string ) {\n\t\treturn $this->variable_processor()->process_field( '{{' . $variable_string . '}}', true );\n\t}", "private function _reducer ()\r\n {\r\n // (stored string or regexp) | +?+ ++? |\r\n //whitespace\r\n $reg = $this->_getRegex('whitespace', array(\r\n 'fbov' => $this->_IdRegex('fbov'),\r\n 'fbo' => $this->_IdRegex('fbo')\r\n ), true);\r\n $this->_script = preg_replace_callback($reg, array(&$this, '_spaceRemover'), $this->_script);\r\n \r\n $reg = preg_replace('#\\s+#','','\r\n for\\s*\\{;;\\}\r\n|\r\n (;\\})\r\n|\r\n (;+)(?=;)\r\n');\r\n \r\n if ($this->getConcatString()) {\r\n $reg .= '|'.$this->_IdRegex('s',true).'((?:\\+'.$this->_IdRegex('s').')+)';\r\n }\r\n \r\n $this->_script = preg_replace_callback('#'.$reg.'#', array(&$this, '_reducerOptimal'), $this->_script);\r\n }", "function assign_var_from_handle($varname, $handle)\n\t{\n\t\tob_start();\n\t\t$res = $this->pparse($handle);\n\t\t$this->vars[$varname] = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $res;\n\t}", "protected function processVariables(&$variables) {\n return $variables;\n }", "private function parseSettingsForEnvVariables()\n {\n foreach ($this->settings as $key => $value)\n {\n $this->settings[ $key ] = craft()->config->parseEnvironmentString($value);\n }\n }", "function ninesixtyrobots_preprocess(&$variables, $hook) {\n \t\tstatic $i;\n\t\tkpr($i . '' . $hook);\n\t\t$i++;\n }", "function yy_r13(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor)); }", "function findAndReplaceVariables($activity)\n{\n global $_server_domain_url;\n if (file_exists(SITE_URL_FOR_SHELL)) {\n include_once SITE_URL_FOR_SHELL;\n }\n $data = array(\n '##ORGANIZATION_LINK##' => $activity['organization_name'],\n '##CARD_LINK##' => '<a href=\"' . $_server_domain_url . '/#/board/' . $activity['board_id'] . '/card/' . $activity['card_id'] . '\">' . $activity['card_name'] . '</a>',\n '##LABEL_NAME##' => $activity['label_name'],\n '##CARD_NAME##' => '<a href=\"' . $_server_domain_url . '/#/board/' . $activity['board_id'] . '/card/' . $activity['card_id'] . '\">' . $activity['card_name'] . '</a>',\n '##DESCRIPTION##' => $activity['card_description'],\n '##LIST_NAME##' => $activity['list_name'],\n '##BOARD_NAME##' => '<a href=\"' . $_server_domain_url . '/#/board/' . $activity['board_id'] . '\">' . $activity['board_name'] . '</a>',\n '##USER_NAME##' => '<strong>' . $activity['full_name'] . '</strong>',\n '##CHECKLIST_ITEM_NAME##' => $activity['checklist_item_name'],\n '##CHECKLIST_ITEM_PARENT_NAME##' => $activity['checklist_item_parent_name'],\n '##CHECKLIST_NAME##' => $activity['checklist_name']\n );\n $comment = strtr($activity['comment'], $data);\n return $comment;\n}", "protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n }", "public function parse($line) {\r\n $data = array();\r\n \r\n foreach ($this->regx_parse as $types => $parser) {\r\n\t\t\t$subject = $this->_get_subject($parser,$data,$line);\r\n\t\t\t\r\n\t\t\tif ((!is_null($subject)) && (isset($parser['value']))) {\r\n\t\t\t\t$test = $parser['value'];\r\n\t\t\t\tpreg_match($test,$subject,$matches);\r\n\t\t\t\t\r\n\t\t\t\t$count = 1;\r\n $types = explode(' ',$types);\r\n foreach ($types as $type) {\r\n if (!empty($matches)) {\r\n $data[$type] = $matches[$count];\r\n } else {\r\n $data[$type] = null;\r\n }\r\n $count++;\r\n }\r\n\t\t\t\t\r\n\t\t\t}\r\n }\r\n \r\n return $data;\r\n }", "private function cleanUp() : void\n {\n\n // For every line.\n foreach ($this->contents as $lineId => $line) {\n\n // Test.\n preg_match('/( +)(\\*)( )(.+)/', $line, $output);\n\n // First option - this is proper comment line.\n // Second option - sth is wrong - ignore this line.\n if (isset($output[4]) === true && empty($output[4]) === false) {\n $this->contents[$lineId] = $output[4];\n } else {\n unset($this->contents[$lineId]);\n }\n }\n }", "abstract public function parse( $line );", "function yy_r71(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\\''. $this->yystack[$this->yyidx + -4]->minor .'\\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -7]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -2]->minor .')'.$this->yystack[$this->yyidx + 0]->minor; }", "function yy_r77(){ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,\"'\"))->nocache; }", "function yy_r209(){ $this->_retvalue = new Stmt\\VariablePlaceholder($this->yystack[$this->yyidx + 0]->minor); }", "abstract protected function prepareVars(array $data);", "private function _line( $line='' )\n {\n $output = array();\n\n if( is_string( $line ) )\n {\n $line = preg_replace( '/^Content\\-(Disposition|Type)\\:[\\ ]+/', 'content=', $line );\n $line = preg_replace( '/\\;\\s+/', '&', $line );\n $line = str_replace( '\"', '', $line );\n parse_str( $line, $output );\n }\n return $output;\n }", "private function processLine($line)\n {\n return\n '\"' .\n implode(\n \"\\\",\\\"\",\n array_map(\n function ($e) {\n if($e == '' || $e == 'NULL' || $e == null) return '\\\\N';\n return str_replace(\"\\n\", '\\n',\n $e\n );\n },\n $line\n )\n )\n . \"\\\"\\n\";\n }", "function yy_r69(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\\''. $this->yystack[$this->yyidx + -3]->minor .'\\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -1]->minor .')'; }", "function yy_r107()\n {\n $this->_retvalue = '$_scope->_tpl_vars->' . trim($this->yystack[$this->yyidx + - 2]->minor, \"'\") . '->' . $this->yystack[$this->yyidx + 0]->minor;\n }", "function yy_r45(){$this->_retvalue = '$_smarty_tpl->getStreamVariable(\\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\\')'; }", "private function _expandParamsValuesHandler($varName)\n {\n $staticVars = array(\n 'CONTEXT_NAME' => $this->name,\n );\n if (isset($staticVars[$varName])) {\n return $staticVars[$varName];\n }\n $value = $this->getParamByName($varName);\n if ($value === false) {\n return '';\n }\n return $value;\n }", "private function returnMappedValue($line) {\n\t//--\n\t$array = array();\n\t$key = $this->unquote(trim(substr($line, 0, -1)));\n\t$array[$key] = '';\n\t//--\n\treturn $array;\n\t//--\n}", "function drush_variable_realm_get($realm_name, $realm_key, $variable_name) {\n if ($variable_name) {\n $variables[$variable_name] = variable_realm_get($realm_name, $realm_key, $variable_name);\n }\n else {\n $variables = variable_realm($realm_name, $realm_key)->variable_list();\n }\n\n foreach ($variables as $name => $value) {\n drush_print_pipe(drush_format($value, $name, 'export'));\n drush_print(drush_format($value, $name));\n $returns[$name] = $value;\n }\n\n if (empty($variables)) {\n return drush_set_error('No matching variable found.');\n }\n else {\n return $returns;\n }\n}", "public function expandAll ()\n {\n foreach ($this->data as $key => $value) {\n // kopiruje funkcionalitu Cfg::expand()\n $this->data[$key] = preg_replace_callback('/%([a-z0-9_-]*)%/i',\n array($this, 'expandGet'),\n $value);\n }\n }", "function yy_r92(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -3]->minor.'\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\']').']'; }", "function _variableHandler($data)\r\n {\r\n if (preg_match('/\\$(\\w+)/', $data, $matches)) {\r\n return $GLOBALS[$matches[1]];\r\n } elseif (defined($data)) {\r\n return constant($data);\r\n } else {\r\n return '{'.$data.'}';\r\n }\r\n }", "function yy_r76(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + 0]->minor['index']);} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor['var'] .')->value'.$this->yystack[$this->yyidx + 0]->minor['index']; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],\"'\"))->nocache;} }", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strpos($blockname, '.') !== false)\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata;\n\t\t\tfor($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i] . '.'];\n\t\t\t\t$str = &$str[sizeof($str) - 1];\n\t\t\t}\n\n\t\t\t$s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// Now the tricky part, we always assign S_LAST_ROW and remove the entry before\n\t\t\t// This is much more clever than going through the complete template data on display (phew)\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Now we add the block that we're actually assigning to.\n\t\t\t// We're adding a new iteration to this block with the given variable assignments.\n\t\t\t$str[$blocks[$blockcount] . '.'][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Top-level block.\n\t\t\t$s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// We always assign S_LAST_ROW and remove the entry before\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Add a new iteration to this block with the variable assignments we were given.\n\t\t\t$this->_tpldata[$blockname . '.'][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "function yy_r208(){ $this->_retvalue = new Stmt\\VariablePlaceholder; }", "protected function processVariable(\n File $phpcsFile,\n $stackPtr\n ) {\n }", "function pagelines_less_var( $name, $value ){\n\t\n\tglobal $less_vars;\n\t\n\t$less_vars[$name] = $value;\n\t\n}", "function sugar_parse_values($line, $key) {\n $pair = explode(\"=\", $line);\n if (count($pair) > 1 && $pair[0] == $key) {\n $value = trim($pair[1]);\n if ($value) {\n return explode(\",\", $value);\n }\n }\n return NULL;\n}", "function saveVariables( $aForm, $sFile, $sVariable = 'config' ){\n if( is_file( $sFile ) && strstr( $sFile, '.php' ) ){\n $aFile = file( $sFile );\n $iCount = count( $aFile );\n $rFile = fopen( $sFile, 'w' );\n\n if( isset( $aForm['page_search'] ) && isset( $aForm['start_page'] ) && $aForm['start_page'] == $aForm['page_search'] ){\n $aForm['page_search'] = '';\n }\n\n for( $i = 0; $i < $iCount; $i++ ){\n foreach( $aForm as $sKey => $sValue ){\n if( preg_match( '/'.$sVariable.\"\\['\".$sKey.\"'\\]\".' = /', $aFile[$i] ) && strstr( $aFile[$i], '=' ) ){\n $mEndOfLine = strstr( $aFile[$i], '; //' );\n if( empty( $mEndOfLine ) ){\n $mEndOfLine = ';';\n }\n $sValue = changeSpecialChars( trim( str_replace( '\"', '&quot;', $sValue ) ) );\n if( preg_match( '/^(true|false|null)$/', $sValue ) ){\n $aFile[$i] = \"\\$\".$sVariable.\"['\".$sKey.\"'] = \".$sValue.$mEndOfLine;\n }\n else\n $aFile[$i] = \"\\$\".$sVariable.\"['\".$sKey.\"'] = \\\"\".$sValue.\"\\\"\".$mEndOfLine;\n }\n } // end foreach\n\n fwrite( $rFile, rtrim( $aFile[$i] ).( $iCount == ( $i + 1 ) ? null : \"\\r\\n\" ) );\n\n } // end for\n fclose( $rFile );\n }\n}", "function compile_compile_config($variable, &$object)\r{\r\t$_result\t= \"\";\r\r\t// remove the beginning and ending #\r\t$variable = substr($variable, 1, -1);\r\r\t// get [foo] and .foo and (...) pieces\t\t\t\r\tpreg_match_all('!(?:^\\w+)|(?:' . $object->_var_bracket_regexp . ')|\\.\\$?\\w+|\\S+!', $variable, $_match);\r\t$variable = $_match[0];\r\t$var_name = array_shift($variable);\r\r\t$_result = \"\\$this->_confs['$var_name']\";\r\tforeach ($variable as $var)\r\t{\r\t\tif ($var{0} == '[')\r\t\t{\r\t\t\t$var = substr($var, 1, -1);\r\t\t\tif (is_numeric($var))\r\t\t\t{\r\t\t\t\t$_result .= \"[$var]\";\r\t\t\t}\r\t\t\telseif ($var{0} == '$')\r\t\t\t{\r\t\t\t\t$_result .= \"[\" . $object->_compile_variable($var) . \"]\";\r\t\t\t}\r\t\t\telseif ($var{0} == '#')\r\t\t\t{\r\t\t\t\t$_result .= \"[\" . $object->_compile_config($var) . \"]\";\r\t\t\t}\r\t\t\telse\r\t\t\t{\r\t\t\t\t$_result .= \"['$var']\";\r\t\t\t}\r\t }\r\t else if ($var{0} == '.')\r\t {\r \t\t\t\tif ($var{1} == '$')\r\t\t\t{\r \t\t\t\t$_result .= \"[\\$this->_TPL['\" . substr($var, 2) . \"']]\";\r\t\t\t}\r\t \t\telse\r\t\t\t{\r\t\t \t\t$_result .= \"['\" . substr($var, 1) . \"']\";\r\t\t\t}\r\t\t}\r\t\telse if (substr($var,0,2) == '->')\r\t\t{\r\t\t\tif(substr($var,2,2) == '__')\r\t\t\t{\r\t\t\t\t$object->trigger_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);\r\t\t\t}\r\t\t\telse if (substr($var, 2, 1) == '$')\r\t\t\t{\r\t\t\t\t$_output .= '->{(($var=$this->_TPL[\\''.substr($var,3).'\\']) && substr($var,0,2)!=\\'__\\') ? $_var : $this->trigger_error(\"cannot access property \\\\\"$var\\\\\"\")}';\r\t\t\t}\r\t\t}\r\t\telse\r\t\t{\r\t\t\t$object->trigger_error('#' . $var_name.implode('', $variable) . '# is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);\r\t\t}\r\t}\r\treturn $_result;\r}", "protected function prepareVariables(ILess_Environment $env, array $variables)\n {\n // FIXME: flag to mark variables as prepared!\n $prepared = array();\n foreach ($variables as $name => $value) {\n // user provided node, no need to process it further\n if ($value instanceof ILess_Node) {\n $prepared[] = $value;\n continue;\n }\n // this is not an \"real\" variable\n if (!$value instanceof ILess_Variable) {\n $value = ILess_Variable::create($name, $value);\n }\n $prepared[] = $value->toNode();\n }\n\n if (count($prepared)) {\n $env->customVariables = new ILess_Node_Ruleset(array(), $prepared);\n }\n }", "private function _buildArray($variables)\n {\n $i = 0;\n $j = 0;\n foreach ($variables as $key => $section) {\n foreach ($section as $value) {\n // avoid first and last values, and tag elements\n if ($i == 0 || $i == count($variables[$key])\n || $value[0] == '<') {\n $i++;\n continue;\n } else {\n $variableParts = $this->cleanExplode(\"_\", $value);\n switch ($variableParts[0]) {\n case 'BLOCK':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['TYPE'] =\n $variableGroup[1];\n }\n break;\n\n case 'GROUP':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUPID'] =\n $variableGroup[1];\n }\n if (!empty ($variableGroup[2])) {\n //The group is nested inside other group\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[2];\n }\n break;\n\n case 'TAB':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['TYPE'] =\n $variableGroup[1];\n }\n break;\n\n case 'HEADING':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n break;\n\n case 'COMMENT':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[1];\n } elseif (!empty ($variableParts[2])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableParts[2];\n }\n break;\n\n case 'TEXT':\n case 'TEXTAREA':\n case 'SELECT':\n case 'DATE':\n self::$templateVariables[$key][$j]['TAG'] = $variableParts[0];\n $variableGroup = $this->cleanExplode(self::$_templateGroupSymbol, $variableParts[1]);\n self::$templateVariables[$key][$j]['NAME'] =\n $variableGroup[0];\n if (!empty ($variableGroup[1])) {\n self::$templateVariables[$key][$j]['GROUP'] =\n $variableGroup[1];\n }\n break;\n\n default:\n break;\n }\n $j++;\n }\n $i++;\n }\n }\n\n }", "private function process_line($line)\n\t{\n\t\tswitch($this->_state)\n\t\t{\n\t\t\tcase self::START:\n\t\t\t\tif(preg_match('/<h1>Class[ \\t]+(.+?)<\\/h1>/', $line, $matches))\n\t\t\t\t{\n\t\t\t\t\t$this->log(2, \" Class \".$matches[1]);\n\t\t\t\t\t$this->_cur_class = new ClassDef($matches[1]);\n\t\t\t\t\t$this->_state = self::IN_CLASS;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase self::IN_CLASS:\n\t\t\t\tif(preg_match('/Extends:.*<a ext:cls=\\\"(.+?)\\\"/', $line, $matches))\n\t\t\t\t{\n\t\t\t\t\t$this->log(2, \" :: Extends \".$matches[1]);\n\t\t\t\t\t$this->_cur_class->set_parent_class_name($matches[1]);\n\t\t\t\t}\n\t\t\t\telse if(preg_match('/<h2>(Config Options|Public Properties)<\\/h2>/', $line, $matches))\t\t\n\t\t\t\t{\n\t\t\t\t\t$this->_state = self::IN_PROPERTIES;\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\tbreak;\n\t\t\tcase self::IN_PROPERTIES:\n\t\t\t\t// TODO Differentiate between:\n\t\t\t\t// - Config Options\n\t\t\t\t// - Public Properties\n\t\t\t\tif(preg_match('/<b>(.+)<\\/b>[ \\t]*:[ \\t]*([A-Za-z0-9\\.\\/]+?)[ \\t]*<div class=\\\"mdesc\\\">/', $line, $matches))\n\t\t\t\t{\n\t\t\t\t\t$this->log(3, \" Property: \".$matches[1].\" (\".$matches[2].\")\");\n\t\t\t\t\t// TODO Handle default\n\t\t\t\t\t$class_name_parts = explode('.', $this->_cur_class->get_name());\t\t\t\t\t\n\t\t\t\t\t$property_name = &$matches[1];\n\t\t\t\t\t$static_property = false;\n\t\t\t\t\tif(false !== strpos($property_name, '.'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$property_name_parts = explode('.', $property_name);\n\t\t\t\t\t\t$c_c_n_p = count($class_name_parts);\n\t\t\t\t\t\t$c_p_n_p = count($property_name_parts);\n\t\t\t\t\t\t$offset = ($class_name_parts[0]=='Ext' ? 1 : 0);\n\t\t\t\t\t\tfor($i=0;$i<$c_c_n_p-$offset; $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($class_name_parts[$i+$offset] == $property_name_parts[0])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$offset += $i;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($c_c_n_p-$offset < $c_p_n_p)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$static_property = true;\n\t\t\t\t\t\t\tfor($i=0; $i<$c_c_n_p-$offset; $i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($class_name_parts[$i+$offset] != $property_name_parts[$i])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$static_property = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$this->_cur_class->set_property($property_name, '', $static_property, $matches[2]);\n\t\t\t\t}\n\t\t\t\telse if(preg_match('/<h2>Public Methods<\\/h2>/', $line, $matches))\t\t\n\t\t\t\t{\n\t\t\t\t\t$this->_state = self::IN_METHODS;\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\tbreak;\n\t\t\tcase self::IN_METHODS:\n\t\t\t\tif(preg_match('/<b>(.+)<\\/b>(.+)[ \\t]*<div class=\\\"mdesc\\\">/', $line, $matches))\n\t\t\t\t{\n\t\t\t\t\t// Extract parameters\n\t\t\t\t\t$raw_parameters_array = explode(',', $matches[2]);\n\t\t\t\t\t$method_name = $matches[1];\n\t\t\t\t\t$this->log(3, \" Method: \".$matches[1]);\n\t\t\t\t\t$args = array();\n\t\t\t\t\tforeach($raw_parameters_array as $raw_parameter)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(preg_match(\"/(\\[*)<code>([A-Za-z0-9\\.\\/]+)[ \\t]+(.+)<\\/code>/\", $raw_parameter, $matches))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->log(4, \" \".$matches[2].\": \".$matches[1].$matches[3]);\n\t\t\t\t\t\t\tif(false !== strpos($matches[3], 'etc.'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// TODO Handle variable number of arguments\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!ctype_alnum($matches[3][0]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$arg_type = $this->normalize_arg_type($matches[3]);\n\t\t\t\t\t\t\t\t\t$matches[3] = $matches[2];\n\t\t\t\t\t\t\t\t\t$matches[2] = $arg_type;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(false !== strpos($matches[3], '.'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// FIXME This assumes that we are only using internal consts...tssk tssk\n\t\t\t\t\t\t\t\t\t// On 2nd thought: ORLY?\n\t\t\t\t\t\t\t\t\tlist(, $arg_name) = explode('.', $matches[3]);\n\t\t\t\t\t\t\t\t\t$matches[3] = 'const_'.$arg_name;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reserved keywords\n\t\t\t\t\t\t\t\tif(in_array($matches[3], self::$RESERVED))\n\t\t\t\t\t\t\t\t\t$matches[3] = self::PREFIX.$matches[3];\n\t\t\t\t\t\t\t\t$args[$matches[3]] = new ArgDef($matches[3], $matches[2], ($matches[1]=='['));\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$class_name_parts = explode('.', $this->_cur_class->get_name());\n\t\t\t\t\t// Build constructor comparison object and compare\n\t\t\t\t\t$constructor = false;\n\t\t\t\t\t$method_name_parts = explode('.', $method_name);\n\t\t\t\t\t$c_c_n_p = count($class_name_parts);\n\t\t\t\t\t$c_m_n_p = count($method_name_parts);\n\t\t\t\t\tif($c_m_n_p <= $c_c_n_p)\n\t\t\t\t\t{\n\t\t\t\t\t\t$constructor = true;\n\t\t\t\t\t\tfor($i=1; $i<=$c_m_n_p; $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($class_name_parts[$c_c_n_p-$i] != $method_name_parts[$c_m_n_p-$i])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$constructor = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($constructor)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_cur_class->set_constructor_args($args);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$static_method = false;\n\t\t\t\t\t\t$offset = ($class_name_parts[0]=='Ext' ? 1 : 0);\n\t\t\t\t\t\tfor($i=0;$i<$c_c_n_p-$offset; $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($class_name_parts[$i+$offset] == $method_name_parts[0])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$offset += $i;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($c_c_n_p-$offset < $c_m_n_p)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$static_method = true;\n\t\t\t\t\t\t\tfor($i=0; $i<$c_c_n_p-$offset; $i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($class_name_parts[$i+$offset] != $method_name_parts[$i])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$static_method = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\n\n\t\t\t\t\t\tif($c_m_n_p>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($class_name_parts[$c_c_n_p-1] == $method_name_parts[0])\n\t\t\t\t\t\t\t\t$static_method = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!$static_method) $static_method = $this->is_special_case_static($method_name);\n\t\t\t\t\t\t$this->_cur_class->set_method($method_name, $args, $static_method);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(preg_match('/<h2>Public Events<\\/h2>/', $line, $matches))\t\t\n\t\t\t\t{\n\t\t\t\t\t// TODO Hmm this is dirty.\n\t\t\t\t\t$this->_classes[$this->_cur_class->get_name()] = $this->_cur_class;\n\t\t\t\t\t$this->_cur_class = null;\n\t\t\t\t\t$this->_state = self::START;\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}", "function variables($Name,$HostServer) { // Retourne la valeur de la variable $Name contenu dans config.pl\n if($HostServer==\"\") {\n\t $filename=\"/etc/backuppc/config.pl\";\n\t} else {\n\t $filename=\"/etc/backuppc/\".$HostServer.\".pl\";\n\t}\n\n\tif (file_exists(\"$filename\")) { //Si le fichier existe on recherche les valeurs\n\t $lignes = file(\"$filename\");\n\t foreach ($lignes as $num => $ligne) {\n\t if (preg_match (\"/$Conf{$Name}.*=(.*);/\",$ligne, $reg)) {\n\t\t\t if (preg_match (\"/\\[(.*)\\]/\",$reg[1],$reg2)) {\n\t\t\t \t$variable = trim ($reg2[1]);\n\t\t\t\treturn $variable;\n\t\t\t }\t \n\t\t if (preg_match(\"/'(.*)'/\",$reg[1],$reg2)) {\n\t\t\t \t $variable = trim($reg2[1]);\n\t\t\t return $variable;\n\t\t\t }\n\t\t\t $variable = trim($reg[1]); \n\t\t\t return $variable; \n\t }\n\t\t\t if (preg_match (\"/$Name.*=>(.*),/\",$ligne,$reg)) {\n\t\t\t \t$variable = trim($reg[1]);\n\t\t\t \treturn $variable;\n\t\t\t}\t\n\t }\n\t}\n}", "function yy_r79(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\\''. $this->yystack[$this->yyidx + -1]->minor .'\\')'; }", "function yy_r91(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\'][\\'index\\']').']'; }", "protected function processVariable(File $phpcsFile, $stackPtr)\n {\n\n }", "protected function parseVars($template) {\n\t\t$template = preg_replace_callback(\n\t\t\t'/\\{\\$(.*?)\\}/is',\n\t\t\tfunction ($matches) {\n\t\t\t\treturn $this->assignVar($matches[1]);\n\t\t\t},\n\t\t\t$template\n\t\t); // {$var}\n\t\treturn $template;\n\t}", "public function HandleVariables($value, $replaces)\n {\n $result = $value;\n if (!is_array($result)) {\n if (preg_match_all(\"/%%([A-Z0-9_:]+)%%/\", $result, $match) !== false) {\n if (is_array($match) && is_array($match[0])) {\n foreach ($match[0] as $k => $v) {\n $var = str_replace(\"%%\", \"\", $v);\n $var = strtolower($var);\n list($section, $key) = explode(\":\", $var);\n \n $varValue = null;\n if ($section == \"var\") {\n if (array_key_exists($key, $replaces)) {\n $varValue = $replaces[$key];\n }\n }\n if (!isset($varValue)) {\n $varValue = $this->Get($section, $key, \"\");\n }\n $result = str_replace($v, $varValue, $result);\n }\n }\n }\n }\n return $result;\n }", "function fillVariableIfActivated($strNeedle, $strReplace, $strHaystack, $boolActivated)\n {\n if ($boolActivated) {\n return preg_replace('/\\{'.$strNeedle.'\\}/mi', $strReplace, $strHaystack);\n }\n return $strHaystack;\n }", "function extract_attrs($line) {\n if (preg_match(self::REGEX_ATTR, $line)) {\n return preg_replace(self::REGEX_ATTR, ' \\1', $line);\n }\n }", "protected function addBootstrapVariables()\n {\n $objFile = new \\File($this->getBootstrapSrc('variables.less'));\n\n $strVariables = '';\n\n if ($objFile->size > 0)\n {\n $strVariables = $objFile->getContent();\n }\n\n if (!is_array($this->variablesOrderSRC))\n {\n return;\n }\n\n $objTarget = new \\File($this->getBootstrapCustomSrc($this->variablesSrc));\n\n // overwrite bootstrap variables with custom variables\n $objFilesModels = \\FilesModel::findMultipleByUuids($this->variablesOrderSRC);\n\n if ($objFilesModels !== null)\n {\n while ($objFilesModels->next())\n {\n $objFile = new \\File($objFilesModels->path);\n $strContent = $objFile->getContent();\n\n if ($this->isFileUpdated($objFile, $objTarget))\n {\n $this->rewrite = true;\n $this->rewriteBootstrap = true;\n if ($strContent)\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n else\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n }\n\n if ($this->rewriteBootstrap)\n {\n $objTarget->write($strVariables);\n $objTarget->close();\n }\n\n $this->objLess->parse($strVariables);\n }", "function yy_r80(){$this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; }", "function yy_r1(){\n $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null;\n }", "function yy_r3(){\r\n if ($this->compiler->has_code) {\r\n $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array();\r\n $this->_retvalue = $this->cacher->processNocacheCode($tmp.$this->yystack[$this->yyidx + 0]->minor, $this->compiler,true);\r\n } else { $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;} $this->compiler->has_variable_string = false; }", "function associateVariablesWithBlocks() {\n $varRefNo = 0;\n $activeBlockNo = 0;\n $nextBlockNo = 1;\n while ($varRefNo < $this->varRefTabCnt) {\n $vrtr =& $this->varRefTab[$varRefNo];\n $varRefTPos = $vrtr['tPosBegin'];\n $varNo = $vrtr['varNo'];\n if ($varRefTPos >= $this->blockTab[$activeBlockNo]['tPosEnd']) {\n $activeBlockNo = $this->blockTab[$activeBlockNo]['parentBlockNo'];\n continue; }\n if ($nextBlockNo < $this->blockTabCnt) {\n if ($varRefTPos >= $this->blockTab[$nextBlockNo]['tPosBegin']) {\n $activeBlockNo = $nextBlockNo;\n $nextBlockNo += 1;\n continue; }}\n $btr =& $this->blockTab[$activeBlockNo];\n if ($varRefTPos < $btr['tPosBegin'])\n $this->programLogicError(1);\n $blockVarNo = $btr['blockVarCnt']++;\n $btr['blockVarNoToVarNoMap'][$blockVarNo] = $varNo;\n if ($btr['firstVarRefNo'] == -1)\n $btr['firstVarRefNo'] = $varRefNo;\n $vrtr['blockNo'] = $activeBlockNo;\n $vrtr['blockVarNo'] = $blockVarNo;\n $varRefNo += 1; }}", "function pre(...$vars)\n {\n foreach ($vars as $var) {\n echo '<pre>';\n print_r($var);\n echo '</pre>';\n }\n }", "function cps_changeset_publish_batch_variables(&$context) {\n $item = $context['results']['entity'];\n foreach ($item->variables as $name => $value) {\n db_merge('variable')->key(array('name' => $name))->fields(array('value' => serialize($value)))->execute();\n }\n cache_clear_all('variables', 'cache_bootstrap');\n $context['message'] = t('Publishing variables');\n}", "function\tfunc_decoupage($line)\n{\n $delimiter = ' ';\n $string = $line;\n return (explode(' ', $string));\n}", "function var_identify($arg1){\n global $token;\n $error_val = False;\n\n get_token();\n if($token->type >= tokenType::f_gf && $token->type <= tokenType::f_tf){\n upper_scan($token->data, 0);\n $arg1->addAttribute('type', 'var');\n $arg1[0] = $token->data;\n get_token();\n if($token->type === tokenType::marker){\n $arg1[0] .= $token->data;\n get_token();\n if($token->type !== tokenType::identifier){\n if(!preg_match(\"/^[a-zA-Z_\\-\\$&%\\*!?][a-zA-Z_\\-\\$&%\\*!?0-9]*$/\", $token->data)){\n fwrite(STDERR,\"ERROR : LEX : detected lexical error in: $token->data\\n\");\n exit(23);\n }\n if(!is_keyword(tokenType::identifier)){\n $error_val = True;\n }\n }\n $arg1[0] .= $token->data;\n }\n else $error_val = True;\n }\n else $error_val = True;\n\n if($error_val){\n fwrite(STDERR, \"ERROR : SYNTAX : Variable <var> expected : last token: $token->data $token->type\\n\");\n exit(23);\n }\n }", "function GetEnvVars($list,$s_line_feed)\n{\n\tglobal\t$VALID_ENV,$sServerVars;\n\n $output = \"\";\n for ($ii = 0 ; $ii < count($list) ; $ii++)\n\t{\n\t $name = $list[$ii];\n\t\tif ($name && array_search($name,$VALID_ENV,true) !== false)\n\t\t{\n\t\t\t\t//\n\t\t\t\t// if the environment variable is empty or non-existent, try\n\t\t\t\t// looking for the value in the server vars.\n\t\t\t\t//\n\t\t\tif (($s_value = getenv($name)) === \"\" || $s_value === false)\n\t\t\t\tif (isset($sServerVars[$name]))\n\t\t\t\t\t$s_value = $sServerVars[$name];\n\t\t\t\telse\n\t\t\t\t\t$s_value = \"\";\n\t\t $output .= $name.\"=\".$s_value.$s_line_feed;\n\t\t}\n\t}\n return ($output);\n}", "private function returnMappedSequence($line) {\n\t//--\n\t$array = array();\n\t$key = $this->unquote(trim(substr($line, 1, -1)));\n\t$array[$key] = array();\n\t$this->delayedPath = array(strpos($line, $key) + $this->indent => $key);\n\t//--\n\treturn array($array);\n\t//--\n}", "private function digest_content($file, $input_line) \n {\n foreach (static::$object_attributes as $property => $process_attributes) {\n list($regex, $type) = $process_attributes;\n // Process fields by regex\n if ($type == self::REGEX) {\n if (preg_match($regex, $input_line, $output_array)) {\n $this->{$property} = $output_array[1];\n } else {\n $file->__destruct();\n Error::set(Error::ERROR_ATTR_NOT_FOUND, [$property, $input_line], Error::ERROR);\n }\n // Process free text fields\n } elseif ($type == self::FREE_TEXT) {\n $string_separated = explode(Build::FIELD_DELIMITER, $input_line);\n list($regex, $type, $final_regex) = $process_attributes;\n $content_line = '';\n $content_found = false;\n\n // Wrap all the content beetween the $regex and the $final_refex\n foreach ($string_separated as $line) {\n if (preg_match($regex, $line, $output_array)) {\n // Remove the beginning tag\n $content_line .= preg_replace($regex, \"\", $line);\n $content_found = true;\n continue;\n }\n\n if (preg_match($final_regex, $line, $output_array)) {\n break;\n }\n\n if ($content_found) {\n // Remove the first white space\n $content_line .= preg_replace(\"/^\\s/\", \"\", $line);\n }\n }\n\n if (empty($content_line)) {\n $file->__destruct();\n Error::set(Error::ERROR_ATTR_NOT_FOUND, [$property, $input_line], Error::ERROR);\n } else {\n $this->{$property} = $content_line;\n }\n } else {\n $file->__destruct();\n Error::set(Error::DIGEST_METHOD_NOT_FOUND, [$type], Error::ERROR);\n }\n }\n\n return true;\n }", "function loadAsVar($inc) {\n\t$src = PHP_EOL;\n\t\n\tforeach ($inc as $var => $f) {\n\t\tif (!file_exists($f)) throw new Exception('File doesn\\'t exist: '.$f);\n\t\t$fSrc = file_get_contents($f);\n\t\t$addVar = '$'.$var.' = \\''.str_replace('\\'', '\\\\\\'', $fSrc).'\\';';\n\t\t$src .= $addVar.PHP_EOL;\n\t}\n\t\n\treturn $src;\n}", "private static function parseVariable(mixed $var, int $level = 0, array &$cache = []): string {\n return match (gettype($var)) {\n 'boolean' => $var ? 'true' : 'false',\n 'integer', 'double' => \"$var\",\n 'string' => \"'\".str_replace(\"'\", \"\\'\", $var).\"'\",\n 'resource' => '{resource}',\n 'NULL' => 'null',\n 'unknown type' => '{unknown}',\n 'array' => static::parseArray($var, $level),\n 'object' => static::parseObject($var, $level, $cache),\n default => '{unhandled}',\n };\n }", "function repeatVars(){\n\n\t\treturn FALSE;\n\t\n}", "private function _extractParts($value) {}", "public function expand()\r\n\t{\r\n\t\treturn $this->context->parser->compile($this->block);\r\n\t}", "function variables_from_string($markup) {\r\n\t\t$regexp = new LiquidRegexp('/\\s*('.LIQUID_QUOTED_FRAGMENT.')\\s*/');\r\n\t\t$parts = explode(',', $markup);\r\n\t\t$result = array();\r\n\t\t\r\n\t\tforeach($parts as $part) {\r\n\t\t\t$regexp->match($part);\r\n\t\t\t\r\n\t\t\tif ($regexp->matches[1]) {\r\n\t\t\t\t$result[] = $regexp->matches[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t\t\r\n\t}" ]
[ "0.60124177", "0.56907666", "0.5282981", "0.52580804", "0.52520865", "0.51870656", "0.51722807", "0.5136417", "0.5132015", "0.4980319", "0.49390534", "0.48422295", "0.48050427", "0.47341156", "0.4714324", "0.46481574", "0.46415797", "0.46329415", "0.46173722", "0.46025094", "0.46009666", "0.45972934", "0.45950463", "0.4586554", "0.4576947", "0.45253402", "0.4505542", "0.4492057", "0.44822472", "0.4481762", "0.4480812", "0.44781432", "0.44747403", "0.44706294", "0.4435516", "0.44177175", "0.4414462", "0.44099438", "0.44073817", "0.44020468", "0.4398291", "0.43877387", "0.43730074", "0.43721437", "0.4371795", "0.4363795", "0.43532926", "0.43508443", "0.43441653", "0.4342057", "0.4340747", "0.43400842", "0.43381882", "0.43214336", "0.4320611", "0.43165025", "0.4313713", "0.4304737", "0.43004996", "0.4299836", "0.4292688", "0.4284026", "0.4275429", "0.42679188", "0.4265887", "0.42595735", "0.4258909", "0.42574587", "0.42571577", "0.42539448", "0.42520738", "0.42496306", "0.42491612", "0.42432544", "0.4226862", "0.4222091", "0.42161226", "0.42085922", "0.4197739", "0.41944787", "0.4193385", "0.41930676", "0.41926324", "0.4190463", "0.41841942", "0.41814905", "0.41810414", "0.41810098", "0.4175748", "0.41749173", "0.41708618", "0.41701737", "0.41657907", "0.41462094", "0.4141478", "0.4132533", "0.4130568", "0.4129389", "0.4127525", "0.4122235", "0.4117644" ]
0.0
-1
Process a variable and if does not exist: expand as 'object', 'array' or 'leaf' at a position, otherwise move to the next position.
private static function &ev_next(Array &$curr_pos, mixed $next, String $current, Array $values): Array{ if(!strcmp($current,'*') && !strcmp($next,'*')) throw new \Exception('Two or more * cannot follows each other', 400); if($next === false){ if(!strcmp($current,'*')) throw new \Exception('Last elt cannot be a *', 400); $curr_pos[$current] = $expandValidator[$current] = ExpandValidatorLeaf::build(ExpandValidatorLeaf::KEY, $values); return $curr_pos; } if(!strcmp($current,'*')) return $curr_pos; $is_in = array_key_exists($current,$curr_pos); if(!strcmp($next,'*')){ if(!$is_in) $curr_pos[$current] = ExpandValidatorArray::build(); return $curr_pos[$current][ExpandValidatorArray::FIELD][ExpandValidatorObject::FIELD]; } //Overwrites the variable if the type is not an object where an object is expected. if(!$is_in || !array_key_exists(ExpandValidatorObject::FIELD, $curr_pos[$current])) $curr_pos[$current] = ExpandValidatorObject::build(); return $curr_pos[$current][ExpandValidatorObject::FIELD]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mawk_process_var (&$expr) {\n \n switch ($expr[0]) {\n \n case OP_RUN_VAR :\n \n $val = @$GLOBALS['mawk_vars'][$expr[1]];\n $start = 2;\n break;\n \n case OP_FIELD_VAR :\n \n $val = @$GLOBALS['mawk_data'][$expr[1]][$expr[2]];\n $start = 3;\n break;\n \n case OP_INDEX_VAR :\n \n \n # get the values\n \n $source_idx = $expr[1];\n $index_idx = $expr[2];\n \n $key = $opd1[3];\n \n if (is_array ($key))\n $key = mawk_process_expression ($key);\n\n $field_idx = $opd1[4];\n \n if (is_array ($field_idx))\n $field_idx = mawk_process_expression ($field_idx);\n \n \n # process values\n \n if (!(is_string ($key) || is_numeric ($key)))\n mawk_error (\"index var key is not a string or a number\");\n \n if (!is_integer ($field_idx)) {\n \n $field_name = $field_idx;\n \n if (!is_string ($field_name))\n mawk_error (\"index var field index is not an integer or a string\");\n \n $field_idx = @$GLOBALS['mawk_fields'][$source_idx][$index_idx][$field_name];\n \n if (!is_int ($field_idx))\n mawk_error (\"index var field '$field_name' does not exist\");\n }\n \n $val = $GLOBALS['mawk_indexes'][$source_idx][$index_idx][$key][$field_idx];\n $start = 5;\n }\n \n \n # get sub arrays\n \n $expr_count = count ($expr);\n \n for ($i=$start; $i<$expr_count; $i++) {\n \n $key = mawk_process_expression ($expr[$i]);\n $val = @$val[$key];\n \n if ($val === null)\n return null;\n }\n \n return $val;\n}", "protected function replaceRecursive($var, $level = 0) {\n\n $level++;\n\n foreach($var as $key => $value) {\n\n if (is_array($value)) {\n\n $this->debug && drush_print(\n t(\n 'Key !key is Array',\n array(\n '!key' => $key\n )\n ),\n $level\n );\n\n $var[$key] = $this->replaceRecursive($value, $level);\n\n }\n elseif (\n is_object($value)\n && get_class($value) == 'stdClass'\n && $this->filterObjects\n ) {\n\n $this->debug && drush_print(\n t(\n 'Key !key is stdClass Object',\n array(\n '!key' => $key\n )\n ),\n $level\n );\n\n $obj_as_array = (array)$value;\n $obj_as_array = $this->replaceRecursive($obj_as_array, $level);\n\n foreach($obj_as_array as $obj_key => $obj_value) {\n $value->{$obj_key} = $obj_value;\n }\n\n $var[$key] = $value;\n\n }\n elseif (is_object($value)) {\n\n // Skip any non-stdClass objects, as we can't process them without\n // up front knowledge of their class structure.\n (!$this->filterObjects || $this->debug) && drush_print(\n t(\n 'Key !key is !type Object (skipped)',\n array(\n '!key' => $key,\n '!type' => get_class($value)\n )\n ),\n $level\n );\n\n }\n else {\n\n /**\n * Check if the value is literally a serialized FALSE. To prevent\n * confusion when unserialize() returns FALSE on fail, we skip over the\n * unserialize code if the value is already FALSE.\n */\n if ($value == serialize(FALSE)) {\n continue;\n }\n\n if (preg_match(\"/^(i|s|a|o|d):(.*);/si\", $value)) {\n\n // The string value looks like its serialized, so let's try\n // unserialization.\n $unserialized = @unserialize($value);\n\n if ($unserialized === FALSE) {\n\n /**\n * If a literal FALSE is thrown at this point, it couldn't\n * unserialize. Try to fix up string lengths and try again.\n * If it still doesn't work after that, the data's too dirty\n * to use.\n */\n $error_message = t(\n 'Bad serialized data, trying to fix: key = !key, value = !value',\n array(\n '!key' => $key,\n '!value' => $value,\n )\n );\n\n drush_print($error_message);\n\n $value = $this->recalcSerializedStringLen($value);\n $unserialized = @unserialize($value);\n\n }\n\n if ($unserialized === FALSE) {\n\n /**\n * I make that a double fault. Thus, it's throw an exception time\n * if debugging, or simply output the error and continue if not.\n */\n\n $error_message = t(\n 'Failed unserialization! key = !key, value = !value',\n array(\n '!key' => $key,\n '!value' => $value,\n )\n );\n\n if ($this->debug) {\n throw new UnexpectedValueException($error_message);\n }\n else {\n drush_print($error_message);\n continue;\n }\n\n }\n elseif (is_array($unserialized)) {\n\n $this->debug && drush_print(\n t(\n 'Key !key is serialized Array',\n array(\n '!key' => $key\n )\n ),\n $level\n );\n\n $tmp = $this->replaceRecursive($unserialized, $level);\n $var[$key] = serialize($tmp);\n\n }\n elseif (\n is_object($unserialized)\n && get_class($unserialized) == 'stdClass'\n && $this->filterObjects\n ) {\n\n $this->debug && drush_print(\n t(\n 'Key !key is serialized stdClass Object',\n array(\n '!key' => $key\n )\n ),\n $level\n );\n\n $obj_as_array = (array)$unserialized;\n $obj_as_array = $this->replaceRecursive($obj_as_array, $level);\n\n foreach($obj_as_array as $obj_key => $obj_value) {\n $unserialized->{$obj_key} = $obj_value;\n }\n\n $var[$key] = serialize($unserialized);\n\n }\n elseif (is_object($unserialized)) {\n\n // Skip any non-stdClass objects, as we can't process them without\n // up front knowledge of their class structure.\n (!$this->filterObjects || $this->debug) && drush_print(\n t(\n 'Key !key is serialized !type Object (skipped)',\n array(\n '!key' => $key,\n '!type' => get_class($unserialized)\n )\n ),\n $level\n );\n\n }\n else {\n\n // It's a serialized string. The 'variable' table uses a lot of\n // these as it passes everything through serialize()\n // irrespective of what it actually is.\n $this->debug && drush_print(\n t(\n 'Key !key is Value',\n array(\n '!key' => $key\n )\n ),\n $level\n );\n\n foreach($this->filters as $filter) {\n $unserialized = $filter->execute($unserialized);\n }\n\n $var[$key] = serialize($unserialized);\n\n }\n\n }\n else {\n\n // It's not serialized data, it's just a plain string value.\n $this->debug && drush_print(\n t(\n 'Key !key is Value',\n array(\n '!key' => $key\n )\n ),\n $level\n );\n\n foreach($this->filters as $filter) {\n $value = $filter->execute($value);\n }\n\n $var[$key] = $value;\n\n }\n\n }\n }\n\n return $var;\n\n }", "static function convert_deep($variable,$parseObject=true){\n\t\tif(is_object($variable)){\n\t\t\tif($parseObject){\n\t\t\t\t$parts = self::from_object($variable);\n\t\t\t\tforeach($parts as $k=>$part){\n\t\t\t\t\t$return[$k] = self::convert($part,false);\n\t\t\t\t}\n\t\t\t\treturn $return;\n\t\t\t}elseif(method_exists($variable,'__toString')){\n\t\t\t\treturn (string)$variable;\n\t\t\t}\n\t\t}elseif(is_array($variable)){\n\t\t\tforeach($variable as $k=>$part){\n\t\t\t\t$return[$k] = self::convert($part,false);\n\t\t\t}\n\t\t\treturn $return;\n\t\t}else{\n\t\t\treturn $variable;\n\t\t}\n\t}", "function assign( $variable, $value = null ){\n\n\t\tif( is_array( $variable ) )\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\telseif( is_object( $variable ) ){\n\t\t\t$variable = get_object_vars( $variable );\n\t\t\tforeach( $variable as $name => $value )\n\t\t\t\t$this->variables[ $name ] = $value;\n\t\t}\n\t\telse\n\t\t\t$this->variables[ $variable ] = $value;\n\t}", "private static function parseVariable(mixed $var, int $level = 0, array &$cache = []): string {\n return match (gettype($var)) {\n 'boolean' => $var ? 'true' : 'false',\n 'integer', 'double' => \"$var\",\n 'string' => \"'\".str_replace(\"'\", \"\\'\", $var).\"'\",\n 'resource' => '{resource}',\n 'NULL' => 'null',\n 'unknown type' => '{unknown}',\n 'array' => static::parseArray($var, $level),\n 'object' => static::parseObject($var, $level, $cache),\n default => '{unhandled}',\n };\n }", "function tie_var($var_name, &$var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\t$list = array_keys($var_value);\r\n\t\t\tforeach($list as $key)\r\n\t\t\t{\r\n\t\t\t\t$this->tie_var($var_name . '.' . $key, $var_value[$key]); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] =& $var_value;\r\n\t\t}\r\n\t}", "public function resolve($variable)\n {\n $orm = $this->container\n ->get('doctrine.orm.default_entity_manager');\n\n $options = $variable->getOptions();\n if ($variable->getContent()) {\n return $orm\n ->getRepository($options['model'])\n ->findEager($variable->getContent());\n }\n\n return null;\n }", "function set( $varname, $value, $scope='', $obj_to_array=0 ){\n global $FUNCS;\n\n if( is_null($value) ){ $value = ''; }\n elseif( is_bool($value) ){ $value = (int)$value; }\n elseif( $obj_to_array && (is_array($value) || is_object($value)) ){\n $value = $FUNCS->json_decode( $FUNCS->json_encode($value) ); // recursively converts all objects to arrays\n }\n\n if( strpos($varname, '.')===false ){\n return $this->_set( $varname, $value, $scope );\n }\n\n // we are dealing with arrays now e.g \"zoo.mammals.dogs.small\"\n $keys = array_map( \"trim\", explode('.', $varname) );\n $varname = array_shift( $keys );\n\n $parent = null;\n switch( $scope ){\n case \"global\":\n $parent = &$this->ctx[0]['_scope_'][$varname];\n break;\n case \"parent\":\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) && isset($this->ctx[$x]['_scope_'][$varname]) ){\n $parent = &$this->ctx[$x]['_scope_'][$varname];\n break 2;\n }\n }\n default:\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) ){\n $parent = &$this->ctx[$x]['_scope_'][$varname];\n break;\n }\n }\n }\n\n $cnt_keys = count( $keys );\n for( $x=0; $x<$cnt_keys; $x++ ){\n $key = $keys[$x];\n\n if( is_array($parent) ){\n if( $x==$cnt_keys-1 ){\n if( $key=='' ){\n //$key=count( $parent );\n $tmp = array_filter( array_keys($parent), 'is_int' );\n $key = ( count($tmp) ) ? max($tmp)+1 : 0;\n }\n $parent[$key] = $value;\n }\n else{\n $tmp = &$parent[$key];\n unset( $parent );\n $parent = &$tmp;\n unset( $tmp );\n }\n }\n else{\n return;\n }\n }\n }", "function cellar_door_preprocess_search_result(&$vars){\n $node_obj = $vars['result']['node'];\n\n}", "function minim_preprocess_node(&$vars) { \n $type = $vars['node']->getType();\n if (!empty($type)) {\n $function = __FUNCTION__ . '_' . $type;\n if (function_exists($function)) {\n $function($vars, $hook);\n }\n }\n}", "public function assign($var, $value = null)\n {\n if (is_string($var)) {\n $this->_vars[$var] = $value;\n\n return $this;\n }\n\n if (is_array($var)) {\n foreach ($var as $key => $value) {\n if ($value instanceof AbstractClassContent) {\n // trying to load subcontent\n $subcontent = $this->entityManager->getRepository(ClassUtils::getRealClass($value))\n// @TODO gvf\n// ->load($value, $this->getApplication()->getBBUserToken());\n ->load($value);\n if (null !== $subcontent) {\n $value = $subcontent;\n }\n }\n\n $this->_vars[$key] = $value;\n }\n }\n\n return $this;\n }", "private function parse_variables_simple(&$package, &$variable)\n {\n $name = $variable['@attributes']['name'];\n $value = $variable['@attributes']['value'];\n $os = isset($variable['@attributes']['os']) ? $variable['@attributes']['os'] : null;\n $arch = isset($variable['@attributes']['architecture']) ? $variable['@attributes']['architecture'] : null;\n\n $package->withVariable($name, $value, $os, $arch);\n }", "function smarty_modifier_debug_print_var( $var, $depth = 0, $length = 40 )\r\n{\r\n $_replace = array( \"\\n\" => \"<i>\\\\n</i>\", \"\\r\" => \"<i>\\\\r</i>\", \"\\t\" => \"<i>\\\\t</i>\" );\r\n switch ( gettype( $var ) )\r\n {\r\n case \"array\" :\r\n $results = \"<b>Array (\".count( $var ).\")</b>\";\r\n foreach ( $var as $curr_key => $curr_val )\r\n {\r\n $results .= \"<br>\".str_repeat( \"&nbsp;\", $depth * 2 ).\"<b>\".strtr( $curr_key, $_replace ).\"</b> =&gt; \".smarty_modifier_debug_print_var( $curr_val, ++$depth, $length );\r\n $depth--;\r\n }\r\n break;\r\n case \"object\" :\r\n $object_vars = get_object_vars( $var );\r\n $results = \"<b>\".get_class( $var ).\" Object (\".count( $object_vars ).\")</b>\";\r\n foreach ( $object_vars as $curr_key => $curr_val )\r\n {\r\n $results .= \"<br>\".str_repeat( \"&nbsp;\", $depth * 2 ).\"<b> -&gt;\".strtr( $curr_key, $_replace ).\"</b> = \".smarty_modifier_debug_print_var( $curr_val, ++$depth, $length );\r\n $depth--;\r\n }\r\n break;\r\n case \"boolean\" :\r\n case \"NULL\" :\r\n case \"resource\" :\r\n if ( TRUE === $var )\r\n {\r\n $results = \"true\";\r\n }\r\n else if ( FALSE === $var )\r\n {\r\n $results = \"false\";\r\n }\r\n else if ( NULL === $var )\r\n {\r\n $results = \"null\";\r\n }\r\n else\r\n {\r\n $results = htmlspecialchars( ( boolean )$var );\r\n }\r\n $results = \"<i>\".$results.\"</i>\";\r\n break;\r\n case \"integer\" :\r\n case \"float\" :\r\n $results = htmlspecialchars( ( boolean )$var );\r\n break;\r\n case \"string\" :\r\n $results = strtr( $var, $_replace );\r\n if ( $length < strlen( $var ) )\r\n {\r\n $results = substr( $var, 0, $length - 3 ).\"...\";\r\n }\r\n $results = htmlspecialchars( \"\\\"\".$results.\"\\\"\" );\r\n break;\r\n case \"unknown type\" :\r\n default :\r\n do\r\n {\r\n $results = strtr( ( boolean )$var, $_replace );\r\n if ( $length < strlen( $results ) )\r\n {\r\n $results = substr( $results, 0, $length - 3 ).\"...\";\r\n }\r\n $results = htmlspecialchars( $results );\r\n break;\r\n } while ( 1 );\r\n }\r\n return $results;\r\n}", "function AE_decode(&$dest, $var)\n{\n\t$items = explode(\"_AE_\", $var);\n\tif (count($items) <= 1) return;\n\n\t$current = &$dest;\n\tforeach ($items as $key)\n\t{\n\t\t$current = &$current[$key];\n\t}\n\n\tif (is_array($dest[$var]))\n\t{\n\t\t$current = atk_array_merge_recursive((array)$current, $dest[$var]);\n\t}\n\telse\n\t{\n\t\t$current = $dest[$var];\n\t}\n\n\tunset($dest[$var]);\n}", "public function bindVariable($name, qti_variable &$variable) {\n switch ($variable->cardinality) {\n case 'single':\n if( $submittedvalue = $this->get($name)) {\n $variable->value = $submittedvalue;\n if ($variable->type == 'directedPair') {\n // Gap is target, value is source\n foreach($submittedvalue as $target => $source) {\n $variable->value = \"$source $target\";\n break; // There should be only one\n }\n } else if ($variable->type == 'boolean') {\n $variable->value = ($submittedvalue == 'true');\n } \n }\n break;\n case 'multiple':\n if($submittedvalue = $this->get($name)) {\n if (is_array($submittedvalue)) {\n $variable->value = $submittedvalue;\n } else {\n $variable->value = array($submittedvalue);\n }\n if ($variable->type == 'directedPair') {\n $variable->value = array();\n // Gap is target, value is source\n // This is a bit over-complicated to deal with matchInteraction\n foreach($submittedvalue as $target => $source) {\n if (!is_array($source)) {\n $source = array($source);\n }\n foreach($source as $s) {\n $variable->value[] = \"$s $target\";\n }\n }\n } else if ($variable->type == 'point') {\n $variable->value = explode(',', $submittedvalue);\n }\n }\n break;\n case 'ordered':\n /* Ordered variables use inputs with names like:\n * RESPONSE[choiceA] which have integer values giving\n * the order\n * \n * TODO: Deal with unset options\n */\n $values = $this->get($name);\n $values = array_flip($values);\n ksort($values);\n $variable->value = array_values($values);\n break;\n default:\n throw new Exception('qti_http_response_source does not support variable cardinality ' . $variable->cardinality);\n }\n \n }", "public function setVariable($key, $value, & $data) {\n\n if (strpos($key, $this->scopeGlue) === false) {\n $parts = explode('.', $key);\n } else {\n $parts = explode($this->scopeGlue, $key);\n }\n\n $i = 0;\n $count = count($parts);\n $d = & $data;\n\n while ($i < $count) {\n\n $key_part = $parts[$i];\n $key_part_int = filter_var($key_part, FILTER_VALIDATE_INT);\n $key_part_is_int = $key_part_int !== false;\n $set_value = ($i + 1) == $count;\n\n if ($key_part_is_int && is_object($d)) {\n $d = (array) $d;\n }\n\n if (!is_array($d) && !is_object($d)) {\n $d = array();\n }\n\n if (is_array($d)) {\n\n if ($key_part_is_int && !array_key_exists($key_part, $d)) {\n $key_part = $key_part_int;\n }\n\n if ($set_value) {\n\n $d[$key_part] = $value;\n\n } else {\n\n if (!isset($d[$key_part])) {\n $d[$key_part] = array();\n }\n\n $d = & $d[$key_part];\n }\n\n } else {\n\n if ($set_value) {\n\n $d->{$key_part} = $value;\n\n } else {\n\n if (!property_exists($d, $key_part)) {\n $d->{$key_part} = array();\n }\n\n $d = & $d->{$key_part};\n }\n }\n\n $i++;\n }\n }", "function issetor(&$variable, $placeholder = ''){\n if(isset($variable)){\n return $variable;\n } else {\n return $placeholder;\n }\n}", "function captogov_preprocess_node(&$vars, $hook) {\n if ($vars['type'] == 'landing_page') {\n $children = captogov_childtree($vars['nid']);\n if(gettype($children) == \"string\"){\n $vars['children_pages'] = $children;\n }\n }\n}", "function var_parser($match)\r\n\t{\r\n\t\t$tvar = $match[1];\r\n\t\tglobal $$tvar;\r\n\t\tif (isset($this->vars[$tvar])) return $this->vars[$tvar];\r\n\t\telse if (isset($$tvar)) return $$tvar;\r\n\t\telse if (defined($tvar)) return constant($tvar);\r\n\t\treturn $match[0];\r\n\t}", "private static function &extractWorkVar(Node &$var): Node\n {\n if ($var instanceof ArrayDimFetch && $var->var instanceof ArrayDimFetch) {\n return self::extractWorkVar($var->var);\n }\n return $var;\n }", "public function addToVariable($variable,$value){\n\n $var = $this->getSavedVariable($variable);\n\n if($var){\n $var = json_decode($var,true);\n if(is_array($var) AND !empty($var)){\n if(in_array($value,$var)){\n return false;\n } else {\n array_push($var,$value);\n }\n }\n }\n\n if(!is_array($var) OR empty($var)){\n $var = array();\n array_push($var,$value);\n }\n\n $var = json_encode($var);\n $this->saveVariable($variable,$var);\n\n }", "function tempty($variable)\n{\n\n\tif ($variable=='' ) return true;\n\tif (is_array($variable))\n\t{\n\t\tforeach ($variable as $subvar)\n\t\t{\n\t\t\t$result=tempty($subvar);\n\t\t\tif (!$result) break;\n\t\t}\n\t\treturn $result;\n\t}\n\telse {return false;}\n}", "function var_identify($arg1){\n global $token;\n $error_val = False;\n\n get_token();\n if($token->type >= tokenType::f_gf && $token->type <= tokenType::f_tf){\n upper_scan($token->data, 0);\n $arg1->addAttribute('type', 'var');\n $arg1[0] = $token->data;\n get_token();\n if($token->type === tokenType::marker){\n $arg1[0] .= $token->data;\n get_token();\n if($token->type !== tokenType::identifier){\n if(!preg_match(\"/^[a-zA-Z_\\-\\$&%\\*!?][a-zA-Z_\\-\\$&%\\*!?0-9]*$/\", $token->data)){\n fwrite(STDERR,\"ERROR : LEX : detected lexical error in: $token->data\\n\");\n exit(23);\n }\n if(!is_keyword(tokenType::identifier)){\n $error_val = True;\n }\n }\n $arg1[0] .= $token->data;\n }\n else $error_val = True;\n }\n else $error_val = True;\n\n if($error_val){\n fwrite(STDERR, \"ERROR : SYNTAX : Variable <var> expected : last token: $token->data $token->type\\n\");\n exit(23);\n }\n }", "public function unshift($var)\n {\n $node = new Node($var);\n if ($this->first_node !== null) {\n $node->setNext($this->first_node);\n $this->first_node->setPrev($node);\n }\n $node->first_node = $node;\n }", "function _postProcess() {\r\n $item = current($this->_struct);\r\n \r\n $ret = array('_name'=>$item['tag'], '_attributes'=>array(), '_value'=>null);\r\n\r\n if (isset($item['attributes']) && count($item['attributes'])>0) {\r\n foreach ($item['attributes'] as $key => $data) {\r\n if (!is_null($data)) {\r\n $item['attributes'][$key] = str_replace($this->_replaceWith, $this->_replace, $item['attributes'][$key]);\r\n }\r\n }\r\n $ret['_attributes'] = $item['attributes'];\r\n if ($this->attributesDirectlyUnderParent)\r\n $ret = array_merge($ret, $item['attributes']);\r\n }\r\n\r\n if (isset($item['value']) && $item['value'] != null)\r\n $item['value'] = str_replace($this->_replaceWith, $this->_replace, $item['value']);\r\n \r\n switch ($item['type']) {\r\n case 'open':\r\n $children = array();\r\n while (($child = next($this->_struct)) !== FALSE ) {\r\n if ($child['level'] <= $item['level'])\r\n break;\r\n \r\n $subItem = $this->_postProcess();\r\n \r\n if (isset($subItem['_name'])) {\r\n if (!isset($children[$subItem['_name']]))\r\n $children[$subItem['_name']] = array();\r\n \r\n $children[$subItem['_name']][] = $subItem;\r\n }\r\n else {\r\n foreach ($subItem as $key=>$value) {\r\n if (isset($children[$key])) {\r\n if (is_array($children[$key]))\r\n $children[$key][] = $value;\r\n else\r\n $children[$key] = array($children[$key], $value);\r\n }\r\n else {\r\n $children[$key] = $value;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if ($this->childTagsDirectlyUnderParent)\r\n $ret = array_merge($ret, $this->_condenseArray($children));\r\n else\r\n $ret['_value'] = $this->_condenseArray($children);\r\n \r\n break;\r\n case 'close':\r\n break;\r\n case 'complete':\r\n if (count($ret['_attributes']) > 0) {\r\n if (isset($item['value']))\r\n $ret['_value'] = $item['value'];\r\n }\r\n else {\r\n\t\t\tif (isset($item['value'])) {\r\n\t\t\t\t$ret = array($item['tag']=> $item['value']);\r\n\t\t\t} else {\r\n\t\t\t\t$ret = array($item['tag']=> \"\");\r\n\t\t\t}\r\n }\r\n break;\r\n }\r\n\r\n //added by Dan Coulter\r\n\r\n \r\n /*\r\n foreach ($ret as $key => $data) {\r\n if (!is_null($data) && !is_array($data)) {\r\n $ret[$key] = str_replace($this->_replaceWith, $this->_replace, $ret[$key]);\r\n }\r\n }\r\n */\r\n return $ret;\r\n }", "function acf_extract_var(&$array, $key, $default = \\null)\n{\n}", "public function _assignInScope($varname, $variable_obj, $scope_type = Smarty::SCOPE_LOCAL)\n {\n if ($scope_type == Smarty::SCOPE_GLOBAL) {\n Smarty::$_global_tpl_vars->{$varname} = $variable_obj;\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n // we must bubble from current template\n $scope_type = Smarty::SCOPE_ROOT;\n } else {\n // otherwise done\n return;\n }\n }\n\n // must always assign in local scope\n $this->_tpl_vars->{$varname} = $variable_obj;\n\n // if called on data object return\n if ($this->_usage == Smarty::IS_DATA) {\n return;\n }\n\n // if called from template object ($this->scope_type set) we must consider\n // the scope type if template object\n if ($this->_usage == Smarty::IS_TEMPLATE) {\n if (($this->scope_type == Smarty::SCOPE_ROOT || $this->scope_type == Smarty::SCOPE_PARENT) &&\n $scope_type != Smarty::SCOPE_ROOT && $scope_type != Smarty::SCOPE_SMARTY\n ) {\n $scope_type = $this->scope_type;\n }\n }\n\n if ($scope_type == Smarty::SCOPE_LOCAL) {\n return;\n }\n\n $node = $this->parent;\n while ($node) {\n // bubble up only in template objects\n if ($node->_usage == Smarty::IS_TEMPLATE || ($scope_type == Smarty::SCOPE_SMARTY && $node->_usage != Smarty::IS_DATA)) {\n $node->_tpl_vars->{$varname} = $variable_obj;\n if ($scope_type == Smarty::SCOPE_PARENT) {\n break;\n }\n }\n $node = $node->parent;\n }\n }", "function bang_preprocess_node(&$variables, $hook) {\n // Create single event locations to make them appear with an icon each.\n if (is_array($variables['ddbasic_event_location'])) {\n foreach (element_children($variables['ddbasic_event_location']) as $index) {\n $variables['ddbasic_event_locations'][] = $variables['ddbasic_event_location'][$index];\n }\n }\n elseif (isset($variables['ddbasic_event_location'])) {\n $variables['ddbasic_event_locations'][] = $variables['ddbasic_event_location'];\n }\n}", "function hudson_preprocess_node(&$variables, $hook) {\n // Optionally, run node-type-specific preprocess functions, like\n // STARTERKIT_preprocess_node_page() or STARTERKIT_preprocess_node_story().\n $function = __FUNCTION__ . '_' . $variables['node']->type;\n if (function_exists($function)) {\n $function($variables, $hook);\n }\n}", "function indeed_debug_var($variable){\n\t if (is_array($variable) || is_object($variable)){\n\t\t echo '<pre>';\n\t\t print_r($variable);\n\t\t echo '</pre>';\n\t } else {\n\t \tvar_dump($variable);\n\t }\n}", "function lean_preprocess_node(&$vars) {\n $vars['node_top'] = theme('blocks', 'node_top');\n $vars['node_bottom'] = theme('blocks', 'node_bottom');\n \n // Load node type-specific preprocess functions (if they exist)\n $function = 'lean_preprocess_node'.'_'. $vars['node']->type;\n if (function_exists($function)) {\n $function(&$vars);\n } else {\n \n // Load the usual node stuff\n lean_preprocess_node_default($vars);\n } \n}", "public function & getVariableRef($key, & $data) {\n\n if (strpos($key, $this->scopeGlue) === false) {\n $parts = explode('.', $key);\n } else {\n $parts = explode($this->scopeGlue, $key);\n }\n\n $i = 0;\n $count = count($parts);\n $d = & $data;\n\n while ($i < $count) {\n\n $key_part = $parts[$i];\n $key_part_int = filter_var($key_part, FILTER_VALIDATE_INT);\n $key_part_is_int = $key_part_int !== false;\n $get_ref = ($i + 1) == $count;\n\n if ($key_part_is_int && is_object($d)) {\n $d = (array) $d;\n }\n\n if (!is_array($d) && !is_object($d)) {\n $d = array();\n }\n\n if (is_array($d)) {\n\n if ($key_part_is_int && !array_key_exists($key_part, $d)) {\n $key_part = $key_part_int;\n }\n\n if ($get_ref) {\n\n if (!array_key_exists($key_part, $d)) {\n $d[$key_part] = null;\n }\n\n return $d[$key_part];\n\n } else {\n\n if (!isset($d[$key_part])) {\n $d[$key_part] = array();\n }\n\n $d = & $d[$key_part];\n }\n\n } else {\n\n if ($get_ref) {\n\n if (!property_exists($d, $key_part)) {\n $d->{$key_part} = null;\n }\n\n return $d->{$key_part};\n\n } else {\n\n if (!property_exists($d, $key_part)) {\n $d->{$key_part} = array();\n }\n\n $d = & $d->{$key_part};\n }\n }\n\n $i++;\n }\n }", "function yy_r91(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\'][\\'index\\']').']'; }", "function is_nested_var($name){ // SYSTEM FUNCTION - DO NOT USE!\n\t$curr_var = $this->vars[$name];\n\tfor($c = 0; $c <= $this->system_vars['cycle_nesting']; $c++){\n\t\tif (!is_array($curr_var) || !isset($curr_var[$this->system_vars['cycle_counters'][$c]])) return false;\n\t\t$curr_var = $curr_var[$this->system_vars['cycle_counters'][$c]];\n\t}\n\treturn true;\n}", "function insertSub ( &$_n, $_payload, $_pos )\n\t{\n\t\t\t//empty pointer from an internal node\n\t\tif ( ! is_object ( $_n ) )\n\t\t{\n\t\t\t//auto leaf\n\t\t\t$_n = new Node ( $_payload->payload [ $_pos ] );\n\t\t} \n\t\t\n\t\t\t//we placed the leaf in an appropriate position and will\n\t\t\t//now continue with our new internal node.\n\t\tif ( ord ( $_payload->payload [ $_pos ] ) < ord ( $_n->char ) )\n\t\t{\n\t\t\t$this->insertSub ( &$_n->left, $_payload, $_pos );\t\n\t\t\n\t\t} else if ( ord ( $_payload->payload [ $_pos ] ) > ord ( $_n->char ) )\n\t\t{\n\t\t\t$this->insertSub ( &$_n->right, $_payload, $_pos );\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\tif ( $_pos+1 == strlen ( $_payload->payload ) )\n\t\t\t{\n\t\t\t\t$_n->word = $_payload; \n\t\t\t\t$this->is_leaf = false;\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->insertSub ( &$_n->mid, $_payload, $_pos+1 );\n\t\t\n\t\t\t}\n\t\t}\t\t\n\t}", "public function fetch()\n {\n $cur = current($this->stack[$this->depth]);\n if ($cur === false and $this->depth == 0) {\n $this->position = 0;\n return false;\n }\n elseif ($cur === false and $this->depth > 0) {\n array_pop($this->stack);\n array_pop($this->names);\n array_pop($this->types);\n --$this->depth;\n return $this->fetch();\n }\n $r = new PROItem;\n $r->name = key($this->stack[$this->depth]); \n $r->baseURI = implode($this->names, ':');\n $r->uri = ltrim(rtrim($r->baseURI, ':').':'.$r->name, ':');\n $r->value = $cur; \n $r->index = $this->position++;\n $r->type = $this->getcase($cur);\n $r->depth = $this->depth;\n\n next($this->stack[$this->depth]);\n if ($r->type === $this->types[$this->depth] or in_array($r->type, $this->allowed_types)) {\n ++$this->depth;\n $this->stack[$this->depth] =& $cur;\n reset($this->stack[$this->depth]);\n $this->types[$this->depth] = $r->type;\n $this->names[$this->depth] = $r->name;\n return $this->fetch();\n }\n return $r;\n }", "function set_var($var_name, $var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\tforeach($var_value as $key=>$value)\r\n\t\t\t{\r\n\t\t\t\t$this->set_var($var_name . '.' . $key, $value); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] = $var_value;\r\n\t\t}\r\n\t}", "public static function resolveVariableToNode(Node\\Expr $var)\n {\n $n = $var;\n // When a use is passed, start outside the closure to not return immediatly\n if ($var instanceof Node\\Expr\\ClosureUse) {\n $n = $var->getAttribute('parentNode')->getAttribute('parentNode');\n $name = $var->var;\n } else if ($var instanceof Node\\Expr\\Variable || $var instanceof Node\\Param) {\n $name = $var->name;\n } else {\n throw new \\InvalidArgumentException('$var must be Variable, Param or ClosureUse, not ' . get_class($var));\n }\n // Traverse the AST up\n do {\n // If a function is met, check the parameters and use statements\n if ($n instanceof Node\\FunctionLike) {\n foreach ($n->getParams() as $param) {\n if ($param->name === $name) {\n return $param;\n }\n }\n // If it is a closure, also check use statements\n if ($n instanceof Node\\Expr\\Closure) {\n foreach ($n->uses as $use) {\n if ($use->var === $name) {\n return $use;\n }\n }\n }\n break;\n }\n // Check each previous sibling node for a variable assignment to that variable\n while ($n->getAttribute('previousSibling') && $n = $n->getAttribute('previousSibling')) {\n if (\n ($n instanceof Node\\Expr\\Assign || $n instanceof Node\\Expr\\AssignOp)\n && $n->var instanceof Node\\Expr\\Variable && $n->var->name === $name\n ) {\n return $n;\n }\n }\n } while (isset($n) && $n = $n->getAttribute('parentNode'));\n // Return null if nothing was found\n return null;\n }", "function assign($var, $value = false)\n {\n\t\tif (is_array($var))\r\n\t\t{\r\n\t\t\tforeach ($var as $name => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->_vars[$name] = $value;\r\n\t\t\t}\r\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_vars[$var] = $value;\n\t\t}\n\t}", "function do_dump(&$var, $var_name = NULL, $indent = NULL, $reference = NULL)\n{\n\t$do_dump_indent = \"<span style='color:#eeeeee;'>|</span> &nbsp;&nbsp; \";\n\t$reference = $reference.$var_name;\n\t$keyvar = 'the_do_dump_recursion_protection_scheme'; $keyname = 'referenced_object_name';\n\n\tif (is_array($var) && isset($var[$keyvar]))\n\t{\n\t\t$real_var = &$var[$keyvar];\n\t\t$real_name = &$var[$keyname];\n\t\t$type = ucfirst(gettype($real_var));\n\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span> = <span style='color:#e87800;'>&amp;$real_name</span><br>\";\n\t}\n\telse\n\t{\n\t\t$var = array($keyvar => $var, $keyname => $reference);\n\t\t$avar = &$var[$keyvar];\n\n\t\t$type = ucfirst(gettype($avar));\n\t\tif($type == \"String\") $type_color = \"<span style='color:green'>\";\n\t\telseif($type == \"Integer\") $type_color = \"<span style='color:red'>\";\n\t\telseif($type == \"Double\"){ $type_color = \"<span style='color:#0099c5'>\"; $type = \"Float\"; }\n\t\telseif($type == \"Boolean\") $type_color = \"<span style='color:#92008d'>\";\n\t\telseif($type == \"NULL\") $type_color = \"<span style='color:black'>\";\n\n\t\tif(is_array($avar))\n\t\t{\n\t\t\t$count = count($avar);\n\t\t\techo \"$indent\" . ($var_name ? \"$var_name => \":\"\") . \"<span style='color:#a2a2a2'>$type ($count)</span><br>$indent(<br>\";\n\t\t\t$keys = array_keys($avar);\n\t\t\tforeach($keys as $name)\n\t\t\t{\n\t\t\t\t$value = &$avar[$name];\n\t\t\t\tdo_dump($value, \"['$name']\", $indent.$do_dump_indent, $reference);\n\t\t\t}\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_object($avar))\n\t\t{\n\t\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span><br>$indent(<br>\";\n\t\t\tforeach($avar as $name=>$value) do_dump($value, \"$name\", $indent.$do_dump_indent, $reference);\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_int($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_string($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\\\"$avar\\\"</span><br>\";\n\t\telseif(is_float($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_bool($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\".($avar == 1 ? \"TRUE\":\"FALSE\").\"</span><br>\";\n\t\telseif(is_null($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> {$type_color}NULL</span><br>\";\n\t\telse echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $avar<br>\";\n\n\t\t$var = $var[$keyvar];\n\t}\n}", "function process_variable( $variable_string ) {\n\t\treturn $this->variable_processor()->process_field( '{{' . $variable_string . '}}', true );\n\t}", "function assignToView($variable_name, $variable_value = null) {\r\n $template_engine = Angie::getTemplateEngine();\r\n if(is_array($variable_name)) {\r\n foreach($variable_name as $k => $v) {\r\n $template_engine->assignToView($k, $v);\r\n } // foreach\r\n } else {\r\n $template_engine->assignToView($variable_name, $variable_value);\r\n } // if\r\n }", "public function visitVar(Node $node): UnionType\n {\n // $$var or ${...} (whose idea was that anyway?)\n $name_node = $node->children['name'];\n if (($name_node instanceof Node)) {\n // This is nonsense. Give up.\n $name_node_type = $this->__invoke($name_node);\n static $int_or_string_type;\n if ($int_or_string_type === null) {\n $int_or_string_type = UnionType::fromFullyQualifiedPHPDocString('int|string|null');\n }\n if (!$name_node_type->canCastToUnionType($int_or_string_type, $this->code_base)) {\n Issue::maybeEmit($this->code_base, $this->context, Issue::TypeSuspiciousIndirectVariable, $name_node->lineno, (string)$name_node_type);\n return MixedType::instance(false)->asPHPDocUnionType();\n }\n $name_node = $name_node_type->asSingleScalarValueOrNull();\n if ($name_node === null) {\n return MixedType::instance(false)->asPHPDocUnionType();\n }\n // fall through\n }\n\n // foo(${42}) is technically valid PHP code, avoid TypeError\n $variable_name =\n (string)$name_node;\n\n if ($this->context->getScope()->hasVariableWithName($variable_name)) {\n $variable = $this->context->getScope()->getVariableByName(\n $variable_name\n );\n $union_type = $variable->getUnionType();\n if ($union_type->isPossiblyUndefined()) {\n if ($node->flags & PhanAnnotationAdder::FLAG_IGNORE_UNDEF) {\n if ($this->context->isInGlobalScope()) {\n $union_type = $union_type->eraseRealTypeSet();\n }\n return $union_type->convertUndefinedToNullable();\n }\n if ($this->context->isInGlobalScope()) {\n $union_type = $union_type->eraseRealTypeSet();\n if ($this->should_catch_issue_exception) {\n if (!Config::getValue('ignore_undeclared_variables_in_global_scope')) {\n $this->emitIssue(\n Issue::PossiblyUndeclaredGlobalVariable,\n $node->lineno,\n $variable_name\n );\n }\n }\n } else {\n if ($this->should_catch_issue_exception) {\n $this->emitIssue(\n Issue::PossiblyUndeclaredVariable,\n $node->lineno,\n $variable_name\n );\n }\n }\n }\n\n return $union_type;\n }\n if (Variable::isHardcodedVariableInScopeWithName($variable_name, $this->context->isInGlobalScope())) {\n // @phan-suppress-next-line PhanTypeMismatchReturnNullable variable existence was checked\n return Variable::getUnionTypeOfHardcodedGlobalVariableWithName($variable_name);\n }\n if ($node->flags & PhanAnnotationAdder::FLAG_IGNORE_UNDEF) {\n if (!$this->context->isInGlobalScope()) {\n if ($this->should_catch_issue_exception && !(($node->flags & PhanAnnotationAdder::FLAG_INITIALIZES) && $this->context->isInLoop())) {\n // Warn about `$var ??= expr;`, except when it's done in a loop.\n $this->emitIssueWithSuggestion(\n Variable::chooseIssueForUndeclaredVariable($this->context, $variable_name),\n $node->lineno,\n [$variable_name],\n IssueFixSuggester::suggestVariableTypoFix($this->code_base, $this->context, $variable_name)\n );\n }\n if ($variable_name === 'this') {\n return ObjectType::instance(false)->asRealUnionType();\n }\n // Be more certain that unknown variables are not set inside of function scopes than the global scope.\n return NullType::instance(false)->asRealUnionType();\n }\n if ($variable_name === 'this') {\n return ObjectType::instance(false)->asRealUnionType();\n }\n return NullType::instance(false)->asPHPDocUnionType();\n }\n\n if (!($this->context->isInGlobalScope() && Config::getValue('ignore_undeclared_variables_in_global_scope'))) {\n if (!$this->should_catch_issue_exception) {\n throw new IssueException(\n Issue::fromType(Variable::chooseIssueForUndeclaredVariable($this->context, $variable_name))(\n $this->context->getFile(),\n $node->lineno,\n [$variable_name],\n IssueFixSuggester::suggestVariableTypoFix($this->code_base, $this->context, $variable_name)\n )\n );\n }\n Issue::maybeEmitWithParameters(\n $this->code_base,\n $this->context,\n Variable::chooseIssueForUndeclaredVariable($this->context, $variable_name),\n $node->lineno,\n [$variable_name],\n IssueFixSuggester::suggestVariableTypoFix($this->code_base, $this->context, $variable_name)\n );\n }\n if ($variable_name === 'this') {\n return ObjectType::instance(false)->asRealUnionType();\n }\n\n if (!$this->context->isInGlobalScope()) {\n if (!$this->context->isInLoop()) {\n return NullType::instance(false)->asRealUnionType()->withIsDefinitelyUndefined();\n }\n return NullType::instance(false)->asRealUnionType();\n }\n\n return UnionType::empty();\n }", "function yy_r92(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -3]->minor.'\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\']').']'; }", "function get( $varname, $scope=false ){\n if( strpos($varname, '.')===false ){\n return $this->_get( $varname, $scope );\n }\n\n // we are dealing with arrays now e.g \"zoo.mammals.dogs.small\"\n $keys = array_map( \"trim\", explode('.', $varname) );\n $varname = array_shift( $keys );\n\n $parent = $this->_get( $varname, $scope );\n $cnt_keys = count( $keys );\n\n for( $x=0; $x<$cnt_keys; $x++ ){\n $key = $keys[$x];\n if( $key=='' ) $key=0;\n\n if( is_array($parent) && isset($parent[$key]) ){\n if( $x==$cnt_keys-1 ){\n return $parent[$key];\n }\n else{\n $parent = $parent[$key];\n }\n }\n else{\n return null;\n }\n }\n\n return null;\n }", "public function getVariable($key, $data, $default = null)\n {\n if (strpos($key, $this->scopeGlue) === false) {\n $parts = explode('.', $key);\n } else {\n $parts = explode($this->scopeGlue, $key);\n }\n foreach ($parts as $key_part) {\n if (is_array($data)) {\n\n // Modified by Ivan Tcholakov, 26-DEC-2015.\n //if ( ! array_key_exists($key_part, $data)) {\n // return $default;\n //}\n $key_part_int = filter_var($key_part, FILTER_VALIDATE_INT);\n $key_part_is_int = $key_part_int !== false;\n\n if ($key_part_is_int && !array_key_exists($key_part, $data)) {\n $key_part = $key_part_int;\n }\n\n if (!array_key_exists($key_part, $data)) {\n return $default;\n }\n //\n\n $data = $data[$key_part];\n } elseif (is_object($data)) {\n if ( ! isset($data->{$key_part})) {\n return $default;\n }\n\n $data = $data->{$key_part};\n } else {\n return $default;\n }\n }\n\n return $data;\n }", "function _variableHandler($data)\r\n {\r\n if (preg_match('/\\$(\\w+)/', $data, $matches)) {\r\n return $GLOBALS[$matches[1]];\r\n } elseif (defined($data)) {\r\n return constant($data);\r\n } else {\r\n return '{'.$data.'}';\r\n }\r\n }", "public function addToVariable($variable, $value)\n {\n $var = $this->getSavedVariable($variable);\n\n if ($var) {\n $var = json_decode($var, true);\n if (is_array($var) AND !empty($var)) {\n if (in_array($value, $var)) {\n return false;\n } else {\n array_push($var, $value);\n }\n }\n }\n\n if (!is_array($var) OR empty($var)) {\n $var = array();\n array_push($var, $value);\n }\n\n $var = json_encode($var);\n $this->saveVariable($variable, $var);\n }", "protected function __resolve_parse($value)\n {\n $value = is_string($value) ? ['file' => $value] : $value;\n $value += [\n 'is_object' => true,\n 'is_root' => true,\n ];\n\n $parsed = $this->parseLater($value['file'], 'file', false);\n\n return\n $value['is_object']\n ? [$value['is_root'] ? '$newRoot' : '$new' => $parsed]\n : $parsed\n ;\n }", "private function parse_variables(&$package, $variables)\n {\n if (count($variables) > 1) {\n foreach ($variables as $variable) {\n $this->parse_variables_simple($package, $variable);\n }\n } else {\n $this->parse_variables_simple($package, $variables);\n }\n }", "public function varOrTerm(){\n try {\n // Sparql11query.g:339:3: ( variable | graphTerm ) \n $alt44=2;\n $LA44_0 = $this->input->LA(1);\n\n if ( (($LA44_0>=$this->getToken('VAR1') && $LA44_0<=$this->getToken('VAR2'))) ) {\n $alt44=1;\n }\n else if ( (($LA44_0>=$this->getToken('TRUE') && $LA44_0<=$this->getToken('FALSE'))||$LA44_0==$this->getToken('IRI_REF')||$LA44_0==$this->getToken('PNAME_NS')||$LA44_0==$this->getToken('PNAME_LN')||$LA44_0==$this->getToken('INTEGER')||$LA44_0==$this->getToken('DECIMAL')||$LA44_0==$this->getToken('DOUBLE')||($LA44_0>=$this->getToken('INTEGER_POSITIVE') && $LA44_0<=$this->getToken('DOUBLE_NEGATIVE'))||($LA44_0>=$this->getToken('STRING_LITERAL1') && $LA44_0<=$this->getToken('STRING_LITERAL_LONG2'))||$LA44_0==$this->getToken('BLANK_NODE_LABEL')||$LA44_0==$this->getToken('OPEN_BRACE')||$LA44_0==$this->getToken('OPEN_SQUARE_BRACE')) ) {\n $alt44=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 44, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt44) {\n case 1 :\n // Sparql11query.g:340:3: variable \n {\n $this->pushFollow(self::$FOLLOW_variable_in_varOrTerm1158);\n $this->variable();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:341:5: graphTerm \n {\n $this->pushFollow(self::$FOLLOW_graphTerm_in_varOrTerm1164);\n $this->graphTerm();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "function alias_expand($name) {\n\n\tglobal $aliastable;\n\n\tif (isset($aliastable[$name]))\n\treturn $aliastable[$name];\n\telse if (is_ipaddr($name) || is_subnet($name))\n\treturn $name;\n\telse\n\treturn null;\n}", "function yy_r208(){ $this->_retvalue = new Stmt\\VariablePlaceholder; }", "function psa_debug( $variable ) {\n\techo \"<pre>\";\n\tif( is_array( $variable ) || is_object( $variable ) ) {\n\t\tprint_r( $variable );\n\t} else {\n\t\tvar_dump( $variable );\n\t}\n\techo \"</pre>\";\n}", "protected function processVariable( File $phpcs_file, $stack_ptr ) {\n\n\t\t$tokens = $phpcs_file->getTokens();\n\t\t$var_name = ltrim( $tokens[ $stack_ptr ]['content'], '$' );\n\n\t\t// If it's a php reserved var, then its ok.\n\t\tif ( isset( $this->phpReservedVars[ $var_name ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Merge any custom variables with the defaults.\n\t\t$this->mergeWhiteList();\n\n\t\t// Likewise if it is a mixed-case var used by WordPress core.\n\t\tif ( isset( $this->wordpress_mixed_case_vars[ $var_name ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$obj_operator = $phpcs_file->findNext( Tokens::$emptyTokens, ( $stack_ptr + 1 ), null, true );\n\t\tif ( \\T_OBJECT_OPERATOR === $tokens[ $obj_operator ]['code'] ) {\n\t\t\t// Check to see if we are using a variable from an object.\n\t\t\t$var = $phpcs_file->findNext( Tokens::$emptyTokens, ( $obj_operator + 1 ), null, true );\n\t\t\tif ( \\T_STRING === $tokens[ $var ]['code'] ) {\n\t\t\t\t$bracket = $phpcs_file->findNext( Tokens::$emptyTokens, ( $var + 1 ), null, true );\n\t\t\t\tif ( \\T_OPEN_PARENTHESIS !== $tokens[ $bracket ]['code'] ) {\n\t\t\t\t\t$obj_var_name = $tokens[ $var ]['content'];\n\n\t\t\t\t\t// There is no way for us to know if the var is public or\n\t\t\t\t\t// private, so we have to ignore a leading underscore if there is\n\t\t\t\t\t// one and just check the main part of the variable name.\n\t\t\t\t\t$original_var_name = $obj_var_name;\n\t\t\t\t\tif ( '_' === substr( $obj_var_name, 0, 1 ) ) {\n\t\t\t\t\t\t$obj_var_name = substr( $obj_var_name, 1 );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! isset( $this->whitelisted_mixed_case_member_var_names[ $obj_var_name ] ) && self::isSnakeCase( $obj_var_name ) === false ) {\n\t\t\t\t\t\t$error = 'Object property \"$%s\" is not in valid snake_case format, try \"$%s\"';\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t$original_var_name,\n\t\t\t\t\t\t\tSniff::get_snake_case_name_suggestion( $original_var_name ),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$phpcs_file->addError( $error, $var, 'UsedPropertyNotSnakeCase', $data );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$in_class = false;\n\t\t$obj_operator = $phpcs_file->findPrevious( Tokens::$emptyTokens, ( $stack_ptr - 1 ), null, true );\n\t\tif ( \\T_DOUBLE_COLON === $tokens[ $obj_operator ]['code'] || \\T_OBJECT_OPERATOR === $tokens[ $obj_operator ]['code'] ) {\n\t\t\t// The variable lives within a class, and is referenced like\n\t\t\t// this: MyClass::$_variable or $class->variable.\n\t\t\t$in_class = true;\n\t\t}\n\n\t\t// There is no way for us to know if the var is public or private,\n\t\t// so we have to ignore a leading underscore if there is one and just\n\t\t// check the main part of the variable name.\n\t\t$original_var_name = $var_name;\n\t\tif ( '_' === substr( $var_name, 0, 1 ) && true === $in_class ) {\n\t\t\t$var_name = substr( $var_name, 1 );\n\t\t}\n\n\t\tif ( self::isSnakeCase( $var_name ) === false ) {\n\t\t\tif ( $in_class && ! isset( $this->whitelisted_mixed_case_member_var_names[ $var_name ] ) ) {\n\t\t\t\t$error = 'Object property \"$%s\" is not in valid snake_case format, try \"$%s\"';\n\t\t\t\t$error_name = 'UsedPropertyNotSnakeCase';\n\t\t\t} elseif ( ! $in_class ) {\n\t\t\t\t$error = 'Variable \"$%s\" is not in valid snake_case format, try \"$%s\"';\n\t\t\t\t$error_name = 'VariableNotSnakeCase';\n\t\t\t}\n\n\t\t\tif ( isset( $error, $error_name ) ) {\n\t\t\t\t$data = array(\n\t\t\t\t\t$original_var_name,\n\t\t\t\t\tSniff::get_snake_case_name_suggestion( $original_var_name ),\n\t\t\t\t);\n\t\t\t\t$phpcs_file->addError( $error, $stack_ptr, $error_name, $data );\n\t\t\t}\n\t\t}\n\t}", "function VariableValue($variableName, $value = UNDEFINED);", "function grab_array_var($arr,$varname,$default=\"\"){\n\tglobal $request;\n\t\n\t$v=$default;\n\tif(is_array($arr)){\n\t\tif(array_key_exists($varname,$arr))\n\t\t\t$v=$arr[$varname];\n\t\t}\n\treturn $v;\n\t}", "function apiSnagType($varName,$default=false,$type=false) {\r\n\t$retVal = $default;\t\r\n\tif(apiSnag($varName)) {\r\n\t\tif(!$type || gettype(apiSnag($varName)) == $type) {\t//\tif type is set, make sure it's the right type\r\n\t\t\t$retVal = apiSnag($varName);\r\n\t\t}\r\n\t}\r\n\treturn $retVal;\r\n}", "protected function assignVar($var) {\n\t\textract($this->vars, EXTR_OVERWRITE);\n\n\t\t$var = stripslashes($var);\n\t\t$command = explode('|', $var);\n\t\t$var = array_shift($command);\n\t\t$var = eval(\"return $\".$var.\";\");\n\n\t\tforeach ($command as $c) {\n\t\t\t$attr = explode('=', $c);\n\n\t\t\tswitch ($attr[0]) {\n\t\t\t\tcase 'capitalize':\n\t\t\t\t\t$var = strToUpper(substr($var, 0, 1)).substr($var, 1).\" \";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->is_addon($attr[0])) {\n\t\t\t\t\t\t$var = $this->call_addon($var, self);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\n\t\treturn $var;\n\t}", "public function testObjectVariables()\n {\n\n $parser = new HTML_Template_Nest_Parser();\n $output = $parser->parse('${some_var->foo}');\n $this->assertEquals(\"<?php /* {some_var->foo} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo)?>\", $output);\n $output = $parser->parse('${some_var->FOO}');\n $this->assertEquals(\"<?php /* {some_var->FOO} */ echo htmlentities(\\$_o(\\$p, 'some_var')->FOO)?>\", $output);\n $output = $parser->parse('${some_var->foo(bar,bin, baz)}');\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar,bin, baz)} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'),\\$_o(\\$p, 'bin'), \\$_o(\\$p, 'baz')))?>\", \n $output\n );\n \n $output = $parser->parse(\n '${some_var->foo(bar,\"bin\", baz, \\'boo biscuits\\' )}'\n );\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar,\\\"bin\\\", baz, 'boo biscuits' )} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'),\" .\n \"\\\"bin\\\", \\$_o(\\$p, 'baz'), 'boo biscuits' ))?>\", \n $output\n );\n\n $output = $parser->parse(\n '${some_var->foo(bar,\"bin\", baz, \\'boo biscuit\\\\\\'s brother\\' )}'\n );\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar,\\\"bin\\\", baz, 'boo biscuit\\\\'s brother' )} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'),\\\"bin\\\"\" .\n \", \\$_o(\\$p, 'baz'), 'boo biscuit\\'s brother' ))?>\", \n $output\n );\n \n // nested methods\n $output = $parser->parse(\n '${some_var->foo(bar, \"bin\")->bar()->bob(\"bo\\\"oo\\\"\",bin)}'\n );\n $this->assertEquals(\n \"<?php /* {some_var->foo(bar, \\\"bin\\\")->bar()->bob(\\\"bo\\\\\\\"oo\\\\\\\"\\\",bin)} */ echo htmlentities(\\$_o(\\$p, 'some_var')->foo(\\$_o(\\$p, 'bar'), \\\"bin\\\")\" .\n \"->bar()->bob(\\\"bo\\\\\\\"oo\\\\\\\"\\\",\\$_o(\\$p, 'bin')))?>\", \n $output\n );\n \n // null testing\n $output = $parser->parseExpression(\"error != null &amp;&amp; error->getText() != ''\");\n $this->assertEquals(\n \"\\$_o(\\$p, 'error') != null && \\$_o(\\$p, 'error')->getText() != ''\",\n $output);\n \n $output = $parser->parseExpression(\"error->getText(null, 'foo') != ''\");\n $this->assertEquals(\n \"\\$_o(\\$p, 'error')->getText(null, 'foo') != ''\",\n $output); \n }", "protected static function astVarType(\n Context $context,\n $node\n ) : Type {\n\n // Check for $$var or ${...} (whose idea was that anyway?)\n if(($node->children[0] instanceof Node)\n && ($node->children[0]->kind == \\ast\\AST_VAR\n || $node->children[0]->kind == \\ast\\AST_BINARY_OP)\n ) {\n return new Type(['mixed']);\n }\n\n if($node->children[0] instanceof Node) {\n return Type::none();\n }\n\n $variable_name = $node->children[0];\n\n // if(empty($scope[$current_scope]['vars'][$node->children[0]])\n if (!$context->getScope()->hasVariableWithName($variable_name)) {\n if(!superglobal($variable_name))\n Log::err(\n Log::EVAR,\n \"Variable \\${$node->children[0]} is not defined\",\n $context->getFile(),\n $node->lineno\n );\n } else {\n $variable =\n $context->getScope()->getVariableWithName($variable_name);\n\n return $variable->getType();\n\n /*\n if(!empty($scope[$current_scope]['vars'][$node->children[0]]['tainted'])\n ) {\n $tainted_by =\n $scope[$current_scope]['vars'][$node->children[0]]['tainted_by'];\n $taint = true;\n }\n */\n }\n\n return Type::none();\n }", "private function build_full_array_expansion()\n\t\t{\n\t\t\tif(is_array($this->listexpand) )\n\t\t\t{\n\t\t\t\t// Build expansion list to root for all item in listexpand array\n\t\t\t\twhile(list($key, $val) = each($this->listexpand))\n\t\t\t\t{\n\t\t\t\t\t$this->get_all_parent_to_root($key);\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t// At last, remove all duplicate entries\n\t\t\t\t$this->fulllistexpand = array_unique($this->fulllistexpand);\n\t\t\t}\n\t\t\t// Add focused item to expand list\n\t\t\tif($this->myfocus != null)\n\t\t\t{\n\t\t\t\t$this->get_all_parent_to_root($this->myfocus);\n\t\t\t}\n\t\t}", "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 parse_vars($match)\r\n\t{\r\n\t\t$tvar = $match[1];\r\n\t\tglobal $$tvar;\r\n\t\tif (key_exists($tvar, $this->vars)) return $this->vars[$tvar];\r\n\t\telse if (isset($$tvar)) return $$tvar;\r\n\t\telse if (defined($tvar)) return constant($tvar);\r\n\t\telse if ($this->use_getvar) return GetVar($tvar);\r\n\t\treturn $match[0];\r\n\t}", "protected static function readExpandLevelsAndReType (array & $iniData, $iniScannerMode) {\n\t\t$result = [];\n\t\t$objectTypes = [];\n\t\t//$objectTypes[''] = [0, & $result];\n\t\t$oldIniScannerMode = $iniScannerMode === 1;// 1 => INI_SCANNER_RAW\n\t\tforeach ($iniData as $rawKey => $rawValue) {\n\t\t\t$current = & $result;\n\t\t\t// prepare keys to build levels and configure stdClass/array types\n\t\t\t$rawKeys = [];\n\t\t\t$lastRawKey = $rawKey;\n\t\t\t$lastDotPos = strrpos($rawKey, '.');\n\t\t\tif ($lastDotPos !== FALSE) {\n\t\t\t\t$rawKeys = explode('.', substr($rawKey, 0, $lastDotPos));\n\t\t\t\t$lastRawKey = substr($rawKey, $lastDotPos + 1);\n\t\t\t}\n\t\t\t// prepare levels structure and configure stdClass or array type change where necessary\n\t\t\t$absoluteKey = '';\n\t\t\t$prevAbsoluteKey = '';\n\t\t\tforeach ($rawKeys as $key) {\n\t\t\t\t$prevAbsoluteKey = $absoluteKey;\n\t\t\t\t$absoluteKey .= ($absoluteKey ? '.' : '') . $key;\n\t\t\t\tif (!isset($current[$key])) {\n\t\t\t\t\t$keyIsNumeric = is_numeric($key);\n\t\t\t\t\t$current[$key] = [];\n\t\t\t\t\t// object type switch -> array by default:\n\t\t\t\t\t$objectTypes[$absoluteKey] = [0, & $current[$key]];\n\t\t\t\t\tif (isset($objectTypes[$prevAbsoluteKey])) {\n\t\t\t\t\t\t$objTypesRec = & $objectTypes[$prevAbsoluteKey];\n\t\t\t\t\t\tif (!$keyIsNumeric && !$objTypesRec[0])\n\t\t\t\t\t\t\t// object type switch -> not array anymore:\n\t\t\t\t\t\t\t$objTypesRec[0] = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$current = & $current[$key];\n\t\t\t}\n\t\t\t// set up value into levels structure and configure type into array if necessary\n\t\t\tif ($oldIniScannerMode) {\n\t\t\t\t$typedValue = static::readTypedValue($rawValue);\n\t\t\t} else {\n\t\t\t\t$typedValue = $rawValue;\n\t\t\t}\n\t\t\tif (isset($current[$lastRawKey])) {\n\t\t\t\t$current[$lastRawKey][] = $typedValue;\n\t\t\t} else {\n\t\t\t\tif (!is_array($current)) \n\t\t\t\t\t$current = [$current];\n\t\t\t\t$current[$lastRawKey] = $typedValue;\n\t\t\t}\n\t\t\tif (!is_numeric($lastRawKey))\n\t\t\t\t$objectTypes[$absoluteKey][0] = 1;\n\t\t}\n\t\treturn [$result, $objectTypes];\n\t}", "function yy_r209(){ $this->_retvalue = new Stmt\\VariablePlaceholder($this->yystack[$this->yyidx + 0]->minor); }", "protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }", "function yy_r175(){ \n if ($this->yystack[$this->yyidx + 0]->minor instanceof Stmt\\VariablePlaceholder) {\n $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n } else if (is_array($this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = new Stmt\\Expr('column', $this->yystack[$this->yyidx + 0]->minor[0], $this->yystack[$this->yyidx + 0]->minor[1]); \n } else {\n $this->_retvalue = new Stmt\\Expr('column', $this->yystack[$this->yyidx + 0]->minor);\n }\n }", "function &object(object $value, string $namespace = 'default'): object\n{\n $var = new Variable\\ObjectVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function assign($variable, $value = null) {\n if (is_array($variable))\n $this->var = $variable + $this->var;\n else\n $this->var[$variable] = $value;\n\n return $this;\n }", "function _topNodeVar ($var) {\r\n $stack_count = count ($this->_stack);\r\n return $this->_stack[$stack_count-1]->$var;\r\n }", "public function extract(Parser $parser, Node\\Variable $var, $data)\n {\n if ($data[0] === '&') {\n $data = substr($data, 1);\n }\n\n $value = $data;\n $vals = explode($this->sep, $data);\n $options = $var->options;\n\n switch ($options['modifier']) {\n case '%':\n parse_str($data, $query);\n\n return $query[$var->name];\n\n case '*':\n $data = array();\n\n foreach($vals as $val) {\n list($k, $v) = explode('=', $val);\n\n // 2\n if ($k === $var->getToken()) {\n $data[] = $v;\n }\n\n // 4\n else {\n $data[$k] = $v;\n }\n }\n\n break;\n case ':':\n break;\n default:\n // 1, 3\n // remove key from value e.g. 'lang=en,th' becomes 'en,th'\n $value = str_replace($var->getToken().'=', '', $value);\n $data = explode(',', $value);\n\n if (sizeof($data) === 1) {\n $data = current($data);\n }\n }\n\n return $this->decode($parser, $var, $data);\n }", "protected function _getArgValue($var)\n {\n $args = $this->_args;\n\n if (!in_array($var, $args)) {\n return;\n }\n\n $key = array_search($var, $args);\n if ($key === false) {\n return null;\n }\n\n if (isset($args[$key + 1])) {\n return $args[$key + 1];\n }\n\n return null;\n }", "private function PREPARE_OBJECT_VARIABLE_METHOD()\r\r {\r\r if($this->_type === 'POST')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_POST[$key])?$_POST[$key]:false;\r\r } \r\r } \r\r else if($this->_type === 'GET')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_GET[$key])?$_GET[$key]:false;\r\r } \r\r } \r\r }", "function init($varname, $value = \"\", $append = false) {\n if (!is_array($varname)) {\n if ($varname !== '') {\n $this->_keys[$varname] = $this->_varname($varname);\n ($append) ? $this->_vals[$varname] .= $value : $this->_vals[$varname] = $value;\n }\n } else {\n reset($varname);\n while (list($k, $v) = each($varname)) {\n if ($k !== '') {\n $this->_keys[$k] = $this->_varname($k);\n ($append) ? $this->_vals[$k] .= $v : $this->_vals[$k] = $v;\n }\n }\n }\n }", "function beerfamily_preprocess_node(&$variables) {\n\n}", "function _set( $varname, $value, $scope='' ){\n if( $scope=='global' ){\n $this->ctx[0]['_scope_'][$varname] = $value;\n return;\n }\n\n if( $scope=='parent' ){\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) && isset($this->ctx[$x]['_scope_'][$varname]) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n\n }", "public function expand($template, array $variables) {\n\t\tif ($this->regex == self::DEFAULT_PATTERN && false === strpos($template, '{')) {\n\t\t\treturn $template;\n\t\t}\n\n\t\t$this->template = $template;\n\t\t$this->variables = $variables;\n\n\t\treturn preg_replace_callback($this->regex, array($this, 'expandMatch'), $this->template);\n\t}", "private function _substitute_variable($text, $variable, $object, $function)\n\t{\n\t\tif (strstr($text, $variable))\n\t\t{\n\t\t\t$value = call_user_func(array($object, $function));\n\t\t\t$text = str_replace($variable, $value, $text);\n\t\t}\n\t\treturn $text;\n\t}", "function smarty_catalogue_template_assign($smarty, &$smarty_famille, &$familles, &$nav, $hid, $var = '', $link = '', $rootpath = '', $web_root_path = '') {\n\tglobal $recursive_mode;\n\tglobal $wce_mode;\n\tglobal $scriptenv;\n\n\tif (isset($familles['tree'][$hid])) {\n\t\tif (isset($familles['list'][$hid])) {\n\t\t\tif ($familles['list'][$hid]['depth'] == 0) $localvar = \"sw_root{$familles['list'][$hid]['position']}\";\n\t\t\telse $localvar = \"{$var}sw_heading{$familles['list'][$hid]['depth']}\";\n\t\t}\n\t\t$selprec = 0;\n\n\t\t$nbFam = count($familles['tree'][$hid]);\n\t\t$i = 0;\n\n\t\tforeach($familles['tree'][$hid] as $id) {\n\t\t\t$i++;\n\t\t\t$detail = $familles['list'][$id];\n\n\t\t\t$depth = $detail['depth'] - 1;\n\t\t\tif ($depth == 0) {\n\t\t\t\t$localvar = \"cata{$detail['position']}\";\n\t\t\t\t$rootpath = $localvar;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$localvar = \"famille{$depth}\";\n\t\t\t}\n\t\t\t$locallink = ($link != '') ? \"{$link}-{$id}\" : \"{$id}\";\n\n\t\t\tswitch($wce_mode) {\n\t\t\t\tcase 'display';\n\t\t\t\tdefault:\n\t\t\t\t\t// test if url rewrite activated\n\t\t\t\t\tif ($detail['urlrewrite'] != '') {\n\t\t\t\t\t\t// Gestion du lien vers un article WCE\n\t\t\t\t\t\tif ($detail['id_article_wce'] > 0) {\n\t\t\t\t\t\t\t$script = '/'.$detail['urlrewrite_article'].\".html?\".http_build_query(array('catafam'=>'/'.$detail['urlrewrite']));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$script = $web_root_path.'/'.$detail['urlrewrite']; //.\".html\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//$script = $web_root_path.'/catalogue/'.str_replace(' ', '_', $detail['label']).'/'.$detail['id_famille'];\n\t\t\t\t\t\t$script = '?op=catalogue&param='.$detail['id_famille'];\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$sel = '';\n\n\t\t\tif (isset($nav[$depth]) && $nav[$depth] == $id) {\n\t\t\t\t$tpl_path = array(\n\t\t\t\t\t'DEPTH' => $depth,\n\t\t\t\t\t'LABEL' => $detail['label'],\n\t\t\t\t\t'LINK' => $script\n\t\t\t\t\t);\n\n\t\t\t\t$smarty->assign(\"path\",$tpl_path);\n\t\t\t\t$tpl_headcur = array(\n\t\t\t\t\t'TITLE' => $detail['label'],\n\t\t\t\t\t'ID_FAMILLE' => $id,\n\t\t\t\t\t'POSITION' => $detail['position'],\n\t\t\t\t\t'COLOR' => $detail['color'],\n\t\t\t\t\t'COLOR2' => $detail['color2'],\n\t\t\t\t\t'COLOR3' => $detail['color3'],\n\t\t\t\t\t'COLOR4' => $detail['color4'],\n\t\t\t\t\t'DESCRIPTION' => isset($detail['description']) ? $detail['description'] : '');\n\n\t\t\t\t$smarty->assign(\"HEADING{$depth}\",$tpl_headcur);\n\n\t\t\t\t$sel = 'selected';\n\t\t\t\t$selprec=$id;\n\t\t\t}\n\n\t\t\tif ($detail['visible']) {\n\t\t\t\tif (!empty($detail['url'])) $script = $detail['url'];\n\t\t\t\tif ($depth > 0) {\n\t\t\t\t\tif ($selprec>0 && $selprec!=$detail['id']) {\n\t\t\t\t\t\t// on a le suivant\n\t\t\t\t\t\t$detail['selprec']=\"selected\";\n\t\t\t\t\t\t$selprec=0;\n\t\t\t\t\t}\n\t\t\t\t\telse $detail['selprec']=\"\";\n\n\t\t\t\t\t$smarty_famille[$localvar][$detail['id']]=array(\n\t\t\t\t\t'DEPTH' => $depth,\n\t\t\t\t\t'ID_FAMILLE' => $detail['id'],\n\t\t\t\t\t'LABEL' => $detail['label'],\n\t\t\t\t\t'POSITION' => $detail['position'],\n\t\t\t\t\t'IMAGE' \t => $detail['image'],\n\t\t\t\t\t'LINK' => $script,\n\t\t\t\t\t'SEL' => $sel,\n\t\t\t\t\t'COLOR' => $detail['color'],\n\t\t\t\t\t'COLOR2' => $detail['color2'],\n\t\t\t\t\t'COLOR3' => $detail['color3'],\n\t\t\t\t\t'COLOR4' => $detail['color4'],\n\t\t\t\t\t'SELPREC' => $detail['selprec'],\n\t\t\t\t\t'ISLAST'\t\t=> $nbFam==$i,\n\t\t\t\t\t);\n\n\t\t\t\t\tif ($sel==\"selected\") {\n\t\t\t\t\t\t$smarty_famille['SELECTEDHEADING']= array(\n\t\t\t\t\t\t'DEPTH' => $depth,\n\t\t\t\t\t\t'ID_FAMILLE' => $detail['id'],\n\t\t\t\t\t\t'LABEL' => $detail['label'],\n\t\t\t\t\t\t'POSITION' => $detail['position'],\n\t\t\t\t\t\t'IMAGE' \t => $detail['image'],\n\t\t\t\t\t\t'COLOR' => $detail['color'],\n\t\t\t\t\t\t'COLOR2' => $detail['color2'],\n\t\t\t\t\t\t'COLOR3' => $detail['color3'],\n\t\t\t\t\t\t'COLOR4' => $detail['color4'],\n\t\t\t\t\t\t'LINK' => $script\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$smarty_famille[$localvar]=array(\n\t\t\t\t\t'DEPTH' => $depth,\n\t\t\t\t\t'ID_FAMILLE' => $detail['id'],\n\t\t\t\t\t'LABEL' => $detail['label'],\n\t\t\t\t\t'POSITION' => $detail['position'],\n\t\t\t\t\t'IMAGE' \t => $detail['image'],\n\t\t\t\t\t'COLOR' => $detail['color'],\n\t\t\t\t\t'COLOR2' => $detail['color2'],\n\t\t\t\t\t'COLOR3' => $detail['color3'],\n\t\t\t\t\t'COLOR4' => $detail['color4'],\n\t\t\t\t\t'LINK' => $script,\n\t\t\t\t\t'SEL' => $sel,\n\t\t\t\t\t'ISLAST'\t\t=> $nbFam==$i,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($depth == 0 || (isset($recursive_mode[$depth]) && $recursive_mode[$depth] == 'prof')) {\n\t\t\t\t\tif (isset($familles['tree'][$id])) {\n\t\t\t\t\t\tif ($depth > 0) {\n\t\t\t\t\t\t\tsmarty_catalogue_template_assign($smarty, $smarty_famille[$localvar][$detail['id']], $familles, $nav, $id, \"{$localvar}.\", $locallink, $rootpath, $web_root_path);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tsmarty_catalogue_template_assign($smarty, $smarty_famille[$localvar], $familles, $nav, $id, \"{$localvar}.\", $locallink, $rootpath, $web_root_path);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($familles['list'][$hid])) {\n\t\t\t$depth = $familles['list'][$hid]['depth'];\n\t\t\tif ($depth > 0 && isset($nav[$depth-1]) && $nav[$depth-1] == $hid && !(isset($recursive_mode[$depth]) && $recursive_mode[$depth] == 'prof'))\n\t\t\t{\n\t\t\t\tif ($link!='' && isset($nav[$depth])) $link .= \"-$nav[$depth]\";\n\t\t\t\telseif (isset($nav[$depth])) $link = \"$nav[$depth]\";\n\n\t\t\t\tif (isset($nav[$depth]) && isset($familles['tree'][$nav[$depth]])) smarty_catalogue_template_assign($smarty,$smarty_famille,$familles, $nav, $nav[$depth], '', $link,$rootpath);\n\t\t\t}\n\t\t}\n\n\t}\n}", "public function assign($variable , $value)\n {\n $this->data[$variable] = $value;\n }", "function mft_preprocess_page(&$variables) {\n if (!empty($variables['node'])) {\n $variables['theme_hook_suggestions'][] = 'page__node_' . $variables['node']->type;\n }\n}", "private function varIsObject($var, $format): void {\r\n\t\t$var_ser = serialize($var);\r\n\t\t$this->arrHistory[] = $var_ser;\r\n\t\t$this->makeTableHeader( $format, $format );\r\n\t\t\r\n\t\tif(is_object($var)) {\r\n\t\t\t$arrObjVars=get_object_vars($var);\r\n\t\t\tforeach($arrObjVars as $key=>$value) {\r\n\r\n\t\t\t\t$value=(!is_object($value) && !is_array($value) && trim($value)==='') ? '[empty string]' : $value;\r\n\t\t\t\t$this->makeTDHeader( $format,$key);\r\n\t\t\t\t\r\n\t\t\t\t//check for recursion\r\n\t\t\t\tif(is_object($value)||is_array($value)) {\r\n\t\t\t\t\t$var_ser = serialize($value);\r\n\t\t\t\t\tif(in_array($var_ser, $this->arrHistory, TRUE)) {\r\n\t\t\t\t\t\t$value = (is_object($value)) ? '*RECURSION* -> $' . get_class($value) : '*RECURSION*';\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif( in_array( gettype( $value ), $this->arrType, true ) ) {\r\n\t\t\t\t\t$this->checkType( $value );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\techo $value;\r\n\t\t\t\t}\r\n\t\t\t\techo $this->closeTDRow();\r\n\t\t\t}\r\n\t\t\t$arrObjMethods=get_class_methods(get_class($var));\r\n\t\t\tforeach($arrObjMethods as $key=>$value) {\r\n\t\t\t\t$this->makeTDHeader( $format,$value);\r\n\t\t\t\techo '[function]' . $this->closeTDRow();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\techo '<tr><td>' . $this->error( $format ) . $this->closeTDRow();\r\n\t\t}\r\n\t\tarray_pop($this->arrHistory);\r\n\t\techo '</table>';\r\n\t}", "public function dump($variable) {}", "public function expand($root);", "public function testInject() {\n $data = $this->expanded;\n $this->assertEquals($data, Hash::inject($data, 'one.depth', 2));\n\n $result = Hash::inject($data, 'one.foo', 'bar');\n $data['one']['foo'] = 'bar';\n $this->assertEquals($data, $result);\n }", "public function visitDynamicVariableAstNode( ezcTemplateDynamicVariableAstNode $var )\n {\n $this->write( '${' );\n $var->nameExpression->accept( $this );\n $this->write( '}' );\n }", "function PageVariableValue($variableName, $value = UNDEFINED);", "function assign_vars($vararray)\n\t{\n\t\t$this->_tpldata['.'][0] = array_merge(empty($this->_tpldata['.'][0]) ? array() : $this->_tpldata['.'][0], $vararray);\n\t\treturn true;\n\t}", "protected function normalizeValue($value) {\n\t\tif ($value instanceof \\PHPParser\\Node\\NodeInterface) {\n\t\t\treturn $value;\n\t\t} elseif (is_null($value)) {\n\t\t\treturn new ConstFetchExpression(\n\t\t\t\t\tnew NameNode('null')\n\t\t\t);\n\t\t} elseif (is_bool($value)) {\n\t\t\treturn new ConstFetchExpression(\n\t\t\t\t\tnew NameNode($value ? 'true' : 'false')\n\t\t\t);\n\t\t} elseif (is_int($value)) {\n\t\t\treturn new LNumberScalar($value);\n\t\t} elseif (is_float($value)) {\n\t\t\treturn new DNumberScalar($value);\n\t\t} elseif (is_string($value)) {\n\t\t\treturn new StringScalar($value);\n\t\t} elseif (is_array($value)) {\n\t\t\t$items = array();\n\t\t\t$lastKey = -1;\n\t\t\tforeach ($value as $itemKey => $itemValue) {\n\t\t\t\t// for consecutive, numeric keys don't generate keys\n\t\t\t\tif (null !== $lastKey && ++$lastKey === $itemKey) {\n\t\t\t\t\t$items[] = new ArrayItemExpression(\n\t\t\t\t\t\t\t$this->normalizeValue($itemValue)\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$lastKey = null;\n\t\t\t\t\t$items[] = new ArrayItemExpression(\n\t\t\t\t\t\t\t$this->normalizeValue($itemValue),\n\t\t\t\t\t\t\t$this->normalizeValue($itemKey)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new ArrayExpression($items);\n\t\t} else {\n\t\t\tthrow new \\LogicException('Invalid value');\n\t\t}\n\t}", "function mf_merge_parsed_vars_to_post($parsed_vars){\n\t\tforeach ($parsed_vars as $key_1 => $value_1) {\n\t\t\tif(is_array($value_1)){\n\t\t\t\tforeach ($value_1 as $key_2 => $value_2) {\n\t\t\t\t\tif(is_array($value_2)){\n\t\t\t\t\t\tforeach ($value_2 as $key_3 => $value_3) {\n\t\t\t\t\t\t\tif(is_array($value_3)){\n\t\t\t\t\t\t\t\tforeach ($value_3 as $key_4 => $value_4) {\n\t\t\t\t\t\t\t\t\tif(is_array($value_4)){\n\t\t\t\t\t\t\t\t\t\tforeach ($value_4 as $key_5 => $value_5) {\n\t\t\t\t\t\t\t\t\t\t\tif(is_array($value_5)){\n\t\t\t\t\t\t\t\t\t\t\t\t//placeholder\n\t\t\t\t\t\t\t\t\t\t\t\t//add another loop here to add more level\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$_POST[$key_1][$key_2][$key_3][$key_4][$key_5] = $value_5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$_POST[$key_1][$key_2][$key_3][$key_4] = $value_4;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$_POST[$key_1][$key_2][$key_3] = $value_3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$_POST[$key_1][$key_2] = $value_2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$_POST[$key_1] = $value_1;\n\t\t\t}\n\t\t}\n\t}", "protected static function _export($var, $depth, $indent)\n {\n switch (static::getType($var)) {\n case 'boolean':\n return ($var) ? 'true' : 'false';\n case 'integer':\n return '(int) ' . $var;\n case 'float':\n return '(float) ' . $var;\n case 'string':\n if (trim($var) === '') {\n return \"''\";\n }\n return \"'\" . $var . \"'\";\n case 'array':\n return static::_array($var, $depth - 1, $indent + 1);\n case 'resource':\n return strtolower(gettype($var));\n case 'null':\n return 'null';\n case 'unknown':\n return 'unknown';\n default:\n return static::_object($var, $depth - 1, $indent + 1);\n }\n }", "public function variable($string);", "function addTags($rawData, $tag)\n{\n switch($rawData['genericType'])\n {\n case \"Diagram\":\n $rawData['id'] = addTag($rawData['id'], $tag);\n foreach ($rawData['nodeList'] as &$node)\n {\n $node['id'] = addTag($node['id'], $tag);\n }\n\n foreach ($rawData['linkList'] as &$link)\n {\n $link['id'] = addTag($link['id'], $tag);\n $link['originNode'] = addTag($link['originNode'], $tag);\n $link['destinationNode'] = addTag($link['destinationNode'], $tag);\n }\n\n foreach ($rawData['DiaNodeList'] as &$diaNode)\n {\n $diaNode['id'] = addTag($diaNode['id'], $tag);\n }\n\n for ($i = 0; $i < count($rawData['ancestry']); $i++)\n {\n $rawData['ancestry'][$i] = addTag($rawData['ancestry'][$i], $tag);\n }\n\n $rawData['diaNode'] = addTag($rawData['diaNode'], $tag);\n break;\n \n case \"diaNode\":\n // Intentionally let it fall through to Node so that we only\n // have to write linkList code here once\n case \"Node\":\n $rawData['id'] = addTag($rawData['id'], $tag);\n $rawData['diagramId'] = addTag($rawData['diagramId'], $tag);\n foreach ($rawData['linkList'] as &$link)\n {\n $link['id'] = addTag($link['id'], $tag);\n $link['originNode'] = addTag($link['originNode'], $tag);\n $link['destinationNode'] = addTag($link['destinationNode'], $tag);\n }\n break;\n \n case \"Link\":\n $rawData['id'] = addTag($rawData['id'], $tag);\n $rawData['diagramId'] = addTag($rawData['diagramId'], $tag);\n $rawData['originNode']['id'] = addTag($rawData['originNode']['id'], $tag);\n $rawData['destinationNode']['id'] = addTag($rawData['destinationNode']['id'], $tag);\n break;\n \n case \"List\":\n for ($i = 0; $i < count($rawData['list']); $i++)\n {\n $rawData['list'][$i]['id'] = addTag($rawData['list'][$i]['id'], $tag);\n }\n break;\n \n default:\n // Probably should update to a specialized exception\n throw new BadFunctionCallException(\"Not a valid genericType\");\n break;\n \n }\n \n return $rawData;\n}", "protected function Debugear($variable)\n {\n var_dump($variable);\n exit;\n }", "function replaceChildren(&$element,&$val)\n {\n // Most of the this method is borrowed from parseAttributeIf() in HTML_Template_Flexy_Compiler_Flexy_Tag\n \n // If this is a method, not a variable (last character is ')' )...\n if (substr($val,-1) == ')') {\n // grab args..\n $args = substr($val,strpos($val,'(')+1,-1);\n // simple explode ...\n \n $args = strlen(trim($args)) ? explode(',',$args) : array();\n //print_R($args);\n \n // this is nasty... - we need to check for quotes = eg. # at beg. & end..\n $args_clean = array();\n // clean all method arguments...\n for ($i=0; $i<count($args); $i++) {\n if ($args[$i]{0} != '#') {\n $args_clean[] = $args[$i];\n continue;\n }\n // single # - so , must be inside..\n if ((strlen($args[$i]) > 1) && ($args[$i]{strlen($args[$i])-1}=='#')) {\n $args_clean[] = $args[$i];\n continue;\n }\n \n $args[$i] .=',' . $args[$i+1];\n // remove args+1..\n array_splice($args,$i+1,1);\n $i--;\n // reparse..\n }\n \n //echo('<br/>VAL: ' . $val . ' is seen as method');\n \n $childToken = $element->factory('Method',array(substr($val,0,strpos($val,'(')), $args_clean), $element->line);\n } else {\n\n //echo('<br/>VAL: ' . $val . ' is seen as var');\n $childToken = $element->factory('Var', '{'.$val.'}', $element->line);\n }\n\n $element->children = array($childToken);\n \n // move flexy:if's End postfix of the start tag to the child token\n if (!$element->close && $element->postfix) {\n $element->children = array_merge($element->children, $element->postfix);\n $element->postfix = '';\n }\n\n\n }", "private static function parseObject(mixed $object, int $level, array &$cache): string {\n $output = '';\n $className = get_class($object);\n\n if (($id = array_search($object, $cache, true)) !== false) $output .= \"{$className}#\" . (++$id) . '(...)';\n else if (static::$depth <= $level) $output .= \"{$className}(...)\";\n else {\n $id = array_push($cache, $object);\n $members = (array)$object;\n $keys = array_keys($members);\n $spaces = str_repeat(' ', $level * 4);\n $output .= \"$className#$id {\";\n\n foreach ($keys as $key) {\n $keyDisplay = strtr(trim(\"$key\"), [\"\\0\" => ':']);\n $output .= PHP_EOL . \"{$spaces} [$keyDisplay] => \" . self::parseVariable($members[$key], $level + 1, $cache);\n }\n $output .= PHP_EOL . \"{$spaces}}\";\n }\n return $output;\n }", "public function lookAt(string $variableName): TestGuy;", "function get_nested_val($name){ // SYSTEM FUNCTION - DO NOT USE!\n\t$curr_var = $this->vars[$name];\n\tfor($c = 0; $c <= $this->system_vars['cycle_nesting']; $c++)\n\t\t$curr_var = $curr_var[$this->system_vars['cycle_counters'][$c]];\n\tif (is_array($curr_var)){\n\t\t$this->show_notice($name, 3);\n\t\t$curr_var = '<font color=\"red\"><b>INVALID</b></font>';\n\t}\n\treturn $curr_var;\n}", "protected static function getItem($var, $key, $default = '') {\n\t\t\t\treturn is_object($var) ?\n\t\t\t\t\t( isset( $var->$key ) ? $var->$key : $default ) :\n\t\t\t\t\t( isset( $var[$key] ) ? $var[$key] : $default );\n\t\t\t}", "function _toType($value) {\n\tif (preg_match('/^(\"(.*)\"|\\'(.*)\\')/',$value,$matches)) {\n\t$value = (string)preg_replace('/(\\'\\'|\\\\\\\\\\')/',\"'\",end($matches));\n\t$value = preg_replace('/\\\\\\\\\"/','\"',$value);\n\t} elseif (preg_match('/^\\\\[(.+)\\\\]$/',$value,$matches)) {\n\t\t// Inline Sequence\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$value = array();\n\t\tforeach ($explode as $v) {\n\t\t$value[] = $this->_toType($v);\n\t\t}\n\t} elseif (strpos($value,': ')!==false && !preg_match('/^{(.+)/',$value)) {\n\t\t// It's a map\n\t\t$array = explode(': ',$value);\n\t\t$key = trim($array[0]);\n\t\tarray_shift($array);\n\t\t$value = trim(implode(': ',$array));\n\t\t$value = $this->_toType($value);\n\t\t$value = array($key => $value);\n\t} elseif (preg_match(\"/{(.+)}$/\",$value,$matches)) {\n\t\t// Inline Mapping\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$array = array();\n\t\tforeach ($explode as $v) {\n\t\t$array = $array + $this->_toType($v);\n\t\t}\n\t\t$value = $array;\n\t} elseif (strtolower($value) == 'null' or $value == '' or $value == '~') {\n\t\t$value = NULL;\n\t} elseif (preg_match ('/^[0-9]+$/', $value)) {\n\t// Cheeky change for compartibility with PHP < 4.2.0\n\t\t$value = (int)$value;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('true', 'on', '+', 'yes', 'y'))) {\n\t\t$value = true;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('false', 'off', '-', 'no', 'n'))) {\n\t\t$value = false;\n\t} elseif (is_numeric($value)) {\n\t\t$value = (float)$value;\n\t} else {\n\t\t// Just a normal string, right?\n\t\t$value = trim(preg_replace('/#(.+)$/','',$value));\n\t}\n\n\treturn $value;\n\t}" ]
[ "0.5543662", "0.55142194", "0.54707307", "0.51146024", "0.50153124", "0.50124216", "0.48821846", "0.47776705", "0.46889842", "0.4598568", "0.45862615", "0.45827296", "0.45504698", "0.45296976", "0.45193368", "0.45140865", "0.45030513", "0.44803602", "0.447461", "0.4459099", "0.44431022", "0.4433082", "0.44230968", "0.44230863", "0.44151387", "0.4357209", "0.43435806", "0.43247524", "0.4318261", "0.43117812", "0.4310065", "0.4307752", "0.4306882", "0.43035066", "0.42959315", "0.4293654", "0.4290447", "0.42792332", "0.42788613", "0.4276233", "0.42417273", "0.42354336", "0.4234475", "0.42285648", "0.42094606", "0.4185946", "0.41809475", "0.4171586", "0.4167675", "0.4133182", "0.41241616", "0.4123544", "0.41030386", "0.4099872", "0.40989304", "0.40927416", "0.40767962", "0.40648592", "0.40622696", "0.40549114", "0.4047699", "0.40462956", "0.40444103", "0.4033359", "0.40270597", "0.40259796", "0.402288", "0.40211412", "0.40157485", "0.40155703", "0.40038267", "0.4003649", "0.400258", "0.39997095", "0.39989012", "0.39981934", "0.39960656", "0.39948905", "0.39811844", "0.39806107", "0.39678165", "0.39633587", "0.39632434", "0.39626715", "0.39596626", "0.3957159", "0.39570668", "0.3952988", "0.39529717", "0.39446598", "0.39440513", "0.3943075", "0.3934373", "0.39306766", "0.39300385", "0.39270884", "0.39212728", "0.3916915", "0.3894956", "0.3888143", "0.38814273" ]
0.0
-1
Set value if key is not exists
public function setex($key, $value) { return $this->memcache->add($key, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function set($key, $value){\n \n if (!array_key_exists($key, self::$dades)) //array_key_exists comprueba si existe\n { \n self::$dades[$key] = $value; \n return true; //si existe le pasamos true\n \n }else\n { \n return false; //si existe le pasamos false \n } \n \n }", "abstract protected function putValue($key, $value);", "public function set($key, $value = null);", "public function set($key, $value = null);", "public function __set($key, $value)\n {\n if (strpos($key, '_') === 0) {\n return;\n }\n if ($this->_overwrite === true) {\n $this->_store[$key]=$value;\n if (isset($this->_engine)) {\n $this->_engine->save($this->_store);\n }\n } else {\n if (isset($this->$key) === true) {\n return;\n } else {\n $this->_store[$key]=$value;\n if (isset($this->_engine)) {\n $this->_engine->save($this->_store);\n }\n }\n }\n return;\n }", "private function set_if_not_null( $key, $value, &$array )\n {\n if ( $value !== null ) {\n $array[ $key ] = $value;\n }\n }", "public function set(string $key, $value = null);", "public function __set($key, $value);", "function set($key,$val) {\n\t\treturn ($key=='_id')?FALSE:($this->item[$key]=$val);\n\t}", "function setMeta($meta, $key, $value, $ignoreExistingKey = false)\n{\n if (!$meta)\n $meta = (object) array();\n\n //Ignore existing key\n if ($ignoreExistingKey) {\n if (isset($meta->{$key}))\n return $meta;\n }\n\n\n $meta->{$key} = $value;\n return $meta;\n}", "public function set( $key, $value );", "public function set( $key, $value );", "public function __set($key, $val);", "abstract public function set($key, $value);", "abstract public function set($key, $value);", "abstract public function set ($key, $value);", "public function setValue($key, $value);", "public function setValue($key, $value);", "function assign($key, $value = null) \n\t{\n\t\tif (is_array($key)) \n\t\t{\n\t\t\tforeach ($key as $k => $v) \n\t\t\t{\n\t\t\t\t$this->data[$k] = $v;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->data[$key] = $value;\n\t\t}\n\t}", "public function set($key,$value){\n\t\t$this->data[$key] = $value;\n\t\treturn true;\n\t}", "public function set($key, $value = null): bool;", "public function def($key, $value = null, $hash = 'request') {\n\t\tif (!$this->has($key, $hash)) $this->set($key, $value, $hash);\n\t}", "public static function Set($key, $value)\r\n {\r\n if (isset(self::$Data[$key])) {\r\n self::$Data[$key] = ($value == null) ? '' : $value;\r\n } elseif (!empty($key)) {\r\n self::$Data[$key] = ($value == null) ? '' : $value;\r\n }\r\n }", "public function __set($key,$value) {\n $cur = $this->key();\n if(!isset($this->_changed[$cur]) || !is_array($this->_changed[$cur])){\n $this->_changed[$cur]=[];\n }\n if($this->$key != $value){\n $this->_changed[$cur][$key] = $value;\n }\n $this->_data[$cur][$key] = $value;\n }", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "function _set($key,$value){\n switch($key){\n case 'value': case 'val': $this->set($value); return TRUE;\n case 'settings': $this->set_settings($value); return TRUE;\n case 'key': $this->set_key($value); return TRUE;\n }\n return FALSE;\n }", "public static function set(?string $key, $value): void\n {\n if (isset($key))\n self::$defined[$key] = $value;\n }", "public function set ($key, $value);", "function set($key,$val) {\n\t\treturn ($key=='_id')?FALSE:($this->document[$key]=$val);\n\t}", "public function setData($key, $value = null);", "public function overwrite($key, $value)\r\n\t{\r\n\t\tlist($baseKey, $searchKey) = $this->fetchKey($key);\r\n\t\t$registry = $this->get($baseKey);\r\n\r\n\t\tif (is_null($registry)) throw new \\Exception(\"Item [$key] does not exists\");\r\n\r\n\t\tif ($baseKey != $searchKey)\r\n\t\t{\r\n\t\t\tarray_set($registry, $searchKey, $value);\r\n\t\t\t$this->app['db']->table('system_registries')->where('key', '=', $baseKey)->update(array('value' => json_encode($registry)));\r\n\r\n\t\t\t$this->cache_storage[$baseKey] = $registry;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->app['db']->table('system_registries')->where('key', '=', $baseKey)->update(array('value' => json_encode($value)));\r\n\r\n\t\t\t$this->cache_storage[$baseKey] = $value;\r\n\t\t}\r\n\r\n\t\tCache::forever('torann.registry', $this->cache_storage);\r\n\r\n\t\treturn true;\r\n\t}", "public function set(string $key, mixed $value): void\n {\n if (null !== $value) {\n $this->items[$key] = $value;\n } else {\n unset($this->items[$key]);\n }\n }", "public function __set($key, $value) {\n\t}", "function set_array_value(&$array, $ignore_if_blank, $key, $value)\n{\n if ($value || (!$ignore_if_blank && isset($array[$key])))\n {\n if ($value)\n $array[$key] = $value;\n else\n unset($array[$key]);\n }\n}", "private static function set( $key, $value ) {\n\t\t// this method will raise an exception on invalid data\n\t\tself::validate( $key, $value );\n\t\t// set the value in the cache\n\t\tself::$_cache[$key] = $value;\n\t}", "function setIfNot($name, $value) {\n\t\tif ($this->_settings->exists($name)) {\n\t\t\treturn ;\n\t\t} # if\n\t\t\n\t\t$this->_settings->set($name,$value);\n\t}", "function __set($key,$val){\n if($this->_set($key,$val)==TRUE) return $this->_ok();\n return $this->_err(array(2,$key));\n }", "public function __set(string $key, $val): void;", "function set($key, $value);", "function set($key, $value);", "function set($key, $value);", "public function set($key = null, $value = null) {\n if( !is_string($key) ) throw new Exception('Keu given is not string!');\n if( !is_string($value) && !is_array($value)) throw new Exception('Value given is not array or string');\n $this->Key = $key;\n $this->Value = $value;\n $this->save();\n return true;\n }", "public function set($key, $value = null)\n {\n DotArr::set($this->data, $key, $value);\n }", "protected static function setValue( $key, $value ) {\n\n\t\tif ( $value ) {\n\n\t\t\tstatic::$data[ $key ] = $value;\n\n\t\t\treturn $value;\n\t\t}\n\t\telse {\n\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function set($key, $value) {\n\n }", "function set($key = '', $value)\n {\n }", "function set($key, $value){\n\t\n\t\t$this->hold_data[$key] = $value;\n\t\treturn true;\n\t\n\t}", "public function set($key,$value=null){\n if(is_array($key)){\n $this->vars += $key;\n }else{\n $this->vars[$key]=$value;\n }\n }", "static function set($key, $value)\n {\n self::$values[$key] = $value;\n }", "public function set(string $key, $value);", "public function set(string $key, $value);", "public function set(string $key, $value) : bool;", "public function set(string $key, $value): void;", "public function __set ($key, $value) {\n\t\t$this->defaultData[$key] = $value;\n\t\treturn $value;\n\t}", "public function set($key, $value = null)\n {\n $value = serialize($value);\n\n try {\n $this->table()->insert(compact('key', 'value'));\n } catch (Exception $e) {\n $this->table()->where('key', '=', $key)->update(compact('value'));\n }\n\n if ($this->cacheEnabled) {\n $this->cache->forget($this->getKey($key));\n }\n }", "public function __set($key, $value)\n {\n }", "public function put($key, $value);", "public function put($key, $value);", "public function __set($key, $value)\n {\n }", "public function __set($key, $value)\n {\n }", "public function __set($key, $value)\n {\n }", "public function setValue($key = null, $value = null)\n {\n $position = key(($this->configuration)) - 1;\n\n if (intval($position) === -1) {\n $position = count($this->configuration) - 1;\n }\n\n $keys = $this->Header; // Retorna todas as keys do item atual\n\n if (is_numeric($key) && isset($keys[$key])) { // se for um numero o indice substituira o key pelo seu nome\n $key = $keys[$key];\n }\n\n if (isset($this->_current[$key])) {\n $this->_current[$key] = $value;\n $this->configuration[$position][$key] = $value;\n return;\n }\n\n }", "function def( $key, $value = false ) { \n \n if( $value !== false ) {\n \n $this->cache[$key] = $value;\n \n }\n \n else {\n \n $defined = array_key_exists($key, $this->cache) and isset($this->cache[$key]);\n \n if( $defined ) return $this->cache[$key];\n \n return null;\n \n }\n \n }", "public function set($key, $val)\n\t\t{\n\t\t\t$this->storage[$key] = $val;\n//\t\t\tif (!is_string($key)){\n// return false;\n// }\n// self::getInstance()->$key = $val;\n\t\t}", "public /*void*/ function __set(/*scalar*/ $key, /*mixed*/ $value){}", "public function __set($key, $value) {\n $this->pos = 0;\n $this->data[$key] = $value;\n $this->keys = array_keys($this->data);\n }", "public function setIfNotExists(string $key, $value, int $ttl = self::DEFAULT_TTL): bool\n {\n return false;\n }", "#[ReturnTypeWillChange]\n public function offsetSet( $key, $value )\n {\n if ( isset( $this->dataset[$key] ) &&\n $this->checkValue( $value ) )\n {\n $this->dataValue[$key] = $value;\n }\n else\n {\n throw new ezcGraphNoSuchDataException( $key );\n }\n }", "public function set ( $key, &$value ) { \t$this->storage[$key] = $value; }", "public function set( $key, $value = null )\n\t{\n\t\tif ( is_array( $key ) )\n\t\t\tforeach ( $key as $innerKey => $innerValue )\n\t\t\t\tArr::set( $this->items, $innerKey, $innerValue );\n\t\telse\n\t\t\tArr::set( $this->items, $key, $value );\n\t}", "abstract public function Set(string $key, $value) : void;", "public function set($key, $value = null) {\n $this->map[$key] = $value;\n }", "public function set($strKey, $varValue);", "public function set($key, $value): void;", "public function put( $key, $value = null )\n {\n $this->loadSettingsIfNotLoaded();\n $this->unsaved = true;\n\n if ( is_array( $key ) ) {\n foreach ( $key as $k => $v ) {\n array_set( $this->settings, $k, $v );\n }\n } else {\n array_set( $this->settings, $key, $value );\n }\n }", "public function set($key, $data);", "public function offsetSet($key,$value){\n if(!array_key_exists($key,$this->definition)){\n throw new \\Disco\\exceptions\\Exception(\"Field `{$key}` is not defined by this data model\");\n }//if\n $this->data[$key] = $value;\n }", "public function set( $key , $value ) {\n\t\teval( '$this->items' . $this->nodelize( $key ) . ' = $value;' );\n\t}", "public static function Set($key, $val);", "public function set(string $key, $data);", "public function setExists($value);", "public function __set($key,$value){\n if(!array_key_exists($key,$this->definition)){\n throw new \\Disco\\exceptions\\Exception(\"Field `{$key}` is not defined by this data model\");\n }//if\n $this->data[$key] = $value;\n }", "public function __set($key, $val) {\n\tif (in_array(strtoupper($key), array_keys($this->paths))) trigger_error('You are not allowed to re-define '.$key, E_USER_NOTICE);\n\telse return $this->data[$key] = $val;\n}", "public function set($key,$value) {\n $this->_data[$key]=$value;\n }", "public function set($key, $value = null, $hash = 'request') {\n\t\t$this->_hashes[$hash][$key] = $value;\n\t}" ]
[ "0.67549324", "0.65523386", "0.64790684", "0.64790684", "0.64785045", "0.6433335", "0.63761485", "0.6366116", "0.63640505", "0.63016593", "0.62433386", "0.62433386", "0.62302697", "0.62285125", "0.62285125", "0.6226789", "0.6224177", "0.6224177", "0.619162", "0.6184403", "0.6180266", "0.6163968", "0.614837", "0.6139876", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61261725", "0.61164963", "0.61119956", "0.6107285", "0.6080345", "0.60763156", "0.60758793", "0.60754395", "0.606828", "0.606316", "0.60528624", "0.60369056", "0.60331327", "0.6027937", "0.60215825", "0.60215825", "0.60215825", "0.6015347", "0.59900486", "0.5989821", "0.59853196", "0.59715927", "0.5963478", "0.5959958", "0.59544504", "0.5950135", "0.5950135", "0.5945142", "0.5940716", "0.5940517", "0.59190124", "0.591631", "0.5915907", "0.5915907", "0.5915587", "0.59149593", "0.59149593", "0.5910946", "0.5906141", "0.58903176", "0.58768547", "0.5871773", "0.58623886", "0.5861429", "0.58603334", "0.58595103", "0.5857904", "0.5844353", "0.58354884", "0.58263934", "0.5817756", "0.581567", "0.5809468", "0.5807883", "0.5807077", "0.5806783", "0.580431", "0.5804158", "0.58036274", "0.5799069", "0.57971925" ]
0.0
-1
Get a new identifier
public function newIdentifier(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewId();", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "abstract public function getIdentifier();", "public abstract function getIdentifier();", "function getIdentifier();", "function getIdentifier();", "public function getIdentifier()\n {\n }", "public function intGetNewId() {\n $this->XaoThrow(\n \"_EntBase::Build(): This entity does not implement retrieval of a \".\n \"new numeric identifier as a descrite function. It may not be \" .\n \"applicable.\"\n , debug_backtrace()\n );\n }", "function getIdentifier() ;", "function getIdentifier() ;", "function getIdentifier() ;", "public function getIdentifier(): string;", "public function getIdentifier(): string;", "public function getIdentifier()\n {\n // TODO: Implement getIdentifier() method.\n }", "public static abstract function getIdentifier() : string;", "public function getIdentifier()\n {\n return 1;\n }", "public function getId(): Identifier;", "public function getIdentifier(): mixed;", "abstract public function getIdent();", "public function getIdentifier()\n {\n return new Identifier(self::IDENTIFIER);\n }", "public function __newID() {\n\t\treturn ('#'.$this->_fieldid);\n\t}", "public function getUniqueObjectIdentifier();", "public function getIdentifier(): string|int;", "protected function getNewID()\n {\n $ids = [];\n $namedIds = [];\n foreach (static::$ids as $k) {\n // attempt use the supplied value if the ID property is mutable\n $property = static::getProperty($k);\n if (in_array($property['mutable'], [self::MUTABLE, self::MUTABLE_CREATE_ONLY]) && isset($this->_unsaved[$k])) {\n $id = $this->_unsaved[$k];\n } else {\n $id = self::$driver->getCreatedID($this, $k);\n }\n\n $ids[] = $id;\n $namedIds[$k] = $id;\n }\n\n $this->_id = implode(',', $ids);\n $this->_ids = $namedIds;\n }", "public function obtenerID();", "public function determineId() {}", "public function getIdentifier()\n {\n return new Identifier($this->code);\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "function getID();", "public function obtenerId() {}", "abstract public function get_id();", "public function getIdentifier()\n {\n return $this->id;\n }", "public function newId()\n {\n return md5(microtime());\n }", "public function getIdentifierField();", "public function getIdentifier() {\n\n\t\treturn parent::getIdentifier() . '_' . parent::getValue();\n\t}", "function generateNewId(){\n\t\t$id = null;\n\t\t//while ( $this->getSessionData($id) !== null ){\n\t\t\t$id = rand(0,100000);\n\t\t//}\n\t\treturn $id;\n\t}", "public function getID();", "public function getID();", "public function getID();", "public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}", "public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}", "protected function getInstanceIdentifier() {}", "function getId();", "public function getID() : string;", "public function getIdentifier(): string\n {\n return self::IDENTIFIER;\n }", "public function getIdentifier(): string\n {\n return self::IDENTIFIER;\n }", "abstract public function identifier(): string;", "function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n\t{\n\t\treturn $this->identifier;\n\t}", "public function identifier()\n {\n return $this->id;\n }", "public function getID(): string;", "public function newid($str = 'id')\n {\n $this->idgen += 1;\n return $str.$this->idgen;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function get_identifier() {\n return $this->identifier;\n }", "public function getIdentifier() {\n\t\treturn $this->identifier;\n\t}", "abstract public function getUniqueId();", "public function GetId () ;", "function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function get_id();", "public function get_id();", "public function getIdentifier()\n {\n\n return $this->identifier;\n\n }", "public function createCompositeIdentifier()\n {\n $itemId = $this['id'];\n \n return $itemId;\n }", "public function createCompositeIdentifier()\n {\n $itemId = $this['id'];\n \n return $itemId;\n }", "public function getIdentifier()\n {\n return $this->slug ?: $this->id;\n }", "public function createID()\n {\n $myID = new \\MongoID();\n\n return (string) $myID;\n }", "public function getIdentifier() {\n return $this->identifier;\n }", "public function getIdentifier() {\n return $this->identifier;\n }", "abstract function getId();" ]
[ "0.80312693", "0.8014722", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.80135", "0.80135", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7962092", "0.7954783", "0.7890156", "0.7890156", "0.7722734", "0.7710018", "0.7702121", "0.7702121", "0.7699496", "0.76342916", "0.76342916", "0.7531337", "0.74982566", "0.7467266", "0.7407107", "0.7405491", "0.72461396", "0.72292125", "0.7194488", "0.71733457", "0.7161101", "0.7160368", "0.71478957", "0.71419245", "0.71044666", "0.7090671", "0.7090671", "0.7090671", "0.70876616", "0.70635897", "0.7049167", "0.702084", "0.70059663", "0.6973718", "0.6965296", "0.69428504", "0.6934931", "0.6934931", "0.6934931", "0.69327796", "0.69327796", "0.69140506", "0.69107616", "0.6910476", "0.68873346", "0.68873346", "0.6876023", "0.6870584", "0.6859126", "0.68467265", "0.6843085", "0.68398446", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68301326", "0.6827191", "0.68099076", "0.6797762", "0.67810374", "0.6778854", "0.6778854", "0.6778854", "0.6778854", "0.6774558", "0.6774558", "0.67646176", "0.6749305", "0.6749305", "0.67353517", "0.67296046", "0.67239535", "0.67239535", "0.6720169" ]
0.84006816
0
Check if version is up
public function has(string $version): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateIsAvailable()\n {\n return self::INSTALLED_VERSION != $this->version;\n }", "function checkForUpdate() {\n $cache_data = Terminus::getCache()->getData(\n 'latest_release',\n array('decode_array' => true)\n );\n if (!$cache_data\n || ((int)$cache_data['check_date'] < (int)strtotime('-7 days'))\n ) {\n $logger = Terminus::getLogger();\n try {\n $current_version = checkCurrentVersion();\n if (version_compare($current_version, TERMINUS_VERSION, '>')) {\n $logger->info(\n 'An update to Terminus is available. Please update to {version}.',\n array('version' => $current_version)\n );\n }\n } catch (\\Exception $e) {\n $logger->info($e->getMessage());\n $logger->info('Cannot retrieve current Terminus version.');\n }\n }\n}", "public function check_wp_version_check_exists()\n {\n }", "function alertcloud_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 126) {\n return false;\n }\n return true;\n}", "public function hasVersions(): bool;", "public function upgrade_check(){\n $this->upgrade_site();\n }", "function scheduledreporting_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 512) {\n return false;\n }\n return true;\n}", "function alertstream_component_checkversion()\n{\n if(!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 500) {\n return false;\n }\n return true;\n}", "public function hasVersion(){\n return $this->_has(1);\n }", "public static function has_update() {\n\t\trequire_once(trailingslashit(ABSPATH) . 'wp-admin/includes/plugin.php');\n\t\trequire_once(trailingslashit(ABSPATH) . 'wp-admin/includes/plugin-install.php');\n\t\treturn (version_compare(static::get_version(), static::get_remote_version()) < 0);\n\t}", "public function check_for_updates() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, $this->config->version, '!=' ) ) {\n $this->install();\n }\n }", "function tidypics_is_upgrade_available() {\n\t// sets $version based on code\n\trequire_once elgg_get_plugins_path() . \"tidypics/version.php\";\n\n\t$local_version = elgg_get_plugin_setting('version', 'tidypics');\n\tif ($local_version === false) {\n\t\t// no version set so either new install or really old one\n\t\tif (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album')) {\n\t\t\t$local_version = 0;\n\t\t} else {\n\t\t\t// set initial version for new install\n\t\t\telgg_set_plugin_setting('version', $version, 'tidypics');\n\t\t\t$local_version = $version;\n\t\t}\n\t} elseif ($local_version === '1.62') {\n\t\t// special work around to handle old upgrade system\n\t\t$local_version = 2010010101;\n\t\telgg_set_plugin_setting('version', $local_version, 'tidypics');\n\t}\n\n\tif ($local_version == $version) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function birdseye_component_checkversion()\n{\n if (!function_exists('get_product_release'))\n return false;\n if (get_product_release() < 207)\n return false;\n\n return true;\n}", "protected function _version_check()\n\t{\n\t\tee()->load->library('el_pings');\n\t\t$version_file = ee()->el_pings->get_version_info();\n\n\t\tif ( ! $version_file)\n\t\t{\n\t\t\tee('CP/Alert')->makeBanner('notices')\n\t\t\t\t->asWarning()\n\t\t\t\t->withTitle(lang('cp_message_warn'))\n\t\t\t\t->addToBody(sprintf(\n\t\t\t\t\tlang('new_version_error'),\n\t\t\t\t\tee()->cp->masked_url(DOC_URL.'troubleshooting/error_messages/unexpected_error_occurred_attempting_to_download_the_current_expressionengine_version_number.html')\n\t\t\t\t))\n\t\t\t\t->now();\n\t\t}\n\t}", "public static function isStable()\n {\n return (bool) preg_match('/^[0-9\\.]+$/', static::VERSION);\n }", "public static function check_for_updates() {\n global $wpdb;\n\n $current_version = get_option('h5p_version');\n if ($current_version === self::VERSION) {\n return; // Same version as before\n }\n\n // We have a new version!\n if (!$current_version) {\n // Never installed before\n $current_version = '0.0.0';\n }\n\n // Split version number\n $v = self::split_version($current_version);\n\n $between_1710_1713 = ($v->major === 1 && $v->minor === 7 && $v->patch >= 10 && $v->patch <= 13); // Target 1.7.10, 1.7.11, 1.7.12, 1.7.13\n if ($between_1710_1713) {\n // Fix tmpfiles table manually :-)\n $wpdb->query(\"ALTER TABLE {$wpdb->prefix}h5p_tmpfiles ADD COLUMN id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST, DROP PRIMARY KEY, ADD PRIMARY KEY(id)\");\n }\n\n // Check and update database\n self::update_database();\n\n $pre_120 = ($v->major < 1 || ($v->major === 1 && $v->minor < 2)); // < 1.2.0\n $pre_180 = ($v->major < 1 || ($v->major === 1 && $v->minor < 8)); // < 1.8.0\n $pre_1102 = ($v->major < 1 || ($v->major === 1 && $v->minor < 10) ||\n ($v->major === 1 && $v->minor === 10 && $v->patch < 2)); // < 1.10.2\n $pre_1110 = ($v->major < 1 || ($v->major === 1 && $v->minor < 11)); // < 1.11.0\n $pre_1113 = ($v->major < 1 || ($v->major === 1 && $v->minor < 11) ||\n ($v->major === 1 && $v->minor === 11 && $v->patch < 3)); // < 1.11.3\n $pre_1150 = ($v->major < 1 || ($v->major === 1 && $v->minor < 15)); // < 1.15.0\n\n // Run version specific updates\n if ($pre_120) {\n // Re-assign all permissions\n self::upgrade_120();\n }\n else {\n // Do not run if upgrade_120 runs (since that remaps all the permissions)\n if ($pre_180) {\n // Does only add new permissions\n self::upgrade_180();\n }\n if ($pre_1150) {\n // Does only add new permissions\n self::upgrade_1150();\n }\n }\n\n if ($pre_180) {\n // Force requirements check when hub is introduced.\n update_option('h5p_check_h5p_requirements', TRUE);\n }\n\n if ($pre_1102 && $current_version !== '0.0.0') {\n update_option('h5p_has_request_user_consent', TRUE);\n }\n\n if ($pre_1110) {\n // Remove unused columns\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'author');\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'keywords');\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'description');\n }\n\n if ($pre_1113 && !$pre_1110) { // 1.11.0, 1.11.1 or 1.11.2\n // There are no tmpfiles in content folders, cleanup\n $wpdb->query($wpdb->prepare(\n \"DELETE FROM {$wpdb->prefix}h5p_tmpfiles\n WHERE path LIKE '%s'\",\n \"%/h5p/content/%\"));\n }\n\n // Keep track of which version of the plugin we have.\n if ($current_version === '0.0.0') {\n add_option('h5p_version', self::VERSION);\n }\n else {\n update_option('h5p_version', self::VERSION);\n }\n }", "public static function check_version() {\n\t\ttry {\n\t\t\t$current_version = get_option( self::CK_DB_VERSION, 0 );\n\t\t\t$version_keys = array_keys( self::$db_migrations );\n\t\t\tif ( version_compare( $current_version, '0', '>' ) && version_compare( $current_version, end( $version_keys ), '<' ) ) {\n\t\t\t\t// We migrate the Db for all blogs.\n\t\t\t\tself::install_db( true );\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action(\n\t\t\t\t\t'admin_notices',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'WC_PostFinanceCheckout_Admin_Notices',\n\t\t\t\t\t\t'migration_failed_notices',\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function has_versions()\n {\n return ($this->get_current() != 1);\n }", "public function isInstalledVersionAReleasedVersion() {}", "public function isInstallVersionNewer()\n {\n // Get a db connection so we can find the installed version from #__extensions\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n\n $query\n ->select ($db->quoteName('manifest_cache'))\n ->from ($db->quoteName('#__extensions'))\n ->where ($db->quoteName('element') . ' = '. $db->quote('com_cajobboard'));\n\n $db->setQuery($query);\n\n $manifest = json_decode($db->loadResult(), true);\n $installedRelease = $manifest['version'];\n\n if (version_compare($newRelease, $installedRelease, 'le'))\n {\n JFactory::getApplication()->enqueueMessage(\n Text::sprintf('COM_CAJOBBOARD_NO_UPDATE_TO_AN_OLDER_VERSION', $installedRelease, $newRelease), 'error'\n );\n\n return false;\n }\n\n return true;\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( 'DateNinja', 'e64e02e0-38f8-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "public function hasVersion(){\n return $this->_has(3);\n }", "public function daily_version_check() {\n // data to send in our API request\n $api_params = [\n 'edd_action' => 'get_version',\n 'item_id' => 11\n ];\n // Call the API\n $response = wp_remote_post(\n WPSTG_STORE_URL, [\n 'timeout' => 15,\n 'sslverify' => false,\n 'body' => $api_params\n ]\n );\n // make sure the response came back okay\n if( is_wp_error( $response ) ) {\n return false;\n }\n $license = json_decode( wp_remote_retrieve_body( $response ) );\n update_option( 'wpstg_version_latest', $license->stable_version );\n }", "public function check_version() {\n\n\t\tif ( ! self::compatible_version() ) {\n\t\t\tif ( is_plugin_active( plugin_basename( THEMECOMPLETE_EPO_PLUGIN_FILE ) ) ) {\n\t\t\t\tdeactivate_plugins( plugin_basename( THEMECOMPLETE_EPO_PLUGIN_FILE ) );\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'disabled_notice' ) );\n\t\t\t\tif ( isset( $_GET['activate'] ) ) {\n\t\t\t\t\tunset( $_GET['activate'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( self::old_version() ) {\n\t\t\tdeactivate_plugins( 'woocommerce-tm-custom-price-fields/tm-woo-custom-prices.php' );\n\t\t\tadd_action( 'admin_notices', array( $this, 'deprecated_notice' ) );\n\t\t}\n\n\t\tif ( ! self::woocommerce_check() ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'disabled_notice_woocommerce_check' ) );\n\t\t}\n\n\t}", "protected function checkPcreVersion() {}", "public function test_wp_version_check_attached()\n {\n }", "function wp_version_check($extra_stats = array(), $force_check = \\false)\n {\n }", "public function isAutoVersion(): bool\n {\n }", "public function isOutdated(): bool\n {\n return $this->getVersionsBehind() > 0;\n }", "public function versionCheckAction()\n {\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n\n $currentVersion = \"1.6.3\";\n $clientVersion = $_GET['ver'];\n\n if ($clientVersion < $currentVersion) {\n echo \"upgrade\";\n } elseif ($clientVersion == $currentVersion) {\n echo \"latest\";\n } elseif ($clientVersion > $currentVersion) {\n echo \"development\";\n } else {\n echo \"unknown-version\";\n }\n }", "private function checkUpdate() {\n\n $doupdate = false;\n\n foreach(array_values($this->checkUpdateVersion) AS $package) {\n $match = explode(':', $package);\n // always set and extract if not match\n if ($this->get_config('last_'.$match[0].'_version') == $match[1]) {\n $doupdate = false;\n } else {\n $this->set_config('last_'.$match[0].'_version', $match[1]);\n $doupdate = true;\n break; // this is possibly needed to force install upgrade routines\n }\n }\n\n return $doupdate ? true : false;\n }", "function checkPluginUpdate($filename) {\n\tglobal $communitySettings;\n\n\t$filename = basename($filename);\n\t$upgradeVersion = (is_file(\"/tmp/plugins/$filename\")) ? plugin(\"version\",\"/tmp/plugins/$filename\") : \"0\";\n\t$installedVersion = $upgradeVersion ? plugin(\"version\",\"/var/log/plugins/$filename\") : 0;\n\n\tif ( $installedVersion < $upgradeVersion ) {\n\t\t$unRaid = plugin(\"unRAID\",\"/tmp/plugins/$filename\");\n\t\treturn ( $unRaid === false || version_compare($communitySettings['unRaidVersion'],$unRaid,\">=\") ) ? true : false;\n\t}\n\treturn false;\n}", "public function appVersionIsOutdated()\n {\n $appVersion = '0.0.1';\n\n if (Headers::isAndroid()) {\n $appVersion = $this->android_version;\n } elseif (Headers::isIos()) {\n $appVersion = $this->ios_version;\n }\n\n return -1 === version_compare(Headers::getAppVersion(), $appVersion) ? true : false;\n }", "protected function hasNewerVersion()\n\t{\n\t\treturn version_compare($this->getVersion(),$this->getConfigValue('latest_version'),'<');\n\t}", "public function checkRequiredVersion() {\n if (version_compare(PHP_VERSION, '4.3.2', '>=')) {\n return TRUE;\n }\n $this->logMsg(\n MSG_ERROR,\n PAPAYA_LOGTYPE_MODULES,\n 'Could not get HTML Purifier instance because this PHP version is too old.'\n );\n return FALSE;\n }", "public function page_check_version()\n\t{\n\t\tif (!$content = Http::get_file_on_server(FSB_REQUEST_SERVER, FSB_REQUEST_VERSION, 10))\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\t$content = explode(\"\\n\", $content);\n\n\t\tif (count($content) < 3)\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\tif (strpos('http', $content[2]) === false)\n\t\t{\n\t\t\tarray_shift($content);\n\t\t}\n\n\t\t@list($last_version, $url, $level) = $content;\n\t\t$last_version = trim($last_version);\n\n\t\t// Aucune redirection\n\t\tFsb::$session->data['u_activate_redirection'] = 2;\n\n\t\tif (!is_last_version(Fsb::$cfg->get('fsb_version'), $last_version))\n\t\t{\n\t\t\tDisplay::message(sprintf(Fsb::$session->lang('adm_old_version'), $last_version, Fsb::$cfg->get('fsb_version'), $url, $url, Fsb::$session->lang('adm_version_' . trim($level))) . '<br /><br />' . sprintf(Fsb::$session->lang('adm_click_view_newer'), $url));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDisplay::message('adm_version_ok', 'index.' . PHPEXT, 'index_adm');\n\t\t}\n\t}", "function tptn_update_db_check() {\n\tglobal $tptn_db_version, $network_wide;\n\n\tif ( get_site_option( 'tptn_db_version' ) != $tptn_db_version ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison\n\t\ttptn_activation_hook( $network_wide );\n\t}\n}", "private function checkVersion($version){\n\t\tif(VersionMappingBackendQuery::create()->filterByServerRelease(YaffmapConfig::get('version'))->filterByClientRelease($version)->count() == 0){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t}", "function myplugin_update_db_check()\n\t{\n\n\n\t\t// Get the Current DB and check against this verion\n\t\t$currentDBversion = get_option('agreedMarkingDB_version');\n\t\t$thisDBversion = $this->DBversion;\n\n\t\tif($thisDBversion>$currentDBversion)\n\t\t{\n\n\t\t\t$this->createTables();\n\t\t\tupdate_option('agreedMarkingDB_version', $thisDBversion);\n\t\t}\n\t\t//$this->createTables(); // Testing\n\n\t}", "public function isDatabaseVersionUpToDate()\r\n {\r\n // NOTE: The default 3.2 version number here is ok, because it defines the case of older plugin versions,\r\n // when plugin version data was not saved to db\r\n $databaseVersion = 3.2;\r\n\r\n if($this->checkBlogIdColumnExists())\r\n {\r\n // We are testing NRS 5.0 or later database version\r\n $validBlogId = intval($this->blogId);\r\n $sql = \"\r\n SELECT conf_value AS plugin_version\r\n FROM {$this->conf->getPrefix()}settings\r\n WHERE conf_key='conf_plugin_version' AND blog_id='{$validBlogId}'\r\n \";\r\n $databaseVersionResult = $this->conf->getInternalWPDB()->get_var($sql);\r\n if(!is_null($databaseVersionResult))\r\n {\r\n $databaseVersion = floatval($databaseVersionResult);\r\n }\r\n } else\r\n {\r\n // We are testing NRS 4.3 or earlier database version when blog_id column did not yet existed\r\n $sql = \"\r\n\t\t\t\tSELECT conf_value AS plugin_version\r\n\t\t\t\tFROM {$this->conf->getPrefix()}settings\r\n\t\t\t\tWHERE conf_key='conf_plugin_version'\r\n\t\t\t\";\r\n $databaseVersionResult = $this->conf->getInternalWPDB()->get_var($sql);\r\n if(!is_null($databaseVersionResult))\r\n {\r\n $databaseVersion = floatval($databaseVersionResult);\r\n }\r\n }\r\n $codeVersion = $this->conf->getVersion();\r\n\r\n // DEBUG\r\n //echo \"DB VERSION: {$databaseVersion}<br />\";\r\n //echo \"CODE VERSION: {$codeVersion}<br />\";\r\n\r\n return $databaseVersion >= $codeVersion ? TRUE : FALSE;\r\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, '9bfb17aa-f8f0-4638-a549-af4f86a9d412', $this->info->version );\n\t}", "function check_version( $version ) {\n\t$sql = \"SELECT * FROM movie_versions WHERE version_name = \".\n\t\t\tformat_sql( $version );\n\t$res = mysql_query( $sql );\n\tif ( mysql_num_rows( $res ) > 0 ) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "public function hasVersion()\n {\n return $this->version !== null;\n }", "protected function checkPhpVersion() {}", "private static function _checkProjectVersion() {\n $composer_openfed = json_decode(file_get_contents('composer.openfed.json'), TRUE);\n $current_version = $composer_openfed['require']['openfed/openfed8'];\n preg_match('/(?:[\\d+\\.?]+[a-zA-Z0-9-]*)/', $current_version, $matches);\n // If current version is dev, we should ignore version check.\n if (strpos($current_version, 'dev') !== FALSE) {\n return FALSE;\n }\n\n return version_compare($matches[0], '10.0', '>=');\n }", "public function check_version_and_update() {\n\t\tif ( ! defined( 'IFRAME_REQUEST' ) && $this->version !== WC_PAYSAFE_PLUGIN_VERSION ) {\n\t\t\t$this->update();\n\t\t}\n\t}", "function versionCheck($template) {\n\tglobal $communitySettings;\n\n\tif ( $template['MinVer'] && ( version_compare($template['MinVer'],$communitySettings['unRaidVersion']) > 0 ) ) return false;\n\tif ( $template['MaxVer'] && ( version_compare($template['MaxVer'],$communitySettings['unRaidVersion']) < 0 ) ) return false;\n\treturn true;\n}", "function version_check($vercheck)\n {\n $minver = str_replace(\".\",\"\", $vercheck);\n $curver = str_replace(\".\",\"\", phpversion());\n return ($curver >= $minver) ? TRUE : FALSE;\n }", "function plugin_chkVersion_jtickets() {\n\tglobal $_JTICKETS_CONF;\n\t\n\treturn $_JTICKETS_CONF['pi_version'];\n}", "public function action_update_check()\n\t{\n\t\tUpdate::add( 'StatusNet', '8676A858-E4B1-11DD-9968-131C56D89593', $this->info->version );\n\t}", "public function update_db_check() {\n\t\t// Add a database version to help with upgrades and run SQL install\n\t\tif ( !get_option( 'vfb_pro_db_version' ) ) {\n\t\t\tupdate_option( 'vfb_pro_db_version', $this->vfb_db_version );\n\t\t\t$this->install_db();\n\t\t}\n\n\t\t// If database version doesn't match, update and maybe run SQL install\n\t\tif ( version_compare( get_option( 'vfb_pro_db_version' ), $this->vfb_db_version, '<' ) ) {\n\t\t\tupdate_option( 'vfb_pro_db_version', $this->vfb_db_version );\n\t\t\t$this->install_db();\n\t\t}\n\t}", "protected function is_upgrade()\n\t{\n\t\tif ( get_site_option( 'cur_from' ) ) :\n\t\t\treturn TRUE;\n\t\telse :\n\t\t\treturn FALSE;\n\t\tendif;\n\t}", "public function isVersionActivelyMaintained() {}", "function NeedDatabaseUpgrade()\n\t{\n\t\tif ($this->database_version == -1) {\n\t\t\t$this->CheckCron();\n\t\t}\n\n\t\tif ($this->database_version < SENDSTUDIO_DATABASE_VERSION) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function rename_component_checkversion()\n{\n // Needs permission fix in reconfigure_nagios.sh script in 2011R2.4\n if (!function_exists('get_product_release') || get_product_release() < 300) {\n return false;\n }\n return true;\n}", "public function action_update_check()\n\t{\n\t\tUpdate::add('Ohloh Badge', '42aaa113-4285-42ef-a811-3eb4281cee7c', $this->info->version);\n\t}", "function admin_check_version()\n{\n global $app, $globalSettings;\n $versionAnswer = [];\n $contents = file_get_contents(VERSION_URL);\n if ($contents == false) {\n $versionClass = 'error';\n $versionAnswer = sprintf(getMessageString('admin_new_version_error'), $globalSettings['version']);\n } else {\n $versionInfo = json_decode($contents);\n $version = $globalSettings['version'];\n if (strpos($globalSettings['version'], '-') === false) {\n $v = preg_split('/-/', $globalSettings['version']);\n $version = $v[0];\n }\n $result = version_compare($version, $versionInfo->{'version'});\n if ($result === -1) {\n $versionClass = 'success';\n $msg1 = sprintf(getMessageString('admin_new_version'), $versionInfo->{'version'}, $globalSettings['version']);\n $msg2 = sprintf(\"<a href=\\\"%s\\\">%s</a>\", $versionInfo->{'url'}, $versionInfo->{'url'});\n $msg3 = sprintf(getMessageString('admin_check_url'), $msg2);\n $versionAnswer = $msg1 . '. ' . $msg3;\n } else {\n $versionClass = '';\n $versionAnswer = sprintf(getMessageString('admin_no_new_version'), $globalSettings['version']);\n }\n }\n $app->render('admin_version.html', [\n 'page' => mkPage(getMessageString('admin_check_version'), 0, 2),\n 'versionClass' => $versionClass,\n 'versionAnswer' => $versionAnswer,\n 'isadmin' => true,\n ]);\n}", "function verify_version_for_user($version) // Colorize: green\n { // Colorize: green\n return isset($version) // Colorize: green\n && // Colorize: green\n is_int($version) // Colorize: green\n && // Colorize: green\n $version >= 20190101 // Colorize: green\n && // Colorize: green\n $version <= 99999999; // Colorize: green\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add('Atom Threading Extensions', 'a413fa7e-76cf-4edf-b7c5-53b8aa648eef', $this->info->version);\n\t}", "public function getVersion()\n {\n return true;\n }", "public function needs_updating() {\n\t\t// We need updating if we don't need to install, and the current version is less than target version\n\t\tif ( $this->needs_installing() === false && version_compare( $this->get_current_version(), REDIRECTION_DB_VERSION, '<' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Also if we're still in the process of upgrading\n\t\tif ( $this->get_current_stage() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function is_possible_upgrade() {\n\t\t\treturn false;\n\t\t}", "public function isOutdated() {}", "public function wp_check_update()\n\t{\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/emulsion-io/wp-migration-url/master/version.json'.'?'.mt_rand());\n\t\t$version = json_decode($content);\n\n\t\t//var_dump($version); exit;\n\n\t\t$retour['version_courante'] = $this->_version;\n\t\t$retour['version_enligne'] = $version->version;\n\n\t\tif($retour['version_courante'] != $retour['version_enligne']) {\n\t\t\t$retour['maj_dipso'] = TRUE;\n\t\t} else {\n\t\t\t$retour['maj_dipso'] = FALSE;\n\t\t}\n\n\t\treturn $retour;\n\t}", "private function isOldVersion() {\r\n\t\treturn $this->getRequest ()->getParam ( \"oldversion\", null ) == 1;\r\n\t}", "public function hasOnlineversion()\n {\n return $this->get(self::ONLINEVERSION) !== null;\n }", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "function wp_check_browser_version()\n {\n }", "public static function check()\n\t\t{\n\t\t\tif(!($v = get_option(\"ws_plugin__s2member_activated_version\")) || !version_compare($v, WS_PLUGIN__S2MEMBER_VERSION, \">=\"))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"version\");\n\n\t\t\telse if(is_multisite() && is_main_site() && (!($mms_v = get_option(\"ws_plugin__s2member_activated_mms_version\")) || !version_compare($mms_v, WS_PLUGIN__S2MEMBER_VERSION, \">=\")))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"mms_version\");\n\n\t\t\telse if(!($l = (int)get_option(\"ws_plugin__s2member_activated_levels\")) || $l !== $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"])\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"levels\");\n\t\t}", "function checkCurrentVersion() {\n $request = new Request();\n $url = 'https://api.github.com/repos/pantheon-systems/cli/releases';\n $url .= '?per_page=1';\n $response = $request->simpleRequest($url, array('absolute_url' => true));\n $release = array_shift($response['data']);\n Terminus::getCache()->putData(\n 'latest_release',\n array('version' => $release->name, 'check_date' => time())\n );\n return $release->name;\n}", "public function addCheckingForUpdate() {\n global $laterpay_version;\n\n if ( get_option('laterpay_version') != $laterpay_version ) {\n $this->activate();\n }\n }", "function verify_version($version) // Colorize: green\n { // Colorize: green\n return isset($version) // Colorize: green\n && // Colorize: green\n is_int($version) // Colorize: green\n && // Colorize: green\n $version >= 20190101000000 // Colorize: green\n && // Colorize: green\n $version <= 99999999999999; // Colorize: green\n }", "function db_check() {\n\t\tif(!is_admin() || !$this->db_option || !$this->db_version || !$this->table_schema) return false;\n\t\tglobal $wpdb;\n\t\t$current_db_version = get_option($this->db_option);\n\t\tif($this->db_version != $current_db_version) {\n\t\t\t$this->db_install_options();\n\t\t\t$this->db_install($sql);\n\t\t}\n\t}", "public function checkApiIsUp() {\n\t\t$result = $this->useCfCURLQuery( \"https://socket.bittrex.com/signalr/ping\" );\n\t\tif ( $result ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isVersionless(): bool\n {\n return ! $this->isVersioning();\n }", "public function does_support( $version ) {\n\t\treturn version_compare( $this->get_current_version(), $version, 'ge' );\n\t}", "public function checkVersions() {\n\t\treturn ($this->checkPHPVersion() == self::VERSION_COMPATIBLE) && ($this->checkOpenSSLVersion() == self::VERSION_COMPATIBLE) && ($this->checkWordPressVersion() == self::VERSION_COMPATIBLE);\n\t}", "private function is_php_version_ready() {\n\n\t\tif ( ! version_compare( $this->min_php_version , PHP_VERSION, '>=' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->add_error_notice(\n\t\t\t'PHP ' . $this->min_php_version . '+ is required',\n\t\t\t'You\\'re running version ' . PHP_VERSION\n\t\t);\n\n\t\treturn false;\n\t}", "public static function check_db_version_for_addons(){\n $is_new_addon_db_version_available = false;\n $installed_addons = self::get_installed_addons_list();\n if(empty($installed_addons)) return;\n foreach($installed_addons as $installed_addon){\n $current_addon_db_version = get_option($installed_addon['name'] . '_addon_db_version');\n if(!$current_addon_db_version || version_compare($current_addon_db_version, $installed_addon['db_version'])){\n update_option( $installed_addon['name'] . '_addon_db_version', $installed_addon['db_version'] );\n $is_new_addon_db_version_available = true;\n }\n }\n if($is_new_addon_db_version_available) self::install_database_for_addons();\n }", "public static function isBelow_6_0()\n {\n return (self::getVersionAsInteger() < self::VERSION_6_0);\n }", "function checkVersion($version)\n {\n return version_compare($this->getVersion(), $version, 'lt');\n }", "function __requirements(){\n\nglobal $__settings, $error, $software;\n\n\t//If there are some shorfalls then pass it to $error and return false\n\tif(sversion_compare($__settings['ver'], '5.5.2.1', '<')){\n\t\t$error[] = 'You cannot upgrade to '.$software['ver'].' unless you have upgraded to 5.5.2.1';\n\t\treturn false;\n\t}\n\t\n\treturn true;\n\n}", "function cj_authorship_check()\n{\n if (get_site_option(CJ_AUTHORSHIP_VERSION_OPTION) != \\CJ_Authorship\\CJ_Authorship_Handler::VERSION) {\n cj_authorship_install();\n }\n}", "function is_wp_version_compatible($required)\n {\n }", "public function check() {\n\t\trequire_once 'PEAR/Registry.php';\n\t\t$registry = new PEAR_Registry();\n\n\t\t$installedVersion = $registry->packageInfo($this->name, 'version', $this->channel);\n\t\tif (is_null($installedVersion)) {\n\t\t\t$this->log('Package \"'.$this->name.'\" from \"'.$this->channel.'\" is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\tif ($this->min && version_compare($installedVersion, $this->min, '<')) {\n\t\t\t$this->log('Package \"'.$this->name.'\" from \"'.$this->channel.'\" is '.$installedVersion.'. >= '.$this->min.' is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\tif ($this->max && (version_compare($installedVersion, $this->max, '>'))) {\n\t\t\t$this->log('Package \"'.$this->name.'\" from \"'.$this->channel.'\" is '.$installedVersion.'. <= '.$this->max.' is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\t$this->log('Package \"'.$this->name.'\" '.$installedVersion.' is passed', Project::MSG_VERBOSE);\n\n\t\treturn 0;\n\t}", "public function checkDbVersion()\n {\n if ( GALETTE_MODE === 'DEV' ) {\n Analog::log(\n 'Database version not checked in DEV mode.',\n Analog::INFO\n );\n return true;\n }\n try {\n $select = new \\Zend_Db_Select($this->db);\n $select->from(\n PREFIX_DB . 'database',\n array('version')\n )->limit(1);\n $sql = $select->__toString();\n $res = $select->query()->fetch();\n return $res->version === GALETTE_DB_VERSION;\n } catch ( \\Exception $e ) {\n Analog::log(\n 'Cannot check database version: ' . $e->getMessage(),\n Analog::ERROR\n );\n return false;\n }\n }", "function updateVersion() {\n\t\tif ($this->newVersion->compare($this->currentVersion) > 0) {\n\t\t\t$versionDao =& DAORegistry::getDAO('VersionDAO');\n\t\t\tif (!$versionDao->insertVersion($this->newVersion)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$result = true;\n\t\tHookRegistry::call('Installer::updateVersion', array(&$this, &$result));\n\n\t\treturn $result;\n\t}", "protected function checkOwnCloudVersion($status) {\n\t\t$decoded = \\json_decode($status, true);\n\t\tif (!empty($decoded) && isset($decoded['version'])) {\n\t\t\tif (!\\version_compare($decoded['version'], '9.0.0', '>=')) {\n\t\t\t\tthrow new HintException('Remote server version is too low. ownCloud 9.0 is required.');\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function isNewerThan($version = '5.3')\n {\n return version_compare(App::VERSION(), $version) > 0;\n }", "function is_version( $version = '3.5' ) {\n\t\tglobal $wp_version;\n\t\treturn version_compare( $wp_version, $version, '>=' );\n\t}", "public function checkForUpdates()\n\t{\n\t\tif (!is_numeric(BUILD))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// HOOK: proxy module\n\t\tif (Config::get('useProxy')) {\n\t\t\t$objRequest = new \\ProxyRequest();\n\t\t} else {\n\t\t\t$objRequest = new \\Request();\n\t\t}\n\n\t\t$objRequest->send(\\Config::get('liveUpdateBase') . (LONG_TERM_SUPPORT ? 'lts-version.txt' : 'version.txt'));\n\n\t\tif (!$objRequest->hasError())\n\t\t{\n\t\t\t\\Config::set('latestVersion', $objRequest->response);\n\t\t\t\\Config::persist('latestVersion', $objRequest->response);\n\t\t}\n\n\t\t// Add a log entry\n\t\t$this->log('Checked for Contao updates', __METHOD__, TL_CRON);\n\t}", "public function version($check = null);", "abstract function has_premium_version();", "private function validateVersion()\n {\n return preg_match('/[0-99]+\\.[0-99]+\\.[0-99]+.*/', $this->version);\n }", "public static function old_version() {\n\n\t\tif ( class_exists( 'TM_Custom_Prices' ) ) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "public function upgradePossible () {\n $locale = git::getTagsInstallLatest();\n $repo = conf::getModuleIni('system_repo');\n $remote = git::getTagsRemoteLatest($repo);\n if ($remote > $locale) {\n return true;\n }\n return false;\n }", "function RSS_upgrade($oldversion)\n{\n // Update successful\n return true;\n}", "public function isUnstable($version)\n {\n return !$this->stable($version);\n }" ]
[ "0.7343413", "0.7320498", "0.72607446", "0.723381", "0.7180005", "0.7164551", "0.71060365", "0.7105198", "0.7084488", "0.70839447", "0.7081866", "0.7081547", "0.70758194", "0.7033066", "0.7007108", "0.70015234", "0.69582623", "0.6943205", "0.6926823", "0.68903023", "0.6856554", "0.68556994", "0.68459135", "0.68338484", "0.68239087", "0.6812128", "0.6790714", "0.67791754", "0.67664284", "0.67588377", "0.6744313", "0.67364717", "0.6688304", "0.66634315", "0.6662423", "0.6658371", "0.664829", "0.662604", "0.65995795", "0.6598804", "0.65970516", "0.6592784", "0.6574378", "0.6564325", "0.65418947", "0.6532558", "0.65099347", "0.6498647", "0.64980745", "0.6497751", "0.6467575", "0.64660895", "0.64656097", "0.64491874", "0.64460653", "0.6436859", "0.64296186", "0.6426253", "0.64047074", "0.6394676", "0.639436", "0.63784677", "0.6372864", "0.63717824", "0.6371722", "0.63593113", "0.6334811", "0.6333946", "0.6328745", "0.63270235", "0.6323022", "0.63168365", "0.63126653", "0.6312619", "0.6299064", "0.6294998", "0.6289487", "0.6287038", "0.627714", "0.62765867", "0.62740755", "0.6255487", "0.62493455", "0.6248922", "0.62401736", "0.62291026", "0.62187827", "0.62122875", "0.6209377", "0.6182492", "0.6181189", "0.6176963", "0.61757344", "0.617101", "0.6167795", "0.61617905", "0.61561793", "0.6155687", "0.6151613" ]
0.6222619
87
Get the current version
public function current(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentVersion();", "public function get_version();", "function get_version() {\n\n\t\treturn $this->version;\n\n\t}", "public function getVersion()\n {\n return $this->get(self::_VERSION);\n }", "public static function get_version() {\n return self::$version;\n }", "public function getVersion()\n {\n return $this->get(self::VERSION);\n }", "public function retrieveVersion()\n {\n return $this->start()->uri(\"/api/system/version\")\n ->get()\n ->go();\n }", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "function &getCurrentVersion() {\n\t\treturn $this->currentVersion;\n\t}", "public function get_version()\n {\n return $this->version;\n }", "public function get_version()\n {\n return $this->version;\n }", "public function get_version() { \n\n\t\treturn $this->version; \n\n\t}", "public function get_version() {\n return $this->version;\n }", "public function getVersion() {\n\t\tif($this->version == \"\")\n\t\t$this->version = \"0.0.0\";\n\t\treturn $this->version;\n\t}", "public function getCurrentVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 0 ? $versions[0] : 0;\n }", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function get_version(): string\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->sendrequest('version', null);\n }", "function getCurrentVersion() {\n return json_decode(file_get_contents(storage_path('app/version.json')), true);\n}", "public function getVersion()\n {\n return $version;\n }", "public static function get_current_version() {\n\t\t// $db = JFactory::getDbo();\n\t\t// $db->setQuery('SELECT manifest_cache FROM #__extensions WHERE element = \"mod_slideshowck\"');\n\t\t// $manifest = json_decode($db->loadResult(), true);\n\t\t// $installed_version = $manifest['version'];\n\t\t\n\t\t// get the version installed\n\t\t$installed_version = 'UNKOWN';\n\t\t$file_url = JPATH_SITE .'/modules/mod_slideshowck/mod_slideshowck.xml';\n\t\tif ($xml_installed = JFactory::getXML($file_url)) {\n\t\t\t$installed_version = (string)$xml_installed->version;\n\t\t}\n\n\t\treturn $installed_version;\n\t}", "public static function version()\r\n {\r\n return self::$version;\r\n }", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }", "public static function getVersion()\n\t{\n\t\treturn self::$_version;\n\t}", "public function getVersion(){\n\t\treturn $this->version;\n\t}", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "function GetVersion()\n {\n return '1.0';\n }", "public function getVersion()\r\n {\r\n return $this->version;\r\n }", "public static final function getCurrentVersion() : Version\n {\n return new Version(self::VERSION);\n }", "public function getVersion()\n {\n return $this->values[\"version\"];\n }", "function get_version() {\n return self::VERSION;\n }", "function get_version() {\n return self::VERSION;\n }", "public function getVersion()\n {/*{{{*/\n return $this->_version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }", "public function get_version(){\n return $this->_version;\n }", "public function getVersion()\n\t{\n\t\treturn $this->version;\n\t}", "public function getVersion(): string;", "public function getVersion(): string;", "public function getVersion() {\r\n $version = $this->QuerySysStatus(1);\r\n return $version['ver-key'];\r\n }", "public function getVersion() {\n\t\treturn self::$version;\n\t}", "public function getVersion() {\r\n return $this->version;\r\n }", "public function getVersion() {\n return isset($this->data['version']) ? $this->data['version'] : null;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();" ]
[ "0.90437883", "0.8404134", "0.83468676", "0.82837486", "0.82742316", "0.8271975", "0.82634044", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82078373", "0.8197135", "0.8197135", "0.8177875", "0.81719226", "0.81653637", "0.8147729", "0.81269836", "0.8108384", "0.80543363", "0.80287796", "0.8026055", "0.8024699", "0.80209655", "0.8017189", "0.8007553", "0.7996099", "0.7987614", "0.7972071", "0.7955475", "0.79514533", "0.79505354", "0.79477745", "0.79477745", "0.7947182", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.79426533", "0.793987", "0.79361546", "0.7930642", "0.7919215", "0.7919215", "0.7913691", "0.79064995", "0.7906391", "0.7893688", "0.78855234", "0.78855234", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018", "0.7885018" ]
0.0
-1
Add a version Mark this version as upgrade
public function add(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_version() {\n $installed = get_option( 'wd_academy_installed' );\n if ( $installed ) {\n update_option( 'wd_academy_installed', time() );\n }\n update_option( 'wd_academy_version', WD_ACADEMY_VERSION );\n }", "public function upgrade () {\r\n }", "protected function incrementVersion(): void\n {\n $version = $this->getVersion() + 1;\n\n $this->store->forever($this->getCacheVersionKey(), $version);\n\n static::$versions[$this->prefix] = $version;\n }", "public function setVersion($version) {}", "public function setVersion($version) {}", "protected function whenNewVersionWasRequested()\n {\n }", "function add_new_version( $version ) {\n\t$sql = \"INSERT INTO movie_versions (version_name) VALUES (\".\n\t\t\tformat_sql( $version ) . \n\t\t\t\")\";\n\t//echo $sql;\n\t$res = mysql_query( $sql );\n\tif ( $res ) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "protected function _upgrade()\n {\n $this->helper->pluginBroker->callHook(\n 'upgrade', array('old_version' => self::$oldVersion), 'Neatline'\n );\n }", "public function setVersion(string $version);", "public function registerVersion() {\n $this->loadModel('Versions');\n $result = $this->Versions->newEntity();\n if ($this->request->is('post') || $this->request->is('put')) {\n $this->Versions->patchEntity($result, $this->request->data(), [\n 'validate' => 'adminAdd'\n ]);\n if ($this->Versions->save($result)) {\n $this->redirect(array('controller' => 'users', 'action' => 'version'));\n }\n }\n $this->set(compact('result'));\n }", "public function prependVersion(Version $version)\n {\n array_unshift($this->versions, $version);\n }", "private function _log_version_number () {\n update_option( $this->_token . '_version', $this->_version );\n }", "public function setVersion($version) {\n throw new \\BadFunctionCallException('Cannot set version number of graded version');\n }", "public function upgrade( $installed_version ) {\n\n\t\t$this->installed_version = $installed_version;\n\n\t\tadd_action( 'woocommerce_after_register_taxonomy', array( $this, 'delayed_upgrade' ) );\n\t}", "private function _log_version_number () {\n\t\tupdate_option( $this->_token . '_version', $this->_version );\n\t}", "protected function upgrade() {\r\n\t\tif (!$version = $this->ci->options->get('gw_users_version', false)) {\r\n\t\t\t$this->setup();\r\n\t\t}\r\n\t}", "private function setVersion($v){\n\t\t$this->version = $v;\n\t}", "public function upgrade($old_version)\r\n\t{\r\n\t\t// Upgrade Logic\r\n\t\treturn true;\r\n\t}", "public function addComponentToCheck($name, $version)\n {\n $this->componentsToCheck[$name] = $version;\n }", "public function upgrade(){\n \n global $DB;\n \n $return = true;\n $version = $this->version; # This is the current DB version we will be using to upgrade from \n\n \n if ($version < 2013102401)\n {\n \n $DB->insert_record(\"lbp_plugin_report_elements\", array(\"pluginid\" => $this->id, \"getstringname\" => \"reports:bcgt_target_grades:aspgrades\", \"getstringcomponent\" => \"block_bcgt\"));\n $this->version = 2013102401;\n $this->updatePlugin();\n \\mtrace(\"## Inserted plugin_report_element data for plugin: {$this->title}\");\n \n }\n \n if ($version < 2014012402)\n {\n $DB->insert_record(\"lbp_plugin_report_elements\", array(\"pluginid\" => $this->id, \"getstringname\" => \"reports:bcgt_target_grades:percentwithaspgrades\", \"getstringcomponent\" => \"block_bcgt\"));\n $this->version = 2014012402;\n $this->updatePlugin();\n \\mtrace(\"## Inserted plugin_report_element data for plugin: {$this->title}\");\n }\n \n \n return $return; # Never actually seems to change..\n \n \n }", "public function increment($var,$version)\n {\n $this->redis->set($var,$version);\n }", "public function setVersion($name) {\n\n // Take what is the $current variable and copy it into an entry in\n // the versions variable.\n $this->versions[$name] = $this->current;\n }", "public function updateDatabase($version) {\n\t\t$installedVersion = get_option(UserAgentThemeSwitcherData::VERSION_KEY, 0);\n\n\t\tif($installedVersion == 0) {\n\t\t\t$this->createDatabase($version);\n\t\t}\n\n\t\tif($installedVersion != $version) {\n\t\t\tif($version != 0) {\n\t\t\t\tadd_option(UserAgentThemeSwitcherData::VERSION_KEY, $version);\n\t\t\t}\n\t\t}\n\t}", "function updateVersion() {\n\t\tif ($this->newVersion->compare($this->currentVersion) > 0) {\n\t\t\t$versionDao =& DAORegistry::getDAO('VersionDAO');\n\t\t\tif (!$versionDao->insertVersion($this->newVersion)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$result = true;\n\t\tHookRegistry::call('Installer::updateVersion', array(&$this, &$result));\n\n\t\treturn $result;\n\t}", "public function setVersion($version)\n {\n $this->version = $version;\n }", "function generator_decla_upgrade($nom_meta_base_version, $version_cible) {\n\t\n\t$maj = array();\n\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "public function setVersion($version) {\n\t\t$this->version = $version;\n\t}", "protected function assignVersion()\n {\n\n }", "public function setNewVersion()\n {\n $difference = '9223372036854775806';\n $rand_percent = bcdiv(mt_rand(), mt_getrandmax(), 12);\n $version = bcmul($difference, $rand_percent, 0);\n $this->owner->setAttribute($this->versionField, $version);\n }", "public function upgrade() {\n//\t\tupdate it's database table, you will need to run this:\n//\t\t\n//\t\t$est = AttributeType::getByHandle('attribute_handle');\n//\t\t$path = $est->getAttributeTypeFilePath(FILENAME_ATTRIBUTE_DB);\n//\t\tPackage::installDB($path);\n\n\t\tparent::upgrade();\n\t\t//$pkg = Package::getByHandle($this->pkgHandle);\n\t\t//$this->installAdditionalPageAttributes($pkg);\n\t}", "public function hookUpgrade($args) {\n\t\t$oldVersion = $args['old_version'];\n $newVersion = $args['new_version'];\n $doMigrate = false;\n\n $versions = array();\n foreach (glob(IIIF_API_BRIDGE_DIRECTORY . '/libraries/IiifApiBridge/Migration/*.php') as $migrationFile) {\n $className = 'IiifApiBridge_Migration_' . basename($migrationFile, '.php');\n include $migrationFile;\n $versions[$className::$version] = new $className();\n }\n uksort($versions, 'version_compare');\n\n foreach ($versions as $version => $migration) {\n if (version_compare($version, $oldVersion, '>')) {\n $doMigrate = true;\n }\n if ($doMigrate) {\n $migration->up();\n if (version_compare($version, $newVersion, '>')) {\n break;\n }\n }\n }\n\t}", "public function setVersion($value){\n $this->version = $value;\n }", "public function addCheckingForUpdate() {\n global $laterpay_version;\n\n if ( get_option('laterpay_version') != $laterpay_version ) {\n $this->activate();\n }\n }", "public function setVersion(string $version): void\n {\n $this->version = $version;\n }", "public function setVersion($version)\n {\n $this->version = $version;\n }", "public function setVersion($version)\n {\n $this->version = $version;\n }", "public function setVersion($version)\n {\n $this->version = $version;\n }", "public function wd_se_activate() {\n\t\t$install_date = get_option( 'wd_se_install_date', time() );\n\n\t\tif( ! $install_date ) {\n\t\t\tupdate_option( 'version', WD_SE_RELEASE_NUMBER );\n\t\t}\n\t}", "private function setNewModuleVersionNumber( $version )\n {\n $sql = \"UPDATE {$this->config->dbTablePrefix}common_module\n SET\n `version`='{$version}'\n WHERE\n `name`='keyword'\";\n\n $this->model->dba->query($sql);\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, '9bfb17aa-f8f0-4638-a549-af4f86a9d412', $this->info->version );\n\t}", "public function upgrade($version)\n {\n if (version_compare($version, '1.1.0', '<')) {\n $updator = new Updator110($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n if (version_compare($version, '1.2.2', '<')) {\n $updator = new Updator122($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n if (version_compare($version, '1.3.0', '<')) {\n $updator = new Updator130($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n if (version_compare($version, '1.3.1', '<')) {\n $updator = new Updator131($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n \n if (version_compare($version, '1.3.2', '<')) {\n $updator = new Updator132($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n $result = $this->from133($version);\n\n return $result;\n }", "function do_core_upgrade($reinstall = \\false)\n {\n }", "public function upgrade($oldversion)\n {\n switch ($oldversion)\n {\n case '2.0':\n // Module variables initialisation\n ModUtil::setVar('ShoutIt', 'shoutit_refresh_rate', '10');\n \n // Register hook\n HookUtil::registerSubscriberBundles($this->version->getHookSubscriberBundles());\n }\n return true;\n }", "public function upgrade($oldversion)\n {\n // Update successful\n return true;\n }", "public function setVersion(Version $version): void\n {\n $this->version = $version;\n }", "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "public function addNewVersion($module, $version, $desc = '')\n {\n $id = $this->getQueueId($module);\n if ($id === false) {\n throw new Horde_Exception('Unable to locate requested queue');\n }\n\n $method = 'tickets.addVersion';\n $params = array($id, $version, $desc);\n try {\n $res = Horde_Rpc::request('jsonrpc', $this->_params['url'], $method, $this->_http, $params);\n } catch (Horde_Http_Client_Exception $e) {\n throw new Horde_Exception_Wrapped($e);\n }\n }", "public function updateVersion(string $extension, ?string $version): void\n {\n $this->set(\"{$extension}/version\", $version);\n $this->updateHistory($extension, $version);\n }", "public function install () {\n\t\t$this->_log_version_number();\n\t}", "public function setVersion($version)\n\t{\n\t\t$this->version = (int) $version;\n\t}", "public function addCoreUpdateVersion($updates){\n global $wp_version;\n\n if($updates === false){\n return;\n }\n\n $newVersion = get_option('svc_upgrade_version');\n\n //no version was set so don't attempt to change to custom version\n if($newVersion < 1) {\n return $updates;\n }\n\n //we don't need to add a new version if they match\n if (version_compare( $wp_version, $newVersion ) == 0) {\n return $updates;\n }\n\n $url = \"https://downloads.wordpress.org/release/en_GB/wordpress-{$newVersion}.zip\";\n\n $updates->updates[0]->download = $url;\n $updates->updates[0]->packages->full = $url;\n $updates->updates[0]->packages->no_content = '';\n $updates->updates[0]->packages->new_bundled = '';\n $updates->updates[0]->current = $newVersion;\n\n return $updates;\n }", "private function setNewModuleVersionNumber( $version )\n {\n $sql = \"UPDATE {$this->config->dbTablePrefix}common_module\n SET\n `version`='{$version}'\n WHERE\n `name`='modcreator'\";\n\n $this->model->dba->query($sql); \n }", "public function upgrade__0_1_5__0_1_6()\n {\n }", "private function up($version)\n {\n $sql = sprintf('INSERT INTO schema_migration (version,created_at) VALUES (%s, now())', $version);\n $this->connection->execute($sql);\n }", "public function migrateToVersion($version, $up = true)\n {\n $this->createIfNotExists();\n $currentVersion = $this->getCurrentVersion();\n if ($up) {\n $this->up($version);\n } else {\n $this->down($version);\n }\n }", "function upgrade_101()\n {\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( 'DateNinja', 'e64e02e0-38f8-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "public function install () {\n $this->_log_version_number();\n }", "public function setVersionReference($version)\n {\n assertion(! $this->isStockItem());\n $this->version = trim($version);\n }", "function pmb_upgrade($nom_meta_base_version,$version_cible){\n\t$current_version = 0.0;\n\tif ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) )\n\t\t\t|| (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){\n\t\tinclude_spip('base/pmb');\n include_spip('base/create');\n\t\tinclude_spip('base/abstract_sql');\n\t\tcreer_base();\n\t\tecrire_meta($nom_meta_base_version,$current_version=$version_cible,'non');\n\t}\n}", "function setCurrentVersion(&$version) {\n\t\t$this->currentVersion = $version;\n\t}", "public function upgrade($oldVersion)\n {\n // update successful\n return true;\n }", "public function addPatchversion( $value){\n return $this->_add(40, $value);\n }", "public function makeNewVersion(): Versionable;", "function cv_upgrade($nom_meta_base_version, $version_cible){\n\t$maj = array();\n\t\n\t// Première installation\n\t$maj['create'] = array(\n\t\tarray('cv_configuration_base',true),\n\t\tarray('cv_creer_rubriques',true)\n\t);\n\t\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "public function ajouterVersionBD($version) {\n\t\t\n\t\t\t$this->log->debug(\"Maintenance::ajouterVersionBD() Début - version : '$version'\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$sql = \"insert into tconfig (version,date_modification) values (?, now())\";\n\t\t\t\t$sth = $this->dbh->prepare($sql);\n\t\t\t\t$sth->execute(array($version));\n\t\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\tErreur::erreurFatal('018', \"Maintenance::ajouterVersionBD() - Erreur technique détectée : '\" . $e->getMessage() . $e->getTraceAsString() . \"'\", $this->log);\n\t\t\t}\n\t\t\n\t\t\t$this->log->debug(\"Maintenance::ajouterVersionBD()\");\n\t\t\n\t\t\treturn $version;\n\t\t}", "function RSS_upgrade($oldversion)\n{\n // Update successful\n return true;\n}", "function qtype_IPAtranscription_upgrade($oldversion=0) {\n global $CFG;\n\n ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.\n\n return true;\n}", "public function testAddVersion()\n {\n $this->document->addJsonApiVersion('1.0', ['some' => 'meta']);\n $this->document->unsetData();\n\n $expected = <<<EOL\n {\n \"jsonapi\":{\n \"version\" : \"1.0\",\n \"meta\" : { \"some\" : \"meta\" }\n }\n }\nEOL;\n $this->check($expected);\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add('Ohloh Badge', '42aaa113-4285-42ef-a811-3eb4281cee7c', $this->info->version);\n\t}", "private function _log_version_number () {\n\t\t// Log the version number.\n\t\tupdate_option( $this->token . '-version', $this->version );\n\t}", "public function upgradeAction()\r\n\t{\r\n\t try {\r\n \t // run the upgrade command\r\n \t $packageName = $this->_runCommand(\r\n \t $command = Faett_Core_Interfaces_Service::COMMAND_UPGRADE\r\n \t );\r\n // attach a message to the session\r\n \t\tMage::getSingleton('adminhtml/session')->addSuccess(\r\n \t\t Mage::helper('adminhtml')->__(\r\n \t\t '201.success.package-upgrade', $packageName\r\n \t\t )\r\n \t\t);\r\n\t } catch(Faett_Manager_Exceptions_InvalidCommandException $ice) {\r\n Mage::getSingleton('adminhtml/session')->addError(\r\n \t\t $ice->getMessage()\r\n \t\t);\r\n\t } catch(Exception $e) {\r\n Mage::getSingleton('adminhtml/session')->addError(\r\n \t\t Mage::helper('manager')->__(\r\n \t\t '900.pear.exception',\r\n \t\t $e->getMessage()\r\n \t\t )\r\n \t\t);\r\n\t }\r\n // redirect to the licence overview\r\n $this->_redirect('*/*/');\r\n\t}", "public function upgrade( $previous_version ) {\n\n\t\t// Was previous Add-On version before 1.0.6?\n\t\t$previous_is_pre_custom_app_only = ! empty( $previous_version ) && version_compare( $previous_version, '1.0.6', '<' );\n\n\t\t// Run 1.0.6 upgrade routine.\n\t\tif ( $previous_is_pre_custom_app_only ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set default app flag.\n\t\t\tif ( ! rgar( $settings, 'customAppEnable' ) && $this->initialize_api() ) {\n\t\t\t\t$settings['defaultAppEnabled'] = '1';\n\t\t\t}\n\n\t\t\t// Remove custom app flag.\n\t\t\tunset( $settings['customAppEnable'] );\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t\t// Was previous Add-On version before 2.0?\n\t\t$previous_is_pre_20 = ! empty( $previous_version ) && version_compare( $previous_version, '2.0dev2', '<' );\n\n\t\t// Run 2.0 upgrade routine.\n\t\tif ( $previous_is_pre_20 ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set custom app state.\n\t\t\tif ( rgar( $settings, 'defaultAppEnabled' ) ) {\n\t\t\t\tunset( $settings['defaultAppEnabled'], $settings['customAppEnable'] );\n\t\t\t} else {\n\t\t\t\t$settings['customAppEnable'] = '1';\n\t\t\t}\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t}", "public static function activate() {\n self::version_compare();\n update_option(self::version_option_name, self::version);\n }", "protected function bumperUpdate($version)\n {\n $filename = 'version';\n foreach (['', '.txt'] as $extension) {\n $filepath = $filename . $extension;\n foreach ([strtoupper($filename) . $extension, ucfirst($filepath), $filepath] as $path) {\n if (file_exists($path)) {\n $file = $path;\n break;\n }\n }\n\n if (!isset($file)) {\n continue;\n }\n\n $this->taskWriteToFile($file)->line($version)->run();\n unset($file);\n }\n\n if (file_exists('composer.json')) {\n $this->taskReplaceInFile('composer.json')\n ->regex('/\"version\": \"[^\\\"]*\"/')\n ->to('\"version\": \"' . ltrim($version, 'v') . '\"')\n ->run();\n }\n }", "public function add( $data = '', $version = false ) {\n\t\t\tif ( file_exists( trailingslashit( $data ) . 'index.php' ) ) {\n\t\t\t\tif ( false === $version ) {\n\t\t\t\t\t$args = get_file_data( trailingslashit( $data ) . 'index.php', array( 'version' => 'Version' ) );\n\t\t\t\t\t$version = ( isset( $args['version'] ) && ! empty( $args['version'] ) ) ? $args['version'] : $version;\n\t\t\t\t}\n\t\t\t\tself::$data[ $version ] = trailingslashit( $data );\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public static function recordComponentSuccessfullyUpdated($name, $version)\n {\n try {\n Option::set(self::getNameInOptionTable($name), $version, $autoLoad = 1);\n } catch (\\Exception $e) {\n // case when the option table is not yet created (before 0.2.10)\n }\n }", "public function setRequestedVersion($version)\n {\n $this->_options['requested_version'] = $version;\n }", "public function please_upgrade() {\n\t\t$this->infoAlert(\"Please Upgrade Message\");\n\t}", "public function updateVersionMatrix() {}", "public function updateVersionMatrix() {}", "public function SetVersion($version)\n {\n $this->messageBuilder->SetVersion($version);\n }", "public function hookUpgrade($args)\n {\n $oldVersion = $args['old_version'];\n $newVersion = $args['new_version'];\n\n // Earlier than version 1.1.\n if (version_compare($oldVersion, '1.1', '<')) {\n if (!get_option('neatlinetime')) {\n $this->setDefaultOptions();\n }\n }\n\n if (version_compare($oldVersion, '2.0.2', '<') && version_compare($oldVersion, '2.0', '>') ) {\n if ($timelines = get_records('NeatlineTimeTimeline')) {\n foreach ($timelines as $timeline) {\n $query = unserialize($timeline->query);\n while (!is_array($query)) {\n $query = unserialize($query);\n }\n $timeline->query = serialize($query);\n $timeline->save();\n }\n }\n }\n\n if (version_compare($oldVersion, '2.1', '<')) {\n $rows = $this->_db->query(\n \"show columns from {$this->_db->prefix}neatline_time_timelines where field='center_date';\"\n );\n\n if ($rows->rowCount() === 0) {\n $sqlNeatlineTimeline = \"ALTER TABLE `{$this->_db->prefix}neatline_time_timelines`\n ADD COLUMN `center_date` date NOT NULL default '0000-00-00'\";\n\n $this->_db->query($sqlNeatlineTimeline);\n }\n }\n\n if (version_compare($oldVersion, '2.1.1', '<')) {\n $sql = \"ALTER TABLE `{$this->_db->prefix}neatline_time_timelines`\n MODIFY COLUMN `center_date` date NOT NULL default '2018-01-01',\n MODIFY COLUMN `added` timestamp NOT NULL default CURRENT_TIMESTAMP\";\n $this->_db->query($sql);\n }\n\n if (version_compare($oldVersion, '2.1.2', '<')) {\n $sql = \"ALTER TABLE `{$this->_db->prefix}neatline_time_timelines`\n MODIFY COLUMN `added` timestamp NOT NULL default '2000-01-01 00:00:00'\";\n $this->_db->query($sql);\n }\n\n }", "function acf_has_upgrade()\n{\n}", "function microblog_upgrade($nom_meta_base_version,$version_cible){\n\t$current_version = 0.0;\n\tif ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) )\n\t\t\t|| (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){\n\n\t\tif ($current_version==0.0){\n\t\t\tsql_alter(\"table spip_articles ADD microblog VARCHAR(140) DEFAULT '' NOT NULL\");\n\t\t\tecrire_meta($nom_meta_base_version,$current_version=$version_cible);\n\t\t}\n\t}\n}", "public function addNextVersion($version, $initial_note,\n $stability_api = null,\n $stability_release = null)\n {\n $notes = \"\\n* \" . $initial_note . \"\\n \";\n $api = $this->getNodeText('/p:package/p:version/p:api');\n if ($stability_api === null) {\n $stability_api = $this->getNodeText('/p:package/p:stability/p:api');\n }\n if ($stability_release === null) {\n $stability_release = $this->getNodeText(\n '/p:package/p:stability/p:release'\n );\n }\n $version_node = $this->findNode('/p:package/p:version');\n $this->replaceTextNodeRelativeTo(\n './p:release', $version_node, $version\n );\n $this->replaceTextNode('/p:package/p:notes', $notes);\n $this->replaceTextNode('/p:package/p:date', date('Y-m-d'));\n $this->replaceTextNode('/p:package/p:time', date('H:i:s'));\n\n $changelog = $this->findNode('/p:package/p:changelog');\n $this->_insertWhiteSpace($changelog, ' ');\n\n $release = $this->_xml->createElementNS(self::XMLNAMESPACE, 'release');\n $this->_appendVersion($release, $version, $api, \"\\n \");\n $this->_appendStability($release, $stability_release, $stability_api, \"\\n \");\n $this->_appendChild($release, 'date', date('Y-m-d'), \"\\n \");\n $this->_appendLicense(\n $release,\n $this->getLicense(),\n $this->getLicenseLocation(),\n \"\\n \"\n );\n $this->_appendChild($release, 'notes', $notes . ' ', \"\\n \");\n $this->_insertWhiteSpace($release, \"\\n \");\n $changelog->appendChild($release);\n $this->_insertWhiteSpace($changelog, \"\\n \");\n }", "function acf_update_db_version($version = '')\n{\n}", "public function store(int $version)\n {\n $this->filesystem->put($this->filename, $version);\n }", "function upgrade_600()\n {\n }", "function Legal_upgrade($oldversion)\n{\n // Upgrade dependent on old version number\n switch($oldversion) {\n case 1.1:\n\t\t\tpnModSetVar('legal', 'termsofuse', true);\n\t\t\tpnModSetVar('legal', 'privacypolicy', true);\n\t\t\tpnModSetVar('legal', 'accessibilitystatement', true);\n\t pnModSetVar('legal', 'refundpolicy', true);\n \treturn Legal_upgrade(1.2);\n break;\n }\n\n // Update successful\n return true;\n}", "public function can_upgrade($type, $version) {\r\n return false;\r\n }", "function update_extension($current = '')\n\t{\n\t\tif ($current == '' OR $current == $this->version)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ($current < '0.2.1')\n\t\t{\n\t\t\t//update to version 0.1\n\t\t}\n\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->update(\n\t\t\t'extensions',\n\t\t\tarray('version' => $this->version)\n\t\t);\n\t}", "public function install()\n {\n $this->initConfig();\n $this->loadConfig();\n $this->config['installed']=ASTAT_VERSION2;\n $this->config['newInstall']='y';\n $this->saveConfig();\n\n GPCCore::register($this->getPluginName(), ASTAT_VERSION, ASTAT_GPC_NEEDED);\n\n return(true);\n }", "public function laterThan($version);" ]
[ "0.6990274", "0.6209433", "0.6165426", "0.6125037", "0.6125037", "0.60869944", "0.6077672", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.5943941", "0.5942448", "0.592736", "0.5889506", "0.5815514", "0.5784992", "0.5761434", "0.57479626", "0.5715671", "0.5694075", "0.56812245", "0.5664076", "0.56574893", "0.5606888", "0.5606879", "0.5603481", "0.5602644", "0.5595461", "0.558081", "0.55734855", "0.55716574", "0.55674535", "0.5555724", "0.5527113", "0.55268097", "0.5509763", "0.54943347", "0.54889464", "0.54889464", "0.54889464", "0.548847", "0.5482098", "0.5476163", "0.54744524", "0.5471066", "0.5466942", "0.5437584", "0.54285747", "0.54166305", "0.54166305", "0.54117066", "0.539421", "0.5381671", "0.5379437", "0.53763676", "0.53694993", "0.53674644", "0.53669345", "0.5358986", "0.53491396", "0.5347135", "0.5346359", "0.5339469", "0.5329848", "0.5327495", "0.5313796", "0.529623", "0.52873826", "0.52777475", "0.5276697", "0.5276513", "0.5272192", "0.5257961", "0.52578676", "0.52557176", "0.5248762", "0.523099", "0.52257556", "0.52143365", "0.52121437", "0.5208575", "0.51986647", "0.519266", "0.51707333", "0.51692456", "0.5168493", "0.5152002", "0.51509136", "0.51461333", "0.51450086", "0.5140651", "0.51381665", "0.5137453", "0.5132969", "0.5129763", "0.51198953", "0.51168054", "0.5109096" ]
0.7515287
0
Remove a version Mark this version as downgrade
public function remove(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uninstall()\n {\n\n $this->markUninstalled();\n //or call parent::uninstall(); \n }", "function bft_remove_version() {\n\treturn '';\n}", "function pramble_remove_version(){\n\t\t\t\treturn '';\n\t\t\t}", "public function uninstall();", "public function uninstall();", "function uninstall(){}", "function dimaan_remove_version() { return ''; }", "public function uninstall() {\n\n\n }", "function wpb_remove_version() {\nreturn '';\n}", "public function uninstall(): void\n {\n $this->output(\"TODO: Drop the journal table, remove the files and show the composer command to remove the package\");\n exit;\n }", "public function uninstall(){\n\t\t$this->_uninstall();\n\t\t$model = $this->getCounterpartModel();\n\n\t\tif( $model->getConfigValue( 'uninstall_clear_db' ) ) {\n\t\t\t$this->_uninstallDb();\n\t\t}\n\t\tif( $model->getConfigValue( 'uninstall_clear_settings' ) ) {\n\t\t\t$this->_uninstallSettings();\n\t\t}\n\n\t\t//mark the extension as uninstalled\n\t\t//better to use editSetting - since there is may be no 'installed' value in config after uninstall\n\t\tAdvertikon::getExtendedModel( 'setting_setting' )->editSettingValue( 'installed' , 0 );\n\t}", "function wpb_remove_version() {\r\n return '';\r\n}", "private function down($version)\n {\n $sql = sprintf('DELETE FROM schema_migration WHERE version = \\'%s\\'', $version);\n $this->connection->execute($sql);\n }", "function wpb_remove_version() {\n return '';\n}", "public static function uninstall() {\n\t\t}", "function complete_version_removal() { return ''; }", "public function uninstall()\n {\n }", "public function uninstall()\n {\n }", "function uninstall() {\n\t}", "function wpversion_remove_version() {\n return '';\n }", "public static function uninstall(){\n }", "public static function uninstall() {\n\n\t}", "function uninstall(){\n\n }", "public function uninstall()\n\t{\n\t\treturn true;\n\t}", "public function uninstall() {\n\t\tdelete_option('hotlink-no-more');\n\t}", "function version_unregister($module, &$content)\n{\n $install_file = PHPWS_SOURCE_DIR . 'mod/' . $module . '/boost/install.sql';\n\n if (!is_file($install_file)) {\n return;\n }\n\n $install_sql = file($install_file);\n\n if (empty($install_file)) {\n return;\n }\n\n foreach ($install_sql as $sql) {\n if (!preg_match('/^create /i', $sql)) {\n continue;\n }\n\n $table_name = PHPWS_DB::extractTableName($sql);\n\n if (empty($table_name)) {\n continue;\n }\n\n $version_table = $table_name . '_version';\n $version_table_seq = $version_table . '_seq';\n\n if (!PHPWS_DB::isTable($version_table)) {\n continue;\n }\n\n $result = PHPWS_DB::dropTable($version_table);\n if (PHPWS_Error::isError($result)) {\n PHPWS_Error::log($result);\n $content[] = dgettext('version', 'There was an error removing a version table.');\n } else {\n $content[] = sprintf(dgettext('version', 'Version table removed: %s'), $version_table);\n }\n }\n}", "function startertheme_remove_version() {\nreturn '';\n}", "public function delete()\n {\n foreach ($this->versions as $version)\n {\n $version->delete();\n }\n\n parent::delete();\n }", "function uninstall()\n {\n \t// For now nothing in unistall, because we don't want user lose the data. \n }", "public static function drop()\n {\n global $wpdb;\n $tableName = static::getTableName($wpdb->prefix);\n\n $sql = \"DROP TABLE IF EXISTS $tableName;\";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n $wpdb->query($sql);\n \\delete_option($tableName . '_version');\n }", "public function uninstall()\n {\n return true;\n }", "public function on_plugin_uninstall(): void {\n\t\tif ( is_multisite() ) {\n\t\t\tdelete_site_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t}\n\t\tdelete_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t}", "public function removeUpdateVersion($action, $type){\n if($action == 'update' && $type == 'core'){\n delete_option('svc_upgrade_version');\n }\n }", "public function uninstall()\n\t{\n\t\treturn false;\n\t}", "public function uninstall()\n\t{\n\t\treturn false;\n\t}", "public function uninstall() {\n\t\tdelete_option( $this->options_key );\n\t}", "public function revert()\n {\n $this->curlSender->post(\n $this->uninstallRequest->getUrl(),\n $this->uninstallRequest->getParams()\n );\n }", "function wpmudev_remove_version() {\nreturn '';\n}", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS app_vkbot');\n parent::uninstall();\n }", "function on_uninstall ()\n{\n}", "function on_uninstall ()\n{\n}", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS mixcloud_favorites');\n parent::uninstall();\n }", "public function downModule()\n {\n /** @var App $app_record */\n $app_record = App::findOne(['name' => $this->module->id, 'className' => $this->module->getModuleClassName()]);\n if (!is_null($app_record))\n {\n if ($app_record->core_module == 1)\n {\n throw new yii\\base\\Exception('Module ' . $this->module->id . ' is core, so it can\\'t be uninstalled.');\n }\n\n $app_record->delete();\n $app_record = NULL;\n } else\n {\n throw new yii\\base\\Exception('No installed APP named ' . $this->module->id . ' found.');\n }\n }", "public function _uninstall() {\n\t\tdelete_option( $this->identifier . '_indexing' );\n\n\t\tparent::_uninstall();\n\t}", "function unsinstall()\n\t\t{\n\t\t}", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "function bajweb_remove_meta_version() {\n\treturn '';\n}", "function onUninstall(){\n\tdelete_option( 'stackoverflowUser' );\n\tdelete_option( 'StackoverflowData' );\n}", "function sunset_remove_meta_version(){\n return '' ;\n}", "function delete()\n {\n jimport('joomla.installer.installer');\n $installer =& JInstaller::getInstance();\n\n require_once(JPATH_COMPONENT.DS.'adapters'.DS.'sef_ext.php');\n $adapter = new JInstallerSef_Ext($installer);\n $installer->setAdapter('sef_ext', $adapter);\n\n $result = $installer->uninstall('sef_ext', $this->_id, 0);\n\n return $result;\n }", "function uninstall() {\n global $DB, $USER;\n if(!$USER->may(INSTALL)) return false;\n $DB->dropTable($this->DBTable);\n }", "public static function uninstall() {\n\t\tUninstall::uninstall();\n\t}", "protected function afterUninstall()\n {\n }", "function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS watchfolders');\r\n parent::uninstall();\r\n }", "public function uninstall()\r\n {\r\n Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'clubmembre');\r\n\r\n return parent::uninstall();\r\n }", "function wfs_remove_meta_version() {\n\treturn '';\n}", "public function uninstall()\n\t{\n\t\treturn FALSE;\n\t}", "function remove_version_number() {\n return '';\n}", "public function uninstall()\n {\n // drop tables\n DoctrineHelper::dropSchema($this->entityManager, array('Downloads_Entity_Download',\n 'Downloads_Entity_Categories'));\n\n //remove files from data folder\n $uploaddir = DataUtil::formatForOS($this->getVar('upload_folder'));\n FileUtil::deldir($uploaddir, true);\n\n // remove all module vars\n $this->delVars();\n\n HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());\n\n return true;\n }", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS lagartoservers');\n SQLExec('DROP TABLE IF EXISTS lagartoendpoints');\n parent::uninstall();\n }", "public static function uninstall() {\n $sql = 'DROP TABLE IF EXISTS `'.self::tableName.'`;';\n db_query($sql);\n }", "function uninstall()\n\t{\n\t\t$GLOBALS['SITE_DB']->drop_if_exists('customtasks');\n\t}", "function logger_remove_firmware_upgrade_request($device) {\n\n db_delete('logger_firmware_upgrade_request')\n ->condition('device', $device)\n ->execute();\n}", "function wrmp_uninstall()\n{\n\tif(!class_exists('WildcardPluginInstaller'))\n\t{\n\t\trequire_once MYBB_ROOT . 'inc/plugins/wrmp/classes/installer.php';\n\t}\n\t$installer = new WildcardPluginInstaller(MYBB_ROOT . 'inc/plugins/wrmp/install_data.php');\n\t$installer->uninstall();\n\n\t// delete our cached version\n\twrmp_unset_cache_version();\n}", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS AliIPRelays');\n SQLExec('DROP TABLE IF EXISTS AliIPRelay');\n SQLExec('DROP TABLE IF EXISTS AliIPRelays_queue');\n parent::uninstall();\n }", "public function remove() {\n if ( ! $this->can_remove() ) {\n return;\n }\n $location = add_query_arg( 'tab', 'export', admin_url( 'options-general.php?page=wpsupercache' ) );\n if ( $this->backupFileExists() )\n $file = @unlink( self::$cache_config_file_backup );\n if ( ! $file ) {\n wp_safe_redirect( add_query_arg( 'message', 4, $location ) );\n exit;\n }\n delete_option( '_wp_super_cache_backup_options' );\n wp_safe_redirect( add_query_arg( 'message', 6, $location ) );\n exit;\n }", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "function uninstall_hook()\n\t\t{\n\t\t\t// Delete plugin options\t\t\t\n\t\t\tdelete_option('verify-meta-tags');\n\t\t}", "public function uninstall() {\n $this->helper_pricealert->deleteTables();\n $this->__deleteEvents();\n }", "public function uninstall()\n\t\t{\n\t\t\t$this->_Parent->Database->delete('tbl_pages_types', \"`page_id` = 4294967295\");\n\t\t}", "public function destroy(Version $version)\n {\n //\n }", "public function uninstall()\n {\n $this->log->uninstall();\n }", "public function uninstall()\n {\n $query = \"ALTER TABLE `\" . Common::prefixTable('log_visit') . \"` DROP `location_provider`\";\n Db::exec($query);\n }", "public function uninstall(){\n if (!parent::uninstall())\n Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.$this->name.'`');\n \n $this->deleteConfiguration(); // delete settings\n \n return parent::uninstall();\n }", "public function uninstall()\r\n {\r\n // ee()->db->where('class', ucfirst(EXT_SHORT_NAME).'_ext');\r\n // ee()->db->delete('extensions');\r\n\r\n ee()->db->where('module_name', EXT_NAME);\r\n ee()->db->delete('modules');\r\n\r\n ee()->db->delete('modules', array( 'module_name' => EXT_NAME));\r\n\r\n // ee()->load->dbforge();\r\n // $sql[] = \"DROP TABLE IF EXISTS exp_email_cache_plus\";\r\n // $sql[] = \"DROP TABLE IF EXISTS exp_email_queue_plus\";\r\n // $this->runSQL($sql);\r\n return true;\r\n }", "function uninstall()\n\t{\n\t\t$GLOBALS['NO_DB_SCOPE_CHECK']=true;\n\t\t$GLOBALS['SITE_DB']->drop_if_exists('f_welcome_emails');\n\t\t$GLOBALS['NO_DB_SCOPE_CHECK']=false;\n\t}", "public function uninstall()\n {\n $this->deleteConfig();\n GPCCore::unregister($this->getPluginName());\n }", "function spr_section_exclude_uninstall() {\nglobal $spr_exclude_db_debug;\n\n\t$res = safe_query(\"ALTER TABLE \".safe_pfx(\"txp_section\").\" DROP COLUMN spr_exclude;\",$spr_exclude_db_debug);\n\treturn $res;\n}", "public static function remove($package_name, $no_output=false) {\n if(isset(self::$_packages[$package_name])) {\n $version_installed = self::$_packages[$package_name];\n //remove from packagist\n unset(self::$_packages[$package_name]);\n self::save();\n //get package info\n $package_info = json_decode(file_get_contents(self::URL.\"/$package_name.json\"), true);\n $git_name = $package_info[\"package\"][\"repository\"];\n $git_name = substr($git_name, strrpos($git_name, '/', strrpos($git_name, '/') - strlen($git_name) - 1) + 1);\n //get all directories\n $package_directory = App::libs()->directory('Packagist.'.trim(str_replace('/', '-', strtolower($git_name))));\n $installed_versions = $package_directory->directories();\n //remove from autoload\n foreach($installed_versions as $version) {\n if(isset(self::$_autoload[$version->name()])) {\n unset(self::$_autoload[$version->name()]);\n }\n //remove version\n $version->remove();\n }\n self::save();\n //remove remaining directory\n $package_directory->remove();\n //show packages\n $to_install = self::match($package_info, $version_installed);\n $notice = \"\";\n foreach($to_install[\"require\"] as $p => $v) {\n if(strpos($p, '/')!==false) {\n $notice .= \"$p : $v\\n\";\n }\n }\n if(($notice!=\"\")&&($no_output===false)) {\n echo \"Don't forget, following packags were required by $package_name but might not be needed anymore\\n(You can run 'autoremove $package_name $version_installed' or 'autoremove $package_name' to remove them automatically\".PHP_EOL;\n echo $notice;\n }\n return true;\n }\n return false;\n }", "public function uninstall()\r\n {\r\n // Remove\r\n ee()->dbforge->drop_table('tagger');\r\n ee()->dbforge->drop_table('tagger_links');\r\n ee()->dbforge->drop_table('tagger_groups');\r\n ee()->dbforge->drop_table('tagger_groups_entries');\r\n\r\n ee('Model')->get('Action')->filter('class', ucfirst($this->module_name))->all()->delete();\r\n ee('Model')->get('Module')->filter('module_name', ucfirst($this->module_name))->all()->delete();\r\n\r\n return true;\r\n }", "public function uninstall() {\n $this->load->model('extension/module/export_yml');\n $this->model_extension_module_export_yml->uninstallPromCategoryTable();\n $this->model_extension_module_export_yml->uninstallPromProductTable();\n }", "static public function deregisterMigration($machine_name) {\n $rows_deleted = db_delete('migrate_status')\n ->condition('machine_name', $machine_name)\n ->execute();\n }", "public function uninstall($parent)\n {\n }", "function uninstall() {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['plugins'].\"` WHERE `name`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['leftsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function uninstallHook()\n\t{\n\t\t$ok =\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY) &&\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY_HASH);\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_STORE_AVATAR_HASHES)\n\t\t;\n\t}", "public function unsetCatalogVersion(): void\n {\n $this->catalogVersion = [];\n }", "public static function uninstall() {\n\t\tglobal $wpdb;\n\t\t$wpdb->query( \"DROP TABLE IF EXISTS {$wpdb->prefix}product_list\" );\n\t\t$wpdb->query( \"DROP TABLE IF EXISTS {$wpdb->prefix}product_list_detail\" );\n\t\tdelete_option( 'product_list_version' );\n\n\t\twp_clear_scheduled_hook('my_cron_event');\n\n\t}", "public function down()\n {\n echo \"m000000_000001_media does not support migration down.\\n\";\n return false;\n }", "function uninstall() {\n\n\t// Delete the data.\n\tHelpers\\clear_pending_data();\n\n\t// Include our action so that we may add to this later.\n\tdo_action( Core\\HOOK_PREFIX . 'uninstall_process' );\n\n\t// And flush our rewrite rules.\n\tflush_rewrite_rules();\n}", "function uninstall()\n\t{\n\t\tdelete_config_option('youtube_channel_update_time');\n\t}", "function uninstall()\n\t{\n\t\t$this->EE->load->dbforge();\n\n\t\t$this->EE->db->select('module_id');\n\t\t$query = $this->EE->db->get_where('modules', array('module_name' => 'LikEE'));\n\n\t\t$this->EE->db->where('module_id', $query->row('module_id'));\n\t\t$this->EE->db->delete('module_member_groups');\n\n\t\t$this->EE->db->where('module_name', 'Likee');\n\t\t$this->EE->db->delete('modules');\n\n\t\t$this->EE->db->where('class', 'Likee');\n\t\t$this->EE->db->delete('actions');\n\n\t\t$this->EE->dbforge->drop_table('likee');\n\t\t\n\t\treturn TRUE;\n\t}", "private function _update_package_to_version_141()\n {\n $this->EE->db->delete('actions',\n array('class' => ucfirst($this->get_package_name())));\n }", "public function uninstall()\r\n {\r\n $this->db->query('DROP TABLE IF EXISTS `' . DB_PREFIX . 'accept_cards_tokens`;');\r\n }", "protected function uninstallCustom() : void\n {\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "protected function uninstallCustom(): void\n {\n }", "function uninstall() {\nunsubscribeFromEvent($this->name, 'HOURLY');\nSQLExec('DROP TABLE IF EXISTS camshoter_devices');\nSQLExec('DROP TABLE IF EXISTS camshoter_config');\nSQLExec('DROP TABLE IF EXISTS camshoter_recognize');\nSQLExec('DROP TABLE IF EXISTS camshoter_people');\n\n\n parent::uninstall();\n\n }", "public function remove_rss_version() {\n\t\treturn '';\n\t}", "function deactivate() {\r\n delete_option(\"bvd_post_version\");\t\r\n delete_option(\"bvd_post_type\");\r\n delete_option(\"bvd_connection\");\r\n delete_option(\"bvd_show_version\");\r\n delete_option(\"bvd_favorites\");\r\n }" ]
[ "0.65213996", "0.6320239", "0.6307188", "0.62853426", "0.62853426", "0.61895514", "0.6139495", "0.613305", "0.60173833", "0.60069394", "0.6003697", "0.598573", "0.5975026", "0.59682363", "0.59232265", "0.5914587", "0.59127164", "0.59127164", "0.591234", "0.58904654", "0.58347124", "0.5826518", "0.5809069", "0.58056515", "0.5803643", "0.57798964", "0.57770365", "0.57727474", "0.57671964", "0.57616687", "0.5749003", "0.5694019", "0.5669523", "0.5659675", "0.5659675", "0.5652901", "0.56323534", "0.56308895", "0.5616971", "0.5594516", "0.5594516", "0.5575467", "0.5557634", "0.55389345", "0.55339676", "0.55332464", "0.5500945", "0.54707265", "0.54676867", "0.54637426", "0.5450099", "0.544716", "0.5442947", "0.5420437", "0.5410157", "0.5407423", "0.54020834", "0.5379878", "0.53736025", "0.5362986", "0.5362573", "0.5361452", "0.5361064", "0.5345246", "0.5334809", "0.5308238", "0.53046083", "0.53028363", "0.5293311", "0.5291669", "0.52916574", "0.52912086", "0.5288752", "0.52622706", "0.5262225", "0.5257663", "0.52460015", "0.52385443", "0.523735", "0.5234597", "0.52334684", "0.5222977", "0.52064747", "0.52041435", "0.52038276", "0.52024513", "0.5199255", "0.5196588", "0.519591", "0.51943046", "0.5180574", "0.5180267", "0.51689667", "0.5156232", "0.51523393", "0.5149046", "0.5148341", "0.51413286", "0.51363564", "0.51292986" ]
0.710458
0
var_dump($info); // 3 time 2 conten 1 link
function trim_tags($info) { $i=0; while(!empty($info[$i])) { $info[$i]=strip_tags($info[$i]); $i++; } return $info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _info($info){\r\n return array('title'=>$info->full, 'block'=>false);\r\n }", "private function _cookData($info) {\n\t\tif(!$info['name']) $this->output(-1, '名称不能为空.'); \n\t\tif(!$info['link']) $this->output(-1, '链接地址不能为空.');\n\t\tif (strpos($info['link'], 'http://') === false || !strpos($info['link'], 'https://') === false) {\n\t\t\t$this->output(-1, '链接地址不规范.');\n\t\t}\n\t\treturn $info;\n\t}", "function getInfo();", "function info($data)\n{\n print_r($data);\n print(PHP_EOL);\n}", "function info($data)\n{\n print_r($data);\n print(PHP_EOL);\n}", "public function getInfo($url);", "public function getInfo();", "public function getInfoLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n 'text' => $this->__('Status'),\n 'class' => 'z-icon-es-confi');\n }\n\t\t\n return $links;\n }", "public function getLinkInfo()\n {\n return array(\n 'PageURL' => $this->curlInfo['url'],\n 'page_title' => $this->getPageTitle(),\n 'description' => trim((isset($this->collected['metaData']['description'])) ? $this->collected['metaData']['description'] : Standards::$default),\n 'content_language' => $this->getLanguage(),\n 'external_links' => $this->countLinks('external'),\n 'internal_links' => $this->countLinks('internal'),\n 'no_follow_links' => $this->countLinks('no-follow'),\n 'follow_links' => ($this->countLinks('external') + $this->countLinks('internal') - $this->countLinks('no-follow')),\n 'h1' => $this->collected['headingsCount']['h1'],\n 'h2' => $this->collected['headingsCount']['h2'],\n 'h3' => $this->collected['headingsCount']['h3'],\n 'h4' => $this->collected['headingsCount']['h4'],\n 'h5' => $this->collected['headingsCount']['h5'],\n 'h6' => $this->collected['headingsCount']['h6'],\n 'http_code' => $this->curlInfo['http_code'],\n 'charset' => $this->getCharset(),\n 'server_config' => implode(';', $this->getServerConfig()),\n\n // fetched by others:\n # 'load_time' => Standards::$default,\n # 'page_weight' => Standards::$default,\n # 'indexed_bing' => Standards::$default,\n # 'indexed_google' => Standards::$default,\n );\n }", "public function getInfo() {}", "public function getInfo() {}", "public function info();", "public function info();", "function appendInfo($info) {\n\t\t\t$this->responseVar['info'] .= $info.\"\\n<br>\\n\";\n\t\t}", "public function getLinkInfomation() {\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Credentials: true\");\n header('Content-Type: application/json; charset=utf-8');\n header(\"Access-Control-Allow-Methods: POST, GET, OPTIONS\");\n header('Access-Control-Allow-Headers \"Origin, X-Requested-With, Content-Type, Accept');\n\n $sLink = $this->input->post('link');\n\n if (!filter_var($sLink, FILTER_VALIDATE_URL)) {\n $sLink = 'http://'.$sLink;\n }\n\n $urlData = parse_url($sLink);\n \n $aMeta = getUrlMeta($sLink);\n \n $aMeta['host'] = str_replace('www.', '', $urlData['host']);\n \n echo json_encode($aMeta);\n die();\n }", "function getLink() {return $this->_link;}", "function getLink() {return $this->_link;}", "public function getInfo() {\n\t\t\t$rec = array(\n\t\t\t\t'ff' => array(\n\t\t\t\t\t'name' => 'Firefox',\n\t\t\t\t\t'href' => 'https://www.mozilla.org/en-US/firefox/new/',\n\t\t\t\t\t'ttl' => 'Open the Firefox download page.'\n\t\t\t\t),\n\t\t\t\t'gc' => array(\n\t\t\t\t\t'name' => 'Google Chrome',\n\t\t\t\t\t'href' => 'http://www.google.com/chrome/eula.html',\n\t\t\t\t\t'ttl' => 'Open the Google Chrome EULA page.'\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$isValid = false;\n\t\t\t\n\t\t\tforeach ($rec as $key => $value) {\n\t\t\t\tif ($this->bc == $key) {\n\t\t\t\t\t$isValid = true;\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!$isValid) {\n\t\t\t\t$this->bc = 'ff';\n\t\t\t}\n\t\t\t\n\t\t\t$info = array(\n\t\t\t\t'name' => $rec[$this->bc]['name'],\n\t\t\t\t'href' => $rec[$this->bc]['href'],\n\t\t\t\t'ttl' => $rec[$this->bc]['ttl']\n\t\t\t);\n\t\t\t\n\t\t\treturn $info;\n\t\t}", "public function get2($link){\n $url = explode('/', $_GET['url']);\n $this->url_enlace = $url[2];\n }", "function ciniki_artistprofiles_dropboxDownloadLinks(&$ciniki, $tnid, $client, $artist, $details) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dropboxOpenWebloc');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'artistprofiles', 'private', 'linkType');\n\n foreach($details as $link) {\n $name = '';\n $url = '';\n $description = '';\n if( preg_match('/^.*\\/([^\\/]*)\\.webloc$/', $link['filename'], $matches) ) {\n $name = $matches[1];\n $rc = ciniki_core_dropboxOpenWebloc($ciniki, $tnid, $client, $link['path']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.artistprofiles');\n return $rc;\n }\n $url = $rc['url'];\n }\n\n if( $url != '' ) {\n $found = 'no';\n $found_link = null;\n \n $link_type = 1000;\n $rc = ciniki_artistprofiles_linkType($ciniki, $tnid, $url);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $link_type = $rc['link_type'];\n\n foreach($artist['links'] as $artist_link) {\n if( $artist_link['url'] == $url && $artist_link['link_type'] == $link_type ) {\n $found = 'yes';\n $found_link = $artist_link;\n break;\n }\n }\n if( isset($artist['videos']) ) {\n foreach($artist['videos'] as $artist_link) {\n if( $artist_link['url'] == $url && $artist_link['link_type'] == $link_type ) {\n $found = 'yes';\n $found_link = $artist_link;\n break;\n }\n }\n }\n if( $found == 'no' ) {\n $rc = ciniki_core_objectAdd($ciniki, $tnid, 'ciniki.artistprofiles.link', array(\n 'artist_id'=>$artist['id'],\n 'name'=>$name,\n 'link_type'=>$link_type,\n 'url'=>$url,\n 'description'=>$description,\n ), 0x04);\n if( $rc['stat'] != 'ok' && $rc['stat'] != 'exists' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.artistprofiles');\n return $rc;\n }\n } elseif( $found == 'yes' ) {\n $update_args = array();\n if( $found_link['url'] != $url ) {\n $update_args['url'] = $url;\n }\n if( $found_link['name'] != $name ) {\n $update_args['name'] = $name;\n }\n if( count($update_args) > 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.artistprofiles.link', $found_link['id'], $update_args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.artistprofiles');\n return $rc;\n }\n }\n }\n }\n }\n\n return array('stat'=>'ok');\n}", "function getInfo () {\n\t\treturn array('id'=>'yahoo');\n\t}", "protected function info()\n\t\t{\n\t\t}", "public function getLinkData()\n {\n return array(\n 'loungetag' => $this->lounge->getLoungetag()\n );\n }", "public function getLinkDetails($link, $doImage = false)\n {\n $result = [\n 'title' => '',\n 'description' => '',\n 'image' => '',\n 'link' => $link\n ];\n\n try {\n $urlContent = @file_get_contents($link);\n ///$urlContent = iconv(\"Windows-1252\",\"UTF-8\",$urlContent);\n $dom = new \\DOMDocument(\"4.01\", 'UTF-8');\n @$dom->loadHTML('<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">' . $urlContent);\n $title = $dom->getElementsByTagName('title');\n\n\n //once the page does not have title the url is invalid from here\n if ($title->length < 1) return $result;\n\n $result['title'] = $title->item(0)->nodeValue;\n $description = null;\n $metas = $dom->getElementsByTagName('meta');\n for ($i = 0; $i < $metas->length; $i++) {\n $meta = $metas->item($i);\n if ($meta->getAttribute('name') == 'description') {\n $result['description'] = $meta->getAttribute('content');\n }\n }\n\n if (empty($result['description'])) {\n //lets try the facebook\n preg_match('#<meta property=\"og:description\" content=\"(.*?)\" \\/>|<meta content=\"(.*?)\" property=\"og:description\" \\/>#',\n $urlContent, $matches);\n if ($matches) {\n if (isset($matches[1]) and $matches[1]) {\n $result['description'] = $matches[1];\n } else {\n $result['description'] = $matches[2];\n }\n }\n\n }\n\n //images\n $image = null;\n $result['image'] = null;\n\n if ($doImage) {\n $images = [];\n\n if (preg_match('#google\\.com#', $link)) {\n //$images[] = 'http://www.google.com.ng/images/google_favicon_128.png';\n }\n\n //lets first get site that favour facebook because the images are gooder\n preg_match('#<meta property=\"og:image\" content=\"(.*?)\" \\/>|<meta content=\"(.*?)\" property=\"og:image\" \\/>#',\n $urlContent, $matches);\n\n if ($matches) {\n if (isset($matches[1]) and $matches[1] and preg_match('#http://|https://#', $matches[1])) {\n if ($this->checkRemoteFile($matches[1])) $images[] = $matches[1];\n } else {\n if (preg_match('#http://|https://#', $matches[2]) and $this->checkRemoteFile($matches[2])) $images[] = $matches[2];\n }\n }\n\n //now lets search for more images through there <img element\n $imgElements = $dom->getElementsByTagName('img');\n for ($i = 0; $i < $imgElements->length; $i++) {\n $cImg = $imgElements->item($i);\n if (count($images) <= 5 and preg_match(\"#http:\\/\\/|https:\\/\\/#\", $cImg->getAttribute('src'))) {\n if ($this->checkRemoteFile($cImg->getAttribute('src'))) $images[] = $cImg->getAttribute('src');\n }\n }\n\n $result['image'] = array_reverse($images);\n }\n\n\n } catch (Exception $e) {\n ///silent ignore it\n }\n return $result;\n\n }", "function getLinkInfo($hash) {\n\t\t$link = getDbConnect();\n\t\n\t\t//get the id\n\t\t$id = base_convert($hash, 36, 10);\n\n\t\t//do our search\n\t\t$preparedStatement = $link->prepare(\"SELECT * FROM urls WHERE id = :id;\");\n\t\t$preparedStatement->execute(array(\":id\" => $id));\n\t\treturn parseFullResults($preparedStatement->fetchAll());\n\t}", "public function getLink() {}", "public function getMoreInfoUrls()\n {\n return $this->more_info_urls;\n }", "public function getLink();", "public function getLink();", "function fetch_info($_url=\"\"){ \n if($_url&&$this-> fetch($_url)){\n $html = str_get_html($this-> html);\n $header = $html->find('head',0);\n $info['title'] = $header ->find('title',0)->plaintext;\n if( $keywords = $header ->find('meta[name=keywords]',0) )\n $info['keywords'] = $keywords->content;\n if( $description = $header ->find('meta[name=description]',0))\n $info['description'] = $description ->content;\n return $info;\n }\n return false;\n }", "private function _cookData($info) {\r\n\t\tif(!$info['title']) $this->output(-1, '广告标题不能为空.'); \r\n\t\tif(!$info['link']) $this->output(-1, '链接不能为空.');\n\t\tif (strpos($info['link'], 'http://') === false || !strpos($info['link'], 'https://') === false) {\n\t\t\t$this->output(-1, '链接地址不规范.');\n\t\t}\r\n\t\tif(!$info['start_time']) $this->output(-1, '开始时间不能为空.'); \r\n\t\tif(!$info['end_time']) $this->output(-1, '结束时间不能为空.');\r\n\t\t$info['start_time'] = strtotime($info['start_time']);\r\n\t\t$info['end_time'] = strtotime($info['end_time']);\r\n\t\tif($info['end_time'] <= $info['start_time']) $this->output(-1, '开始时间不能晚于结束时间.');\r\n\t\treturn $info;\r\n\t}", "function mostrar_link(){\n\t\tif (isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM link WHERE id_cat='$id'\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_cat'];\n\t\t\t$this->etiqueta=$resultado['etiqueta_cat'];\n\t\t\t$this->descripcion=$resultado['descripcion_cat'];\n\t\t\t$this->claves=$resultado['claves_cat'];\n\t\t\t$this->tipo=$resultado['tipo_cat'];\n\t\t\t$this->prioridad=$resultado['prioridad_cat'];\n\t\t\t$this->icono=$resultado['icono_cat'];\n\t\t\t$sql=\"SELECT * FROM linkxsub, sublink WHERE link_rel='$id' AND sublink_rel=id_sub ORDER BY prioridad_sub ASC\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=\"si\";\n\t\t\t\t$this->listado[] = $resultado;\n\t\t\t}\n\t\t} \n\t}", "abstract public function infoAll();", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts'; \n\t\t$info['hacked_by']=NULL; \n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array('subject','path','to','param');\n\t\treturn $info;\n\t}", "function Social_Link(&$data,$site,$mode=0,$text='') {\n if (! isset($data[$site]) || strlen($data[$site]) < 5) return ($mode? '' :$site);\n $link = $data[$site];\n if (preg_match(\"/$site/i\",$link)) {\n $follow = ($text? $text . $site :'');\n return \" \" . weblink($link,($mode? ( \"<img src=/images/icons/$site.jpg title='$follow'> $follow\") : $site)) . ($mode?\"<br>\":\"\");\n }\n return \" <a href=http://$site.com/$link>\" . ($mode? ( \"<img src=/images/icons/$site.jpg>\") : $site) . \"</a><br>\";\n}", "abstract public function information();", "public function test(){\n\t $url = urls('content/show','id=96');\n\t echo \"<a href='$url'>$url</a>\";\n\t}", "private function _cookData($info) {\r\n\t\tif(!$info['title']) $this->output(-1, '广告标题不能为空.'); \r\n\t\tif(!$info['cid']) $this->output(-1, '平台不能为空.'); \r\n\t\tif(!$info['module_id']) $this->output(-1, '模块不能为空.'); \r\n\t\tif(!$info['img']) $this->output(-1, '广告图片不能为空.'); \r\n\t\tif(!$info['start_time']) $this->output(-1, '开始时间不能为空.'); \r\n\t\tif(!$info['end_time']) $this->output(-1, '结束时间不能为空.');\r\n\t\tif(!$info['link']) $this->output(-1, '广告链接不能为空.');\r\n if($info['activity'] && intval($info['clientver']) == 0) $this->output(-1, '客户端版本号不能为空.');\r\n\t\tif(in_array(array(9, 5), $info['ad_type'])){\r\n\t\t\tif (strpos($info['link'], 'http://') === false || !strpos($info['link'], 'https://') === false) {\r\n\t\t\t\t$this->output(-1, '链接地址不规范.');\r\n\t\t\t}\r\n\t\t}\r\n\t\t$info['start_time'] = strtotime($info['start_time']);\r\n\t\t$info['end_time'] = strtotime($info['end_time']);\r\n\t\tif($info['end_time'] <= $info['start_time']) $this->output(-1, '开始时间不能晚于结束时间.');\r\n\t\t//if(!$info['channel_code']) $this->output(-1, '渠道号不能为空.');\r\n\t\treturn $info;\r\n\t}", "function update_info()\n {\n }", "function crawlPage($link){\r\n echo 'Discovered: '.$link->getURL().'<br>';\r\n $link->setCrawled(true);\r\n array_push($this->link_arry,$link);\r\n getPageLinks($link->getURL());\r\n }", "public function getInfo(): array;", "public function getInfoBoxLinks(): array\n {\n return $this->infoBoxLinks;\n }", "function getAllLinks(){\r\n return $this->link_arry;\r\n }", "function info()\n\t{\n\t\treturn array();\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Jason Verhagen';\n\t\t$info['organisation']='HolleywoodStudio.com';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=9;\n\t\t$info['locked']=false;\n\t\t$info['update_require_upgrade']=1;\n\t\t$info['parameters']=array('name','title','template_main','template_style','start_video','max_videos','orderby','embed_allowed','show_player','player_align','player_width','player_height','style','nothumbplayer','thumbnail','formorelead','formoretext','formoreurl');\n\t\treturn $info;\n\t}", "function getlistlink(){\t\t\t\n\t\tif($this->type=='news'){\n\t\t\t$sql = 'SELECT `a`.`id`,`a`.`name`,`b`.`ctrl` FROM `'.DB_TABLE_PREFIX.'news` as `a` INNER JOIN `'.DB_TABLE_PREFIX.'newslink` as `b` ON `a`.`id`=`b`.`linkid` WHERE `b`.`newsid`='.$this->newsid.' AND `b`.`ctrl`='.$this->ctrl;\n\t\t}elseif($this->type=='product'){\n\t\t\t$sql = 'SELECT `a`.`id`,`a`.`name`,`b`.`ctrl` FROM `'.DB_TABLE_PREFIX.'product` as `a` INNER JOIN `'.DB_TABLE_PREFIX.'productnewslink` as `b` ON `a`.`id`=`b`.`productid` WHERE `b`.`newsid`='.$this->newsid.' AND `b`.`ctrl`='.$this->ctrl.' AND `b`.`from`='.$this->from;\t\t\n\t\t}\n\t\t_trace($sql);\n\t\t$rs = mysql_query($sql);\n\t\t$this->a_link = array();\n\t\twhile($this->a_link[] = mysql_fetch_assoc($rs));\n\t\tarray_pop($this->a_link);\t\t\t\n\t\tmysql_free_result($rs);\t\n\t}", "public function OnGetInfos(&$data)\n\t{\n\t}", "public function getInformation();", "function get_cLinks(){\n\t$sqlTags = \"SELECT Codename, CharID, Overview FROM ma_Characters;\";\n\t$result = mysqli_query(IDB::conn(), $sqlTags) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\tif (mysqli_num_rows($result) > 0)//at least one record!\n\t{//show results\n\n\t\t$count = 0;\n\t\t$aar = [];\n\n\t\twhile ($row = mysqli_fetch_assoc($result))\n\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\n\t\t\t$cName \t\t\t= $row['Codename'];\n\t\t\t$cID \t\t = $row['CharID'];\n\t\t\t$cOverView = $row['Overview'];\n\t\t\t#nl2br($cOverivew)\n\n\t\t\t#add in comma/seperator\n\t\t\t$aar[$cID]['link'] = '<a\n\t\t\t\tdata-toggle=\"tooltip\" title=\"' . $cOverView . '\"\n\t\t\t\thref=\"'.VIRTUAL_PATH.'characters/profile.php?CodeName='.$cName.'&id='.$cID.'&act=show\">'.$cName.'</a>';\n\n\t\t\t#$aar[$cID]['overview'] = [$cOverView];\n\t\t}\n\t\t#return an array of links with tooltips\n\t\treturn $aar;\n\t}\n\t@mysqli_free_result($result);\n}", "function links() {\n return array(\n\n );\n }", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function info()\n {\n }", "public abstract function showInfo();", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "public function getInfo()\r\n {\r\n return $this->info;\r\n }", "function getInfo(){\n return array(\n 'author' => 'Oleg Lavrovsky',\n 'email' => '[email protected]',\n 'date' => '2013-2-1',\n 'name' => 'New Page Button Plugin',\n 'desc' => 'Simplifies page creation for users',\n 'url' => 'http://oleg.utou.ch',\n );\n }", "function getLink(): string;", "function url ($link) {\r\n\treturn $link;\r\n}", "private function _cookData($info) {\n\t\tif(!$info['title']) $this->output(-1, '广告标题不能为空.'); \n\t\tif(!$info['link']) $this->output(-1, '广告链接不能为空.'); \n\t\tif(!$info['ad_ptype']) $this->output(-1, '链接类型不能为空.');\n\t\tif(!$info['img']) $this->output(-1, '广告图片不能为空.'); \n\t\tif(!$info['start_time']) $this->output(-1, '开始时间不能为空.'); \n\t\tif(!$info['end_time']) $this->output(-1, '结束时间不能为空.');\n\t\t$info['start_time'] = strtotime($info['start_time']);\n\t\t$info['end_time'] = strtotime($info['end_time']);\n\t\tif($info['end_time'] <= $info['start_time']) $this->output(-1, '开始时间不能大于或等于结束时间.');\n\t\treturn $info;\n\t}", "function user_getTechnoratiLink($url) {\n\t\treturn '<a href=\"'.$url['url'].urlencode($this->cObj->getCurrentVal()).\n\t\t\t\t'\" rel=\"tag\" '.$url['aTagParams'].' '.$url['targetParams'].'>';\n\t\t\n\t}", "public function info(){\n }", "public function getInfo ()\n {\n return $this->info;\n }", "function getInfo() {\n return array(\n 'author' => 'Sam Wilson',\n 'email' => '[email protected]',\n 'date' => '2012-03-10',\n 'name' => 'Proofread Page',\n 'desc' => 'View images side-by-side with pages, for viewing and editing.',\n 'url' => 'http://www.dokuwiki.org/plugin:proofreadpage',\n );\n }", "protected function printCachedInfo() {}", "function process_urls($urls) {\n\tif (count($urls) > 0) {\n\t\techo '<p>Getting url:'.$urls[0].', '. count($urls) .' remaining</p>';\n\t\tget_url_info($urls[0], $urls);\n\t}\n}", "public function updraftplus_clone_info($url) {\n\t\tglobal $updraftplus;\n\t\t\n\t\tif (!empty($url)) {\n\t\t\t$content = '<div class=\"updraftclone_network_info\">';\n\t\t\t$content .= '<p>' . __('Your clone has started and will be available at the following URLs once it is ready.', 'updraftplus') . '</p>';\n\t\t\t$content .= '<p><strong>' . __('Front page:', 'updraftplus') . '</strong> <a target=\"_blank\" href=\"' . esc_html($url) . '\">' . esc_html($url) . '</a></p>';\n\t\t\t$content .= '<p><strong>' . __('Dashboard:', 'updraftplus') . '</strong> <a target=\"_blank\" href=\"' . esc_html(trailingslashit($url)) . 'wp-admin\">' . esc_html(trailingslashit($url)) . 'wp-admin</a></p>';\n\t\t\t$content .= '</div>';\n\t\t\t$content .= '<p><a target=\"_blank\" href=\"'.$updraftplus->get_url('my-account').'\">'.__('You can find your temporary clone information in your updraftplus.com account here.', 'updraftplus').'</a></p>';\n\t\t} else {\n\t\t\t$content = '<p>' . __('Your clone has started, network information is not yet available but will be displayed here and at your updraftplus.com account once it is ready.', 'updraftplus') . '</p>';\n\t\t\t$content .= '<p><a target=\"_blank\" href=\"' . $updraftplus->get_url('my-account') . '\">' . __('You can find your temporary clone information in your updraftplus.com account here.', 'updraftplus') . '</a></p>';\n\t\t}\n\n\t\treturn $content;\n\t}", "public function add_info($info)\r\n { \r\n }", "public function getInfo()\n\t{\n\t\treturn array();\n\t}", "public function rgveda_link($gra1,$gra2) { \n $dbg=false;\n dbgprint($dbg,\"rgveda_link: gra1=$gra1, gra2=$gra2\\n\");\n list($mandala,$hymn) = explode(\".\",$gra1);\n $imandala = (int)$mandala;\n $ihymn = (int)$hymn;\n $hymnfilepfx = sprintf(\"rv%02d.%03d\",$imandala,$ihymn);\n $hymnfile = \"$hymnfilepfx.html\";\n $iverse = (int)$gra2;\n $versesfx = sprintf(\"%02d\",$iverse);\n $anchor = \"$hymnfilepfx.$versesfx\";\n dbgprint($dbg,\"rgveda_link: hymnfile=$hymnfile, anchor=$anchor\\n\");\n return array($hymnfile,$anchor);\n}", "function information()\n\t\t{\n\t\t\t$this->directPageDetails(\"information\");\n\t\t}", "public function getInfo()\n {\n if (array_key_exists(\"info\", $this->_propDict)) {\n if (is_a($this->_propDict[\"info\"], \"\\Beta\\Microsoft\\Graph\\Model\\InformationalUrl\") || is_null($this->_propDict[\"info\"])) {\n return $this->_propDict[\"info\"];\n } else {\n $this->_propDict[\"info\"] = new InformationalUrl($this->_propDict[\"info\"]);\n return $this->_propDict[\"info\"];\n }\n }\n return null;\n }", "public function getLink(){\n return $this->link;\n }", "public function getInfo():array;", "public function getLinksList(){\n return $this->_get(9);\n }", "function noticias_links(){\n \t\n $html=site('http://www.jornalnoticias.co.mz/');\n\t\n\tforeach($html->find('.items-row')as $elms){\n\t\t\n\t\t\n\t\tforeach($elms->find ('.jn-postheader a') as $elms2){\n\t\t\n\t $j[]=mb_convert_encoding( \"http://www.jornalnoticias.co.mz\".$elms2->href, \"HTML-ENTITIES\", \"UTF-8\");\n\t\n\t\n\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $j;\n }", "protected function getInfoLink()\n {\n return Injector::inst()->create(\n GridFieldHtmlFragment::class,\n 'buttons-before-right',\n DBField::create_field('HTMLFragment', ArrayData::create([\n 'Link' => 'https://userhelp.silverstripe.org/en/4/optional_features/modules_report',\n 'Label' => _t(__CLASS__ . '.MORE_INFORMATION', 'More information'),\n ])->renderWith(__CLASS__ . '/MoreInformationLink'))\n );\n }", "private function _cookData($info) {\n\t\tif(!$info['content']) $this->output(-1, '内容不能为空.');\n\t\treturn $info;\n\t}", "function showBasicInfo($data){\n $sym = $data[\"Symbol\"];\n\n $symbol = getInfo($sym);\n\n return $symbol;\n}", "public function printResultSectionLinks() {}", "public function getLink():string;", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=3;\n\t\t$info['locked']=true;\n\t\t$info['update_require_upgrade']=1;\n\t\treturn $info;\n\t}", "public function info(): string;", "public function getLink(): string;", "public function getLink(): string;", "public function info() {\n foreach ($this->items as $item) {\n $item->info();\n }\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function show(Info $info)\n {\n //\n }", "public function show(Info $info)\n {\n //\n }", "function get_url_content($url=''){\n\n get_clean_url($url);\n show_route_content();\n \n enable_url_aliases();\n \n //~ echo $_GET['fetched-url'];\n //~ echo '<br>';\n //~ print_r($_GET['clean-url']);\n //~ print_r($_SESSION);\n}", "private function _cookData($info) {\n\t\tif(!$info['title']) $this->output(-1, '标题不能为空.'); \n\t\tif(!$info['guide']) $this->output(-1, '导语不能为空.');\n\t\tif(!$info['start_time']) $this->output(-1, '生效时间不能为空.');\n\t\tif($info['btype'] == 1 && !$info['img']) $this->output(-1, '图片不能为空.');\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array('root','sort','search','max','param','select','template_set','display_type');\n\t\treturn $info;\n\t}" ]
[ "0.6464066", "0.63086647", "0.6006124", "0.59366935", "0.59366935", "0.5900763", "0.5898716", "0.5882892", "0.5796309", "0.57669276", "0.57669276", "0.56352776", "0.56352776", "0.5626746", "0.5611039", "0.5594135", "0.5594135", "0.55764484", "0.5569591", "0.5564778", "0.5563248", "0.5538477", "0.5495417", "0.54951113", "0.54914415", "0.5482975", "0.54675436", "0.5466685", "0.5466685", "0.5451565", "0.5448145", "0.5432047", "0.54272556", "0.5426477", "0.54245704", "0.54230714", "0.54195064", "0.5413826", "0.5362692", "0.53607005", "0.53553647", "0.53373903", "0.5336073", "0.53309596", "0.5323293", "0.53228825", "0.53218853", "0.53171504", "0.53167397", "0.53042996", "0.530269", "0.53009593", "0.53009593", "0.52949154", "0.528595", "0.52827924", "0.52827924", "0.52827924", "0.5281662", "0.5278455", "0.5261082", "0.52597", "0.52581054", "0.5251622", "0.5251089", "0.5247545", "0.52409446", "0.5238024", "0.5234131", "0.52305734", "0.522847", "0.5223321", "0.5221227", "0.521539", "0.5213908", "0.52093434", "0.5203718", "0.5193198", "0.5188802", "0.51815224", "0.5180111", "0.5176198", "0.51753634", "0.5174478", "0.5173031", "0.51674014", "0.51531625", "0.51531625", "0.51485217", "0.5144275", "0.5144275", "0.5144275", "0.5144275", "0.5144275", "0.5144275", "0.5144275", "0.51381385", "0.51381385", "0.513479", "0.5131885", "0.5130438" ]
0.0
-1
checks if already login
final protected function is_con() { if (isset($this->con)) { if ($this->is_user($this->con)) return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "protected function isLogin()\n {\n $skey = \\Web\\Config\\Auth::$prefix . $this->sessionId;\n if (\\Web\\Config\\Auth::$username != $this->gdata($skey)) {\n return false;\n }else{\n $this->gexpire($skey, \\Web\\Config\\Auth::$expire);\n return true;\n }\n }", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "function is_login ()\r\n {\r\n if (($this->get_login()) && ($this->get_id() != USER_ID_RESET_VALUE) && ($this->get_name() != USER_NAME_RESET_VALUE) && ($this->get_name() != \"\"))\r\n return TRUE;\r\n return FALSE;\r\n }", "public function _check_login()\n {\n\n }", "private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }", "public function loginCheck()\n\t{\n\t}", "public function isLogin();", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "private function compare_with_login()\n {\n }", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "public function checkFirstLogin();", "private function user_already_logged() {\n echo \"Entro por user_already_logged\";\n return isset($this->session->userdata['logged_in']);\n }", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }", "public function loginExists() {\n return (bool) $this->local_account;\n }", "protected function hasLoginBeenProcessed() {}", "function is_login()\n {\n }", "function is_already_authenticated()\n {\n /**\n * Checks is user already authenticated\n * If it's true, sends to main page\n */\n $session = Session::getInstance();\n $username = $session->username;\n $logged = $session->logged;\n if (self::check($username,$logged))\n {\n header(\"Location: /admin\");\n }\n }", "public function is_login()\n {\n $name=Session::get(\"username\");\n if($name)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n }", "public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "function checkLogin() {\n\t\t$fingerprint = fingerprint();\n\t\tsession_start();\n\t\tif (!isset($_SESSION['log_user']) || $_SESSION['log_fingerprint'] != $fingerprint) logout();\n\t\tsession_regenerate_id();\n\t}", "public function isLogin() : bool\n {\n\n\n return (bool) Session::key()->currentUser;\n\n //return $this->validate();\n\n }", "private function checkFirstLogin() {\n\n $count = DB::table('users')->count();\n\n if ($count == 0) {\n\n $password = Hash::make('cciadminpassword');\n\n // insert in users table\n $id = DB::table('users')->insertGetId([\n 'username' => 'admin',\n 'name' => 'Administrator',\n 'password' => $password,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert in roles table\n DB::table('user_roles')->insert([\n 'user_id' => $id,\n 'role' => 'administrator',\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert project status codes\n DB::table('project_status')->insert([\n [ 'status' => 'New' ],\n [ 'status' => 'Quoted' ],\n [ 'status' => 'Sold' ],\n [ 'status' => 'Engineered' ],\n [ 'status' => 'Lost']\n ]);\n\n return;\n }\n\n else { return; }\n }", "public function checkLogin(): bool{\n\t\treturn isset($_SESSION['user']['role']);\n\t}", "private function isLogin()\n {\n return Auth::user() !== null;\n }", "private function checkLogin() {\n if (isset($_SESSION['login'])) {\n if ($_SESSION['login'] == true) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "protected function isLoginInProgress() {}", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function hasLogin()\r\n\t{\r\n\t\treturn (!empty($this->username) && !empty($this->password));\r\n\t}", "public function isLoginUsedAlready($login){\n $stmt = $this->databaseConnection->prepare(\"SELECT login FROM users WHERE login = :login\");\n $stmt->bindParam(':login', $login);\n $stmt->execute();\n $result = $stmt->fetch();\n\n if (empty($result[0])) return false;\n else return true;\n }", "function check_login()\n\t{\n\t\t$fp = $this->fingerprint();\n\n\t\t// logout action\n\t\tif(isset($this->post['logout'])) {\n\t\t\tunset($_SESSION[$fp]);\n\t\t\treturn;\n\t\t}\n\n\t\t// login action\n\t\tif(isset($this->post['login'])\n\t\t&& isset($this->post['password'])) {\n\t\t\t$pass = sha1($this->post['password']);\n\t\t\treturn $this->login($this->post['login'], $pass, $fp);\n\t\t}\n\n\t\t// transparent login (already logged)\n\t\tif(isset($_SESSION[$fp])) {\n\t\t\t$name = $_SESSION[$fp]['name'];\n\t\t\t$pass = $_SESSION[$fp]['password'];\n\t\t\tif($this->login($name, $pass, $fp)) return true;\n\t\t\tunset($_SESSION[$fp]);\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }", "public function hasPersistentLogin();", "public function is_login(){\n if (empty($this->user['userid'])){\n return false;\n }\n return true;\n }", "public function isLogin(): bool;", "function checkLogin(){\n\t \t$logged = $this->dm->session->userdata('logged');\n\t \tif($logged)\n\t \t{\n\t \t\treturn TRUE;\n\t \t}\n\t \treturn FALSE;\n\t }", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "function verificar_login()\n {\n if (!isset($_SESSION['usuario'])) {\n $this->sign_out();\n }\n }", "function checkLogin()\n{\n\t// http://php.net/manual/en/function.session-start.php\n\tsession_start();\n\t\n\t// Check that a there is not a user logged in\n\tif( !isset($_SESSION[\"current_user\"]) or !is_a($_SESSION[\"current_user\"],'User') ) \n\t{\n\t\tunset($_SESSION[\"current_user\"]);\n\t\t\n\t\t// http://stackoverflow.com/questions/14523468/redirecting-to-previous-page-after-login-php\n\t\t// Όποιος νοιάζετε ας βάλει και τα σωστά if για να μην γίνονται malicious redirects\n\t\theader(\"Location: login.php?location=\" . urlencode($_SERVER['REQUEST_URI']));\n\t\treturn false;\n\t}\n\t\n\treturn true;\t\n}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function checkLogin() {\n\t\t\n\t\tif ( ! $this->user_model->isLoggedIn() )\n\t\t\tredirect( base_url() . 'admin' );\n\n\t}", "public function hasLogin(){\r\n\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "function isLogin()\n {\n if($this->ci->session->userdata('status')==1)\n {\n return true;\n }\n return false;\n }", "public function checkUserLogin()\n {\n if (isset($_SESSION[\"user_id\"])) {\n $status = true;\n } else {\n $status = false;\n }\n return $status;\n }", "function checkLogin() {\n /* Check if user has been remembered */\n if (isset($_COOKIE['cook_VenusetP_UserEmail']) && isset($_COOKIE['cook_Venueset_UserPassword'])) {\n $varUserEmail = $_COOKIE['cook_VenusetP_UserEmail'];\n $varUserPassword = $_COOKIE['cook_Venueset_UserPassword'];\n /* Confirm that username and password are valid */\n $arrUserFlds = array('pkUserID', 'UserEmail', 'UserPassword', 'UserFirstName');\n $varUserWhere = ' 1 AND UserEmail = \\'' . $varUserEmail . '\\' AND UserPassword = \\'' . md5(trim($varUserPassword)) . '\\'';\n //echo '<pre>';print_r($varUserWhere);exit;\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if (count($arrUserList) > 0) {\n /* $_SESSION['VenusetP_UserEmail'] = $arrUserList[0]['UserEmail'];\n $_SESSION['VenusetP_UserID'] = $arrUserList[0]['pkUserID'];\n $_SESSION['VenusetP_UserName'] = $arrUserList[0]['UserFirstName']; */\n }\n return true;\n } else {\n return false;\n }\n }", "function isLogin()\n\t {\n\t\t if(empty($_SESSION['username']) || empty($_SESSION['user']))\n\t\t {\n\t\t\t header(\"Location:login.php\");\n\t\t }\n\t }", "function loggedin() {return $this->login_state!=0;}", "public function check() {\n $check = $this->mysqli->query(\"SELECT * FROM user_info WHERE email='$this->email' && password ='$this->password' LIMIT 1\") or die($this->mysqli->error);\n $count = $check->num_rows;\n\n if ($count) {\n while($rows = $check->fetch_array(MYSQLI_ASSOC)){\n $this->loginID = $rows['loginID'];\n $_SESSION['loginID'] = $this->loginID;\n }\n $_SESSION['email'] = $this->email;\n $this->result .= \"Successfully Logged In\";\n } else {\n $this->result .= \"Sign In error!! Please try again\";\n }\n }", "protected function _isAlreadyLoggedIn(){\n debug($_SESSION);\n die();\n if ($this->Session->read('Auth.User')) {\n $role = $this->Role->read(null, $this->Auth->user('role_id'));\n CakeSession::write('Auth.User.role', $role['Role']['alias']);\n\n $url = null;\n switch ($role['Role']['alias']) {\n case 'admin':\n case 'manager':\n $this->Session->setFlash(__('If you pretend to register an other person, user \"Add Register (Consolidate)\" at Administrative Panel.'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'admin', 'admin' => true);\n break;\n case 'registered':\n $this->Session->setFlash(__('You has already registered!'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'profile', 'profile' => true);\n break;\n default:\n $url = $this->Auth->redirect();\n break;\n }\n $this->redirect($url);\n }\n return array('success' => true);\n \n }", "public function check_login()\n\t{\n\t\tif($this->session->userdata('member_login_status'))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function trylogin()\n {\n\t\t$ret = false;\n\t\t\n $err = SHIN_Core::$_models['sys_user_model']->login();\n\n SHIN_Core::$_language->load('app', 'en');\n $err = SHIN_Core::$_language->line($err);\n\t\t\n if ($err != '') {\n SHIN_Core::$_libs['session']->set_userdata('loginErrorMessage', $err);\n } else {\n $this->sessionModel->start(SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t// addons for new field added //////////////////////////\n\t\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t\t// \"host\" and \"lastlogin\" field \n\t\t\t$data = array('lastlogin' => date('Y-m-d H:i:s'), 'host' => SHIN_Core::$_input->ip_address());\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t\t///////////////////////////////////////////////////////\n }\n\n\t\treturn $ret;\n }", "public function checkLogin()\r\n\t{\r\n\t\tif (isset($_SESSION['loggedIn']))\r\n\t\t{\r\n\t\t\t$password = $_SESSION['loggedIn'];\r\n\t\t\t$result = self::$db->getDataSecured(\"SELECT * FROM \".$this->dbTable.\" WHERE $this->userPasswordClmn = :password ;\", array(\":password\" => $password));\r\n\t\t\t\r\n\t\t\tif(!empty($result) && ($_SESSION['lastActive'] + $this->maxLifeTime > time()))\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['lastActive'] = time();\r\n\t\t\t\treturn $result[0];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "function checkLogin(){\n global $database; //The database connection\n\n /* Username and userid have been set and not guest */\n if(isset($_SESSION['username'])){\n return true;\n }\n /* User not logged in */\n else{\n return false;\n }\n }", "public static function checkLogin()\n {\n if (!isset($_SESSION)) {\n session_start();\n }\n if (!isset($_SESSION['email'])) {\n header('Location: login.php');\n }\n }", "public static function verifyLogin():bool\n\t{\n\n\t\tif (\n\t\t\t!isset($_SESSION[User::SESSION])\n\t\t\t||\n\t\t\t!$_SESSION[User::SESSION]\n\t\t\t||\n\t\t\t!(int)$_SESSION[User::SESSION]['iduser'] > 0\n\t\t)\n\t\t{\n\t\t\n\t\t\treturn false;\n\t\t\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t} \n\n\t}", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "function is_member_login() {\n\t\t$cm_account = $this->get_account_cookie(\"member\");\n\t\tif ( !isset($cm_account['id']) || !isset($cm_account['username']) || !isset($cm_account['password']) || !isset($cm_account['onlinecode']) ) {\n\t\t\treturn false;\n\t\t}\n\t\t// check again in database\n\t\treturn $this->check_account();\n\t}", "public function isLoginRequired()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function logged_user_check() {\n if(is_user_logged())\n launch_error(\"You are already logged in.\");\n}", "function islogin()\n\t{\n\t\tif (isset($_SESSION['user']) && !empty($_SESSION['user']))\n\t\t{\n\t\t\treturn true;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }", "public function CheckLogin()\r\n {\r\n $visiteur = new Visiteur();\r\n \r\n //Appelle la fonction Attempt pour verifier le login et le password, si cela correspond $result prends la valeur ID correspondant a l'utilisateur\r\n $result = $visiteur->Attempt($_POST['login'],$_POST['password']);\r\n \r\n //SI l'ID a une valeur, stocke l'ID dans $_SESSION et ramene a la main mage\r\n if (isset($result)){\r\n $_SESSION['uid'] = $result->id;\r\n $this->MainPage();\r\n }\r\n //Sinon, ramene a la page de connexion\r\n else{\r\n $this->LoginPage();\r\n } \r\n }", "function isLogin() {\n if (isset(Yii::app()->session['adminUser'])) {\n return true;\n } else {\n Yii::app()->user->setFlash(\"error\", \"Username or password required\");\n header(\"Location: \" . Yii::app()->params->base_path . \"admin\");\n exit;\n }\n }", "public static function isLogin()\n {\n\n if ( !Session::has( 'admin' ) )\n {\n return false;\n }\n $idAdmin = Session::get( 'admin' );\n $AdminExist = Admin::find( $idAdmin );\n\n if ( !$AdminExist )\n {\n return false;\n }\n\n return true;\n }", "function estaLogueado() {\n return isset($_SESSION[\"email\"]);\n }", "public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }", "public function chkLogin()\r\n {\r\n global $cookie_prefix;\r\n\t\t\r\n if(\r\n isset($_COOKIE[$cookie_prefix . \"id\"])\r\n &&\r\n isset($_COOKIE[$cookie_prefix . \"pass\"])\r\n )\r\n\t{\r\n #<!-- Sanitize ID -->\r\n $id = $_COOKIE[$cookie_prefix . \"id\"];\r\n\t\t/*$id = mysql_real_escape_string($id);\r\n\t\t$id = strip_tags($id);*/\r\n\t\t$id = parent::protect($id);\r\n\t\t\t\r\n #<!-- Sanitize Pass -->\r\n\t\t$pass = $_COOKIE[$cookie_prefix . \"pass\"];\r\n\t\t/*$pass = mysql_real_escape_string($pass);\r\n\t\t$pass = strip_tags($pass);*/\r\n\t\t$pass = parent::protect($pass);\r\n\t\t\r\n $query = mysql_query(\"SELECT * FROM `hxm_members` WHERE `id` = '$id' AND `password` = '$pass'\");\r\n $result = mysql_num_rows($query);\r\n $data = mysql_fetch_array($query);\r\n\t\t\t\r\n if( $result != 1 )\r\n {\r\n header(\"Location: \" . AUTH);\r\n }\r\n\t\t\t\r\n if( $data[\"group\"] == \"0\" )\r\n {\r\n header(\"Location: \" . AUTH);\r\n }\r\n\t}\r\n\telse\r\n\t{\r\n header(\"Location: \" . AUTH);\r\n\t\t\t\t\r\n\t}\r\n }", "private function checkLogin()\n {\n // save the user's destination in case we direct them to authenticate\n\n // whitelist authentication mechanisms\n if($this->_controller == \"authenticate\")\n return;\n\n // whitelist database reload\n if($this->_controller == \"populatetestdata\")\n return;\n\n if(!isset($_SESSION['userid']))\n {\n // Don't redirect the user to an error page just in principle\n // @todo possible @bug why would it do this?\n if($this->_controller != \"error\" && $this->_controller != \"undefined\")\n {\n $this->slogger->slog(\"saving destination to \" . $this->_controller, SLOG_DEBUG);\n $_SESSION['destination'] = $this->_controller;\n }\n redirect('authenticate');\n\n }\n\n }", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function IsLogin()\n {\n //检测是否登录,若没登录则转向登录界面\n session_start();\n if (!isset($_SESSION['permit'])) {\n // header(\"Location:login.html\");\n return 0;\n }\n return 1;\n }", "public function authLogin(): bool\n {\n if (!empty($_SESSION['sessionId'])) {\n return true;\n }\n\n return false;\n }", "public static function already_logged_in() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::setFlash(\"alert-danger\", \"You have already logged in.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}", "static public function is_login( Request $request ){\n return 0;\n }", "public function log_login() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"UPDATE users SET last_seen = NOW() WHERE user_id = '$this->user_id' LIMIT 1\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function checkLogin()\n\t{\n\t\t$sql = sprintf\n\t\t\t('\n\t\t\t\tSELECT id FROM adminner WHERE username = \"%s\" AND password = \"%s\"',\n\t\t\t\t$this->getUsername(),\n\t\t\t\t$this->getPassword()\n\t\t\t);\n\t\t\t\n\t\t\t$query = $this->db->query($sql);\n\n\t\treturn $query->num_rows();\n\t}", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "private function checkLogin() {\n if (!$this->checkConfig()) return;\n $config = $this->getConfig();\n\n if (isset($_SESSION['signin/twitter/status']) && $_SESSION['signin/twitter/status']=='verified') {\n\n $screenname = $_SESSION['signin/twitter/request_vars']['screen_name'];\n $twitterid = $_SESSION['signin/twitter/request_vars']['user_id'];\n $oauth_token = $_SESSION['signin/twitter/request_vars']['oauth_token'];\n $oauth_token_secret = $_SESSION['signin/twitter/request_vars']['oauth_token_secret'];\n\n $connection = new TwitterOAuth($config['consumer_key'], $config['consumer_secret'], $oauth_token, $oauth_token_secret);\n\n // check if we already have this Twitter user in our database\n $user = UserQuery::create()->findOneByOAuthSignIn('twitter::' . $twitterid);\n if (!$user) {\n // if not we create a new one\n $user = new User();\n $user->setCreatedAt(time());\n $user->setOAuthSignIn('twitter::' . $twitterid);\n // we use the email field to store the twitterid\n $user->setEmail('');\n $user->setRole(UserPeer::ROLE_EDITOR); // activate user rigth away\n $user->setName($screenname);\n $user->setSmProfile('https://twitter.com/'.$screenname);\n $user->save();\n }\n DatawrapperSession::login($user);\n }\n }", "public function check_login(): void\n {\n if ($this->email_activation and $this->user and !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect($this->login);\n }\n }", "public function customerIsAlreadyLoggedIn()\n {\n return (bool)$this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n }", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "public static function isLogin() {\r\n\t\treturn (bool) Session::get('login', KumbiaAuthBase::$namespace);\r\n\t}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public function check_login(): void\n {\n if ($this->email_activation && $this->user && !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/login');\n }\n }", "function login_check() {\n global $logvar;\n session_start();\n $obj = new Cryptography();\n\n if (isset($_SESSION[\"login_user\"])) {\n $de_log_var = $obj->decoding($_SESSION[\"login_user\"]);\n if ($de_log_var == $logvar) {\n\n return true;\n\n } else {\n\n return false;\n }\n\n } else {\n return false;\n\n }\n /*check for real user end*/\n}", "public function addLoginState(){\r\n\t\t$userId = $this->session->userdata('userId');\r\n\t\t$res = $this->curd_m->get_search(\"SELECT login_validate FROM users WHERE id=\".$userId,'object');\r\n\t\tif($res!==NULL && sizeof($res)==1){\r\n\t\t\tif( (time()-$res[0]->login_validate) > $this->config->item('sess_time_to_update')){\r\n\t\t\t\treturn $this->curd_m->get_update(\"users\",array('id'=>$userId,'login_validate'=>time()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "function checkloginStatus()\n {\n if (isset($_SESSION['loggedIn']))\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public static function checkLogin() {\n\t\t\n\t\tif(!isset($_SESSION[\"uid\"])) {\n ?>\n <script language=\"javascript\">\n window.location.href = \"login.php\"\n </script>\n <?php\n \t}\n\n\t}", "protected function check_logged_in(){\n\n\t\t$this->load->model('patoauth/patoauth_model', 'patoauth');\n\n\t/*\n\t\tTRY TO AUTOLOGIN */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\t$this->patoauth->autologin();\n\n\t/*\n\t\tIF STILLS NO LOGGED IN GET OUT OF HERE */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\tredirect(site_url('auth/login'));\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "function isLogged()\n\t{\n\t\t//проверяем наличие в куки данных\n\t\tif (array_key_exists('login_id', $_COOKIE) and is_string($_COOKIE['login_id']) //проверка на массив\n\t\t\tand\n\t\t\tarray_key_exists('token', $_COOKIE) and is_string($_COOKIE['token'])\n\t\t) {\n\t\t\t$loginID = (int)$_COOKIE['login_id'];\n\t\t\t$token = (string)$_COOKIE['token'];\n\t\t\t$loginMapper = new LoginMapper($this->pdo);\n\t\t\t//проверяем наличие id (серии) токена в бд\n\t\t\t$hash = $loginMapper->getHash($loginID);\n\t\t\t//делаем что-то только если хэш найден в базе\n\t\t\tif ($hash != false) {\n\t\t\t\t//если хэши из бд и куки совпали\n\t\t\t\tif (hash_equals($hash, hash('sha256', $token))) {\n\t\t\t\t\t//пользователь обладает нужными данными - он залогинен\n\t\t\t\t\t$this->islogged = true;\n\t\t\t\t} else {\n\t\t\t\t\t//пользователь дал нужный айди, но провалил проверку пароля => воровство\n\t\t\t\t\t$this->islogged = false;\n\t\t\t\t}\n\n\t\t\t} else $this->islogged = false;\n\n\t\t} else $this->islogged = false;\n\n\t\treturn $this->islogged;\n\t}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "public function userExists($login){\n $usr = $this->userInfo($login);\n if($usr == null) { // uzivatel neni v DB\n return false;\n }\n else {\n return true;\n }\n }", "public function isLogin() {\n\t\treturn (empty($this->session)) ? false : $this->session->get('login', false);\n\t}", "function user_login_status() {\n $g = get_session('user_data');\n if (!empty($g)) {\n return true;\n }\n return false;\n}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }" ]
[ "0.78095543", "0.77635115", "0.77577263", "0.7744806", "0.7705954", "0.7689055", "0.76341856", "0.7613597", "0.7595479", "0.7594596", "0.7571729", "0.75381124", "0.7531579", "0.7519837", "0.7514515", "0.750842", "0.7504872", "0.7501331", "0.7491394", "0.74634683", "0.7451499", "0.7444584", "0.7441178", "0.7429553", "0.74291044", "0.7422908", "0.74206376", "0.741556", "0.7414755", "0.7403848", "0.7375167", "0.7362056", "0.7345319", "0.73178154", "0.72796893", "0.726548", "0.72600025", "0.7212861", "0.7191783", "0.7178697", "0.7172377", "0.717211", "0.71525115", "0.71496344", "0.7136691", "0.713053", "0.7129186", "0.7127457", "0.71246374", "0.71241915", "0.71226764", "0.71186954", "0.71086997", "0.71077144", "0.7105387", "0.7102858", "0.709788", "0.709057", "0.7077482", "0.70774686", "0.7075039", "0.7073449", "0.70662177", "0.70654356", "0.7054855", "0.70418155", "0.7039792", "0.7032496", "0.7023237", "0.701647", "0.700614", "0.69994646", "0.69983417", "0.6992952", "0.69919056", "0.6982969", "0.69752026", "0.69720984", "0.6971134", "0.6968969", "0.69673896", "0.69649744", "0.69525933", "0.69484067", "0.69434786", "0.6940427", "0.69338137", "0.6929051", "0.69284", "0.69282985", "0.6924983", "0.6923032", "0.69059736", "0.69050646", "0.6903491", "0.69029367", "0.6900707", "0.6894827", "0.6894304", "0.6887324", "0.6886153" ]
0.0
-1
check if db exists
final protected function is_db($user, $db) { if (is_dir("{$this->dir}$user/$db")) return TRUE; return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbExists($dbName);", "function check_db(){\n if( ! $this->database_exists() ){\n $this->create_table();\n }\n }", "public function checkDatabaseExists(): bool\n {\n $query = QueryBuilder::new($this->poolName, null, null);\n\n return $query->fromRaw('information_schema.SCHEMATA')\n ->where('SCHEMA_NAME', $this->getDatabaseName())\n ->exists();\n }", "private function check_db() {\n if (ee()->db->table_exists($this->table_name)) {\n return true;\n }\n return $this->make_db();\n }", "function Sql_DB_Exists($db=\"\")\n {\n if (empty($db)) { $db=$this->DBHash[ \"DB\" ]; }\n\n $dbs=$this->Sql_DBs_Get();\n\n $res=FALSE;\n if (preg_grep('/^'.$db.'$/',$this->Sql_DBs_Get())) { $res=TRUE; }\n\n return $res;\n }", "private function databaseExists()\n {\n try {\n if (is_numeric(Bookmark::count()) && is_numeric(Tag::count())) {\n return true;\n }\n } catch (Exception $e) {\n return false;\n }\n\n return false;\n }", "public function _db_exists($dbname){\n if (!is_dir($this->_db_path($dbname)))\n return FALSE;\n return TRUE;\n }", "public function database_exists()\n\t{\n\t\t\n\t\t$mysqli = $this->connect();\n\t\t\n\t\tif($stmt = $mysqli->prepare(\"\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM information_schema.TABLES\n\t\t\tWHERE table_schema = ?\n\t\t\tAND table_name = ?\"))\n\t\t{\n\t\t\n\t\t\t//Workaround since bind_param doesn't accept constants\n\t\t\t$db_name = DB_NAME;\n\t\t\t\n\t\t\t$stmt->bind_param('ss', $db_name, $this->table_name);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->bind_result($table_count);\n\t\t\t$stmt->fetch();\n\t\t\t$stmt->close();\n\t\t\n\t\t}else{\n\t\t\tdie('Error: Could not prepare statement');\n\t\t}\n\t\t\n\t\t$table_exists = ($table_count >= 1) ? true : false;\n\t\t\n\t\tif ($table_exists) :\n\t\t\treturn true;\n\t\telse :\n\t\t\treturn false;\n\t\tendif;\n\t}", "public function _dbExist($db)\n {\n return is_dir(\"$this->_LIBPATH/$db\") ? true : false;\n }", "public function hasDatabase($name);", "private function is_db_available(){\n \t$host = Configuration::DB_HOST;\n\t\t$dbname = Configuration::DB_NAME;\n\t\t$dbuser = Configuration::DB_USER;\n\t\t$dbpass = Configuration::DB_PASS;\n\t\t$con = null;\n\t\ttry{\n\t\t\t$con = new PDO(\"mysql:host=$host;dbname=$dbname\", $dbuser, $dbpass, array(PDO::ATTR_PERSISTENT => true));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t\t$con = null;\n\t\treturn true;\n }", "public function dbExists($db)\n {\n return $this->_dbExist($db);\n }", "public function checkDatabaseFile()\n {\n return file_exists($this->getDatabasePath());\n }", "public static function checkDB($name){\nif(!(\\Storage::disk('masterDB')->exists($name))){\nnew \\SQLite3(database_path('master').DS.$name);\n}\n}", "public function filterCheckDb()\n {\n App::$Database->addConnection($this->db, 'install');\n\n try {\n App::$Database->getConnection('install')->getDatabaseName();\n } catch (\\Exception $e) {\n return false;\n }\n\n return true;\n }", "public function dbIsInstalled();", "public function check_db()\n {\n $test = $this->connection->query('SELECT COUNT(*) FROM ' . $this->connection->get_table_prefix() . 'users', null, null, true);\n return !is_null($test);\n }", "private static function check_db() {\n\t\tif (self::$db_installed) {\n\t\t\treturn true;\n\t\t}\n\n\t\tglobal $databases;\n\n\t\t$sth = Database::get()->prepare('SELECT table_name FROM information_schema.tables WHERE table_schema = :database AND table_name = :table');\n\n\t\t$sth->execute(array(\n\t\t\t':database' => $databases['default']['name'],\n\t\t\t':table' => 'brutal_variables',\n\t\t));\n\n\t\t$table = $sth->fetchObject();\n\n\t\tif ($table == false) {\n\t\t\t$query = '\n\t\t\t\tCREATE TABLE IF NOT EXISTS `brutal_variables` (\n\t\t\t\t\t`name` varchar(255) NOT NULL,\n\t\t\t\t\t`value` TEXT NOT NULL,\n\t\t\t\tPRIMARY KEY (`name`))\n\t\t\t';\n\n\t\t\tDatabase::get()->exec($query);\n\t\t}\n\n\t\tself::$db_installed = true;\n\n\t\treturn true;\n\t}", "public function test_database()\n\t{\n\t\ttry {\n\t\t\treturn (bool) DB::query(Database::SELECT, 'SHOW DATABASES')\n\t\t\t\t->execute()\n\t\t\t\t->count();\n\t\t} catch (Database_Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function database_exists(){\n global $wpdb;\n\n $table_exists = (bool) $wpdb->query( \"SHOW TABLES LIKE '$wpdb->base_prefix$this->table';\" );\n\n return $table_exists;\n }", "public static function dbExists( $sDbName ) {\n\t\t$rRes = mysql_query( sprintf( \"SHOW DATABASES LIKE '%s'\", $sDbName ) );\n\t\treturn mysql_num_rows( $rRes ) ? TRUE : FALSE;\t\n\t}", "private function canUseDatabase()\n {\n return $this->deploymentConfig->get('db');\n }", "abstract public function hasDatabase(BaseConnectionInfo $connInfo);", "function detectdb() {\r\n\t\t\t$names = array();\r\n\t\t\t$this->db->Halt_On_Error = 'no';\r\n\t\t\t$tables = $this->db->table_names();\r\n\t\t\t\r\n\t\t\tforeach ($tables as $tab_info) {\r\n\t\t\t\t$names[] = $tab_info['table_name'];\r\n\t\t\t}\r\n\t\t\tif(is_array($names) && in_array('s3db_account', $names)) {\r\n\t\t\t\treturn True;\r\n\t\t\t} else {\r\n\t\t\t\treturn False;\r\n\t\t\t}\r\n\t\t}", "function connectionExists(){\n\t\tglobal $dbConnection;\n\t\tif($dbConnection == null){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}", "public function testCreateDb()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n $db = Sopha_Db::createDb($dbname, $host, $port);\n \n // Make sure DB now exists\n $response = Sopha_Http_Request::get($this->_url);\n $this->assertEquals(200, $response->getStatus());\n }", "public function checkDatabaseStructure( );", "private function checkOpenDB(){\r\n if($this->connected){\r\n return true;\r\n }\r\n \r\n //No database opened yet\r\n return false;\r\n }", "function tableExists($db, $table = 'settings') {\n try {\n $result = $db->query(\"SELECT 1 FROM $table LIMIT 1\"); \n } catch (Exception $e) {\n return false;\n }\n return $result == true;\n }", "function CreateDatabaseIfNoneExists() {\n $link = mysql_connect($this->servername, $this->username, $this->password);\n \n if (!$link) {\n die('Could not connect: ' . mysql_error());\n }\n \n //Make Players the current database\n $db_selected = mysql_select_db($this->dbname, $link);\n \n //Checking if the database exists, if it doesn't make it\n if (!$db_selected) {\n $file_content = file('PlayerSpins.sql');\n $query = \"\";\n foreach($file_content as $sql_line){\n if(trim($sql_line) != \"\" && strpos($sql_line, \"--\") === false){\n $query .= $sql_line;\n if (substr(rtrim($query), -1) == ';'){\n //echo $query;\n $result = mysql_query($query)or die(mysql_error());\n $query = \"\";\n }\n }\n }\n }\n mysql_close($link);\n }", "function db_check() {\n\t\tif(!is_admin() || !$this->db_option || !$this->db_version || !$this->table_schema) return false;\n\t\tglobal $wpdb;\n\t\t$current_db_version = get_option($this->db_option);\n\t\tif($this->db_version != $current_db_version) {\n\t\t\t$this->db_install_options();\n\t\t\t$this->db_install($sql);\n\t\t}\n\t}", "public function hasDatabase(): bool\n {\n if ($this->hasDatabaseCache !== null) {\n return $this->hasDatabaseCache;\n }\n\n return $this->hasDatabaseCache = App::hasDatabase() &&\n Schema::hasTable(Config::get('database.migrations', 'migrations'));\n }", "public function isDatabaseRequired()\n {\n return $this->isSomethingRequired(array(\n 'full_backup', 'database'\n ));\n }", "public static function existsKphpDB($dbid)\r\n\t{\r\n\t\tif(!self::$_started)\r\n\t\t{\r\n\t\t\tself::addDebug(\"KeepassPHP is not started!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn self::$_kphpdbManager->existsKey($dbid);\r\n\t}", "static function using_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\t\treturn $dbConn && (substr($dbConn->currentDatabase(), 0, strlen($prefix) + 5) == strtolower(sprintf('%stmpdb', $prefix)));\n\t}", "function db_check() {\n global $wpdb;\n $table_name = $wpdb->prefix . \"bl_maintainers\";\n // if tables aren't installed then install them\n if ($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n $this->db_install();\n }\n }", "function checkIfDatabaseIsCreated(){\n\tglobal $connect;\n\t$query1 = \"create table if not exists Register(id INT AUTO_INCREMENT PRIMARY KEY,firstname VARCHAR(20),lastname VARCHAR(20),email VARCHAR(30),password VARCHAR(20));\";\n\tmysqli_query($connect, $query1) or die (mysqli_error($connect));\n}", "private function existsDatabase(string &$databaseName): bool\n {\n return $this->db\n ->newQuery()\n ->selectRaw('SCHEMA_NAME')\n ->fromRaw('INFORMATION_SCHEMA.SCHEMATA')\n ->whereRaw(\"SCHEMA_NAME = '{$databaseName}'\")\n ->count();\n }", "function new_db($name) {\n\t\t\t$sql = \"CREATE DATABASE IF NOT EXISTS \".$name;\n\t\t\tif ($this->checkup(\"\", $sql) != true) {\n\t\t\t\treturn $this->error(\"an error occured!\");\n\t\t\t}\n\n\t\t\t#\t\tif ( mysqli_query ($this->CONN, $sql ) ) {\n\t\t\tif ($this->one_query($sql)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn $this->error(\"error while creating database '$name'!\");\n\t\t\t}\n\t\t}", "protected function isDatabaseReady()\n {\n // Such as during setup of testsession prior to DB connection.\n if (!DB::is_active()) {\n return false;\n }\n\n // If we have a DB of the wrong type then complain\n if (!(DB::get_conn() instanceof MySQLDatabase)) {\n throw new Exception('HybridSessions\\Store\\DatabaseStore currently only works with MySQL databases');\n }\n\n // Prevent freakout during dev/build\n return ClassInfo::hasTable('HybridSessionDataObject');\n }", "public function checkDatabase()\n {\n $isChecked = $this->isDatabaseChecked();\n if (null !== $isChecked) {\n return $isChecked;\n }\n\n $this->dbCheck = SafeDatabaseChecker::tablesExist($this->getConnection(), $this->requiredTables);\n\n return $this->dbCheck;\n }", "public function checkIfTablesExist()\n {\n foreach (self::DB_TABLE_INFO as $tableName => $createSql) {\n try {\n $result = $this->connection->query('SELECT 1 FROM turns LIMIT 1');\n } catch (Exception $e) {\n $result = false;\n }\n\n if ($result === false) {\n $this->connection->exec($createSql);\n }\n }\n }", "function createDBIfNotExist($type) {\n if($type !== 'account' && $type !== 'job' && $type !== 'store') {\n die(\"ERROR: createDBIfNotExist($type)\\n\");\n }\n\n global $dbconfig;\n // connect to the mysql host of account\n $host = $dbconfig->$type->host;\n $user = $dbconfig->$type->user;\n $password = $dbconfig->$type->password;\n $dbname = $dbconfig->$type->name;\n\n $conn = get_conn($host, $user, $password);\n\n // select the db of information_schema\n select_db('information_schema', $conn);\n\n // check if the account db exists\n if($res = mysql_query(\"select * from SCHEMATA where SCHEMA_NAME='$dbname'\", $conn)) {\n if($record = mysql_fetch_assoc($res)) {\n echo \"DONE: account db $dbname exists on $host\\n\";\n return false;\n } else {\n echo \"DONE: account db $dbname does not exist on $host\\n\";\n //need to create the account db\n createDB($type, $conn);\n return true;\n }\n } else {\n die(\"ERROR: select * from SCHEMATA where SCHEMA_NAME='$dbname'\");\n }\n\n}", "function createDB() {\r\n\t\t\r\n\t\tif( $this->state != 1 ) return false;\r\n\t\t\r\n\t\tglobal $dbName;\r\n\t\t$r = mysql_query( \"CREATE DATABASE `$dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\" );\r\n\t\t$this->connect();\r\n\t\t\r\n\t\treturn $r;\r\n\t}", "public function testCreateExistingDbFails()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n try {\n $db = Sopha_Db::createDb($dbname, $host, $port);\n $this->fail(\"createDb was expected to fail with a 409 error code\");\n } catch (Sopha_Db_Exception $e) {\n $this->assertEquals(412, $e->getCode(), \"Error code is not 409\");\n }\n }", "protected function checkDbAndTables()\n\t{\n\t\tif (!isset($GLOBALS['egw_info']['apps']))\n\t\t{\n\t\t\t$GLOBALS['egw']->applications->read_installed_apps();\n\t\t}\n\t\tif (version_compare($GLOBALS['egw_info']['apps']['activesync']['version'] , '16.1.001', '<'))\n\t\t{\n\t\t\tthrow new UnavailableException('ZPush tables not yet installed, run setup!');\n\t\t}\n\t\treturn true;\n\t}", "function xmldatabaseexists($databasename, $path = \".\", $conn = false)\n{\n return (file_exists(\"$path/$databasename\"));\n}", "public function testDBTablesExist() {\n\n $tables = array(\n 'pheno_plant',\n 'pheno_plantprop',\n 'pheno_scale_member',\n 'pheno_measurements',\n 'pheno_project_cvterm',\n 'pheno_plant_project',\n 'pheno_project_user',\n 'pheno_backup_file',\n );\n \n foreach($tables as $table) {\n $exists = db_table_exists($table);\n $this->assertTrue($exists, \"Checking that $table table exists.\");\n }\n\n }", "private function _createDatabase($dbName) { \n try { \n $this->_openDbConnection();\n\n // Prüfen ob gleichnamige Datenbank existiert\n if (count($this->model->getDatabase($dbName)) !== 0) {\n throw new Exception('Gleichnamige Datenbank existiert schon!');\n }\n\n try {\n $this->model->createDatabase($dbName); \n } catch (Exception $ex) {\n throw new Exception('Erstellen der Datenbank fehlgeschlagen!<br />Möglicherweise hast du keine Berechtigung.');\n }\n $this->model->closeDbConnection($this->model->pdo);\n $return = true;\n } catch (Throwable $ex) {\n $return = $ex;\n }\n return $return;\n }", "function create_database() {\n\ttry {\n\t\t// Set the data source name.\n\t\t$dsn = 'mysql:host=' . DATABASE_HOST . ';charset=utf8';\n\t\t\n\t\t// Attempt to establish the connection.\n\t\t$db = new PDO($dsn, DATABASE_USER, DATABASE_PASS);\n\n\t\t// We want to catch PDOExceptions.\n\t\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t// Does the database already exist?\n\t\t$statement = $db->prepare('SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = ?');\n\t\t$statement->execute([ DATABASE_NAME ]);\n\n\t\tif ($statement->rowCount() > 0) {\n\t\t\t// Drop it, because we want to reinstall.\n\t\t\t$db->query('DROP DATABASE ' . DATABASE_NAME);\n\t\t}\n\n\t\t// Create the database.\n\t\t$db->query('CREATE DATABASE ' . DATABASE_NAME);\n\t\n\t\t// Set UTF8 as the default character set.\n\t\t$db->query('ALTER DATABASE ' . DATABASE_NAME . ' CHARACTER SET utf8 COLLATE utf8_general_ci');\n\n return true;\n\n\t} catch (PDOException $e) {\n\t\techo '<pre>';\n\t\tprint_r($e);\n\t\techo '</pre>';\n\t\treturn false;\n\n\t} catch (Exception $e) {\n\t\treturn false;\n\t}\n}", "public function assertDBConnectionExists()\n {\n $pdo = '';\n\n try {\n $pdo = DB::connection()->getPdo();\n } catch (Exception $e) {\n }\n\n $this->assertTrue(is_object($pdo));\n }", "function configure_db() {\n //Old data is deleted before adding the new db structure\n $db = DB::getInstance();\n //$file = new File(CORE_INSTALLER_FILES_PATH.'/db/init.sql', 'r');\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/init.sql'))->error()) {\n return true;\n }\n return false;\n}", "function checkIntegrityDb()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function new_db( $name )\n\t{\n\t $sql = \"CREATE DATABASE \" . $name;\n\t\tif ( $this->checkup( \"\", $sql ) != true ) {\n\t\t\treturn $this->error( \"an error occured!\" );\n\t\t}\n\t\tif ( mysql_query ( $sql , $this->CONN ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn $this->error ( \"error while creating database '$name'!\" );\n\t\t}\n\t}", "public function exists()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->check_exists();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(DatabaseFileException $e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "protected function isDatabaseChecked()\n {\n if ($this->installed) {\n return true;\n }\n\n if (null !== $this->dbCheck) {\n return $this->dbCheck;\n }\n\n return null;\n }", "protected function _setupDb()\n {\n // First, delete the DB if it exists\n $this->_teardownDb();\n \n // Then, set up a clean new DB and return it\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n return Sopha_Db::createDb($db, $host, $port);\n }", "public function checkDbVersion()\n {\n if ( GALETTE_MODE === 'DEV' ) {\n Analog::log(\n 'Database version not checked in DEV mode.',\n Analog::INFO\n );\n return true;\n }\n try {\n $select = new \\Zend_Db_Select($this->db);\n $select->from(\n PREFIX_DB . 'database',\n array('version')\n )->limit(1);\n $sql = $select->__toString();\n $res = $select->query()->fetch();\n return $res->version === GALETTE_DB_VERSION;\n } catch ( \\Exception $e ) {\n Analog::log(\n 'Cannot check database version: ' . $e->getMessage(),\n Analog::ERROR\n );\n return false;\n }\n }", "public function hasAdministrativeDatabases() {\n return $this->_has(9);\n }", "public function check_db_existance($database=false, $response=true){\n\t\t\n\t\t$db_selected = $this->set_db($database);\n\t\t\n\t\tif (!$db_selected) {\n\t\t\t\n\t\t\t$result = false;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$result = true;\n\t\t\t\n\t\t}\n\n\t\tif($response){\n\t\t\t\n\t\t\treturn $result;\n\t\t}\n\t\n\t}", "function dbtest() {\n\tif ($dbc = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)) {\n\t\tif (!mysql_select_db(DB_NAME)) {\n\t\t\t$error_str = \"Error: Could not select database: \" . dberror();\n\t\t} else {\n\t\t\tdbclose($dbc);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\t$error_str = \"Error: Could not connect to database: \" . dberror();\n\t}\n\treturn false;\n}", "public function validateDb()\r\n {\r\n if (!Az::$app->has($this->db)) {\r\n $this->addError('db', 'There is no application component named \"db\".');\r\n } elseif (!Az::$app->get($this->db) instanceof Connection) {\r\n $this->addError('db', 'The \"db\" application component must be a DB connection instance.');\r\n }\r\n }", "public function check_db_tables(){\n\t\t$query = $this->db->prepare(\"SELECT * FROM `nw_users`\");\n\n\t\ttry{\n\t\t\t$query->execute();\n\t\t\t$check = $query->fetch();\n\t\t\tif($check == \"\"){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\t\n\n\t\t}catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "public function tableExists()\n {\n /**\n * Here we check to see if a table with that name already exists.\n */\n $mysqli = $this->getMysqli();\n $SQL = \"SHOW TABLES LIKE '\".$this->vars['db']['table'].\"'\";\n // echo $SQL;\n if (!$result = $mysqli->query($SQL)) {\n echo $mysqli->error;\n exit();\n }\n return !($result->num_rows == 0);\n }", "function sql_create_db($dbOptions=array()){\n\t$dbOptions = array_merge(array(\n\t\t'collation' => 'utf8_bin',\n\t\t'name' => null\n\t), $dbOptions);\n\n\tif( $dbOptions['name'] ){\n\t\tsql_dump($query = 'CREATE DATABASE IF NOT EXISTS ' . sql_quote($dbOptions['name'], true) . ' COLLATE ' . $dbOptions['collation']);\n\t\t$back = sql_query($query, array(), null);\n\t\treturn $back;\n\t\t\n\t}\n\treturn false;\n}", "private function doTablesExist()\n {\n $query = \"SELECT COUNT(*) AS count FROM sqlite_master WHERE name IN ('games', 'events') AND type = 'table'\";\n $result = $this->oDB->getFirst($query);\n\n return $result['count'] == 2;\n }", "protected function preflightDB()\n {\n $check = $this->db->canInstall();\n if ($check !== true) {\n $error = array_shift($check);\n array_unshift($check, $this->translate($error));\n return $this->error(call_user_func_array('sprintf', $check), true);\n }\n $tablename = \"uptest\" . uniqid();\n if (!$this->db->query(\"CREATE TABLE $tablename(a int, b int)\")) {\n $fail = \"Table creation\";\n } elseif (!$this->db->query(\"INSERT INTO $tablename(a,b) VALUES(1,2)\")) {\n $fail = \"Insertion\";\n } elseif (!$this->db->query(\"UPDATE $tablename SET a=2 WHERE a=1\")) {\n $fail = \"Update\";\n } elseif (!$this->db->query(\"DELETE FROM $tablename WHERE a=2\")) {\n $fail = \"Deletion\";\n }\n if ($this->db->tableExists($tablename)) {\n if (!$this->db->query(\"DROP TABLE $tablename\") && empty($fail)) {\n $fail = \"Table deletion\";\n }\n }\n if (!empty($fail)) {\n return $this->error(\"$fail test failed, please check DB permissions.\", true);\n }\n return true;\n }", "public function doDatabaseCheck()\n {\n $validator = new Validation\\Database();\n $validator->setPathResolver($this->config->app['path_resolver']);\n $validator->setConfig($this->config->app['config']);\n $validator->check();\n }", "static function using_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\treturn $dbConn && (substr($dbConn->currentDatabase(),0,5) == 'tmpdb');\n\t}", "public function select_db($dbname){\n $errormsg='';\n if (!$dbname)\n $errormsg=self::$_error_code_list[8];\n if(!$this->_db_exists($dbname))\n $errormsg=sprintf (self::$_error_code_list[9],$dbname);\n if($errormsg){\n $this->_trigger_error($errormsg);\n return FALSE;\n }\n $this->_currentDB=$dbname;\n return TRUE;\n }", "function table_exists()\r\n{\r\n\t$tables = $this->_db->getTableList();\r\n\t$table = self::replaceDbPrefix('#__flexicontact_log');\r\n\tif (self::in_arrayi($table,$tables))\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "function installDatabase()\n\t{\n\t\tif (!$this->setup->getClient()->db_exists)\n\t\t{\n\t\t\tif ($_POST[\"chk_db_create\"])\n\t\t\t{\n\t\t\t\tif (!$this->setup->createDatabase($_POST[\"collation\"]))\n\t\t\t\t{\n\t\t\t\t\tilUtil::sendFailure($this->lng->txt($this->setup->getError()), true);\n\t\t\t\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt(\"database_not_exists_create_first\"), true);\n\t\t\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t\t\t}\n\t\t}\n\t\tif (!$this->setup->installDatabase())\n\t\t{\n\t\t\tilUtil::sendFailure($this->lng->txt($this->setup->getError()), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"database_installed\"), true);\n\t\t}\n\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t}", "function exist($name, $db) {\n $resultSet = $db -> query(\"SELECT * from Pokedex WHERE name = '$name'\");\n $count = $resultSet->rowCount();\n return (!$count == 0);\n }", "public function testDatabase()\n\t{\n\t\t// Or use putenv('TEST_DATABASE=true') in your tests to throw an error\n\t\tif (env('TEST_DATABASE', false) == true) {\n\t\t\tthrow new Exception('TEST_DATABASE_REGISTER', 422);\n\t\t}\n\t}", "private function setupDatabase()\n {\n try {\n $db = new PDO(sprintf('mysql:host=%s;dbname=%s', $this->host, $this->dbName), $this->userName, $this->password);\n\n } catch (PDOException $e) {\n\n if (false != strpos($e->getMessage(), 'Unknown database')) {\n $db = new PDO(sprintf('mysql:host=%s', $this->host), $this->userName, $this->password);\n $db->exec(\"CREATE DATABASE IF NOT EXISTS `$this->dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\") or die(print_r($db->errorInfo(), true));\n\n } else {\n die('DB ERROR: ' . $e->getMessage());\n }\n\n $db = new PDO(sprintf('mysql:host=%s;dbname=%s', $this->host, $this->dbName), $this->userName, $this->password);\n }\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $db;\n }", "protected function checkIfDbalExtensionIsInstalled() {}", "function create_database() \r\n {\r\n \t\t\t$this->tx_cbywebdav_devlog(1,\"create_database\",\"cby_webdav\",\"create_database\");\r\n\r\n // TODO\r\n return false;\r\n }", "public function selectDb($dbname = null)\n {\n return true;\n }", "function tableExist($table, $database=false){\n if(empty($database)){\n $result = $this->query(\"SELECT DATABASE()\");\n $row = $this->fetchArray($result);\n $database = $row[0];\n }\n $result = $this->query(\"SELECT `table_name` FROM `information_schema`.`tables` WHERE `table_schema` = '{$database}' AND `table_name` = '{$table}'\");\n $numRows = $this->numRows($result);\n return $numRows > 0;\n }", "function myplugin_update_db_check()\n\t{\n\n\n\t\t// Get the Current DB and check against this verion\n\t\t$currentDBversion = get_option('agreedMarkingDB_version');\n\t\t$thisDBversion = $this->DBversion;\n\n\t\tif($thisDBversion>$currentDBversion)\n\t\t{\n\n\t\t\t$this->createTables();\n\t\t\tupdate_option('agreedMarkingDB_version', $thisDBversion);\n\t\t}\n\t\t//$this->createTables(); // Testing\n\n\t}", "function checkTableExists($table_name) {\n $sql = sprintf(\"SELECT count(*) FROM sqlite_master WHERE type='table' AND name='%s'\", $table_name);\n\n $ret = $this->query($sql);\n // echo \"<br>\";\n // echo print_r($ret, $return=true);\n // echo \"<br>\";\n if ($ret) {\n $ary = $ret->fetchArray(SQLITE3_NUM);\n if ($ary[0] > 0) {\n return True;\n } else {\n return False;\n }\n }\n }", "public function exists() : bool {\n return DB::tableExists($this->_name);\n }", "public function getIsDbConnectionValid(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n $e = null;\n try {\n $this->getDb()->open();\n } catch (DbConnectException $e) {\n // throw it later\n } catch (InvalidConfigException $e) {\n // throw it later\n }\n\n if ($e !== null) {\n Craft::error('There was a problem connecting to the database: ' . $e->getMessage(), __METHOD__);\n /** @var ErrorHandler $errorHandler */\n $errorHandler = $this->getErrorHandler();\n $errorHandler->logException($e);\n return false;\n }\n\n return true;\n }", "function createDB($db)\n{\n require_once 'Doctrine/lib/Doctrine.php';\n spl_autoload_register(array('Doctrine', 'autoload'));\n\n try {\n $db = Doctrine_Manager::connection(\"sqlite:///$db\");\n $path = '@include_path@/HTTP/Session2/Container/Doctrine';\n$path = '/Applications/xampp/htdocs/phpcvs/pear/HTTP_SESSION2/HTTP/Session2/Container/Doctrine';\n $sql = Doctrine::generateSqlFromModels($path);\n $db->execute($sql);\n } catch (Doctrine_Exception $e) {\n if (!strstr($e->getMessage(), 'already exists')) {\n die(\"createDB sql error: {$e->getMessage()} ({$e->getCode()})\");\n }\n }\n}", "public function validateDb()\n {\n if (!Yii::$app->has($this->db)) {\n $this->addError('db', 'There is no application component named \"db\".');\n } elseif (!Yii::$app->get($this->db) instanceof Connection) {\n $this->addError('db', 'The \"db\" application component must be a DB connection instance.');\n }\n }", "function create_database($data)\n\t{\n\t\t// Connect to the database\n\t\t$mysqli = new mysqli($data['db_host'],$data['db_username'],$data['db_password'],'');\n\n\t\t// Check for errors\n\t\tif(mysqli_connect_errno())\n\t\t\treturn false;\n\n\t\t// Create the prepared statement\n\t\t$mysqli->query(\"CREATE DATABASE IF NOT EXISTS \".$data['db_name']);\n\n\t\t// Close the connection\n\t\t$mysqli->close();\n\n\t\treturn true;\n\t}", "public function does_database_have_data() {\n\t\tglobal $wpdb;\n\n\t\t$tableprefix = $wpdb->prefix;\n\t\t$simple_history_table = self::DBTABLE;\n\n\t\t$sql_data_exists = \"SELECT id AS id_exists FROM {$tableprefix}{$simple_history_table} LIMIT 1\";\n\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t$data_exists = (bool) $wpdb->get_var( $sql_data_exists, 0 );\n\n\t\treturn $data_exists;\n\t}", "function f_tableExists($link, $tablename, $database = false) {\r\n if (!$database) {\r\n $res = mysqli_query($link, \"SELECT DATABASE()\");\r\n $database = mysqli_result($res, 0);\r\n }\r\n $res = mysqli_query($link, \"SHOW TABLES LIKE '$tablename'\");\r\n return mysqli_num_rows($res) > 0;\r\n}", "function sql_table_exists($table) {\n\t$sql = sql_connect();\n\tif( !$sql ){\n\t\treturn false;\n\t}\n\ttry {\n\t\t$result = $sql->query(sql_select($table, '1'));\n\t} catch (Exception $e) {\n\t\treturn FALSE;\n\t}\n\treturn $result !== FALSE;\n}", "public function valid_db_database()\n\t{\n\t\treturn $this->db_validation(1049, function() {\n\t\t\tee()->form_validation->set_message(\n\t\t\t\t'valid_db_database',\n\t\t\t\tlang('database_invalid_database')\n\t\t\t);\n\t\t});\n\t}", "protected function repositoryExists()\n {\n return retry(2, fn() => $this->migrator->repositoryExists(), 0, function ($e) {\n try {\n if ($e->getPrevious() instanceof SQLiteDatabaseDoesNotExistException) {\n return $this->createMissingSqliteDatabase($e->getPrevious()->path);\n }\n\n $connection = $this->migrator->resolveConnection($this->option('database'));\n\n if (\n $e->getPrevious() instanceof PDOException &&\n $e->getPrevious()->getCode() === 1049 &&\n $connection->getDriverName() === 'mysql') {\n return $this->createMissingMysqlDatabase($connection);\n }\n\n return false;\n } catch (Throwable) {\n return false;\n }\n });\n }", "public function create_db($db_name,$auto_select=true)\n {\n \tif($db_name == \"\") die(\"ERROR: New table name not defined\");\n \tif(mysqli_select_db($table_name) && DEVELOPMENT == true) echo \"WARNING: Database '\" . $db_name . \"' already exists\";\n\t $query = \"CREATE DATABASE IF NOT EXISTS $db_name;\";\n\t\t\t$data = mysqli_query($this->mysql, $query);\n if(!$data) die(\"ERROR: \" . mysqli_error($this->mysql));\n if($auto_select) mysqli_select_db($db_name);\n return true;\n }", "public function ensureDatabaseExists(array $config)\n {\n $query = sprintf(\n 'CREATE DATABASE IF NOT EXISTS %s CHARACTER SET utf8mb4 '\n . 'COLLATE utf8mb4_unicode_ci',\n $config['dbName']\n );\n\n $conn = $this->getDbConnection($config);\n if (!$conn->query($query)) {\n throw new RuntimeException('Unable to create database.');\n }\n\n $query = sprintf(\n \"GRANT ALL PRIVILEGES ON %s.* to %s@'%%' IDENTIFIED BY %s\",\n $config['dbName'],\n $conn->quote($config['dbUser']),\n $conn->quote($config['dbPassword'])\n );\n if (!$conn->query($query)) {\n throw new RuntimeException('Unable to create database user.');\n }\n }", "private function checkDatabaseName(\\Magento\\Framework\\DB\\Adapter\\AdapterInterface $connection, $dbName)\n {\n try {\n $query = sprintf(\"SHOW TABLES FROM `%s`\", $dbName);\n $connection->query($query)->fetchAll(\\PDO::FETCH_COLUMN, 0);\n return true;\n } catch (\\Exception $e) {\n throw new \\Magento\\Setup\\Exception(\n \"Database '{$dbName}' does not exist \"\n . \"or specified database server user does not have privileges to access this database.\"\n );\n }\n }", "function testTableExist()\n{\n\tglobal $db,$conf,$langs;\n\t\n\t$checktable = $db->query(\"SHOW TABLES LIKE '\".MAIN_DB_PREFIX.\"materiels'\");\n\tif (($checktable)&&($db->num_rows($checktable)<=0))\n\t{\n\t\t$db->query(\"CREATE TABLE \".MAIN_DB_PREFIX.\"materiels (rowid INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,ref VARCHAR(50) NOT NULL,socid INT(6),marque VARCHAR(50),model VARCHAR(50),noserie VARCHAR(50),options TEXT,note_public TEXT,date_achat DATE,garantie INT(1))\");\n\t}\n}", "function create_new_database($db, $name)\n{\n $error = $db->query(\"DROP DATABASE IF EXISTS {$name};\");\n $error = $db->query(\"CREATE DATABASE IF NOT EXISTS {$name};\");\n}", "public function update_db_check() {\n\t\t// Add a database version to help with upgrades and run SQL install\n\t\tif ( !get_option( 'vfb_pro_db_version' ) ) {\n\t\t\tupdate_option( 'vfb_pro_db_version', $this->vfb_db_version );\n\t\t\t$this->install_db();\n\t\t}\n\n\t\t// If database version doesn't match, update and maybe run SQL install\n\t\tif ( version_compare( get_option( 'vfb_pro_db_version' ), $this->vfb_db_version, '<' ) ) {\n\t\t\tupdate_option( 'vfb_pro_db_version', $this->vfb_db_version );\n\t\t\t$this->install_db();\n\t\t}\n\t}", "private function isExternalDatabase()\n {\n if ($this->isExternalDb) {\n return true;\n }\n\n if (!empty($this->clone->databaseUser)) {\n return true;\n }\n return false;\n }", "function formExists($formName){\r\n\tglobal $db;\r\n\t$sql = \"SELECT form FROM forms WHERE form ='$formName' \";\r\n\r\n\tif(!$db) connectDb();\r\n\ttry {\r\n\t\t$result = $db->query($sql);\r\n\t}\r\n\tcatch (PDOException $e) {\r\n\t\t$error = $e->getMessage();\r\n\t}\r\n\r\n\tif($result!==false) \r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "public function access() {\n if ( ! isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname']) ) {\n return false;\n }\n return true;\n }" ]
[ "0.8071124", "0.8057389", "0.80493265", "0.7945374", "0.78990406", "0.7841673", "0.77765775", "0.76341677", "0.7480693", "0.7471454", "0.7464454", "0.7442493", "0.74001086", "0.72118217", "0.7202218", "0.71967053", "0.70845675", "0.7070614", "0.7022478", "0.7017249", "0.70151275", "0.7002495", "0.6945151", "0.69205624", "0.67665976", "0.67493314", "0.6730688", "0.671897", "0.6675012", "0.6625863", "0.6617589", "0.66063744", "0.6603947", "0.6596786", "0.6558271", "0.6548478", "0.65320015", "0.6520398", "0.65171665", "0.65073526", "0.64983344", "0.6465655", "0.6422645", "0.63847065", "0.6374174", "0.6349523", "0.6317611", "0.63121766", "0.6310737", "0.630862", "0.62730825", "0.62663794", "0.6258525", "0.62320685", "0.62270856", "0.6217551", "0.6215885", "0.62093747", "0.62043387", "0.61880344", "0.61846983", "0.6164723", "0.6137375", "0.6132635", "0.61306715", "0.61291", "0.61253065", "0.61242825", "0.6120079", "0.611876", "0.61072016", "0.60976154", "0.60958695", "0.6092355", "0.6084301", "0.6083933", "0.60825646", "0.60819227", "0.6076825", "0.60747147", "0.6071417", "0.6066179", "0.603867", "0.6010988", "0.6007074", "0.5999486", "0.59975773", "0.5988117", "0.5983349", "0.5980613", "0.59723896", "0.59717274", "0.596373", "0.5942274", "0.5939726", "0.5928699", "0.5914069", "0.5904718", "0.59041", "0.59038633" ]
0.60979885
71
login to db account
final public function con($user, $pass) { if ($this->is_user($user)) { $psk = $this->user('pass', $user); if ($this->pass($pass) == $psk) { $this->con = $user; return TRUE; } } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function login();", "public function login();", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "private function login(){\n \n }", "public function executeLogin()\n {\n }", "public function login()\n\t{\n\t\t//Compute the hash code of the password submited by user\n\t\t$user_password_hash = $this->passwordEncrypt($this->user_info['user_password']);\n\t\t\n\t\t//Do datebase query to get the hash code of the password\n\t\t$db = BFL_Database :: getInstance();\n\t\t$stmt = $db->factory('select `user_id`,`user_password` from '.DB_TABLE_USER.' WHERE `user_name` = :user_name');\n\t\t$stmt->bindParam(':user_name', $this->user_info['user_name']);\n\t\t$stmt->execute();\n\t\t$rs = $stmt->fetch();\n\t\tif (empty($rs))\n\t\t\tthrow new MDL_Exception_User_Passport('user_name');\n\t\t\n\t\tif ($rs['user_password'] != $user_password_hash)\n\t\t\tthrow new MDL_Exception_User_Passport('user_password');\n\n\t\t//Set user session\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->setUserID($rs['user_id']);\n\t}", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "private function login() {\n //Look for this username in the database\n $params = array($this->auth_username);\n $sql = \"SELECT id, password, salt \n FROM user \n WHERE username = ? \n AND deleted = 0\";\n //If there is a User with this name\n if ($row = $this->db->fetch_array($sql, $params)) {\n //And if password matches\n if (password_verify($this->auth_password.$row[0] ['salt'], $row[0] ['password'])) {\n $params = array(\n session_id(), //Session ID\n $row[0] ['id'], //User ID\n self::ISLOGGEDIN, //Login Status\n time() //Timestamp for last action\n );\n $sql = \"INSERT INTO user_session (session_id, user_id, logged_in, last_action) \n VALUES (?,?,?,?)\";\n $this->db->query($sql, $params);\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n //User now officially logged in\n }\n //If password doesn't match\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }\n //If there isn't a User with this name\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }", "function AdminLogin() {\r\n\t\t$this->DB();\r\n\t}", "public function login(){\n\n\t\t$this->Login_model->login();\t\n\n\t\n\n\t}", "public function login()\n\t{\n\t\t$account = $_POST['account'];\n\t\t$password = $_POST['password'];\n\t\t$staff = D('Staff');\n\t\t$sql = \"select * from lib_staff where staff_id = '{$account}' and password='{$password}'\";\n\t\t$return = $staff->query($sql);\n\t\tif ($return) {\n\n\t\t\tcookie('staffAccount', $account, 3600 * 24);\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'success',\n\t\t\t\t'msg' => 'Welcome!'\n\t\t\t));\n\t\t\techo $json;\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function login(){\n\n }", "abstract protected function doLogin();", "public function loginTrainer(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\t\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' and password='\".$_REQUEST[\"pass\"].\"'\");\r\n\t\t\t\t$row = mysql_fetch_array($result);\r\n\t\t\t\tif($row == false){\r\n\t\t\t\t\t//echo \"No records\";\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$_SESSION['trainer'] = $row;\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function login(){\n\t\t\trequire_once(MODEL.\"ProcessAccount.php\");\n\t\t\t$this->model = new ProcessAccount();\n\t\t\t//Make sure username and password not empty\n\t\t\tif(!empty($_POST[\"username\"]) && !empty($_POST[\"password\"])){\n\t\t\t\t//Check exist account\n\t\t\t\tif($this->model->checkAccount($_POST['username'],$_POST['password'])){\n\t\t\t\t\t//Make seesion to account \n\t\t\t\t\t$this->model->getInfo($_POST['username'],$_POST['password']);\n\t\t\t\t}else{\n\t\t\t\t\t$error = \"Wrong username or password\";\n\t\t\t\t\t$this->view->render('admin/login.php',$error);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function login()\n{\n\tglobal $conf, $json, $resout, $db;\n\n\t$username = cRequest::any('_user');\n\t$password = cRequest::any('_pass');\n\t$p = $password;\n\n\t//die(\"_user: $username | _pass: $password\");\n\t\n\tif ((!$password) || (!$username)) {\n\t\t# XXX: Error page\n\t\tdie(\"Username and Password Required\");\n\t}\n\n\t$dbh = $db->open($conf['db']['host'], $conf['db']['user'],\n\t\t\t $conf['db']['passwd'], $conf['db']['name']);\n\n\t$uname = $db->secure($username);\n\t$passwd = sha1($password);\n\n\t$sql = \"select * from {$conf['tbl']['usermap']}\n\t\twhere username='$uname';\";\n\t$ret = $db->query($sql);\n\tif ($ret) {\n\t\t$res = $db->asfetch($ret);\n\t\t$uid = $res['uid'];\n\t\t$actype = $res['actype'];\n\t\tswitch($actype) {\n\t\tcase 'sa':\n\t\t\t$sql = \"select * from {$conf['tbl']['login']}\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t$sql = \"select * from {$conf['tbl']['shopinfo']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['shopinfo']}.sid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'u':\n\t\t\t$sql = \"select * from {$conf['tbl']['profile']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['profile']}.uid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* XXX: ERROR */\n\t\t\tdie(\"[!] Error: No account with Username $uname\");\n\t\t\t/* NOTREACHED */\n\t\t}\n\n\t\t# cmp passwd\n\t\tif ($passwd != $res['passwd']) {\n\t\t\tprint_r($res);\n\t\t\tprint \"Passwords don't match[$passwd | {$res['passwd']}]\";\n\t\t\texit();\n\t\t}\n\n\t\t# get last login\n\t\t$sqll = \"select * from loginhistory where uid='$uid'\";\n\t\t$retl = $db->query($sqll);\n\t\t$resl = $db->asfetch($retl);\n\n\t\t# set up session data\n\t\t$sess = new cSession;\n\t\t$datetime = date('Y/m/d H:i:s');\n\t\t$lastip = cIP::getusrip();\n\t\t$location = cIP::getusrcountry($lastip); # FIXME: need to add ip2ctry dir\n\t\tif (isset($location['country_name'])) {\n\t\t\t$location = $location['country_name'];\n\t\t} else {\n\t\t\t$location = \"Unknown\";\n\t\t}\n\n\t\tif (preg_match('/1996\\/09\\/26 16:00:00/', $resl['lastlogin'], $match)) {\n\t\t\t$ll = $datetime;\n\t\t} else {\n\t\t\t$ll = $resl['lastlogin'];\n\t\t}\n\n\t\tif (preg_match('/0\\.0\\.0\\.0/', $resl['lastip'], $match)) {\n\t\t\t$lip = $lastip;\n\t\t} else {\n\t\t\t$lip = $resl['lastip'];\n\t\t}\n\n\t\t$sess->set('uid', $res['uid']);\n\t\t$sess->set('uname', $username);\n\t\t$sess->set('actype', $actype);\n\t\tif ($actype == 'u') {\n\t\t\t$sess->set('fname', $res['fname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\t\tif ($actype == 'a') {\n\t\t\t$sess->set('sname', $res['sname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\n\t\t$sess->set('lastlogin', $ll);\n\t\t$sess->set('lastip', $lip);\n\n\t\t# XXX: update login history\n\t\t$sql = \"update {$conf['tbl']['loginhistory']} set lastlogin='$datetime',\n\t\t\tlastip='$lastip', lastlocation='$location'\n\t\t\twhere uid='$uid';\";\n\t\t$db->query($sql);\n\n\t\t$db->close($dbh);\n\t\tunset($db);\n\t\tunset($sess);\n\n\t\theader(\"Location: dashboard.php\");\n\t\texit();\n\t} else {\n\t\t# XXX: Error page\n\t\tdie(\"[!] Fatal Error: No account with Username '$uname'\");\n\t\t/* NOTREACHED */\n\t}\n}", "public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function login(){\r\n if(IS_POST){\r\n //判断用户名,密码是否正确\r\n $managerinfo=D('User')->where(array('username'=>$_POST['username'],'pwd'=>md5($_POST['pwd'])))->find();\r\n if($managerinfo!==null){\r\n //持久化用户信息\r\n session('admin_id',$managerinfo['id']);\r\n session('admin_name', $managerinfo['username']);\r\n $this->getpri($managerinfo['roleid']);\r\n //登录成功页面跳到后台\r\n $this->redirect('Index/index');\r\n }else{\r\n $this->error('用户名或密码错误',U('Login/login'),1);\r\n }\r\n return;\r\n }\r\n $this->display();\r\n }", "public function login()\n {\n }", "public function login()\n {\n }", "function doLogin()\n {\n\n //var_dump($sql);exit;\n /*if($res){*/\n //存入session\n /*session_start();\n $_SESSION['user'] = json_encode($res);*/\n\n //展示数据库\n $sql = 'show databases;';\n $res = $GLOBALS['data']->query($sql)->fetchAll();\n foreach ($res as $k=>$v){\n $res[$k] = $v['Database'];\n }\n //var_dump($res);exit;\n\n include \"views/homePage.html\";\n /*}*/\n }", "public function login(){\n\t\t\t$this->modelLogin();\n\t\t}", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t$q = \"SELECT token\n\tFROM users\n\tWHERE email = '\".$_POST['email'].\"'\n\tAND password = '\".$_POST['password'].\"'\n\t\";\n\n\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t#login failed\n\tif($token == \"\" || $_POST['email'] == \"\" || $_POST['password'] == \"\"){\n\n\n\n\tRouter::redirect(\"/users/login/error\");\n\t# send back to login page - should add indication what went wrong\n\t}\n\t#login successful\n\telse{\t\n\n\t\techo \"if we find a token, the user is logged in. Token:\".$token;\n\n\t\t#store token in a cookie\n\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n\t\t#send them to the main page\n\t\tRouter::redirect(\"/issues\");\n\n\t\t#token name value and how long should last\n\t\t#send back to index page\n\t\t#authenticate baked into base controller\n\t\t#gets users credentials this->user->firstname\n\t}\n}", "public static function login($username, $password)\r\n {\r\n\t\t//\\Config::load('db', true);\r\n\t\t//$active_db = \\Config::get('db.active');\r\n\t\t//print_r($active_db); \r\n\t\t$call_to_db = \\quotes\\Model_Quote::get_nmi_section($username, $password);exit;\r\n\t\t$sql\t=\t\"SELECT EM1_Username, EM1_EmployeeID_pk from t_Employee1, EM1_Password where EM1_Username = ? and EM1_Password = ?\";\r\n $sql = \\NMI::Db()->prepare($sql);\r\n\t\tprint_r($sql);log::error($sql); \r\n\t\t\r\n $stmt->execute(array($username,$password));\r\n $meta = $stmt->fetch();\r\n print_r($meta);exit;\r\n foreach ($meta as $u)\r\n {\r\n $user_id = $u['EM1_EmployeeID_pk'];\r\n $user_name = $u['EM1_Username'];\r\n\t\t $password = $u['EM1_Password'];\r\n }\r\n\t\t\r\n \\Session::set('user_id', $user_id);\r\n\t\t\\Session::set('username', $username);\r\n\t\t\\Session::set('password', $password);\r\n\t\t\\Session::set('authed', 'validated');\r\n\t\t\r\n\t\tif(count($user>0)){return 1;}else{return 0;}\r\n }", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "public function login() {\r\n\t\t\r\n\t\t$back = $this->hybrid->get_back_url();\r\n\t\t$user_profile = $this->hybrid->auth();\r\n\t\t\r\n\t\t$email = $user_profile->emailVerified;\r\n\t\tif(!$email)\r\n\t\t\t$email = $user_profile->email;\r\n\t\t\r\n\t\tif(!$email)\r\n\t\t\t$this->hybrid->throw_error($this->ts(\"You don't have any email address associated with this account\"));\r\n\t\t\r\n\t\t/* check if user exists */\r\n\t\t$user = current($this->a_session->user->get(array(\"email\" => $email)));\r\n\t\tif(!$user) {\r\n\t\t\t/* create user */\r\n\t\t\t$uid = $this->hybrid->add_user($email, $user_profile);\r\n\t\t\t$user = current($this->a_session->user->get(array(\"id\" => $uid)));\r\n\t\t\t\r\n\t\t\tif(!$user)\r\n\t\t\t\t$this->wf->display_error(500, $this->ts(\"Error creating your account\"), true);\r\n\t\t}\r\n\t\t\r\n\t\t/* login user */\r\n\t\t$sessid = $this->hybrid->generate_session_id();\r\n\t\t$update = array(\r\n\t\t\t\"session_id\" => $sessid,\r\n\t\t\t\"session_time\" => time(),\r\n\t\t\t\"session_time_auth\" => time()\r\n\t\t);\r\n\t\t$this->a_session->user->modify($update, (int)$user[\"id\"]);\r\n\t\t$this->a_session->setcookie(\r\n\t\t\t$this->a_session->session_var,\r\n\t\t\t$sessid,\r\n\t\t\ttime() + $this->a_session->session_timeout\r\n\t\t);\r\n\t\t\r\n\t\t/* save hybridauth session */\r\n\t\t$this->a_session->check_session();\r\n\t\t$this->hybrid->save();\r\n\t\t\r\n\t\t/* redirect */\r\n\t\t$redirect_url = $this->wf->linker('/');\r\n\t\tif(isset($uid))\r\n\t\t\t$redirect_url = $this->wf->linker('/account/secure');\r\n\t\t$redirect_url = $back ? $back : $redirect_url;\r\n\t\t$this->wf->redirector($redirect_url);\r\n\t}", "function login();", "protected static function login() {\n $wsdl = FS_APP_ROOT.'/lib/third_party/salesforce/soapclient/partner.wsdl.xml';\n\n if (self::getSessionData('salesforce_sessionId') == NULL) {\n self::getConn()->createConnection($wsdl);\n self::getConn()->login(self::$_username, self::$_password . self::$_token);\n\n // Now we can save the connection info for the next page\n self::setSessionData('salesforce_location', self::getConn()->getLocation());\n self::setSessionData('salesforce_sessionId', self::getConn()->getSessionId());\n self::setSessionData('salesforce_wsdl', $wsdl);\n } else {\n // Use the saved info\n self::getConn()->createConnection(self::getSessionData('salesforce_wsdl'));\n self::getConn()->setEndpoint(self::getSessionData('salesforce_location'));\n self::getConn()->setSessionHeader(self::getSessionData('salesforce_sessionId'));\n }\n }", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n // Check if email address is empty\n $q = \"SELECT email \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $email = DB::instance(DB_NAME)->select_field($q);\n\n if(!$email) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n }", "function auth_login($db, $str_username, $str_password)\r\r\n{\r\r\n $result_user = func_db_query($db, 'SELECT user_id FROM @TABLE_PREFIX@nx3_user WHERE username = ? AND password = MD5(?)',\r\r\n array('ss', $str_username, $str_password));\r\r\n if (isset($result_user[0]) && $result_user[0]['user_id'] != '')\r\r\n {\r\r\n $user_id = $result_user[0]['user_id'];\r\r\n $_SESSION['NX3_AUTHENTICATED'] = 'Y';\r\r\n auth_retrieve_user_properties($db, $user_id);\r\r\n log_message($db, __FILE__, 4, 'Logging user IN - user_id = ' . $user_id);\r\r\n }\r\r\n else\r\r\n {\r\r\n // Log user out, set user to 'guest'\r\r\n log_message($db, __FILE__, 5, 'User authentication Failed, username = \"' . $str_username . '\"');\r\r\n auth_logout($db);\r\r\n }\r\r\n}", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\n $lastLogin = date(\"Y-m-d H:i:s\");\n\n if(Yii::app()->user->tableName === 'tbl_user'){\n $sql = \"UPDATE tbl_user_dynamic SET ulast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_personnel'){\n $sql = \"UPDATE tbl_user_dynamic SET plast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_reader'){\n $sql = \"UPDATE tbl_user_dynamic SET rlast_login = :lastLogin WHERE user_id = :userid\";\n }\n $command = Yii::app()->db->createCommand($sql);\n $command->bindValue(\":userid\", $this->_identity->id, PDO::PARAM_STR);\n $command->bindValue(\":lastLogin\", $lastLogin, PDO::PARAM_STR);\n $command->execute();\n Tank::wipeStats();\n Yii::app()->user->setState('todayHasRecord',User::todayHasRecord());\n return true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "private function _login() {\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n $this->_connection->setUri( $this->_baseUrl . self::URL_LOGIN );\n $this->_connection->setParameterPost( array(\n 'login_username' => $this->_username,\n 'login_password' => $this->_password,\n 'back' => $this->_baseUrl,\n 'login' => 'Log In' ) );\n $this->_doRequest( Zend_Http_Client::POST );\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n throw new Opsview_Remote_Exception( 'Login failed for unknown reason' );\n }\n }\n }", "function login(){\n\t\tif(isset($_POST['login'])){//if login button pressed\n\t\t\t$userTable= new Table('users');//new table created\n\t\t\t$user= $userTable->findInDatabase('user_username', $_POST['username']);//querying users table\n\t\t\tif($user->rowCount()>0){//if data available\n\t\t\t\t$data=$user->fetch();//fetch data\n\t\t\t\tif (password_verify($_POST['password'], $data['user_password'])){//if password matches\n\t\t\t\t\t$_SESSION['session_id']=$data['user_id'];//session variable is set\n\t\t\t\t\t$_SESSION['type']=$data['user_type'];//session variable is set\n\t\t\t\t\t$_SESSION['fullname']=$data['user_firstname'].\" \".$data['user_lastname'];//session variable is set\n\t\t\t\t\theader(\"Location:index.php\");//redirect to another page\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<script> alert(\"Password is incorrect\"); </script>';//js alert is shown\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo '<script> alert(\"Username is incorrect\"); </script>';//js alert for username incorrect\n\t\t\t}\n\t\t}\n\t}", "public function login($name, $password);", "public static function login()\n {\n global $cont;\n $email = $_POST['email'];\n $password = SHA1($_POST['password']);\n\n\n $admin = $cont->prepare(\"SELECT `role` FROM `users` WHERE `email` = ? AND `password` = ? LIMIT 1\");\n $admin->execute([$email , $password]);\n $adminData = $admin->fetchObject();\n session_start();\n if(empty($adminData))\n {\n $_SESSION['error'] = \"Email or Password is Invaliad\";\n header(\"location:../admin/login.php\");\n }\n else\n {\n $_SESSION['role'] = $adminData->role; \n \n header(\"location:../admin/index.php\");\n }\n \n }", "public function login()\n {\n // make sure request is post\n if( ! SCMUtility::requestIsPost())\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $email = SCMUtility::stripTags( (isset($_POST['email'])) ? $_POST['email'] : '' );\n $password = SCMUtility::stripTags( (isset($_POST['password'])) ? $_POST['password'] : '' );\n\n if( ! Session::Auth($email,$password) )\n {\n SCMUtility::setFlashMessage('Invalid email/password.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n }", "function login ($name, $pw)\r\n {\r\n global $firstthingsfirst_admin_passwd;\r\n global $firstthingsfirst_lang;\r\n global $firstthingsfirst_theme;\r\n\r\n $this->_log->trace(\"login (name=\".$name.\")\");\r\n\r\n if ($this->is_login())\r\n $this->logout();\r\n\r\n # create user admin the first time user admin tries to login\r\n if ($name == \"admin\" && !$this->exists(\"admin\"))\r\n {\r\n $this->_log->info(\"first time login for admin\");\r\n $name_value_array = array();\r\n $name_value_array[USER_NAME_FIELD_NAME] = $name;\r\n $name_value_array[USER_PW_FIELD_NAME] = $firstthingsfirst_admin_passwd;\r\n $name_value_array[USER_LANG_FIELD_NAME] = $firstthingsfirst_lang;\r\n $name_value_array[USER_DATE_FORMAT_FIELD_NAME] = DATE_FORMAT_EU;\r\n $name_value_array[USER_DECIMAL_MARK_FIELD_NAME] = DECIMAL_MARK_POINT;\r\n $name_value_array[USER_LINES_PER_PAGE_FIELD_NAME] = 12;\r\n $name_value_array[USER_THEME_FIELD_NAME] = $firstthingsfirst_theme;\r\n $name_value_array[USER_CAN_CREATE_LIST_FIELD_NAME] = 1;\r\n $name_value_array[USER_CAN_CREATE_USER_FIELD_NAME] = 1;\r\n $name_value_array[USER_IS_ADMIN_FIELD_NAME] = 1;\r\n $name_value_array[USER_TIMES_LOGIN_FIELD_NAME] = 0;\r\n\r\n if (!$this->insert($name_value_array))\r\n return FALSE;\r\n }\r\n\r\n # create encoded_key_string\r\n $encoded_key_string = parent::_encode_key_string(USER_NAME_FIELD_NAME.\"='\".$name.\"'\");\r\n\r\n # check if record exists\r\n $record = parent::select_record($encoded_key_string);\r\n if (count($record) == 0)\r\n {\r\n if ($this->error_message_str != \"ERROR_DATABASE_CONNECT\")\r\n {\r\n $this->_handle_error(\"\", \"ERROR_INCORRECT_NAME_PASSWORD\");\r\n $this->error_str = \"\";\r\n }\r\n\r\n return FALSE;\r\n }\r\n\r\n $password = md5($pw);\r\n $db_password = $record[USER_PW_FIELD_NAME];\r\n\r\n if ($db_password == $password)\r\n {\r\n # set session parameters\r\n $this->set_id($record[DB_ID_FIELD_NAME]);\r\n $this->set_name($record[USER_NAME_FIELD_NAME]);\r\n $this->set_current_list_name(\"\");\r\n $this->set_lang($record[USER_LANG_FIELD_NAME]);\r\n $this->set_date_format($record[USER_DATE_FORMAT_FIELD_NAME]);\r\n $this->set_decimal_mark($record[USER_DECIMAL_MARK_FIELD_NAME]);\r\n $this->set_lines_per_page($record[USER_LINES_PER_PAGE_FIELD_NAME]);\r\n $this->set_theme($record[USER_THEME_FIELD_NAME]);\r\n $this->set_can_create_list($record[USER_CAN_CREATE_LIST_FIELD_NAME]);\r\n $this->set_can_create_user($record[USER_CAN_CREATE_USER_FIELD_NAME]);\r\n $this->set_is_admin($record[USER_IS_ADMIN_FIELD_NAME]);\r\n $this->set_times_login($record[USER_TIMES_LOGIN_FIELD_NAME] + 1);\r\n $this->set_login(1);\r\n\r\n $name_values_array = array();\r\n $name_values_array[USER_TIMES_LOGIN_FIELD_NAME] = ($record[USER_TIMES_LOGIN_FIELD_NAME] + 1);\r\n\r\n # update the number of times this user has logged in\r\n if (parent::update($encoded_key_string, $name_values_array) == FALSE)\r\n return FALSE;\r\n else\r\n {\r\n $this->_log->info(\"user logged in (name=\".$name.\")\");\r\n\r\n return TRUE;\r\n }\r\n }\r\n else\r\n {\r\n $this->_log->warn(\"passwords do not match (name=\".$name.\"), user is not logged in\");\r\n $this->error_str = \"\";\r\n $this->_handle_error(\"\", \"ERROR_INCORRECT_NAME_PASSWORD\");\r\n\r\n return FALSE;\r\n }\r\n }", "protected function login( )\r\n {\r\n $this->sendData( 'USER', $this->_nick, $this->_nick . ' ' . $this->_user . ' : ' . $this->_realName );\r\n \r\n $this->sendData( 'NICK', $this->_nick );\r\n \r\n $this->_loggedOn = true;\r\n }", "public function login() \n { \n $conf = $GLOBALS['CONF'];\n \n if (!$conf)\n { \n $conf = new Ossim_conf();\n $GLOBALS['CONF'] = $conf;\n } \n \n $version = $conf->get_conf('ossim_server_version');\n if ($conf->get_conf('login_enable_otp') == 'yes')\n {\n $login_method = 'otp';\n }\n else\n {\n ($conf->get_conf('login_enable_ldap') == 'yes') ? 'ldap' : 'pass'; // Login method is OTP, LDAP or PASSWORD\n }\n \n $conn = $this->conn;\n $orig_pass = $this->pass;\n \n $pass = (preg_match('/^[A-Fa-f0-9]{32}$/',$this->pass) && $this->external) ? $this->pass : md5($this->pass); //Used in Wizard Scheduler and Remote Interfaces\n $login = $this->login;\n \n \n $params1 = array($login); \n $query_1 = 'SELECT * FROM users WHERE login = ?'; \n \n $rs_1 = $conn->Execute($query_1, $params1);\n \n if (!$rs_1->EOF) \n {\n // Specific login method for Admin\n if ($rs_1->fields['login_method'] == 'pass' || $login == AV_DEFAULT_ADMIN) \n { \n $login_method = 'pass'; \n }\n }\n \n unset($query_1, $rs_1, $params1); \n \n $query = \"SELECT *, HEX(uuid) AS uuid FROM users WHERE login = ? AND pass = ?\";\n $params = array($login, $pass);\n $rs = $conn->Execute($query, $params); \n \n //Case 1: Login method is 'pass' or external process(AV Report Scheduler or Remote Interface) are trying to log in the system\n if (($login_method != 'ldap' || preg_match('/^[A-Fa-f0-9]{32}$/',$this->pass)) && (!$rs->EOF)) \n { \n //Generate a new session identifier\n session_regenerate_id(); \n $_SESSION['_user_language'] = $rs->fields['language'];\n $_SESSION['_is_admin'] = $rs->fields['is_admin'];\n $_SESSION['_timezone'] = self::get_timezone($rs->fields['timezone']);\n \n //Get secure_id\n if (valid_hex32($rs->fields['uuid']) && $rs->fields['uuid'] != '0x0')\n {\n $_SESSION['_secureid'] = $rs->fields['uuid'];\n }\n else\n {\n self::set_secure_id($conn, $login, sha1($login.'#'.$pass));\n $_SESSION['_secureid'] = sha1($login.\"#\".$pass);\n }\n \n ossim_set_lang($rs->fields['language']);\n $this->allowed_menus = $this->allowedMenus($login);\n \n $_SESSION['_user'] = $login;\n $_SESSION['_remote_login'] = base64_encode(Util::encrypt($login.'####'.$pass, $conf->get_conf('remote_key')));\n $_SESSION['_allowed_menus'] = $this->allowed_menus;\n \n if (preg_match('/pro|demo/i',$version)) \n {\n $_SESSION['_version'] = 'pro';\n $_SESSION['_user_vision'] = Acl::get_user_vision($conn);\n } \n else \n {\n $_SESSION['_version'] = 'opensource';\n $_SESSION['_user_vision'] = self::get_user_vision($conn);\n }\n\n //License info \n $_license = self::get_system_license();\n $_SESSION['_exp_date'] = $_license['appliance']['expire'];\n $_SESSION['_max_devices'] = $_license['appliance']['devices'];\n\n\n //Update Last login date\n self::update_logon_try($login); \n \n Session_activity::insert($conn);\n \n if($login == 'admin' || intval($rs->fields['is_admin']) == 1)\n {\n $this->check_all_user_accounts($conn);\n }\n\n return TRUE;\n }\n \n \n //Case 2: LDAP Login\n if ($login_method == 'ldap' && self::login_ldap($login, $orig_pass)) \n {\n $params = array($login);\n $query = 'SELECT *, HEX(uuid) AS uuid FROM users WHERE login = ?';\n \n //Logged user exists in Database\n if (($rs = $conn->Execute($query, $params)) && ($rs->EOF)) \n { \n if($conf->get_conf('login_ldap_require_a_valid_ossim_user') == 'no')\n {\n //Create the user with default perms\n $timezone = trim(`head -1 /etc/timezone`);\n \n if (preg_match('/pro|demo/i',$version))\n {\n $perms = $conf->get_conf('login_create_not_existing_user_menu');\n $entities[] = $conf->get_conf('login_create_not_existing_user_entity');\n \n $error = self::insert($conn, $login, 'ldap', md5($orig_pass), $login, '', $perms, $entities, array(), array(), NULL , NULL, $conf->get_conf('language') ,0, $timezone, 0);\n }\n else\n { \n list($menu_perms, $perms_check) = self::get_default_perms($conn);\n $perms = array();\n \n foreach($menu_perms as $mainmenu => $menus) \n {\n foreach($menus as $key => $menu)\n {\n $perms[$key] = TRUE;\n }\n }\n \n $template_id = self::update_template($conn, $login.'_perms', $perms);\n \n $error = self::insert($conn, $login, 'ldap', md5($orig_pass), $login, '', $template_id, '', array(), array() , '', '', $conf->get_conf('language') ,0, $timezone, 0);\n } \n \n User_config::copy_panel($conn, $login);\n \n $rs = $conn->Execute($query, $params); //Get information for created user\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n //Password update. Necessary for AV Report Scheduler and Remote Interfaces (save last password in Database)\n self::change_pass($conn, $login, $orig_pass, NULL, FALSE);\n }\n\n $_SESSION['_user_language'] = $rs->fields['language'];\n $_SESSION['_is_admin'] = $rs->fields['is_admin'];\n $_SESSION['_timezone'] = self::get_timezone($rs->fields['timezone']);\n \n //Get secure_id\n if (valid_hex32($rs->fields['uuid']) && $rs->fields['uuid'] != '0x0')\n {\n $_SESSION['_secureid'] = $rs->fields['uuid'];\n }\n else\n {\n self::set_secure_id($conn, $login, sha1($login.'#'.$pass));\n $_SESSION['_secureid'] = sha1($login.'#'.$pass);\n }\n \n ossim_set_lang($rs->fields['language']);\n $this->allowed_menus = $this->allowedMenus($login);\n \n //Generate a new session identifier\n session_regenerate_id(); \n $_SESSION['_user'] = $login;\n $_SESSION['_remote_login'] = base64_encode(Util::encrypt($login.'####'.$pass, $conf->get_conf('remote_key')));\n $_SESSION['_allowed_menus'] = $this->allowed_menus;\n \n if (preg_match('/pro|demo/i',$version)) \n {\n $_SESSION['_version'] = 'pro';\n $_SESSION['_user_vision'] = Acl::get_user_vision($conn);\n } \n else \n {\n $_SESSION['_version'] = 'opensource';\n $_SESSION['_user_vision'] = self::get_user_vision($conn);\n }\n\n //License info \n $_license = self::get_system_license();\n $_SESSION['_exp_date'] = $_license['appliance']['expire'];\n $_SESSION['_max_devices'] = $_license['appliance']['devices'];\n\n \n //Update last login date\n self::update_logon_try($login); \n \n Session_activity::insert($conn);\n \n if($login == 'admin' || intval($rs->fields['is_admin']) == 1)\n {\n $this->check_all_user_accounts($conn);\n }\n \n return TRUE;\n }\n \n //Case 3: OTP Login\n if ($login_method == 'otp' && self::login_otp($login, $orig_pass)) \n {\n $params = array($login);\n $query = 'SELECT *, HEX(uuid) AS uuid FROM users WHERE login = ?';\n \n //Logged user doesn't exist in Database\n if (($rs = $conn->Execute($query, $params)) && ($rs->EOF)) \n { \n if($conf->get_conf('login_ldap_require_a_valid_ossim_user') == 'no')\n {\n //Create the user with default perms\n $timezone = trim(`head -1 /etc/timezone`);\n \n if (preg_match('/pro|demo/i',$version))\n {\n $perms = $conf->get_conf('login_create_not_existing_user_menu');\n $entities[] = $conf->get_conf('login_create_not_existing_user_entity');\n \n $error = self::insert($conn, $login, 'otp', md5($orig_pass), $login, '', $perms, $entities, array(), array(), NULL , NULL, $conf->get_conf('language') ,0, $timezone, 0);\n }\n else\n { \n list($menu_perms, $perms_check) = self::get_default_perms($conn);\n $perms = array();\n \n foreach($menu_perms as $mainmenu => $menus) \n {\n foreach($menus as $key => $menu)\n {\n $perms[$key] = TRUE;\n }\n }\n \n $template_id = self::update_template($conn, $login.'_perms', $perms);\n \n $error = self::insert($conn, $login, 'otp', md5($orig_pass), $login, '', $template_id, '', array(), array() , '', '', $conf->get_conf('language') ,0, $timezone, 0);\n } \n \n User_config::copy_panel($conn, $login);\n \n $rs = $conn->Execute($query, $params); //Get information for created user\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n //Password update. Necessary for AV Report Scheduler and Remote Interfaces (save last password in Database)\n self::change_pass($conn, $login, $orig_pass, NULL, FALSE);\n }\n\n $_SESSION['_user_language'] = $rs->fields['language'];\n $_SESSION['_is_admin'] = $rs->fields['is_admin'];\n $_SESSION['_timezone'] = self::get_timezone($rs->fields['timezone']);\n \n //Get secure_id\n if (valid_hex32($rs->fields['uuid']) && $rs->fields['uuid'] != '0x0')\n {\n $_SESSION['_secureid'] = $rs->fields['uuid'];\n }\n else\n {\n self::set_secure_id($conn, $login, sha1($login.'#'.$pass));\n $_SESSION['_secureid'] = sha1($login.'#'.$pass);\n }\n \n ossim_set_lang($rs->fields['language']);\n $this->allowed_menus = $this->allowedMenus($login);\n \n //Generate a new session identifier\n session_regenerate_id(); \n $_SESSION['_user'] = $login;\n $_SESSION['_remote_login'] = base64_encode(Util::encrypt($login.'####'.$pass, $conf->get_conf('remote_key')));\n $_SESSION['_allowed_menus'] = $this->allowed_menus;\n \n if (preg_match('/pro|demo/i',$version)) \n {\n $_SESSION['_version'] = 'pro';\n $_SESSION['_user_vision'] = Acl::get_user_vision($conn);\n } \n else \n {\n $_SESSION['_version'] = 'opensource';\n $_SESSION['_user_vision'] = self::get_user_vision($conn);\n }\n\n //License info \n $_license = self::get_system_license();\n $_SESSION['_exp_date'] = $_license['appliance']['expire'];\n $_SESSION['_max_devices'] = $_license['appliance']['devices'];\n\n \n //Update last login date\n self::update_logon_try($login); \n \n Session_activity::insert($conn);\n \n if($login == 'admin' || intval($rs->fields['is_admin']) == 1)\n {\n $this->check_all_user_accounts($conn);\n }\n \n return TRUE;\n }\n\n return FALSE;\n }", "function login() { }", "public function login()\n {\n //$this->username = $username; // we are gonnna use the above property: $username here\n //$this->password = $password;\n // we want to call authuser from within login so\n $this->auth_user(); // we don't need to pass any arguments here because we know the class properties above this line\n\n }", "public static function login()\n {\n //when you add the method you need to look at my find one, you need to return the user object.\n //then you need to check the password and create the session if the password matches.\n //you might want to add something that handles if the password is invalid, you could add a page template and direct to that\n //after you login you can use the header function to forward the user to a page that displays their tasks.\n // $record = accounts::findUser($_POST['email']);\n $user = accounts::findUserbyEmail($_REQUEST['email']);\n print_r($user);\n //$tasks = accounts::findTasksbyID($_REQUEST['ownerid']);\n // print_r($tasks);\n if ($user == FALSE) {\n echo 'user not found';\n } else {\n\n if($user->checkPassword($_POST['password']) == TRUE) {\n session_start();\n $_SESSION[\"userID\"] = $user->id;\n header(\"Location: index.php?page=tasks&action=all\");\n } else {\n echo 'password does not match';\n }\n }\n }", "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "public function login(){\n\n }", "public function loginAction() {\n\n\n $login = $this->getRequest()->getPost();\n if (!isset($login['username']) || !isset($login['password'])) {\n return $this->showMsg(-1, '用户名或者密码不能为空.');\n }\n\n\n $ret = Admin_Service_User::login($login['username'], $login['password']);\n\n\n if (Common::isError($ret)) return $this->showMsg($ret['code'], $ret['msg']);\n if (!$ret) $this->showMsg(-1, '登录失败.');\n $this->redirect('/Admin/Index/index');\n }", "function loginUser() {\n\tsession_start();\n\trequire_once(\"sql/dbQueries.php\");\n\n\t// Fetching user data from login data\n\t$userData = getUserFromLogin($_POST['vms_email'], $_POST['userPassword']);\n\n\tif($userData == False) {\n\t\tprintLoginPage(\"The login information supplied is not valid.\");\n\t\treturn;\n\t} else {\n\t\t// Saving the user's info in a session variable\n\t\t$_SESSION['auth'] = TRUE;\n\t\t$_SESSION['auth_info'] = $userData[0];\n\n\t\t// Fetching the DID for the user's default DID.\n\t\t$activeDID = getDIDFromID($userData[0]['didID_default']);\n\t\tif($activeDID != false) {\n\t\t\t$_SESSION['auth_info']['activeDID'] = $activeDID['did'];\n\t\t} else {\n\t\t\t$_SESSION['auth_info']['activeDID'] = null;\n\t\t}\n\t\t//print_r($_SESSION);\n\n\t\t// Head back home\n\t\theader(\"Location: index.php\");\n\t\treturn;\n\t}\n}", "public function actionLogin() {\n \n }", "public function user_login() {\n global $db;\n\n //Use path to det user\n if (isset($_POST['login'])) {\n $username = \"\";\n $log_col = $_POST['liwth'];\n $user = $_POST['uname'];\n $pwd = sha1($_POST['pwd']);\n $login = $_POST['lias'];\n\n//Chosing the col of table where to login fron\n switch ($log_col) {\n case \"user\":\n $username = \"uname\";\n break;\n case \"cuser\":\n $username = \"cuname\";\n break;\n case \"employee\":\n $username = \"employee_no\";\n break;\n case\"job_seeker\":\n $username = \"natid\";\n break;\n default :\n echo 'ERROR DETERMINING USER CATEGORY!!!';\n }\n\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n// $query = \"SELECT fname $username, pwd FROM $login WHERE $username='$user' AND pwd='$pwd' \";\n $query = \"SELECT $username, fname, pwd FROM $login WHERE $username = ? AND pwd = ?\";\n $type_array = array('s', 's');\n $data_array = array($user, $pwd);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n foreach ($res as $row) {\n $_SESSION[$username] = $row[$username];\n $empno = $_SESSION[$username];\n $_SESSION['fname'] = $row['fname'];\n echo 'Login success';\n echo 'SESSION NAME' . $_SESSION['fname'];\n Redirect::to(\"index.php?rdr=1\");\n }\n } else {\n $query = \"SELECT fname $username, pwd FROM $login WHERE $username = ?\";\n $type_array = array('s');\n $data_array = array($user);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n echo 'Wrong password for ' . $user;\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n } else {\n echo 'The username does not exist';\n }\n }\n }\n }", "public function login($userName, $password);", "public function login(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Login\";\n \n $this->view(\"accounts/login\",$this->data);\n }", "public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }", "public function dologin() {\n $password=$this->model->getpassword($_POST['username']);\n if (!empty($_POST['password']) && !empty($password) && $password[0]['userpasswd']==$_POST['password']) {\n $_SESSION['username']=$_POST['username'];\n $id=$this->model->getid($_POST['username']);\n $_SESSION['userid']=$id[0]['userid'];\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->set('errormessage', \"Błędny login lub hasło!\");\n $this->view->set('redirectto', \"?v=user&a=login\");\n $this->view->render('error_view');\n }\n }", "public function cadastrar()\n\t{\n\t\t//conexao com o banco\n\t\t$connect = new Connect('user_login');\n\n\t\t$this->id = $connect->insert([\n\t\t\t\t'login'=> $this->login,\n\t\t\t\t'password'=> $this->password\n\t\t]);\n\n\t}", "function login() {\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n try {\n $db = getConnection();\n\n\t$sql = \"SELECT userId FROM users WHERE username=:username\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bindParam(\"username\", $username);\n\t$stmt->execute();\n\t$username_test = $stmt->fetchObject();\n\tif(empty($username_test)) {\n\t\techo \"error_username_doesnt_exists\";\n\t\treturn;\n\t}\n\n\t$sql = \"SELECT password FROM users WHERE username=:username\";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $storedPassword = $stmt->fetchObject()->password;\n\n if(empty($storedPassword)) {\n echo \"null\";\n } else if(strcmp($password, $storedPassword) == 0) {\n\t\t $query = \"SELECT userId FROM users WHERE username=:username\";\n\t\t $stmt2 = $db->prepare($query);\n\t\t $stmt2->bindParam(\"username\", $username);\n\t\t $stmt2->execute();\n \t echo '{\"Username\": \"' . $username . '\", \"ID\": ' . $stmt2->fetchObject()->userId . '}'; \n } else {\n\t\techo \"null\";\n\t}\n\n $db = null;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}", "public function loginDo(){\n\n\t\t$this->Login_model->loginDo();\t\n\n\t\n\n\t}", "public function login() {\n return $this->run('login', array());\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "public function connexionSuperAdminLogin(){\n }", "function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }", "function Login()\n{\n\tglobal $txt, $context;\n\n\t// You're not a guest, why are you here?\n\tif (we::$is_member)\n\t\tredirectexit();\n\n\t// We need to load the Login template/language file.\n\tloadLanguage('Login');\n\tloadTemplate('Login');\n\twetem::load('login');\n\n\t// Get the template ready.... not really much else to do.\n\t$context['page_title'] = $txt['login'];\n\t$context['default_username'] =& $_REQUEST['u'];\n\t$context['default_password'] = '';\n\t$context['never_expire'] = false;\n\t$context['robot_no_index'] = true;\n\n\t// Add the login chain to the link tree.\n\tadd_linktree($txt['login'], '<URL>?action=login');\n\n\t// Set the login URL - will be used when the login process is done (but careful not to send us to an attachment).\n\tif (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && strhas($_SESSION['old_url'], array('board=', 'topic=', 'board,', 'topic,')))\n\t\t$_SESSION['login_url'] = $_SESSION['old_url'];\n\telse\n\t\tunset($_SESSION['login_url']);\n}", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->phone,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n $duration = 3600*24*30;\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\t\t\n return false;\n\t}", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "public function login()\n {\n if (isset($_POST['signIn'])) {\n $userExist = $this->checkIfUserExist($_POST['login']);\n var_dump($userExist);\n \n if ($userExist === false) {\n header('Location: auth&alert=NotUser');\n exit();\n } else {\n $authUser = $this->usersManager->getAuthUser($_POST['login']);\n if (password_verify($_POST['password'], $authUser[0]->userPassword())) {\n $this->usersManager->setLastConnexionUser($authUser[0]->userId());\n $this->openSession($authUser[0]);\n } else {\n header('Location: auth&alert=Login');\n exit();\n }\n }\n } else {\n throw new Exception($this->datasError);\n }\n }", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "public function login() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tif($_POST && isset($_POST['login']) && isset($_POST['password'])) {\n\t\t\t$user = $this->_model->getLogin(strtolower($_POST['login']));\n\t\t\tif($user && $user->enabled) {\n\t\t\t\tif(hash_equals($user->password,crypt($_POST['password'],$user->password))) {\n\t\t\t\t\tif($user->blocked) {\n\t\t\t\t\t\thttp_response_code(403);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is blocked\"));\n\t\t\t\t\t} elseif($user->verified) {\n\t\t\t\t\t\tSession::set('user',$user);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'success','icon'=>'check','text'=>\"User has logged in successfully\"));\n\t\t\t\t\t\t$redirect = Session::get('login_redirect');\n\t\t\t\t\t\tRouter::redirect(Session::get('login_redirect'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is not yet confirmed\"));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thttp_response_code(401);\n\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t}\t\n\t\t}\n\t}", "public function login($user, $pass, $persistent);", "function login() {\n\t\t$this->getModule('Laravel4')->seeCurrentUrlEquals('/libraries/login');\n\t\t$this->getModule('Laravel4')->fillField('Bibliotek', 'Eksempelbiblioteket');\n\t\t$this->getModule('Laravel4')->fillField('Passord', 'admin');\n\t\t$this->getModule('Laravel4')->click('Logg inn');\n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }", "public function loginUser()\n {\n $sql = \"SELECT * FROM user WHERE username=\\\"\" . $this->getUsername().\"\\\" AND password=\\\"\" . $this->getPassword().\"\\\"\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) if ($row) {\n return $row;\n }\n }\n }", "private function login(){\n\t\tif (empty($_POST['username'])) {\n\t\t\t$this->errors[] = \"Username field was empty.\";\n } elseif (empty($_POST['password'])) {\n $this->errors[] = \"Password field was empty.\";\n } elseif (!empty($_POST['username']) && !empty($_POST['password'])) { \n\t\t\t$this->username = filter_var($_POST['username'], FILTER_SANITIZE_STRING);\t\t\t\n \t\n\t\t\t//prepared statement to login user\n\t\t\t$sel = \"SELECT * FROM users WHERE username = ? OR email = ? \";\n \tif($stmt = $this->connection->prepare($sel)){\n \t\t$stmt->bind_param(\"ss\", $this->username, $this->username);\n \t\t$stmt->execute();\n \t\t//$stmt->bind_result();\n \t\t$res = $stmt->get_result();\n \t\t$user_info = $res->fetch_object();\n \t}\n\t\t\t\t\t\t\t\t\t\n\t\t\tif (password_verify($_POST['password'], $user_info->password)) {\n\t\t\t\t$_SESSION['username'] = $user_info->username;\n\t\t\t\t$_SESSION['email'] = $user_info->email;\n\t\t\t\t$_SESSION['user_login_status'] = 1;\n\t\t\t} else if(empty($user_info)){\n\t\t\t\t$this->errors[] = \"Wrong User name. Please try again\";\n\t\t\t} else {\n\t\t\t\t$this->errors[] = \"Wrong password. Please try again\";\n\t\t\t}\n\t\t}\n\t}", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function connexionIntervenantLogin(){\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "public function login()\n {\n $username = $this->getAttribute('username');\n\n $this->_user = $this->db->select(Db::TABLE_USER, array(\n 'username' => $username,\n 'password' => UserAuth::hash(\n $this->getAttribute('password')\n ),\n ));\n\n if(!empty($this->_user)) {\n\n $identity = new UserAuth();\n $identity->login($username);\n\n return true;\n } else {\n $this->addError('password','Incorrect username or password');\n }\n\n return false;\n }", "public static function LogIn ($userName = '', $password = '');", "public function login (){\n\t\t$user = $this->get_by(array(\n\t\t\t'email' => $this->input->post('email'),\n\t\t\t'password' => $this->hash($this->input->post('password')),\n\t\t\t), TRUE);\n\t\t\n\t\tif (count($user)) {\n\t\t\t// Log in user\n\t\t\t$data = array(\n\t\t\t\t'username' => $user->username,\n\t\t\t\t'email' => $user->email,\n\t\t\t\t'id' => $user->id,\n\t\t\t\t'loggedin' => TRUE,\n\t\t\t);\n\t\t\t$this->session->set_userdata($data);\n\t\t}\n\t\t}", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "function login_connexion($login, $password){\n\t\t\n\t\tglobal $dbh;\n\n\t\t//recherche l'utilisateur en bdd par son username (ou email)\n\t\t$sql = \"SELECT * FROM users\n\t\t\t\tWHERE pseudo = :login OR email = :login\n\t\t\t\tLIMIT 1\";\n\n\t\t$stmt = $dbh->prepare($sql);\n\t\t$stmt->bindValue(\":login\", $login);\n\t\t$stmt->execute();\n\n\t\t$user = $stmt->fetch();\n\n\t\t$hashedPassword = hashPassword($password, $user['salt']);\n\t\tif ($hashedPassword === $user['pwd']){\n\n\t\t\tsessionStart($user);\n\t\t}\n\n\t}", "function loginUser($da){\r\n\t\t\tglobal $PDO;\r\n\t\t\t$req = $PDO->prepare(\"SELECT users.id, users.login, users.roleid, users.firstlogin, employes.lastname, employes.firstname, employes.photo, employes.sex , employes.phone, employes.email, employes.position, employes.adresse, employes.extension FROM users LEFT JOIN employes ON users.id = employes.iduser\r\n\t\t\t\tWHERE users.login=:connectname AND users.password=:connectpass AND users.status=1 LIMIT 1\");\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\t$req->execute($da);\r\n\t\t\t\t\t$data = $req->fetchAll();\r\n\t\t\t\t\tif(count($data)>0){\r\n\r\n\t\t\t\t\t\t$req = $PDO->prepare(\"SELECT roles.id, roles.name, roles.level FROM roles WHERE id = \".$data[0]->roleid);\r\n\t\t\t\t\t\t$req->execute();\r\n\t\t\t\t\t\t$temp = $req->fetchAll();\r\n\r\n\t\t\t\t\t\t$_SESSION['Auth'] = $data[0];\r\n\t\t\t\t\t\t$_SESSION['Auth']->name=$temp[0]->name;\r\n\t\t\t\t\t\t$_SESSION['Auth']->level=$temp[0]->level;\r\n\t\t\t\t\t\t$_SESSION['Auth']->timeout = date(\"H:i:s\");\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (PDOException $e){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}", "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "private function loginToWigle() {\n\t\t$this->sendCurlRequest(self::WIGLE_LOGIN_URL,array(\"credential_0\"=>$this->user,\"credential_1\"=>$this->password));\n }", "public function login()\n\t{\t\t\n\t\t$credentials['email'] = Input::get('email');\n\t\t$credentials['password'] = Input::get('password');\n\t\t$remember = (is_null(Input::get('remember'))?false:true);\t\t\n\n\t\t$user = $this->repo->login($credentials, $remember);\t\t\n\t\tif (!$user)\n\t\t{\n\t\t\tRedirect::route('login')->withInput(Input::except('password'));\n\t\t}\n\t\tif(Session::has('redirect'))\n\t\t{\n\t\t\t$url = Session::get('redirect');\n\t\t\tSession::forget('redirect');\t\t\t\n\t\t\treturn Redirect::to(Session::get('redirect'))->with('afterlogin', true);\t\n\t\t}\n\t\treturn Redirect::route('home')->with('afterlogin', true);\n\t}", "public function login()\n {\n $this->vista->index();\n }", "public function signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }", "public function login() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->login();\n }\n }", "public function tryLogIn(){\n if(count(self::$loginErrors) === 0){\n $password = md5(self::$loginPassword);\n $query = self::$connection->db->prepare(\"SELECT * FROM users WHERE email = ? AND password = ?\");\n $query->bind_param(\"ss\", self::$loginEmail, $password);\n $query->execute();\n $user = mysqli_fetch_assoc( $query->get_result());\n //Send to Profile page if correct credentials; otherwise, stay on authentication page\n if($user){\n $this->prepareSession($user['name'], self::$loginEmail);\n $_POST = array();\n Auth::CreateView('Profile');\n }else{\n self::addError(\"login\", \"Incorrect credentials!\");\n Auth::CreateView('Auth');\n }\n }\n self::$connection->closeConnection();\n }", "public function authenticate() {\n\t\t \n\t\t$db = db_connect();\n $query= \"SELECT * FROM users WHERE username=:username AND password=:password\";\n $statement=$db->prepare($query);\n $statement->execute(array(\n 'username' => $_POST['username'],'password' => $_POST['password']\n ));\n $count=$statement->rowCount();\n if($count>0){\n $_SESSION['username']=$_POST['username'];\n $_SESSION['is authenticated']= true;\n\t\t}\n }", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->UserName,$this->passWd);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tuser()->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function login() {\n $email = $this->input->post('email');\n $pass = $this->input->post('password');\n if (!empty($email) && !empty($pass)) {\n $user = $this->users_model->login($email, $pass);\n if (!$user) {\n return $this->send_error('ERROR');\n }\n $this->event_log();\n return $this->send_response(array(\n 'privatekey' => $user->privatekey,\n 'user_id' => $user->id,\n 'is_coach' => (bool) $this->ion_auth->in_group('coach', $user->id)\n ));\n }\n return $this->send_error('LOGIN_FAIL');\n }" ]
[ "0.7537801", "0.7537801", "0.7462503", "0.7401626", "0.73946124", "0.73694056", "0.73537606", "0.73208535", "0.7241316", "0.7185673", "0.71598434", "0.71381915", "0.7136423", "0.7135368", "0.7083118", "0.7066597", "0.70348495", "0.70026225", "0.6999759", "0.69744194", "0.6956658", "0.6943937", "0.68959385", "0.68953335", "0.68940157", "0.68940157", "0.6865722", "0.6855422", "0.6832638", "0.67978144", "0.6762501", "0.67575264", "0.67561126", "0.67419344", "0.67301536", "0.67228353", "0.67053276", "0.67049825", "0.6652512", "0.6635709", "0.66350245", "0.6633593", "0.6632585", "0.6628006", "0.6616989", "0.6604351", "0.660034", "0.6599123", "0.6596144", "0.659604", "0.65898275", "0.6588297", "0.6583181", "0.65814555", "0.65749055", "0.6563349", "0.65618795", "0.6556741", "0.65508926", "0.6541267", "0.65396565", "0.6539398", "0.65367264", "0.6529744", "0.65273845", "0.6526507", "0.6525147", "0.6513422", "0.6511566", "0.65035915", "0.6501954", "0.65006435", "0.6498679", "0.64911413", "0.64876246", "0.6486165", "0.6485466", "0.6485022", "0.64831173", "0.647598", "0.6472471", "0.6469331", "0.64685917", "0.6468237", "0.64676857", "0.64656574", "0.6453216", "0.644006", "0.6432091", "0.6430666", "0.64266485", "0.64257383", "0.6420077", "0.641803", "0.6413023", "0.64106995", "0.6401994", "0.6401569", "0.6393671", "0.6389124", "0.6385384" ]
0.0
-1
Set db & tb
final public function db($db) { //select db $this->db = $db; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_db(){\r\n\t\t$this->db=$this->db;\r\n\t}", "public function SetFromDB($db){\r\n\t\t$this->db=$db;\r\n\t}", "protected function setDatabaseObj($db)\r\n {\r\n $this->db = $db;\r\n }", "function set_db($db) {\n $this->db = $db;\n }", "public function setDb($db)\n {\n $this->db = $db;\n }", "public function pick_db($db)\n\t\t{\t$this->db = $db\n\t\t}", "public static function setDB($db)\r\n {\r\n if (isset($db))\r\n self::$db = $db;\r\n }", "final public function select($db, $tb)\r\n\t{\r\n\r\n\t\t$this->db = $db;\r\n\t\t$this->tb = $tb;\r\n\t}", "function set_db( $db = null ) {\n\n\t\t$db = $this->get_db( $db );\n\n\t\tif ( !$db ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->db = $db;\n\n\t\treturn true;\n\t\t\n\t}", "private function setDatabase()\n {\n $parentVars = get_class_vars(get_class($this));\n\n if (isset($parentVars['database']) && !empty($parentVars['database'])) {\n $this->database = $parentVars['database'];\n }\n }", "public function db($db = null) {\n\t\tif(!$db) {\n\t\t\treturn $this->_db;\n\t\t}\n\t\t$this->_db = $db;\n\t\t$this->_db->parent($this);\n\t\treturn $db;\n\t}", "public function db($db = null) {\n\t\tif(!$db) {\n\t\t\treturn $this->_db;\n\t\t}\n\t\t$this->_db = $db;\n\t\t$this->_db->parent($this);\n\t\treturn $db;\n\t}", "public function db($db = null) {\n\t\tif(!$db) {\n\t\t\treturn $this->_db;\n\t\t}\n\t\t$this->_db = $db;\n\t\t$this->_db->parent($this);\n\t\treturn $db;\n\t}", "public function db($db = null) {\n\t\tif(!$db) {\n\t\t\treturn $this->_db;\n\t\t}\n\t\t$this->_db = $db;\n\t\t$this->_db->parent($this);\n\t\treturn $db;\n\t}", "public function db($db = null) {\n\t\tif(!$db) {\n\t\t\treturn $this->_db;\n\t\t}\n\t\t$this->_db = $db;\n\t\t$this->_db->parent($this);\n\t\treturn $db;\n\t}", "public function setCurrent(){ Database::$cDB = $this; }", "public function settaDB()\n {\n include \"MySqlClass.php\";\n // istanza della classe\n $this->database = new MysqlClass();\n }", "protected final function Teadaze_DBInterface($obj) {\n\t\t\n\t\tif(!$this->db)\n\t\t\t$this->db = DBO::init();\n\n\t\t$obj->setDatabase($this->db);\n\t}", "public function database() {\n\t\t$this->_check();\n\t\t$d['title_for_layout'] = __(\"Database creation\");\n\t\t$this->set($d);\n\t}", "public static function init($db){\r\n self::$conn = $db;\r\n }", "public static function set_admin_db($db)\n\t{\n\t\t// Sets the history table name\n\t\tif ( bbn\\str::check_name($db) ){\n\t\t\tself::$admin_db = $db;\n\t\t\tself::$htable = self::$admin_db.'.'.self::$prefix.'history';\n\t\t}\n\t}", "function CAnticipoData($db) {\r\n $this->db = $db;\r\n }", "public function __construct($db) {\n $this->_db = $db;\n }", "function setDb(Ac_Sql_Db $db) {\n if ($db !== ($oldDb = $this->db)) {\n if ($this->immutable) throw self::immutableException();\n $this->db = $db;\n $this->srcNNIdsRelation = false;\n $this->destNNIdsRelation = false;\n }\n }", "function setDb($dbName)\n {\n $this->dbName = ((empty($dbName)) ? \"innodb\" : $dbName);\n }", "public function setDatabaseConfig()\n {\n $this->_databaseConfig = Core_Model_Config_Json::getModulesDatabaseConfig();\n\n $this->_type = $this->_databaseConfig['type'];\n $this->_host = $this->_databaseConfig['host'];\n $this->_name = $this->_databaseConfig['name'];\n $this->_user = $this->_databaseConfig['user'];\n $this->_pass = $this->_databaseConfig['pass'];\n }", "public function setDb($db)\n {\n $this -> db = $db;\n\n return $this;\n }", "public function setConnectionOverride(\\codename\\core\\database $db) {\r\n $this->db = $db;\r\n }", "public function setDb($db)\r\n {\r\n $this->db = $db;\r\n\r\n return $this;\r\n }", "public function __construct($db) {\n $this->_db = $db;\n }", "public function __construct($db) {\n $this->_db = $db;\n }", "private static function setupDB() {\n\t\t$tbl = self::$table;\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\twfDebugLog( __METHOD__, \"\\tCreating tables\\n\" );\n\t\t$dbw->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS $tbl ( pathway varchar(255), day varchar(50) )\", DB_MASTER\n\t\t);\n\t\twfDebugLog( __METHOD__, \"\\tDone!\\n\" );\n\t}", "public function __construct(&$db)\r\n {\r\n $this->_db = $db;\r\n }", "public function __construct($_db) {\n $this->_db=$_db;\n }", "public function __construct($_db) {\n $this->_db=$_db;\n }", "public function __construct(&$db) {\n $this->db = $db;\n }", "public function __construct(&$db) {\n $this->db = $db;\n }", "public function __construct(&$db) {\n $this->db = $db;\n }", "function setupDatabase($db){\n\t\tif($db == null) throw new Exception(\"Database is not given\");\n\t\t\n $sqlBirthdays = \"\n CREATE TABLE IF NOT EXISTS `birthdays` (\n `key` int(11) NOT NULL AUTO_INCREMENT,\n `date` date NOT NULL,\n `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,\n PRIMARY KEY (`key`)\n\t\t);\";\n\t\t\n\t\t$sqlEvents =\"\n\t\tCREATE TABLE IF NOT EXISTS `events` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `title` text NOT NULL,\n `date` date NOT NULL,\n `time` time NOT NULL,\n `descr` mediumtext CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n $sqlTicker = \"\n\t\tCREATE TABLE IF NOT EXISTS `tickermsg` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n `message` text NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n // Execute the create querys\n $db->query($sqlBirthdays);\n $db->query($sqlEvents);\n $db->query($sqlTicker);\n }", "protected function setDB (\\Native5\\Core\\Database\\DB $db) {\n if (empty($db))\n throw new \\InvalidArgumentException(\"Emoty DB object received\");\n\n $this->db = $db;\n }", "public function __construct($db){\r\n $this->db = $db;\r\n }", "public function setDb($db)\n {\n $this->db = $db;\n\n return $this;\n }", "public function loadDatabase(){\n $table = new Table('Textarea_Widgets');\n $table->add_column('Title', 'text');\n $table->add_column('Content', 'text');\n $table->add_column('WidgetName', 'text');\n $table->create();\n }", "public function setDbConnection($value)\n {\n $this->_db = $value;\n }", "public function initDatabaseStructure( );", "function GST_setClassDB()\n {\n if($this->DB !== FALSE)\n $this->DB->useDB('hej_G');\n }", "public function setDB($db) {\n\t\t\tif ($this->myDB != NULL) { throw new Exception('Database can not be changed.'); }\n\t\t\t$this->myDB = $db;\n\t\t\treturn $this;\n\t\t}", "function __construct($db) {\n $this->db = $db;\n }", "public function __construct($db) {\n $this->db = $db;\n }", "function __construct($db) {\r\n\t\t$this->db = $db;\r\n\t}", "function DB() {\r\n \t\t$this->dbh = new Mysql_db;\r\n\t}", "public function __construct($db) {\n\t\t$this->db = $db;\n\t}", "public function __construct(){\n $this->_db = DB::getInstance();\n }", "public function __construct() {\n $this->_db = DB::getInstance();\n }", "private function setStorage(DbStorage $dbs)\n {\n $this->db = $dbs;\n }", "private function setup_db_variables() {\n\t\tglobal $wpdb;\n\t\t$this::$dbtable = $wpdb->prefix . self::DBTABLE;\n\t\t$this::$dbtable_contexts = $wpdb->prefix . self::DBTABLE_CONTEXTS;\n\n\t\t/**\n\t\t * Filter db table used for simple history events\n\t\t *\n\t\t * @since 2.0\n\t\t *\n\t\t * @param string $db_table\n\t\t */\n\t\t$this::$dbtable = apply_filters( 'simple_history/db_table', $this::$dbtable );\n\n\t\t/**\n\t\t * Filter table name for contexts.\n\t\t *\n\t\t * @since 2.0\n\t\t *\n\t\t * @param string $db_table_contexts\n\t\t */\n\t\t$this::$dbtable_contexts = apply_filters(\n\t\t\t'simple_history/logger_db_table_contexts',\n\t\t\t$this::$dbtable_contexts\n\t\t);\n\t}", "public static function init() {\n\t\tself::$_db = Storage::get('objects.database');\n\t}", "public function __construct($db=null)\n {\n $this->db = $db;\n }", "public function __construct($db)\n {\n $this->db = $db;\n }", "public function __construct($db)\n {\n $this->db = $db;\n }", "function __construct($db)\n {\n $this->db = $db;\n $this->statut = 1;\n }", "protected function _initDb(){\n $config = $this->getOptions();\n\n $db = Zend_Db::factory($config['resources']['db']['adapter'], $config['resources']['db']['params']);\n\n //set default adapter\n Zend_Db_Table::setDefaultAdapter($db);\n\n //save Db in registry for later use\n Zend_Registry::set(\"db\", $db);\n \n Zend_Controller_Action_HelperBroker::addPath(\n \t\tAPPLICATION_PATH .'/helpers');\n\t\t\n }", "public function __construct($db)\n {\n $this->db = $db;\n }", "function __construct()\n {\n $this->_db = DB::getInstance();\n }", "abstract protected function initDB();", "private function init_db()\n {\n /**\n * If we've set that we want to use the database, initialize it.\n * Or we may use our parent's\n *\n * Inicializa a base de dados se esse app estiver configurado pra usar a base\n * de dados. Ou usa do nosso parent\n */\n\n if (isset($this->parent->db)) {\n $this->db = $this->parent->db;\n } else {\n $this->load->db('mysql');\n }\n\n }", "private function openDb() {\n if(!$this->db) {\n $this->db = new Db();\n }\n }", "protected static function setupDb()\n\t{\n\t\tif (is_object(self::$db)) {\n\t\t\treturn self::$db;\n\t\t}\n\n\t\t$config = Config::getInstance();\n\t\t$driver = $config->getDatabaseDriver();\n\t\t$host = $config->getDatabaseHostname();\n\t\t$user = $config->getDatabaseUsername();\n\t\t$pass = $config->getDatabasePassword();\n\t\t$dbname = $config->getDatabaseName();\n\t\t$file = $config->getDatabaseFile();\n\n\t\ttry {\n\t\t\tswitch ($driver) {\n\t\t\t\tcase 'sqlite':\n\t\t\t\t\tself::$db = new PDO('sqlite:'.$file);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\tcase 'mysql':\n\t\t\t\t\tself::$db = new PDO($driver.':dbname='.$dbname.';host='.$host,\n\t\t\t\t\t $user, $pass,array(PDO::ATTR_PERSISTENT => true));\n\t\t\t}\n\t\t\tself::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\tthrow new Exception(\"Kunde inte etablera anslutning till databasen. (\".\n\t\t\t $e->getMessage().')');\n\t\t}\n\t}", "public function init()\n {\n $this->_db = Instance::ensure($this->_db, Connection::class);\n }", "public function __construct($db) {\n if($db==null) {\n $this->db =new DBMysql();\n }else {\n $this->db=$db;\n }\n }", "function Sql_DB_Create($db=\"\")\n {\n $query=$this->DB_Create_Query($db);\n $this->DB_Query($query);\n }", "public function test_set_db_invokes()\n {\n $this->expectNotToPerformAssertions(MultiDB::setDB('db-ninja-01'));\n }", "function initDb()\n {\n global $database_host, $database_name, $database_user,$database_pass;\n\n $global=Frd::getGlobal();\n\n $db_config=array(\n 'host'=>$database_host,\n 'username'=>$database_user,\n 'password'=>$database_pass,\n 'dbname'=>$database_name\n );\n\n $db = Zend_Db::factory('pdo_mysql',$db_config);\n $db->query('set names utf8');\n Zend_Db_Table::setDefaultAdapter($db);\n $global->db=$db;\n\n $registry = Zend_Registry::getInstance();\n $registry->set(\"db_default\",$global->db);\n }", "function cl_ing_ingreso_det() {\r\n\r\n $this->database = new Database();\r\n }", "public function set_db()\n{\n $this->_db =new PDO('mysql:host=localhost;dbname=pet_net;charset=utf8','lauhu','stagiaire '); ;\n\n return $this;\n}", "public function __construct(){\n $this->db = DB::getInstance();\n }", "function __construct($db){\n\t//\tparent::__construct();\n\t\n\t\t$this->_db = $db;\n\t}", "function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }", "private function initDatabase() {\n \n \n \n }", "public function setUp(): void\n {\n if ( isset($this->db) )\n {\n return;\n }\n\n (new DBConnect\\Load\\INI(self::DB_CREDENTIALS))->run();\n $this->db = DBConnect\\Connect\\Bank::get();\n\n $this->table = new DBTable\\PostgreSQL(self::TABLE_NAME);\n $this->table->runFieldLookup($this->db);\n }", "public function setDatabase(Database_Config $databaseConfig);", "public function setDatabase($databae){\n\t\t$this->database = $databae;\n\t\treturn $this;\n\t}", "function setDatabase($db) {\n $this->database = $db;\n if(!@mysql_select_db($this->database))\n return false;\n return true;\n }", "public function __construct($db) {\n if ($db == null) {\n $this->db = new DBMysql();\n } else {\n $this->db = $db;\n }\n }", "public function __construct($db) {\n if ($db == null) {\n $this->db = new DBMysql();\n } else {\n $this->db = $db;\n }\n }", "private function _set_connection()\n {\n isset($this->_database_connection) ? $this->load->database($this->_database_connection) : $this->load->database();\n $this->_database = $this->db;\n }", "public static function db($database);", "public function __construct() {\n\t\t$this->db = getDatabase();\n\t}", "private function __set_global()\n {\n $this->__db->setAsGlobal();\n }", "function initDB(PDO $db) {\n $db->exec('drop table if exists \"caching\"');\n $db->exec('CREATE TABLE \"caching\" (\"id\" INTEGER PRIMARY KEY AUTOINCREMENT, \"keyword\" VARCHAR UNIQUE, \"object\" BLOB, \"exp\" INTEGER)');\n $db->exec('CREATE UNIQUE INDEX \"cleaup\" ON \"caching\" (\"keyword\",\"exp\")');\n $db->exec('CREATE INDEX \"exp\" ON \"caching\" (\"exp\")');\n $db->exec('CREATE UNIQUE INDEX \"keyword\" ON \"caching\" (\"keyword\")');\n }", "function setMdb($mdb){\n $this->mdb = $mdb;\n $this->dbdotcoll = $this->mdb.'.'.$this->collection;\n }", "public function __construct($db) \n\t{\n\t\t$this->db = $db->getConn(); \n\t}", "public function __construct($db) {\n\t\t$this->setDb($db);\n\t}", "function use_db($data1){\n\t\tglobal $i18n_std;\n\t\tif(!$this->real_select($data1)){\n\t\t\techo('no db connection:'.$data1.' ('.$this->real_error().') engine='.$this->engine_name);\n\t\t\t//.'cwd='.getcwd()\n\t\t\tdie('');\n\t\t}\n\t}", "function MetaDatabases() {}", "function __construct($db = false) {\n if($db !== false) {\n $this->db = $db;\n } else {\n $this->db = parent::__construct();\n }\n }", "function Tablesettings(&$db) {\r\n\t\tparent::__construct ( '#__simplephotogallery_settings', 'id', $db );\r\n\t}", "public function __construct() {\r\n /* * * maybe set the db name here later ** */\r\n }", "public function __construct($db) {\n\t\t\t$this->myDB = $db;\n\t\t}", "protected function setConfig()\n {\n $dbconfig = atkconfig('db');\n $config = $dbconfig[$this->m_name];\n foreach ($config['nodes'] as $mode=>$nodes)\n {\n if (is_array($nodes))\n {\n foreach ($nodes as $node) $this->setNodeConfig($node, $dbconfig[$node], $mode);\n }\n else $this->setNodeConfig($nodes, $dbconfig[$nodes], $mode);\n }\n }" ]
[ "0.7567747", "0.75304693", "0.74770844", "0.74740404", "0.7282767", "0.7239168", "0.71514726", "0.691253", "0.6906605", "0.6788068", "0.6696597", "0.6696597", "0.6696597", "0.6696597", "0.6696597", "0.66729283", "0.6529897", "0.6520907", "0.6519529", "0.6464887", "0.6447872", "0.64382625", "0.6435339", "0.64284176", "0.64162457", "0.64137983", "0.6380009", "0.63775975", "0.6377251", "0.63755447", "0.63755447", "0.63484406", "0.63309646", "0.629882", "0.629882", "0.6276678", "0.6276678", "0.6276678", "0.6235561", "0.6234255", "0.6226292", "0.6225534", "0.6203749", "0.61962885", "0.6193472", "0.61921394", "0.6186428", "0.61846215", "0.6181555", "0.61662704", "0.6158125", "0.6153118", "0.6142666", "0.6134936", "0.6133152", "0.61319315", "0.6124009", "0.6110676", "0.6109107", "0.6109107", "0.6107579", "0.6106586", "0.6097678", "0.60969627", "0.6093424", "0.6090194", "0.6089376", "0.60846364", "0.60771495", "0.607316", "0.60600704", "0.6059709", "0.60546255", "0.6052418", "0.60508317", "0.6038911", "0.60372657", "0.6027252", "0.6019821", "0.6017923", "0.6015161", "0.6014616", "0.6003228", "0.59978884", "0.59978884", "0.59952897", "0.59895235", "0.59811115", "0.5979239", "0.5975581", "0.5972515", "0.5969952", "0.59669703", "0.5952267", "0.5943145", "0.59352547", "0.5928717", "0.5919561", "0.59140116", "0.5911185" ]
0.74820095
2
select db and tb
final public function select($db, $tb) { $this->db = $db; $this->tb = $tb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function select_db($dbname);", "public function pick_db($db)\n\t\t{\t$this->db = $db\n\t\t}", "public function selectDb($dbName) {}", "public function select($db, $dbh = \\null)\n {\n }", "public function sql_select_db() {}", "public function sql_select_db() {}", "public function sacarmonbredb($tb,$dbt,$id){\n\t\t\t$db=Db::conectar();\n\t\t\t$select=$db->prepare('SELECT '.$tb.' FROM '.$dbt.' WHERE '.$id.'');\n\t\t\t$select->execute();\n\t\t\twhile ($registro=$select->fetch()){\n\t\t\treturn $registro;\n }\n Db::desconectar();\t\t\t\t\n\t\t}", "abstract public function getSelectedDatabase();", "public function selectDB( $db ) {\n\t\t# Stub. Shouldn't cause serious problems if it's not overridden, but\n\t\t# if your database engine supports a concept similar to MySQL's\n\t\t# databases you may as well.\n\t\t$this->mDBname = $db;\n\n\t\treturn true;\n\t}", "function select($tbl = \"\", $eq = array(\"\", \"\"))\n\t{\n\t\t($eq[0] !== \"\" && $eq[1] !== \"\") ? $sql = \"SELECT * FROM $tbl WHERE \" . $eq[0] . \" = ?\" : $sql = \"SELECT * FROM $tbl\";\n\t\t\n\t\t$stmt = $this->db->prepare($sql);\n\t\t\n\t\t($eq[0] !== \"\" && $eq[1] !== \"\") ? $stmt->execute(array(\n\t\t\t$eq[1]\n\t\t)) : $stmt->execute(array());\n\t\t\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "function use_db($data1){\n\t\tglobal $i18n_std;\n\t\tif(!$this->real_select($data1)){\n\t\t\techo('no db connection:'.$data1.' ('.$this->real_error().') engine='.$this->engine_name);\n\t\t\t//.'cwd='.getcwd()\n\t\t\tdie('');\n\t\t}\n\t}", "abstract public function selectDatabase($name);", "function select($db, $dbh = null){\n\t\tif (is_null($dbh)){\n\t\t\t$dbh = $this->dbh;\n\t\t}\n\t\tif (!@mysql_select_db( $db, $dbh )){\n\t\t\t$this->ready = false;\n\t\t\t$error_message = sprintf(SQ_DB_SELECT_TABLE_ERROR_MESSAGE, $db);\n\t\t\tthrow new SQ_Exception($message, SQ_DB_SELECT_TABLE_ERROR_CODE);\n\t\t}\n\t}", "function select_db($base_datos) {\r\n\t\t//\"implementado en la clase <i>\" . get_class($this) . \"</i></h1>\";\r\n\t\treturn FALSE;\r\n\t}", "final public function db($db)\r\n\t{ //select db\r\n\r\n\t\t$this->db = $db;\r\n\t}", "private function selectDB($link)\n\t{\n\t\t$db_selected = mysqli_select_db($link,MYSQL_DATABASE);\n\t\tif (!$db_selected) \n\t\t{\n\t\t\treturn $link;\n\t\t}\n\t\telse if(!$db_selected)\n\t\t{\n\t\t\tthrow new Exception('could not select db',1);\n\t\t}\n\t\t//else if() reviso si tiene tablas para la bd que queremos probar\n\n\t}", "function SelectDB($dbname)\n\t{\n\t\t$this->database = $dbName;\n\t\t$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions\n\t\tif ($this->connectionID) {\n $rs = $this->Execute('USE '.$dbName); \n if($rs) {\n return true;\n } else return false;\t\t\n\t\t}\n\t\telse return false;\t\n\t}", "function wrapper_select_db($dbname) {\n\t\treturn $this->functions['select_db']($dbname, $this->link_id);\n\t}", "function select($db) {\n\t\t\tif (!$this->dbh) $this->connect();\n\t\t\tif ( !@mysql_select_db($db,$this->dbh)) {\n\t\t\t\t$this->print_error(\"<ol><b>Error selecting database <u>$db</u>!</b><li>Are you sure it exists?<li>Are you sure there is a valid database connection?</ol>\");\n\t\t\t}\n\t\t}", "public function select_db($db)\n {\n $this->dbname = $db;\n return $this;\n }", "function get_sql_combo() {\n try {\n $app = Slim\\Slim::getInstance();\n $table = $app->request->params('table_name');\n\n $gii = new easyuigii();\n $gii->set_db_setting();\n $model_combo = $gii->get_table_model_from_db($table);\n $data = $gii->get_sql_for_select($table, $model_combo);\n\n $app->render(200, ['success' => true, 'sql' => $data]);\n } catch (Exception $e) {\n $app->render(200, ['isError' => true, 'msg' => $e->getMessage()]);\n error_log(LogTime() . 'error - get sql for combo' . PHP_EOL, 3, 'logs/error.log');\n }\n}", "public function selected(?string $table = null): bool\n {\n global $dbs;\n\n $database = (function() use ($dbs) {\n return (isset($_GET['db']) AND $dbs[$_GET['db']] == $this) ? true : false;\n })();\n\n if (null === $table)\n return $database;\n\n return (isset($_GET['table']) AND $_GET['table'] == $table) ? true : false;\n }", "public function do_select_db($table, $clm, $ac)\n\t{\n\t\ttry { \n\t\t\t$log_data = null;\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM \".$table.\" WHERE \".$clm.\"=:\".$clm.\"\");\n\t\t\t$stmt->execute(array(':'.$clm=>$ac));\n\t\t\tif ($stmt->rowCount() == 1) {\n\t\t\t\t$result_row=$stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t$select_status = $result_row;\n\t\t\t\t$log_data = \"successfully selected\";\n\t\t\t}\n\t\t\telse if ($stmt->rowCount() == 0) {\n\t\t\t\t$select_status = 'wrong';\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\t$select_status = 'error';\n\t\t\t$log_data = \"\".$e->getMessage().\"\".CONFIG::NEWLINE_ERROR.\"|\";\n\t\t}\n\t\treturn array($log_data, $select_status);\n\t}", "function select($selection,$db) {\n\n\t\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$result = $conn->query($selection);\n\treturn $result;\n}", "function m_seleBD(){\n\t\tmysql_select_db($this->a_nomBD, $this->a_conexion);\n\t}", "public function select_db($dbname){\n $errormsg='';\n if (!$dbname)\n $errormsg=self::$_error_code_list[8];\n if(!$this->_db_exists($dbname))\n $errormsg=sprintf (self::$_error_code_list[9],$dbname);\n if($errormsg){\n $this->_trigger_error($errormsg);\n return FALSE;\n }\n $this->_currentDB=$dbname;\n return TRUE;\n }", "function db_select($table, $column, $group, $ret)\n {\n $result = null;\n global $db_is_connected, $db;\n\t\tif (!$db_is_connected)\n\t\t{\n\t\t\tdb_connnect();\n\t\t}\n if (!$db_is_connected)\n {\t\n consol_message(\"Error: Could not connect to database.\");\n return FALSE;\n }else{\n $query = \"SELECT $column FROM $table $group;\";\n $rslt = $db->query($query);\n if (!$rslt)\n {\n consol_message($query.\" isn't correct .\");\n return FALSE;\n }else{\n while ($row = $rslt->fetch_assoc()) {\n $result[] = $row[\"$ret\"];\n }\n return $result;\n }\n }\n return FALSE;\n }", "public function select($database)\n\t{\n\t\treturn true;\n\t}", "function sql_select_db($db,&$dbh=NULL)\n {\n global $MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD, $MYSQL_DATABASE, $MYSQL_CONN, $MYSQL_HANDLER, $SQL_DBH;\n global $CONF;\n//echo '<hr />'.print_r($dbh,true).'<hr />';\n//exit;\n if ( !is_null($dbh) )\n {\n if ($dbh->exec(\"USE $db\") !== false)\n return 1;\n return 0;\n }\n\n try\n {\n $SQL_DBH = NULL;\n list($host,$port) = explode(\":\",$MYSQL_HOST);\n if (isset($port)) {\n $portnum = $port;\n $port = ';port='.trim($port);\n }\n else {\n $port = '';\n $portnum = '';\n }\n //$SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.trim($host).$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n //$SQL_DBH = sql_connect();\n switch ($MYSQL_HANDLER[1]) {\n case 'sybase':\n case 'dblib':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'mssql':\n if (is_numeric($portnum)) $port = ','.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'oci':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':dbname=//'.$host.$port.'/'.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'odbc':\n if (is_numeric($portnum)) $port = ';PORT='.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME='.$host.$port.';DATABASE='.$db.';PROTOCOL=TCPIP;UID='.$MYSQL_USER.';PWD='.$MYSQL_PASSWORD);\n break;\n case 'pgsql':\n if (is_numeric($portnum)) $port = ';port='.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'sqlite':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':'.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'sqlite2':\n trigger_error(\"Critical Error : sqlite2 driver is not suported. \", E_USER_ERROR);\n break;\n default:\n //mysql\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n }\n return 1;\n }\n catch (PDOException $e)\n {\n if ($CONF['debug'])\n $msg = '<p>a3 Error!: ' . $e->getMessage() . '</p>';\n else\n {\n $msg = '<p>a3 Error!: ';\n $pattern = '/(Access denied for user|Unknown database)/i';\n if (preg_match($pattern, $e->getMessage(), $m))\n $msg .= $m[1];\n $msg .= '</p>';\n }\n startUpError($msg, 'Connect Error');\n return 0;\n }\n }", "function testDBSelect() {\r\n\t$db = MetadataDB::getInstance();\r\n\t// error in sql...\r\n\t$sql = 'select varable from metadata';\r\n\t$result = $db->select($sql);\r\n\tif (!$result) {\r\n\t} else {\r\n\t\t//print 'All OK!';\r\n\t}\r\n}", "public function selectDb($db)\n {\n /* Valid db name? */\n if (empty($db)) {\n return $this->_error(E_USER_NOTICE, 'Cannot select database \\'' . $db . '\\'');\n }\n\n /* Does it exist? */\n if (!$this->_dbExist($db)) {\n return $this->_error(E_USER_NOTICE, 'Database \\'' . $db . '\\' doesn\\'t exist');\n }\n\n /* Select the database */\n $this->_SELECTEDDB = $this->_query->_SELECTEDDB = $db;\n\n return true;\n }", "function select_default($db,$table) { \n\n\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$selection= \"SELECT * FROM \" . $table . \" ORDER BY id ASC\";\n\treturn $result = $conn->query($selection);\n}", "public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {\n global $wpdb;\n $query = \"SELECT `\" . $label_column . \"` FROM \" . $table . $where . \" ORDER BY \" . $order_by;\n $db_info = trim($db_info, '[]');\n if ( $db_info ) {\n $temp = explode( '@@@wdfhostwdf@@@', $db_info );\n $host = $temp[ 0 ];\n $temp = explode( '@@@wdfportwdf@@@', $temp[1] );\n $port = $temp[ 0 ];\n if ($port) {\n $host .= ':' . $port;\n }\n $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );\n $username = $temp[ 0 ];\n $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );\n $password = $temp[ 0 ];\n $temp = explode( '@@@wdfdatabasewdf@@@', $temp[ 1 ] );\n $database = $temp[ 0 ];\n $wpdb_temp = new wpdb( $username, $password, $database, $host );\n $choices_labels = $wpdb_temp->get_results( $query, ARRAY_N );\n } else {\n $choices_labels = $wpdb->get_results( $query, ARRAY_N );\n }\n\n return $choices_labels;\n }", "public function selectDb($dbname = null)\n {\n return true;\n }", "function queryOther($conn, $currentid, $currenttable, $currentfield){\n\t\t\t$otherquery = \"SELECT $currentfield FROM $currenttable WHERE id='$currentid'\";\n\t\t\t$result = $conn->query($otherquery);\n\t\t\techo \"Selected $currenttable: \";\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t\techo $row[\"$currentfield\"] . \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</br>\";\n\t\t}", "function selectDBType()\n\t{\n\t\t$this->checkDisplayMode(\"create_new_client\");\n\n\nif (true)\n{\n\t\t$this->initDBSelectionForm();\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $this->form->getHTML());\n}\nelse\n{\n\t\t// output\n\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.clientsetup_select_db.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"FORMACTION\", \"setup.php?cmd=gateway\");\n\t\t$this->tpl->setVariable(\"TXT_SAVE\", $this->lng->txt(\"save\"));\n\n\t\t$this->tpl->setVariable(\"TXT_DB_TYPE\", $this->lng->txt(\"db_type\"));\n\t\t$this->tpl->setVariable(\"TXT_DB_SELECTION\", $this->lng->txt(\"db_selection\"));\n}\n\t\tif ($this->setup->getClient()->status[\"ini\"][\"status\"])\n\t\t{\n\t\t\t$this->setButtonNext(\"db\");\n\t\t}\n\n\t\t$this->checkPanelMode();\n\t}", "function create_db_combo($tblname, $key_field, $value_field, $order_field, $additional_value='-Plese Select-', $param=''){\n $ci =& get_instance();\n //load databse library\n $ci->load->database();\n\n $ci->db->from($tblname);\n if($param!=''){\n $ci->db->where($param);\n }\n $ci->db->order_by($order_field);\n $result = $ci->db->get();\n\n $dd[''] = $additional_value ;\n if ($result->num_rows() > 0){\n foreach ($result->result() as $row) {\n $dd[$row->$key_field] = $row->$value_field;\n }\n }\n return $dd;\n }", "public function select();", "public function select();", "public function select();", "function print_query($db) {\n\t\techo \"<pre>\";print_r($db->get_compiled_select());echo \"</pre>\";\n\t}", "function select_sql($table='', $fields='*', ...$get_args) {\n\t\t$this->select_result = false;\n return $this->selecting($table, $fields, ...$get_args);\t \n }", "function getConnection($db,$custom);", "private function database($database= NULL) {\n if (NULL !== $database) return $database;\n return $this->conn->query('select database() as db')->next('db');\n }", "function select_db($dbname) {\n\t\t try {\n\t\t\tmysql_select_db($dbname, $this->conn);\n\t\t\t}catch(Exception $e) {\n\t\t\t\t\t$this->show_error(\"Error Connecting to DB \" . $e->getMessage());\n\t\t\t}\n\t\t}", "function choosedb() {\n $web = \"enwiki.web.db.svc.eqiad.wmflabs\";\n $analytics = \"enwiki.analytics.db.svc.eqiad.wmflabs\";\n\n $ts_pw = posix_getpwuid(posix_getuid());\n $ts_mycnf = parse_ini_file($ts_pw['dir'] . \"/replica.my.cnf\");\n\n $webtest = mysqli_connect( $web, $ts_mycnf['user'], $ts_mycnf['password'], 'heartbeat_p' );\n $analyticstest = mysqli_connect( $analytics, $ts_mycnf['user'], $ts_mycnf['password'], 'heartbeat_p' );\n\n $lagq = \"select lag from heartbeat where shard = 's1';\";\n\n $lag_wr = mysqli_query( $webtest, $lagq );\n $lag_ar = mysqli_query( $analyticstest, $lagq );\n\n $lag_webrow = mysqli_fetch_assoc( $lag_wr );\n $lag_anarow = mysqli_fetch_assoc( $lag_ar );\n\n $weblag = $lag_webrow['lag'];\n $analag = $lag_anarow['lag'];\n\n if( $weblag < 600 ) {\n $dbhost = $web;\n } elseif ( $weblag <= $analag ) {\n $dbhost = $web;\n } elseif( $analag <= $weblag ) {\n $dbhost = $analytics;\n } else {\n $dbhost = $web;\n }\n mysqli_close( $webtest );\n mysqli_close( $analyticstest );\n return( $dbhost );\n}", "public function Select($cond)\r\n\t\r\n {\r\n\t\tglobal $db;\r\n if($cond==\"\")\r\n {\r\n $sql = \"SELECT * FROM \".$this->TableName;\r\n } else\r\n {\t\r\n\t\t \t\r\n\t\t $sql = \"SELECT * FROM \". $this->TableName.\" \".$cond;\r\n }\r\n try{\r\n $query = $db->prepare($sql);\r\n $query->execute();\r\n $arr['rows'] = $query->fetchAll(PDO::FETCH_ASSOC);\r\n $arr['err'] = false;\r\n } catch(PDOException $e){\r\n $arr['err'] = true;\r\n $arr['msg'] = $e->getMessage(); \r\n } \r\n return $arr;\r\n }", "public function setQuery($db)\n {\n /** Create Select */\n $query = $db->createSelect();\n /** Get where condition */\n $where = $db->getQueryBuilder()->build($this);\n\n /** Setting query and fquery */\n $queryWhere = \"*:*\";\n if(!empty($where) && is_string($where)){\n $queryWhere = $where;\n }elseif(!empty($where) && is_array($where)){\n $k = key($where[0]);\n $v = $where[0][key($where[0])] === '' ? '\"\"' : $where[0][key($where[0])];\n $queryWhere = $k.':'.$v;\n if(count($where)>1){\n unset($where[0]);\n foreach ($where as $key=>$value){\n $k = key($value);\n $v = $value[key($value)] === '' ? '\"\"' : $value[key($value)];\n $query->createFilterQuery($k.$key)->setQuery($k.\":\".$v);\n }\n }\n }\n $query->setQuery($queryWhere);\n\n\n /** set fields to fetch (this overrides the default setting 'all fields') */\n if($this->select !== null){\n $query->setFields($this->select);\n }\n\n /** set start and rows param (comparable to SQL limit) using fluent interface */\n if(!empty($this->offset)){\n if((int)$this->offset < 0){\n $this->offset = 0;\n }\n $query->setStart($this->offset);\n }\n\n if(!empty($this->limit)){\n if((int)$this->limit < 0){\n $this->limit = 10;\n }\n $query->setRows($this->limit);\n }\n\n /** sort the results by price ascending */\n if($this->orderBy !== null){\n foreach ($this->orderBy as $key=>$value) {\n $query->addSort($key, $value == SORT_ASC ? 'ASC' :'DESC');\n }\n }\n\n /** Document highlight */\n if($this->highlight !== null && !empty($this->highlight['fields'])){\n $Highlighting = $query->getHighlighting();\n $pre_tags = empty($this->highlight['pre_tags']) ? '<b>' : $this->highlight['pre_tags'];\n $post_tags = empty($this->highlight['post_tags']) ? '</b>' : $this->highlight['post_tags'];\n $fields = is_string($this->highlight['fields']) ? explode(',',$this->highlight['fields']) : $this->highlight['fields'];\n foreach ($fields as $value){\n $Highlighting->getField($value)->setSimplePrefix($pre_tags)->setSimplePostfix($post_tags);\n }\n }\n return $query;\n }", "public function SelecionaBanco()\r\n\t\t{\r\n\t\t\tmysql_select_db($this->banco);\r\n\t\t}", "function createSelect($_table, $_value, $_colum)\n{\n\n $_prev_par= false;\n $_query = \"SELECT * FROM $_table\";\n\n foreach ($_value as $_key => $_value)\n {\n if ($_value != \"\")\n {\n if ($_prev_par)\n {\n $_query.= \" AND \";\n }\n else\n {\n $_query.= \" WHERE \";\n }\n\n $_query.= $_colum[$_key].\" = '$_value'\";\n $_prev_par = true;\n }\n }\n $_query.=\";\";\n\n return $_query;\n}", "public function db_select($database_name){\n\t\t@mysql_select_db($database_name, $this->conn) or $this->error(\"Failure on db selection\");\n\t}", "function testDBSelectCorrect() {\r\n\t$db = MetadataDB::getInstance();\r\n\t// error in sql...\r\n\t$sql = 'select variable from metadata';\r\n\t$result = $db->select($sql);\r\n\tif (!$result) {\r\n\t} else {\r\n\t\t//print 'All OK!';\r\n\t}\r\n}", "function selectConexion($database){\n \n return $conexion = conexionlocal();\n \n \n }", "function allinea_db() {\r\n\t\t\r\n\t\t$in=$this->session_vars;\r\n\t\t$conn=$this->conn;\r\n\t\t$service=$this->service;\r\n\t\t$tb_exist = false;\r\n\t\t$str_synonym=\"select * from USER_SYNONYMS where synonym_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $str_synonym );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$sql->get_row();\r\n\t\tif($sql->row['TABLE_NAME']!='') $this->form ['TABLE']=$sql->row['TABLE_NAME'];\r\n\t\t$query = \"select column_name from user_col_comments where table_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $query );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$all_field_exist = true;\r\n\t\tforeach ( $this->fields as $key => $val ) {\r\n\t\t\tif (isset ( $val ['TYPE'] ) && $val ['TYPE'] != '')\r\n\t\t\t$field_type = \"field_{$val['TYPE']}\";\r\n\t\t\telse\r\n\t\t\t$field_type = \"field\";\r\n\t\t\t\r\n\t\t\tif ($this->config_service['field_lib'] != '' && file_exists ( $this->config_service['field_lib'] . $field_type . \".inc\" )) {\r\n\t\t\t\tinclude_once $this->config_service['field_lib'] . $field_type . \".inc\";\r\n\t\t\t} else\r\n\t\t\tinclude_once \"{$field_type}.inc\";\r\n\t\t\t$this->no_field_value_by_tb=true;\r\n\t\t\t$field_obj = new $field_type ( $this, $key, $this->conn, $this->tb_vals, $this->session_vars, $this->service, $this->errors);\r\n\t\t\t$this->no_field_value_by_tb=false;\r\n\t\t\t$allinea_stmt [$key] = $field_obj->allinea_db ();\r\n\t\t\tif ($field_obj->attributes ['PK'] == 'yes') {\r\n\t\t\t\t$sql_pk_fields .= \"{$field_obj->attributes['VAR']},\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sql_pk_fields = rtrim ( $sql_pk_fields, \",\" );\r\n\t\tif ($sql->numrows > 0) {\r\n\t\t\t$tb_exist = true;\r\n\t\t\t$i = 0;\r\n\t\t\twhile ( $sql->get_row () ) {\r\n\t\t\t\t$res [$i] = $sql->row ['COLUMN_NAME'];\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($tb_exist) {\r\n\t\t\t$sql_pk = null;\r\n\t\t\t$c = 0;\r\n\t\t\t$all_field_exist = true;\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tif ($val != '') {\r\n\t\t\t\t\t$field_exist = false;\r\n\t\t\t\t\tforeach ( $val as $vk => $vval ) {\r\n\t\t\t\t\t\t$nome_campo = explode ( \" \", $vval );\r\n\t\t\t\t\t\t$field_exist [$key] [$vk] = false;\r\n\t\t\t\t\t\tforeach ( $res as $key_res => $val_res ) {\r\n\t\t\t\t\t\t\tif ($val_res == $nome_campo [0] || $nome_campo [0] == '') {\r\n\t\t\t\t\t\t\t\t$field_exist [$key] [$vk] = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ( $field_exist as $key1 => $val1 ) {\r\n\t\t\t\t\t\tforeach ( $val1 as $vk => $boolval )\r\n\t\t\t\t\t\tif (! $boolval) {\r\n\t\t\t\t\t\t\t$all_field_exist = false;\r\n\t\t\t\t\t\t\t$index = (count ( $this->fields ) * $vk) + $key;\r\n//\t\t\t\t\t\t\t$eq_sql_str [$index] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$s_sql_str [$index] = \"alter table S_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$sql_str [$index] = \"alter table \" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$sql_pk_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint PK_\" . $this->form ['TABLE'] . \" cascade\";\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$sql_fk_coord_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint FK_\" . $this->form ['TABLE'] . \"_COORD cascade\";\r\n\t\t\tglobal $config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t} else {\r\n\t\t\t$this->body .= \"Table <b>\" . $this->form ['TABLE'] . \"</b> doesn't exist<br/>\";\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tforeach ( $val as $key_f => $val_f )\r\n\t\t\t\tif ($val_f != '')\r\n\t\t\t\t$sql_create_fields .= \"{$val_f},\";\r\n\t\t\t}\r\n\t\t\t$sql_create_fields = rtrim ( $sql_create_fields, \",\" );\r\n\t\t\t$sql_str_ini = \"create table \" . $this->form ['TABLE'] . '(';\r\n\t\t\t$sql_str_end = \")\";\r\n\t\t\t$sql_str [0] = $sql_str_ini . $sql_create_fields . $sql_str_end;\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$config_service=$this->config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n//\t\t\t$eq_sql_str [0] = \"create table EQ_\" . $this->form ['TABLE'] . \" (ID NUMBER, COMMENTO varchar2(400),\" . $sql_create_fields . $sql_str_end;\r\n//\t\t\t$eq_sql_str [1] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add constraint EQ_PK_\" . $this->form ['TABLE'] . \" primary key (ID)\";\r\n\r\n\t\t\t$s_sql_str [0] = \"create table S_\" . $this->form ['TABLE'] . \"(USERID VARCHAR2(20),MODDT DATE,MODPROG NUMBER not null,FL_QUERY CHAR(1) not null,ID_QUERY NUMBER,\" . $sql_create_fields . $sql_str_end;\r\n\t\t\t$s_sql_str [1] = \"alter table S_\" . $this->form ['TABLE'] . \" add constraint S_PK_\" . $this->form ['TABLE'] . \" primary key (MODPROG)\";\r\n\r\n\t\t}\r\n\t\tif (isset ( $in ['CREATE'] ) || isset ( $in ['CREATE_' . $this->form ['TABLE']] )) {\r\n\t\t\tforeach ( $sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $eq_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $s_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tif ($sql_pk_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_pk_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_pk); // bind non necessario\r\n\t\t\tif ($sql_fk_coord_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_fk_coord_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_fk_coord); // bind non necessario\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\treturn ($tb_exist && $all_field_exist);\r\n\t}", "public function select($tienda);", "function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);", "function selectOptions($table,$current,$orderby=\"\",$value=\"value\",$label=\"label\",$where=\"\") {\r\n\r\n\tglobal $TESTMODE;\r\n\t\r\n\t$sql = \"SELECT $value,$label FROM $table WHERE testmode<=\".escapeValue($TESTMODE);\r\n\r\n\tif ($where != \"\") $sql .= \" AND $where\";\r\n\r\n\tif ($orderby != \"\") $sql .= \" ORDER BY $orderby\";\r\n\r\n\t$query = db_query($sql);\r\n\t\r\n\tfor ($i=0; $result = db_fetch($query,$i); $i++) {\r\n\t\r\n\t\techo \"<option value=\\\"\".$result[$value].\"\\\"\";\r\n\t\tif ($result[$value] == $current) echo \" selected\";\r\n\t\techo \">\".$result[$label].\"</option>\\n\";\r\n\t\t\r\n\t}\r\n\r\n}", "function selectDB($db)\n\t{\n\n\t\tglobal $connections,$config;\n\n\t\tif (!isset($connections[$db]))\n\t\t\tdie('Core-Error: Invalid database in selectDB()');\n\n\t\tif ($connections[$db]===false)\n\t\t{\n\n\t\t\t$connections[$db]\t= @mssql_connect($config['db'][$db]['host'],$config['db'][$db]['user'],$config['db'][$db]['pass']);\n\n\t\t\tif ($connections[$db] === false)\n\t\t\t{\n\n\t\t\t\t$msg\t\t= mssql_get_last_message();\n\n\t\t\t\techo '<b>Core-Error</b>: Failed to connect to database!<br />';\n\n\t\t\t\tif (trim($msg)!='')\n\t\t\t\t\techo 'Error: '.htmlspecialchars($msg);\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\tif (trim(strtolower($config['db'][$db]['host'])) == '(local)')\n\t\t\t\t\t\t$config['db'][$db]['host']\t= 'localhost';\n\n\t\t\t\t\t// Lets see if we can establish a connection to the db-server\n\n\t\t\t\t\t$file = @fsockopen ($config['db'][$db]['host'], 80, $errno, $errstr, 10);\n\n\t\t\t\t\tif (!$file)\n\t\t\t\t\t\t$status = -1; // Site is down\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$status\t= 0;\n\t\t\t\t\t\tfclose($file);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($status == -1)\n\t\t\t\t\t\techo 'Error: #'.$errno.', '.htmlspecialchars($errstr).'';\n\t\t\t\t\telse\n\t\t\t\t\t\techo 'Error: Please check if MSSQL-service is running <b>and</b> reachable (firewall, etc.).';\n\n\t\t\t\t}\n\n\t\t\t\tif (DEBUG)\n\t\t\t\t{\n\t\t\t\t\techo '<br /><br />';\n\t\t\t\t\techo '<b>Connection-Details</b>:<br /><br />';\n\t\t\t\t\techo '<table width=\"400\">';\n\t\t\t\t\techo '<tr><td>Host:</td><td>'.htmlspecialchars($config['db'][$db]['host']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>User:</td><td>'.htmlspecialchars($config['db'][$db]['user']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>Password:</td><td>'.htmlspecialchars($config['db'][$db]['pass']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>Database:</td><td>'.htmlspecialchars($config['db'][$db]['db']).'</td></tr>';\n\t\t\t\t\techo '</table>';\n\t\t\t\t}\n\n\t\t\t\tdie('');\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ($connections[$db]!==false)\n\t\t\tmssql_select_db($config['db'][$db]['db']);\n\n\t}", "function db_select ($db, $table, $columns = null, $where = null, $order = null, $group = null)\n{\n\tif (isset($columns)) {\n\t\tif (is_array($columns))\n\t\t\t$cols = implode ($columns, ',');\n\t\telse\n\t\t\t$cols = $columns;\n\n\t\t$key = $columns[0];\n\t\t$key = 'id';\n\t} else {\n\t\t$cols = '*';\n\t\t$key = 'id';\n\t}\n\n\t$query = \"select {$cols} from {$table}\";\n\n\tif (isset ($where)) {\n\t\tif (is_array ($where))\n\t\t\t$w = implode ($where, ' and ');\n\t\telse\n\t\t\t$w = $where;\n\t\t$query .= ' where ' . $w;\n\t}\n\n\tif (isset ($group)) {\n\t\t$query .= ' group by ' . $group;\n\t}\n\n\tif (isset ($order)) {\n\t\t$query .= ' order by ' . $order;\n\t}\n\n\t//echo \"$query;<br>\";\n\t$result = $db->query($query);\n\n\t$list = array();\n\tif ($result) {\n\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)) {\n\t\t\t$list[$row[$key]] = $row;\n\t\t}\n\t}\n\n\t$result->close();\n\treturn $list;\n}", "public function select($table, array $fields = null);", "public function brand_select() {\n //formulate select query\n $sql = \"SELECT * FROM brands\"; \n //execute query \n return $this->db_query($sql);\n }", "function database_select($database_name)\n {\n\t return mysql_select_db($database_name, $this->database_connection);\n\t}", "abstract protected function getTable();", "public function select($table, $fields, $where, $order, $start);", "function BDDselect($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) === FALSE){\n echo 'Errore de la requette';\n print_r($param);\n }\n return $req;\n}", "abstract public function prepareSelect();", "function showcon()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $db=$_GET['db'];\r\n $tbl=$_GET['table'];\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=showtable&db=$db'>Show Tables </a></center><br />\r\n <table width=100% align='center' cellspacing=0 class='xpltab'><tr>\";\r\n \r\n $query=$this->qe(\"SELECT * FROM $db.$tbl\");\r\n $col=array();\r\n $iml=$this->qe(\"SHOW COLUMNS FROM $db.$tbl\");\r\n $r.=\"<tr>\";\r\n while ($c=mysql_fetch_assoc($iml)) {\r\n array_push($col,$c['Field']);\r\n $r.=\"<th style='border:thin solid #000;'>\".strtoupper($c['Field']).\"</th>\";\r\n }\r\n $r.=\"<th>Action</th></tr>\";\r\n while($data=mysql_fetch_row($query))\r\n {\r\n $cols=mysql_fetch_row($iml);\r\n\r\n $r.=\"<tr>\";\r\n foreach ($data as $da) {\r\n $r.=\"<td style='border-right:thin solid #f00;'>\".$da.\"</td>\";\r\n }\r\n\r\n $r.=\"<td><a href='?act=editrow&db=$db&table=$tbl&col=$col[0]&val=$data[0]'>Edit</a> | <a href='?act=delrow&db=$db&table=$tbl&col=$col[0]&val=$data[0]'>Delete</a>\";\r\n \r\n $r.=\"</td></tr>\";\r\n }\r\n $r.= \"</table><br /><center><a href='?act=insertrow&db=$db&table=$tbl'><input type='button' id='but' value='Insert Row'></a></center>\".$this->sqlcommand().\"</div>\";\r\n $this->free($query);\r\n $this->free($iml);\r\n return $r;\r\n }", "public function table($tbl){\n if(empty($this->tbl)){\n $this->tbl = $tbl;\n $this->query = r\\table($tbl);\n $this->old_state = $this->query;\n }\n }", "function logs_tbl()\n {\n // SELECT \n }", "function db_selectData($query)\n\t{\n\t$this->OpenLink();\n\t$this->SelectDB();\n\t$this->query=$query;\n\t$this->result= mysqli_query($this->link,$this->query);\n\treturn $this->result;\n\t\n\t}", "function make_db_current($tables = 'all')\n {\n }", "function Dbtable($dbhost=false, $dbuser=false, $dbpassword=false, $dbname=false){\n\t\tif($dbhost){\n\t\t\t$this->_customDb = true;\n\t\t\t$this->dbhost = $dbhost;\n\t\t\t$this->dbuser = $dbuser;\n\t\t\t$this->dbpassword = $dbpassword;\n\t\t\t$this->dbname = $dbname;\n\t\t}\n\t\t$this->qryStr = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : NULL;\n\t\tparse_str($this->qryStr, $this->qryCurr); //current url\n\t\t$this->qryUrl = $this->qryCurr;\n\t\t$this->imagePath = array();\n\t}", "function show($dbname=null, $type=null){\n //\n $this->bind_arg('dbname', $dbname);\n $this->try_bind_arg(\"type\", $type);\n //\n //Get the involved database\n sql::get_dbase($dbname);\n //\n //Get the fields \n $fields= $this->fields->get_array();\n //\n //Execute this sql \n $array= $this->get_sql_data($dbname);\n //\n //Ouptut a table\n echo \"<table name='{$this->entity->name}'>\";\n echo $this->header();\n //\n //Loop through the array and display the results in a table \n foreach ($array as $row) {\n //\n //The id should be the primary value \n $id=$this->entity->name;\n //\n echo \"<tr onclick='record.select(this)' id='$row[$id]'>\";\n //\n //Step through the columns\n foreach($fields as $field){\n //\n //Get the indexes of the field\n $name= is_null($field->alias) ? $field->column->name:$field->alias;\n //\n //Get the field value\n $value = $row[$name];\n \n echo $field->show($value);\n \n }\n \n echo \"</tr>\";\n }\n echo \"</table>\";\n \n \n }", "function select($table)\n {\n $query = $this->db->get($table);\n\t\treturn $query->result();\n }", "public function getDb();", "public function hack($tabel){\n\t\t$this->db->select('*');\n\t\t$this->db->from($tabel);\n\t\t$this->show($this->db->get()); // SELECT * FROM $tabel;\t\n\t}", "function show($dbname=null, $type=null){\n $this->bind_arg('dbname', $dbname);\n $this->try_bind_arg(\"type\", $type);\n //\n //Execute this sql \n $array= $this->get_sql_data($this->dbname);\n //\n //Ouptut a table\n echo \"<table id='fields' name='{$this->entity->name}'>\";\n echo '<thead>';\n echo $this->header();\n echo '</thead>';\n echo '<tbody id=\"table-body\">';\n //\n //Loop through the array and display each row as a tr element\n foreach ($array as $row) {\n $id= \"{$this->entity->name}\";\n //\n echo \"<tr onclick='record.select(this)' id='$id'>\";\n //\n //loop through the column and out puts its td element.\n foreach ($this->entity->columns as $col){\n //\n //Get the value from the row, remebering that the row is indexed\n //by column name\n $value = $row[$col->name];\n //\n //\n echo $col->show($value);\n }\n //\n echo \"</tr>\";\n }\n \n echo \"</tbody>\";\n echo \"</table>\";\n \n \n }", "public function select_db($database = \"\") {\r\n\t\tif ($database == \"\") {\r\n\t\t\t$database = $this->DATABASE;\r\n\t\t}\r\n\t\t\r\n\t\tif ($database != \"\") {\r\n\t\t\tif (! @mysql_select_db ( $database, $this->conn )) {\r\n\t\t\t\t$this->log_error ( @mysql_error () );\r\n\t\t\t\tdie ( 'Error selecting database ' . $database );\r\n\t\t\t} else {\r\n\t\t\t\t// Successful\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function getSelectStatement($db, $params, $onlyCount) {\n\n\t\t$tableName = $db->escape_string($params[0], $db);\n\t\t$tableNameWithPrefix = $_ENV[\"table_prefix\"] . $tableName;\n\n\t\tif ($onlyCount) {\n\t\t\t$sqlQuery = \"select count(*) from `$tableNameWithPrefix`\";\n\t\t\t//if (isset($params[1])) {\n\t\t\t\t$sqlQuery .= $this->getFilter($db, $tableName, $params[1]);\n\t\t\t//}\n\t\t} else {\n\t\t\tif ($tableName == \"users\") {\n\t\t\t\t// change password to a dummy value\n\t\t\t\t$sqlQuery = \"SELECT id, username, 'dummy' as `password`, firstname, lastname, email, id_team, rights FROM `$tableNameWithPrefix`\";\n\t\t\t} else if ($tableName == \"play_table\") {\n\t\t\t\t$sqlQuery = \"select @rownum:=@rownum+1 as rank, t.*,\"\n\t\t\t\t\t\t. \" (t.wins * 3 + t.stand_off) as points,\"\n\t\t\t\t\t\t. \" (t.shoot - t.got) as goals_diff, \"\n\t\t\t\t\t\t. \" concat(shoot, ':', got) as goals\"\n\t\t\t\t\t\t. \" from `$tableNameWithPrefix` t, (SELECT @rownum:=0) r\";\n\t\t\t} else if ($tableName == \"player_match\") {\n\t\t\t\t$sqlQuery = \"select PM.*, SP.id_saison_team from `$tableNameWithPrefix` PM\"\n\t\t\t\t\t\t. \" left join `\" . $_ENV[\"table_prefix\"] . \"saison_player` SP on SP.id = PM.id_saison_player\";\n\t\t\t} else {\n\t\t\t\t$sqlQuery = \"select * from `$tableNameWithPrefix`\";\n\t\t\t}\n\n\t\t\t// set filter\n\t\t\t//if (isset($params[5])) {\n\t\t\t\t$sqlQuery .= $this->getFilter($db, $tableName, $params[5]);\n\t\t\t//}\n\n\t\t\t// set order\n\t\t\tif ($tableName == \"play_table\") {\n\t\t\t\t$sqlQuery .= \" order by points desc, goals_diff desc, t.shoot desc\";\n\t\t\t} else {\n\t\t\t\tif (isset($params[1]) && isset($params[2])) {\n\n\t\t\t\t\t$sortField = $params[1];\n\t\t\t\t\t$sortOrder = $params[2];\n\n\t\t\t\t\t$sqlQuery .= \" order by $sortField $sortOrder\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// set limit\n\t\t\tif (isset($params[3]) && isset($params[4])) {\n\t\t\t\t$firstIndex = $params[3];\n\t\t\t\t$maxRows = $params[4] - $firstIndex;\n\n\t\t\t\t$sqlQuery .= \" limit $firstIndex, $maxRows\";\n\t\t\t}\n\t\t}\n\t\t//\techo $sqlQuery;\n\t\treturn $sqlQuery;\n\t}", "function browseTable($ar){\n $p = new XParam($ar, array('tplentry'=>'br'));\n $boid = $p->get('boid');\n $tplentry = $p->get('tplentry');\n $options = $p->get('options');\n $x = XDataSource::objectFactory8($boid);\n $lar = array('options'=>$options, '_options'=>array('local'=>true), 'pagesize'=>9999, 'first'=>0, 'selectedfields'=>'all', 'tplentry'=>$tplentry);\n $x->browse($lar);\n }", "public function selectDB($squema) {\r\n\t\tmysql_select_db($squema, $this->connection);\r\n\t}", "function dbSelect() {\n global $con, $dbname;\n $selected = mysqli_select_db($con, $dbname);\n if(!$selected) {\n throw new Exception('<font color=\"white\">Could not select '.$dbname.'</font>');\n }\n}", "public function cpSelect($tablename,$value1=0,$value2=0) {\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1='$value1[$key1]'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}", "function showtable()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=mysql'>Show Database</a></center><br />\r\n <table width=50% align='center' class='xpltab' cellspacing=0 ><tr><th style='border-left:thin solid #f00;'>Table</th><th>Column count</th><th>Dump</th><th>Drop</th></tr>\";\r\n $db=$_GET['db'];\r\n $query=$this->qe(\"SHOW TABLES FROM $db\");\r\n while($data=mysql_fetch_array($query))\r\n {\r\n\r\n $iml=$this->qe(\"SHOW COLUMNS FROM $db.$data[0]\");\r\n $h=(mysql_num_rows($iml))?mysql_num_rows($iml):0;\r\n $r.= \"<tr><td><a href='?act=showcon&db=$db&table=$data[0]'>$data[0]</td><td>$h</td><td><a href='?act=downdb&db=$db&table=$data[0]'>Dump</a></td><td><a href='?act=dropdb&db=$db&tbl=$data[0]'>Drop</a></td></tr>\";\r\n \r\n }\r\n \r\n $r.= \"</table>\".$this->sqlcommand().\"</div>\";\r\n return $r;\r\n $this->free($query);\r\n $this->free($iml);\r\n mysql_close($c);\r\n }", "public static function get($db_type='')\n {\n if ($db_type == \"master\")\n {\n static $mdb = null;\n if ( $mdb == null )\n $mdb = new DBConnection($db_type);\n return $mdb;\n }\n else\n {\n static $sdb = null;\n if ( $sdb == null )\n $sdb = new DBConnection($db_type);\n return $sdb;\n }\n\n }", "public function select_data($tbl_name, $where=\"\", $other=\"\")\n\t\t{\n\t\t\t$query = \"SELECT * FROM $tbl_name\";\n\t\t\tif($where != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" WHERE $where\";\n\t\t\t}\n\t\t\tif($other != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" $other\";\n\t\t\t}\n\t\t\treturn $query;\n\t\t}", "public function selectAllactor() {\n\t\t$this->dbAdapter->dbOpen();\n\t\t$result = $this->dbAdapter->actorSelectAll();\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t\treturn $result;\t\t\n\t}", "function buildSelect($db_name,$table_name,$columns,$where_select){\n\n\t$query_select = \"SELECT \";\n\t//FILL COLUMNS FOR GET\n\tforeach ($columns as $c) {\n\t\t$query_select .= $c;\n\t\tif(array_search($c,$columns) != count($columns) - 1) $query_select .= \",\";\n\t}\n\tif($where_select != \"*\"){//GET \n\t\t//INTERMEDIATE\n\t\t$query_select .= \" FROM $table_name WHERE \";\n\t\t//FILL VALUES WHERE\n\t\tend($where_select);\n\t\t$last_key = key($where_select);\n\t\tforeach ($where_select as $key => $value) {\n\t\t\t$query_select .= $key . \"=\" . \":\" . $key;\n\t\t\tif($key != $last_key) $query_select .= \" AND \";\n\t\t}\n\t\texecuteQuery(\"USE $db_name\");\n\t\treturn executeQuery($query_select,$where_select);\n\t}\n\telse{//GET ALL SELECT\n\t\t//INTERMEDIATE\n\t\t$query_select .= \" FROM $table_name\";\n\t\texecuteQuery(\"USE $db_name\");\n\t\treturn executeQuery($query_select,\"*\");\n\t}\n\n}", "public static function db($database);", "function selecting($table='', $fields='*', ...$get_args) { \n\t\t$getfromtable = $this->fromtable;\n\t\t$getselect_result = $this->select_result; \n\t\t$getisinto = $this->isinto;\n \n\t\t$this->fromtable = null;\n\t\t$this->select_result = true;\t\n\t\t$this->isinto = false;\t\n \n $skipwhere = false;\n $wherekeys = $get_args;\n $where = '';\n\t\t\n if ( ! isset($table) || $table=='' ) {\n $this->setParamaters();\n return false;\n }\n \n $columns = $this->to_string($fields);\n \n\t\tif (isset($getfromtable) && ! $getisinto) \n\t\t\t$sql=\"CREATE TABLE $table AS SELECT $columns FROM \".$getfromtable;\n elseif (isset($getfromtable) && $getisinto) \n\t\t\t$sql=\"SELECT $columns INTO $table FROM \".$getfromtable;\n else \n\t\t\t$sql=\"SELECT $columns FROM \".$table;\n\n if (!empty($get_args)) {\n\t\t\tif (is_string($get_args[0])) {\n $args_by = '';\n $groupbyset = false; \n $havingset = false; \n $orderbyset = false; \n\t\t\t\tforeach ($get_args as $where_groupby_having_orderby) {\n if (strpos($where_groupby_having_orderby,'WHERE')!==false ) {\n $args_by .= $where_groupby_having_orderby;\n $skipwhere = true;\n } elseif (strpos($where_groupby_having_orderby,'GROUP BY')!==false ) {\n $args_by .= ' '.$where_groupby_having_orderby;\n $groupbyset = true;\n } elseif (strpos($where_groupby_having_orderby,'HAVING')!==false ) {\n if ($groupbyset) {\n $args_by .= ' '.$where_groupby_having_orderby;\n $havingset = true;\n } else {\n $this->setParamaters();\n return false;\n }\n } elseif (strpos($where_groupby_having_orderby,'ORDER BY')!==false ) {\n $args_by .= ' '.$where_groupby_having_orderby; \n $orderbyset = true;\n }\n }\n if ($skipwhere || $groupbyset || $havingset || $orderbyset) {\n $where = $args_by;\n $skipwhere = true;\n }\n\t\t\t}\t\t\n\t\t} else {\n $skipwhere = true;\n } \n \n if (! $skipwhere)\n $where = $this->where( ...$wherekeys);\n \n if (is_string($where)) {\n $sql .= $where;\n if ($getselect_result) \n return (($this->getPrepare()) && !empty($this->getParamaters())) ? $this->get_results($sql, OBJECT, true) : $this->get_results($sql); \n else \n return $sql;\n } else {\n $this->setParamaters();\n return false;\n } \n }", "private function selectTable(){\n\t\tView::show(\"user/seleccionaTablas\");\n\t}", "public abstract function getDbTable();", "static function loadDb($table) {\n $tab = new self($table);\n $cols = stdDB::selectArray(\"SHOW COLUMNS FROM `$table`\");\n foreach($cols as $col)\n $tab->cols[$col['Field']] = new schemaColumn($col['Field'],$col['Type'],\n $col['Null'], $col['Default'], $col['Extra']);\n $rows = stdDB::selectArray(\"SHOW INDEX FROM `$table`\");\n $idxrow = array(); $idxs = array();\n foreach($rows as $row){\n $idxrow[$row[\"Key_name\"]][] = $row[\"Column_name\"];\n $idxs[$row[\"Key_name\"]] = $row;\n }\n foreach($idxs as $k=>$row) {\n $tab->idx[$k] = new schemaIndex($k, $idxrow[$k],\n $row['Non_unique'], $row['Sub_part']);\n }\n return $tab;\n }", "function get( $db ,$table ,$input )\n{\n\n\tif( array_key_exists( 'cmd' ,$input ) )\n\t{\n\t\t//fixme fare confronto lovercase del cmd, per evitare stupidi problemi case sensitive\n\t\t$cmd= strtolower( $input['cmd'] );\n\t\t//$cmd= $input['cmd'];\t\t\n\t\n\n\t\tif( $cmd == 'gettable' )\n\t\t\treturn $table;\t\t\t\n\n\t\tif( $cmd == 'currenttable' )\n\t\t\treturn $db->currentTable( );\t\t\n\n\n\n\t\tif( $cmd == 'getall' )\n\t\t\treturn $db->tableGetAll( $table ,$input );\t\t\t\n\n\t\t//?cmd=getOne&rowid=99\n\t\tif( $cmd == 'getone' )\n\t\t\treturn $db->tableGetOne( $table ,$input );\t\t\t\n\n\t\tif( $cmd == 'columns' )\n\t\t\treturn $db->tableDescribe( $table );\n\n\n\t\tif( $cmd == 'tables' )\n\t\t\treturn $db->tableTables( $table );\n\n\n\t\t//?cmd=count\n\t\tif( $cmd == 'count' )\n\t\t\treturn $db->tableGetCount( $table ,$input );\n\n\t\t//?cmd=autocomeplete&column=nome&word=pi &limit=10\n\t\tif( $cmd == 'autocomplete' )\n\t\t\treturn $db->tableAutocomplete( $table ,$input );\n\n\n\t\t//if( $cmd == strtolower('getAllArray') )\n\t\t//\treturn $db->tableGetAll( $table ,$input ,true ) ;\n\n\n\t\tif( array_key_exists( 'cmd' ,$input ) )\n\t\t\treturn $db->restDie( -1 ,\"get.parametro cmd: funzione corrispondente al parametro cmd non trovata\" );\n\t}\n\n\t//return $db->tableGetAll( $table ,$input ) ;\n\t\n\n\t\n\t$f= \"gui.php\"; //se questo presente, servilo e termina\n\tif( file_exists( $f ) )\n\t{\n\t\tinclude( $f );\n\t\tdie( \"\");\n\t}\n\n\t$f= \"gui.html\";//se questo presente, servilo e termina\n\tif( file_exists( $f ) )\n\t{\n\t\tinclude( $f );\n\t\tdie( \"\");\n\t}\n\n\n\n}", "function Sql_DB_Create($db=\"\")\n {\n $query=$this->DB_Create_Query($db);\n $this->DB_Query($query);\n }", "function get_db( $db = null ) {\n\n\t\tif ( $db == null && !is_null($this->db) ) {\n\t\t\treturn $this->db;\n\t\t}\n\n\t\tif ( is_object( $db ) ) {\n\t\t\t$db = $db->name;\n\t\t}\n\t\t\n\t\t\n\t\tif ( !array_key_exists( $db, $this->dbs ) ) {\n\t\t\t$this->error( 'Invalid Database', 404 );\n\t\t}\n\n\t\treturn $this->dbs[$db];\n\n\t}", "public function select($table_name, $fields = array(), $where = array(), $order_by = '')\r\n {\r\n }", "abstract protected function fetchTableNamesDb();", "public function SetFromDB($db){\r\n\t\t$this->db=$db;\r\n\t}", "protected static function db(){\n\t\treturn DatabasePDO::getCurrentpdo();\n\t}" ]
[ "0.6528299", "0.6523396", "0.6441326", "0.6288948", "0.62825274", "0.6281867", "0.62785035", "0.6225119", "0.61457175", "0.61379474", "0.6058814", "0.60488206", "0.6018403", "0.6014407", "0.59870315", "0.5964312", "0.5956833", "0.59456414", "0.5869428", "0.58607244", "0.57583016", "0.5716278", "0.57056075", "0.565631", "0.56534374", "0.5633263", "0.561958", "0.5602415", "0.55818355", "0.55693704", "0.55599546", "0.5558588", "0.55498946", "0.5541788", "0.5528788", "0.5510161", "0.54967576", "0.54907584", "0.54907584", "0.54907584", "0.54547477", "0.54376525", "0.54211134", "0.5420595", "0.5415749", "0.54114664", "0.5393542", "0.53812426", "0.53782845", "0.53703874", "0.5369249", "0.5361462", "0.53596896", "0.5345107", "0.53397197", "0.53223354", "0.5318448", "0.5290506", "0.5288725", "0.5288515", "0.5280458", "0.5277912", "0.52752", "0.52727556", "0.5271464", "0.5269018", "0.52622855", "0.5253868", "0.5250152", "0.52437663", "0.52309823", "0.52294964", "0.5227483", "0.5225661", "0.52249706", "0.5224285", "0.52099425", "0.5208172", "0.5208066", "0.5200499", "0.51982176", "0.5182743", "0.51728183", "0.51655614", "0.516062", "0.5160012", "0.5159056", "0.51518834", "0.5149472", "0.514849", "0.5146377", "0.51346004", "0.5133402", "0.51332897", "0.51314545", "0.51267564", "0.511005", "0.51055384", "0.51049894", "0.5104619" ]
0.7610733
0
debug rows fetch time
final public function fetch_time() { $r = ''; $t = self::ms(); foreach ($this->users('list') as $user) { if (is_dir($this->dir . $user)) { $p = "{$this->dir}$user/"; $dbs = self::_scandir($p); foreach ($dbs as $db) { $tbs = self::_scandir($db); foreach ($tbs as $file) { if (file_exists($file)) { $data = self::data($file); $rows = $data['row']; foreach ($rows as $pk => $row) { $r .= self::ra2str($row); } } } } } } $t = self::ms() - $t; return ($t / 1000) . ' sec'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function query_info()\r\n\t\t{\r\n\t\t\techo \"<u>Your Previous Query Consisted of:</u><br>\";\r\n\t\t\techo \"SQL = '\".$this->last_query[\"sql\"].\"'<br>\";\r\n\t\t\t$temp = ($this->last_query[\"end_time\"] - $this->last_query[\"start_time\"]);\r\n\t\t\t$temp *= 1000;\r\n\t\t\t$temp = number_format($temp, 3);\r\n\t\t\techo \"Time Elapsed: \".$temp.\"(ms)<br>\";\r\n\t\t\techo \"Number of Records: \".$this->numrows.\"<br>\";\r\n\t\t\techo \"Number of Rows Affected: \".$this->affected_rows;\r\n\t\t}", "public function query_fetchlist()\n {\n if (($this->mode > 0) and is_array($this->sql_query_list)) {\n $this->sql_query_list = $this->sort_array_by_col($this->sql_query_list);\n foreach ($this->sql_query_list as $debug_query) {\n $sql_query_debug .= debug::row_double(sprintf(\"<b>%8.4f ms</b>\", $debug_query[0]), $debug_query[1]);\n if (!($debug_query[2]==\"\")) {\n $sql_query_debug .= debug::row_double(\"\", \"<span style=\\\"color:red\\\"><b>Error : \".$debug_query[2].\"</b></span>\");\n }\n }\n return $sql_query_debug;\n }\n }", "public function execTime() {\n return microtime(true)-$this->conn_start;\n }", "public function getAllQueriesTime(){\n return Db::getAllQueriesEstimatedTime();\n }", "public function getFromCache_queryRow() {}", "public function testResultSeekRows()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n }", "public function getFetchTime() {\n return $this->fetchTime;\n }", "public function __sleep() {\n\t\treturn array('_data', '_tableName', '_rowClass', '_pointer', '_count', '_rows', '_stored', '_readOnly');\n\t}", "function adodb_microtime()\n{\n\treturn microtime(true);\n}", "function query_array($sql=null)\n{\nglobal $db,$debug;\n \ntry { \n if ($debug) \n $time_start = microtime(true); \n \n $stmt = $this->db['conn']->prepare($sql);\n $stmt->execute();\n \n if ($debug){\n $time = microtime(true)- $time_start; \n echo \"<HR>Executed SQL:<strong> $sql </strong> in <strong>$time</strong> s<HR>\";\n }\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC); //PDO::FETCH_NUM | PDO::FETCH_ASSOC\n return $results ;\n} catch (PDOException $e) {\n $this->fatal_error(\" Database Error!: <strong>\". $e->getMessage() .\"</strong> SQL: $sql <br /> Using DSN \".$this->db['dsn'].\"<br/>\");\n die(); die();\n}\n\n}", "public function __sleep()\n {\n return ['rowData', 'loaded', 'persisted', 'resourceName'];\n }", "public function testResultFetchPerTable()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test WHERE status='ACTIVE'\");\n \t\n \t$this->assertEquals(array('test'=>array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE')), $result->fetchPerTable());\n \t$this->assertEquals(array('test'=>array('id'=>2, 'key'=>'two', 'title'=>'next row', 'status'=>'ACTIVE')), $result->fetchPerTable());\n \t$this->assertNull($result->fetchPerTable());\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array('test'=>array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE')), $result->fetchPerTable(), \"Fetch after reset pointer: \");\n }", "public function gatherSQLQueryData()\n {\n $queryTotals = array();\n\n $queryTotals['count'] = 0;\n $queryTotals['time'] = 0;\n\n $queries = array();\n\n if(isset($this->connection)) {\n $queryLog = $this->connection->getQueryLog();\n\n $queryTotals['count'] += count($queryLog);\n\n foreach($queryLog as $query) {\n if(isset($query['bindings']) && ! empty($query['bindings'])) {\n $query['sql'] = PdoDebugger::show($query['query'], $query['bindings']);\n } else {\n $query['sql'] = $query['query'];\n }\n\n $query = $this->attemptToExplainQuery($query);\n\n $queryTotals['time'] += $query['time'];\n\n $query['time'] = $this->getReadableTime($query['time']);\n\n //\n $queries[] = $query;\n }\n }\n\n $queryTotals['time'] = $this->getReadableTime($queryTotals['time']);\n\n $this->output['queries'] = $queries;\n $this->output['queryTotals'] = $queryTotals;\n }", "function timequery() {\n static $querytime_begin;\n list($usec, $sec) = explode(' ', microtime());\n\n if (!isset($querytime_begin)) {\n $querytime_begin = ((float) $usec + (float) $sec);\n } else {\n $querytime = (((float) $usec + (float) $sec)) - $querytime_begin;\n echo sprintf('<br />La consulta tardó %01.5f segundos.- <br />', $querytime);\n }\n}", "public function __sleep()\n\t{\n\t\tforeach ($this->_retrieved as $field => $object)\n\t\t{\n\t\t\tif ($object instanceof Database_MySQL_Result)\n\t\t\t{\n\t\t\t\t// Database_MySQL_Results handle results differenly, so they must be converted\n\t\t\t\t// Otherwise they are invalide when they wake up.\n\t\t\t\t$this->_retrieved[$field] = new Database_Result_Cached($object->as_array(), '');\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\n\t\t// Return array of all properties to get them serialised\n\t\treturn array_keys(get_object_vars($this));\n\t}", "function database_log_stats()\n {\n $query_timer_start = getmicrotime();\n \n // DO STUFF\n $time = time();\n $do_insert = FALSE;\n $insert_query = \"\n INSERT INTO se_debug_querylog\n (\n debug_querylog_query,\n debug_querylog_queryhash,\n debug_querylog_querylocation,\n debug_querylog_benchmark,\n debug_querylog_backtrace,\n debug_querylog_result,\n debug_querylog_count,\n debug_querylog_error,\n debug_querylog_time\n )\n VALUES\n \";\n \n foreach( $this->log_data as $log_index=>$log_data )\n {\n // LOG SINGLE QUERY\n if( $do_insert ) $insert_query .= \", \";\n \n $query_location = substr($log_data['backtrace'][0]['file_short'].\" [\".$log_data['backtrace'][0]['line'].\"]\", 0, 254);\n \n $insert_query .= \"(\n '\".$this->database_real_escape_string($log_data['query']).\"',\n '{$log_data['query_hash']}',\n '{$query_location}',\n '{$log_data['time']}',\n '', /* TODO */\n '\".( $log_data['result'] ? '1' : '0' ).\"',\n '{$log_data['count']}',\n '\".$this->database_real_escape_string($log_data['error']).\"',\n '{$time}'\n )\";\n \n $do_insert = TRUE;\n \n // LOG STATS\n $sql = \"\n INSERT INTO se_debug_querystats\n (\n debug_querystats_query_hash,\n debug_querystats_query_location,\n debug_querystats_query,\n debug_querystats_count,\n debug_querystats_count_failed,\n debug_querystats_count_slow,\n debug_querystats_time_total,\n debug_querystats_time_avg\n )\n VALUES\n (\n '{$log_data['query_hash']}',\n '{$query_location}',\n '\".$this->database_real_escape_string($log_data['query']).\"',\n '1',\n '\".( !$log_data['result'] ? '1' : '0' ).\"',\n '\".( $log_data['time']>$this->log_slow_threshold ? '1' : '0' ).\"',\n '{$log_data['time']}',\n '{$log_data['time']}'\n )\n ON DUPLICATE KEY UPDATE\n debug_querystats_count=debug_querystats_count+1,\n debug_querystats_count_failed=debug_querystats_count_failed+\".( !$log_data['result'] ? '1' : '0' ).\",\n debug_querystats_count_slow=debug_querystats_count_slow+\".( $log_data['time']>$this->log_slow_threshold ? '1' : '0' ).\",\n debug_querystats_time_total=debug_querystats_time_total+\".( $log_data['time'] ? $log_data['time'] : '0' ).\",\n debug_querystats_time_avg=(debug_querystats_count*debug_querystats_time_avg+\".( is_numeric($log_data['time']) ? $log_data['time'] : '0' ).\")/(debug_querystats_count+1)\n \";\n \n mysql_query($sql, $this->database_connection) or die(mysql_error($this->database_connection).\" \".$sql);\n }\n \n if( $do_insert ) mysql_query($insert_query, $this->database_connection) or die(mysql_error($this->database_connection).\" \".$insert_query);\n \n $query_timer_end = getmicrotime();\n $query_timer_total = round($query_timer_end-$query_timer_start, 7);\n\t}", "function FetchRow() {}", "public function debug($row = null)\n\t{\n\t\tif($row) {\n\t\t\t// Dump debugging info for current row\n\t\t}\n\t\t\n\t\techo \"<p>Executed \" . $this->getQueryCount() . \" queries:</p>\";\n\t\techo \"<pre>\\n\";\n\t\tprint_r(self::$queryLog);\n\t\techo \"</pre>\\n\";\n\t}", "public function fetchRow();", "public function __sleep()\n {\n return [\n 'primaryKeys',\n 'columns',\n 'data',\n 'modifiedDataFields'\n ];\n }", "protected static function afterGetFromDB(&$row){}", "public function time()\n {\n // CURRENT_TIMESTAMP\n $time = $this->getDbCurrentTimestampSQL();\n return $this->conn->fetchColumn(\"SELECT {$time};\");\n }", "public function getQueryTime()\n {\n return $this->result->getQueryTime();\n }", "function query($sql,$calculateRows=false,$fastHint=false);", "public function getExecutionTimes()\n {\n return $this->queryExecutionTimes;\n }", "function DumpSql ($stmt) {\r\n while ($row = $stmt->fetch()) {\r\n print(var_dump($row));\r\n }\r\n}", "function adodb_log_sql(&$connx,$sql,$inputarr)\n{\n $perf_table = adodb_perf::table();\n\t$connx->fnExecute = false;\n\t$a0 = microtime(true);\n\t$rs = $connx->Execute($sql,$inputarr);\n\t$a1 = microtime(true);\n\n\tif (!empty($connx->_logsql) && (empty($connx->_logsqlErrors) || !$rs)) {\n\tglobal $ADODB_LOG_CONN;\n\n\t\tif (!empty($ADODB_LOG_CONN)) {\n\t\t\t$conn = $ADODB_LOG_CONN;\n\t\t\tif ($conn->databaseType != $connx->databaseType)\n\t\t\t\t$prefix = '/*dbx='.$connx->databaseType .'*/ ';\n\t\t\telse\n\t\t\t\t$prefix = '';\n\t\t} else {\n\t\t\t$conn = $connx;\n\t\t\t$prefix = '';\n\t\t}\n\n\t\t$conn->_logsql = false; // disable logsql error simulation\n\t\t$dbT = $conn->databaseType;\n\n\t\t$time = $a1 - $a0;\n\n\t\tif (!$rs) {\n\t\t\t$errM = $connx->ErrorMsg();\n\t\t\t$errN = $connx->ErrorNo();\n\t\t\t$conn->lastInsID = 0;\n\t\t\t$tracer = substr('ERROR: '.htmlspecialchars($errM),0,250);\n\t\t} else {\n\t\t\t$tracer = '';\n\t\t\t$errM = '';\n\t\t\t$errN = 0;\n\t\t\t$dbg = $conn->debug;\n\t\t\t$conn->debug = false;\n\t\t\tif (!is_object($rs) || $rs->dataProvider == 'empty')\n\t\t\t\t$conn->_affected = $conn->affected_rows(true);\n\t\t\t$conn->lastInsID = @$conn->Insert_ID();\n\t\t\t$conn->debug = $dbg;\n\t\t}\n\t\tif (isset($_SERVER['HTTP_HOST'])) {\n\t\t\t$tracer .= '<br>'.$_SERVER['HTTP_HOST'];\n\t\t\tif (isset($_SERVER['PHP_SELF'])) $tracer .= htmlspecialchars($_SERVER['PHP_SELF']);\n\t\t} else\n\t\t\tif (isset($_SERVER['PHP_SELF'])) $tracer .= '<br>'.htmlspecialchars($_SERVER['PHP_SELF']);\n\t\t//$tracer .= (string) adodb_backtrace(false);\n\n\t\t$tracer = (string) substr($tracer,0,500);\n\n\t\tif (is_array($inputarr)) {\n\t\t\tif (is_array(reset($inputarr))) $params = 'Array sizeof='.sizeof($inputarr);\n\t\t\telse {\n\t\t\t\t// Quote string parameters so we can see them in the\n\t\t\t\t// performance stats. This helps spot disabled indexes.\n\t\t\t\t$xar_params = $inputarr;\n\t\t\t\tforeach ($xar_params as $xar_param_key => $xar_param) {\n\t\t\t\t\tif (gettype($xar_param) == 'string')\n\t\t\t\t\t$xar_params[$xar_param_key] = '\"' . $xar_param . '\"';\n\t\t\t\t}\n\t\t\t\t$params = implode(', ', $xar_params);\n\t\t\t\tif (strlen($params) >= 3000) $params = substr($params, 0, 3000);\n\t\t\t}\n\t\t} else {\n\t\t\t$params = '';\n\t\t}\n\n\t\tif (is_array($sql)) $sql = $sql[0];\n\t\tif ($prefix) $sql = $prefix.$sql;\n\t\t$arr = array('b'=>strlen($sql).'.'.crc32($sql),\n\t\t\t\t\t'c'=>substr($sql,0,3900), 'd'=>$params,'e'=>$tracer,'f'=>adodb_round($time,6));\n\t\t//var_dump($arr);\n\t\t$saved = $conn->debug;\n\t\t$conn->debug = 0;\n\n\t\t$d = $conn->sysTimeStamp;\n\t\tif (empty($d)) $d = date(\"'Y-m-d H:i:s'\");\n\t\tif ($conn->dataProvider == 'oci8' && $dbT != 'oci8po') {\n\t\t\t$isql = \"insert into $perf_table values($d,:b,:c,:d,:e,:f)\";\n\t\t} else if ($dbT == 'odbc_mssql' || $dbT == 'informix' || strncmp($dbT,'odbtp',4)==0) {\n\t\t\t$timer = $arr['f'];\n\t\t\tif ($dbT == 'informix') $sql2 = substr($sql2,0,230);\n\n\t\t\t$sql1 = $conn->qstr($arr['b']);\n\t\t\t$sql2 = $conn->qstr($arr['c']);\n\t\t\t$params = $conn->qstr($arr['d']);\n\t\t\t$tracer = $conn->qstr($arr['e']);\n\n\t\t\t$isql = \"insert into $perf_table (created,sql0,sql1,params,tracer,timer) values($d,$sql1,$sql2,$params,$tracer,$timer)\";\n\t\t\tif ($dbT == 'informix') $isql = str_replace(chr(10),' ',$isql);\n\t\t\t$arr = false;\n\t\t} else {\n\t\t\tif ($dbT == 'db2') $arr['f'] = (float) $arr['f'];\n\t\t\t$isql = \"insert into $perf_table (created,sql0,sql1,params,tracer,timer) values( $d,?,?,?,?,?)\";\n\t\t}\n\n\t\tglobal $ADODB_PERF_MIN;\n\t\tif ($errN != 0 || $time >= $ADODB_PERF_MIN) {\n\t\t\t$ok = $conn->Execute($isql,$arr);\n\t\t} else\n\t\t\t$ok = true;\n\n\t\t$conn->debug = $saved;\n\n\t\tif ($ok) {\n\t\t\t$conn->_logsql = true;\n\t\t} else {\n\t\t\t$err2 = $conn->ErrorMsg();\n\t\t\t$conn->_logsql = true; // enable logsql error simulation\n\t\t\t$perf = NewPerfMonitor($conn);\n\t\t\tif ($perf) {\n\t\t\t\tif ($perf->CreateLogTable()) $ok = $conn->Execute($isql,$arr);\n\t\t\t} else {\n\t\t\t\t$ok = $conn->Execute(\"create table $perf_table (\n\t\t\t\tcreated varchar(50),\n\t\t\t\tsql0 varchar(250),\n\t\t\t\tsql1 varchar(4000),\n\t\t\t\tparams varchar(3000),\n\t\t\t\ttracer varchar(500),\n\t\t\t\ttimer decimal(16,6))\");\n\t\t\t}\n\t\t\tif (!$ok) {\n\t\t\t\tADOConnection::outp( \"<p><b>LOGSQL Insert Failed</b>: $isql<br>$err2</p>\");\n\t\t\t\t$conn->_logsql = false;\n\t\t\t}\n\t\t}\n\t\t$connx->_errorMsg = $errM;\n\t\t$connx->_errorCode = $errN;\n\t}\n\t$connx->fnExecute = 'adodb_log_sql';\n\treturn $rs;\n}", "public function getQueryTime()\n {\n return $this->query_time;\n }", "abstract public function getAffectedRows();", "function AffectedRows ();", "function basey_query_load_time() {\n\n\tif (current_user_can( 'manage_options' )) { ?>\n\t\t<div class=\"uk-container uk-margin-bottom\">\n\t\t\t<div class=\"uk-panel uk-panel-box\">\n\t\t\t\t<strong><?php echo get_num_queries(); ?></strong> queries in <strong><?php timer_stop(1); ?></strong> seconds\n\t\t\t</div>\n\t\t</div>\n\t<?php }\n}", "public function fetchDBTime()\n {\n $sql = \"select now()\";\n $datetime = Yii::app()->db->createCommand($sql)->queryScalar();\n return $datetime;\n }", "function oci_set_prefetch($statement, $rows)\n{\n}", "public function time()\n {\n $query = \"CALL time();\";\n $result = $this->db->query($query);\n if ($result->num_rows() > 0)\n return $result->result_array();\n else\n return false;\n }", "function getDelailAllLoadCell($account_id_local,$DbConnection)\n{\n $query=\"SELECT load_cell_id,datetime,imei,load FROM load_cell USE INDEX(ldcell_uaid_status) WHERE user_account_id='$account_id_local' AND status='1'\";\t\t\t\t\n $result=mysql_query($query,$DbConnection); \t\t\t\t\t\t\t\n while($row=mysql_fetch_object($result))\n {\n /*$load_cell_id=$row->load_cell_id;\n $date=$row->datetime;\t\t\t\t\n $imei=$row->imei;\n $load=$row->load;*/\t\t\n $data[]=array('load_cell_id'=>$row->load_cell_id,'date'=>$row->datetime,'imei'=>$row->imei,'load'=>$row->load);\t\n }\n return $data;\n}", "public function testResultNumRows()\n {\n \t$this->assertEquals(3, $this->conn->query('SELECT * FROM test')->numRows());\n \t$this->assertEquals(2, $this->conn->query('SELECT * FROM test WHERE status=\"ACTIVE\"')->numRows(), \"Active rows\");\n }", "function _ExpensiveSQL($numsql = 10)\n\t{\n\t\tglobal $ADODB_FETCH_MODE;\n\n $perf_table = adodb_perf::table();\n\t\t\t$saveE = $this->conn->fnExecute;\n\t\t\t$this->conn->fnExecute = false;\n\n\t\t\tif (isset($_GET['expe']) && isset($_GET['sql'])) {\n\t\t\t\t$partial = !empty($_GET['part']);\n\t\t\t\techo \"<a name=explain></a>\".$this->Explain($_GET['sql'],$partial).\"\\n\";\n\t\t\t}\n\n\t\t\tif (isset($_GET['sql'])) return;\n\n\t\t\t$sql1 = $this->sql1;\n\t\t\t$save = $ADODB_FETCH_MODE;\n\t\t\t$ADODB_FETCH_MODE = ADODB_FETCH_NUM;\n\t\t\tif ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);\n\n\t\t\t$rs = $this->conn->SelectLimit(\n\t\t\t\"select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer\n\t\t\t\tfrom $perf_table\n\t\t\t\twhere {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT')\n\t\t\t\tand (tracer is null or tracer not like 'ERROR:%')\n\t\t\t\tgroup by sql1\n\t\t\t\thaving count(*)>1\n\t\t\t\torder by 1 desc\",$numsql);\n\t\t\tif (isset($savem)) $this->conn->SetFetchMode($savem);\n\t\t\t$this->conn->fnExecute = $saveE;\n\t\t\t$ADODB_FETCH_MODE = $save;\n\t\t\tif (!$rs) return \"<p>$this->helpurl. \".$this->conn->ErrorMsg().\"</p>\";\n\t\t\t$s = \"<h3>Expensive SQL</h3>\n<font size=1>Tuning the following SQL could reduce the server load substantially</font><br>\n<table border=1 bgcolor=white><tr><td><b>Load</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr>\\n\";\n\t\t\t$max = $this->maxLength;\n\t\t\twhile (!$rs->EOF) {\n\t\t\t\t$sql = $rs->fields[1];\n\t\t\t\t$raw = urlencode($sql);\n\t\t\t\tif (strlen($raw)>$max-100) {\n\t\t\t\t\t$sql2 = substr($sql,0,$max-500);\n\t\t\t\t\t$raw = urlencode($sql2).'&part='.crc32($sql);\n\t\t\t\t}\n\t\t\t\t$prefix = \"<a target=sqle\".rand().\" href=\\\"?hidem=1&expe=1&sql=\".$raw.\"&x#explain\\\">\";\n\t\t\t\t$suffix = \"</a>\";\n\t\t\t\tif($this->explain == false || strlen($prefix>$max)) {\n\t\t\t\t\t$prefix = '';\n\t\t\t\t\t$suffix = '';\n\t\t\t\t}\n\t\t\t\t$s .= \"<tr><td>\".adodb_round($rs->fields[0],6).\"<td align=right>\".$rs->fields[2].\"<td><font size=-1>\".$prefix.htmlspecialchars($sql).$suffix.\"</font>\".\n\t\t\t\t\t\"<td>\".$rs->fields[3].\"<td>\".$rs->fields[4].\"</tr>\";\n\t\t\t\t$rs->MoveNext();\n\t\t\t}\n\t\t\treturn $s.\"</table>\";\n\t}", "function time_function ( $funcname, $text, $dblink, $test_table, $max_rows, $buffer_size = null )\r\n\t {\r\n\t\techo ( \"\\t\" . str_pad ( $text, 60 ) . ' : ' ) ;\r\n\t\tflush ( ) ;\r\n\r\n\t\t$timer_start\t\t= microtime ( true ) ;\r\n\t\t$funcname ( $dblink, $test_table, $max_rows, $buffer_size ) ;\r\n\t\t$timer_stop\t\t= microtime ( true ) ;\r\n\t\t$delta\t\t\t= round ( $timer_stop - $timer_start, 3 ) ;\r\n\r\n\t\tmysqli_query ( $dblink, \"OPTIMIZE TABLE $test_table\" ) ;\r\n\t\tmysqli_query ( $dblink, \"FLUSH TABLES\" ) ;\r\n\r\n\t\techo ( $delta . \"\\n\" ) ;\r\n\t }", "function getRecordTime() {\n\treturn db_query(\"SELECT recordtime FROM RecordTime\");\n}", "abstract public function AffectedRows();", "public function should_be_fetched() {\n\t\tif ( ! isset( $this->ryte_option[ self::LAST_FETCH ] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn ( ( time() - $this->ryte_option[ self::LAST_FETCH ] ) > self::FETCH_LIMIT );\n\t}", "function logcount() {\n\tglobal $cursor;\n\techo $cursor->count() . PHP_EOL;\n}", "function e107_db_debug() {\n\t\tglobal $eTimingStart;\n\n\t\t$this->aTimeMarks[0]=array(\n\t\t'Index' => 0,\n\t\t'What' => 'Start',\n\t\t'%Time' => 0,\n\t\t'%DB Time' => 0,\n\t\t'%DB Count' => 0,\n\t\t'Time' => ($eTimingStart),\n\t\t'DB Time' => 0,\n\t\t'DB Count' => 0\n\t\t);\n\t\t\n\t\tregister_shutdown_function('e107_debug_shutdown');\n\t}", "function getEstimatedTime() {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$estimate = clone $this->_query;\n\t\t$logged = clone $this->_query;\n\n\t\t$estimate->where(\"$i.info_estimate IS NOT NULL\");\n\t\t$estimate->column($this->_grouping->getResolveByKey($this, $estimate), 'PK');\n\t\t$estimate->column(\"COUNT(DISTINCT $i.node_id)\", 'ISSUES');\n\t\t$estimate->column(\"SUM($i.info_estimate)*60\", 'TIME_ESTIMATE');\n\t\t$estimate->groupBy($this->_grouping->getResolveByKey($this, $estimate));\n\t\t\n\t\t$t = $logged->join('synd_issue_task', 't');\n\t\t$logged->where(\"$i.node_id = $t.parent_node_id\");\n\t\t$logged->where(\"$i.info_estimate IS NOT NULL\");\n\t\t$logged->column($this->_grouping->getResolveByKey($this, $logged), 'PK');\n\t\t$logged->column(\"SUM($t.info_duration)*60\", 'TIME_LOGGED');\n\t\t$logged->groupBy($this->_grouping->getResolveByKey($this, $logged));\n\n\t\t$sql = $estimate->toString();\n\t\t$rows = $this->_db->getAll($sql);\n\t\t\n\t\t$sql2 = $logged->toString();\n\t\t$time = $this->_db->getAssoc($sql2);\n\n\t\t$result = array();\n\t\tforeach ($rows as $row) {\n\t\t\t$result[$row['PK']] = $row;\n\t\t\t$result[$row['PK']]['TIME_LOGGED'] = isset($time[$row['PK']]) ? $time[$row['PK']] : null;\n\t\t}\n\t\t\t\n\t\treturn $this->_grouping->filter($result);\n\t}", "public static function execute()\n {\n if(DEBUG_QUERIES)\n {\n $start = microtime();\n }\n $r = self::$stmt->execute();\n if(DEBUG_QUERIES)\n {\n $elapsed = round(microtime() - $start, 4);\n isset(Core::$benchmark['db']['count']) ? Core::$benchmark['db']['count']++ : Core::$benchmark['db']['count'] = 1;\n isset(Core::$benchmark['db']['elapsed']) ? (Core::$benchmark['db']['elapsed']+$elapsed) : Core::$benchmark['db']['elapsed'] = $elapsed;\n }\n if(self::$stmt->errorCode() !== '00000')\n {\n trigger_error(json_encode(self::$stmt->errorInfo()));\n }\n return $r;\n }", "public function getQueryTime()\n {\n return $this->queryTime;\n }", "public function getQueryTime()\n {\n return $this->queryTime;\n }", "public function testResultFetchRow()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchRow(DB::FETCH_ORDERED));\n \t$this->assertEquals(array('id'=>2, 'key'=>'two', 'title'=>'next row', 'status'=>'ACTIVE'), $result->fetchAssoc(DB::FETCH_ASSOC));\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE', 'id'=>3, 'key'=>'three', 'title'=>'another row', 'status'=>'PASSIVE'), $result->fetchRow(DB::FETCH_FULLARRAY));\n \t$this->assertNull($result->fetchRow(DB::FETCH_ORDERED));\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE'), $result->fetchRow(DB::FETCH_ASSOC));\n \t$this->assertEquals(2, $result->fetchRow(DB::FETCH_VALUE), \"Fetch after reset pointer: \");\n }", "protected function getTime()\n {\n return microtime(true);\n }", "protected function getTime() {\n return microtime(true);\n }", "public static function showsql(){\n echo self::table()->last_sql;\n die;\n }", "public function getRows()\n {\n \treturn $this->previouslyExecuted->fetch_array(MYSQLI_ASSOC);\n }", "function devlyQueries() {\n\t\n\techo 'ran ' . get_num_queries() . ' queries in ' . timer_stop(1) . ' seconds';\n\t\n}", "protected function startTime()\n {\n return microtime(true);\n }", "function logs_tbl()\n {\n // SELECT \n }", "#[@test]\n public function unbufferedReadOneResult() {\n $this->createTable();\n $db= $this->db();\n\n $q= $db->open('select * from unittest');\n $this->assertEquals(array('pk' => 1, 'username' => 'kiesel'), $q->next());\n\n $this->assertEquals(1, $db->query('select 1 as num')->next('num'));\n }", "function getProfile()\n{\n\tglobal $time_start, $db;\n\n\t$start = $time_start;\n\t$end = gettimeofday();\n\t$dbcalls = count($db->queries);\n\t$dbtime = $db->time;\n\n\t$total = (float)($end['sec'] - $start['sec']) + ((float)($end['usec'] - $start['usec'])/1000000);\n\t$script = $total - $dbtime;\n\t$scriptper = $script / $total;\n\n\t$ret = round($total, 3) . 's, ' . round(100 * $scriptper, 1) . '% PHP, ' . round(100* (1 - $scriptper), 1) . '% SQL with ' . $dbcalls . ' ' . makeLink('queries', $_SERVER['QUERY_STRING'] . '&sqlprofile');\n\n\treturn $ret;\n}", "public function getConnectionTime()\n {\n return $this->info->connect_time * 1000;\n }", "public function testPrepareLoad_Ordered()\n {\n \t$qs = $this->conn->prepare('SELECT * FROM test');\n \t$this->assertEquals(array(2, 'two', 'next row', 'ACTIVE'), $qs->load(2, DB::FETCH_ORDERED));\n }", "private function get_rows()\n {\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n\n // IF : hits should counted\n if ( $this->ts_countHits() )\n {\n // 1. step: filter items with one hit at least\n $arr_return = $this->get_rowsWiHits();\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n return $arr_return;\n }\n $rows = $arr_return[ 'data' ][ 'rows' ];\n // 1. step: filter items with one hit at least\n }\n // IF : hits should counted\n // 2. step: all filter items, hits will be taken from $rows\n $arr_return = $this->get_rowsAllItems( $rows );\n\n return $arr_return;\n }", "private function fetchConnections() {\t\t\n\t\t$query = Registry::get(\"database\")->query(\"SELECT * FROM security WHERE type=\".$this->id.\" AND ip='\".SecurityManager::$IP.\"' AND timestamp > (NOW() - INTERVAL \".$this->timeframe.\")\") or die(Registry::get(\"database\")->getError());\n\t\tif ($query) {\n\t\t\treturn $query->rowCount();\n\t\t}\n\t\treturn 0;\n\t}", "public function fetchRows( $type = FETCH_OBJ );", "public function testResultFetchOrdered()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test WHERE status='ACTIVE'\");\n \t\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(2, 'two', 'next row', 'ACTIVE'), $result->fetchOrdered());\n \t$this->assertNull($result->fetchOrdered());\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchOrdered(), \"Fetch after reset pointer: \");\n }", "public function testQueryFetchNum() {\n $records = [];\n $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25], ['fetch' => \\PDO::FETCH_NUM]);\n foreach ($result as $record) {\n $records[] = $record;\n $this->assertIsArray($record);\n $this->assertArrayHasKey(0, $record);\n $this->assertSame('John', $record[0]);\n }\n\n $this->assertCount(1, $records, 'There is only one record');\n }", "function get_debug_info($query)\n\t{\n\t\t$data = array();\n\t\tif (substr(trim(strtoupper($query)), 0, 6) == 'SELECT') {\n\t\t\tif (!pg_send_query($this->connection, \"EXPLAIN $query\"))\n\t\t\t{\n\t\t\t\t$err = pg_get_result($this->connection);\n\t\t\t\terror(PDNSADMIN_QUERY_ERROR, pg_result_error($err), $query, 0);\n\t\t\t} else {\n\t\t\t\t$result = pg_get_result($this->connection);\n\t\n\t\t\t\tif (false === $this->last)\n\t\t\t\t{\n\t\t\t\t\terror(PDNSADMIN_QUERY_ERROR, pg_result_error($err), $query, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = pg_fetch_array($result);\n\t\t}\n\t\treturn $data;\n\t}", "function database_query($database_query)\n {\n // EXECUTE QUERY\n $query_timer_start = getmicrotime();\n $query_result = mysql_query($database_query, $this->database_connection);\n $query_timer_end = getmicrotime();\n $query_timer_total = round($query_timer_end-$query_timer_start, 7);\n \n // LAST QUERY INFO\n $this->_last_query = $database_query;\n $this->_last_resource = $query_result;\n\t \n // RETURN IF NOT LOGGING STATS\n switch( TRUE )\n {\n case (!$this->log_stats):\n case ( $query_result && (SE_DATABASE_LOG_SUCCESS & ~ $this->log_trigger)):\n case (!$query_result && (SE_DATABASE_LOG_FAIL & ~ $this->log_trigger)):\n case ($query_timer_total< $this->log_slow_threshold && (SE_DATABASE_LOG_FAST & ~ $this->log_trigger)):\n case ($query_timer_total>=$this->log_slow_threshold && (SE_DATABASE_LOG_SLOW & ~ $this->log_trigger)):\n return $query_result;\n break;\n }\n \n \n // STATS\n $log_data = array('index' => count($this->log_data));\n $this->log_data_totals['total']++;\n \n // QUERY\n if( $this->log_options & SE_DATABASE_LOGOPTS_QUERY )\n {\n // When making hash, remove timestamps\n $log_data['query_hash'] = md5(preg_replace('/\\d{10}/', '', $database_query));\n $log_data['query'] = $database_query;\n }\n \n // TIME\n if( $this->log_options & SE_DATABASE_LOGOPTS_TIME )\n {\n $log_data['time'] = $query_timer_total;\n $this->log_data_totals['time'] += $query_timer_total;\n }\n \n // BACKTRACE\n if( $this->log_options & SE_DATABASE_LOGOPTS_BACKTRACE )\n {\n $backtrace = debug_backtrace();\n foreach( $backtrace as $backtrace_index=>$single_backtrace )\n if( !empty($backtrace[$backtrace_index]['file']) )\n $backtrace[$backtrace_index]['file_short'] = str_replace($this->root_folder, '', $backtrace[$backtrace_index]['file']);\n \n $log_data['backtrace'] = &$backtrace;\n }\n \n // RESULT\n if( $this->log_options & SE_DATABASE_LOGOPTS_RESULT )\n {\n $log_data['result'] = ( $query_result ? TRUE : FALSE );\n \n if( $query_result )\n $this->log_data_totals['success']++;\n else\n $this->log_data_totals['failed']++;\n }\n \n // COUNT\n if( $this->log_options & SE_DATABASE_LOGOPTS_COUNT )\n {\n $result_count = 0;\n \n if( $query_result && !$result_count )\n $result_count = $this->database_affected_rows();\n \n if( $query_result && !$result_count )\n $result_count = $this->database_num_rows($query_result);\n \n $log_data['count'] = $result_count;\n }\n \n // GET ERROR\n if( $this->log_options & SE_DATABASE_LOGOPTS_ERROR )\n {\n $log_data['error'] = ( $query_result ? FALSE : $this->database_error() );\n }\n \n // GET THRESHOLD COLOR\n foreach( $this->query_thresholds as $threshold_time=>$threshold_color )\n {\n if( (float)$query_timer_total>(float)$threshold_time )\n continue;\n \n $log_data['color'] = $threshold_color;\n break;\n }\n \n // ADD TO LOG\n $this->log_data[] = $log_data;\n \n // RETURN\n\t return $query_result;\n\t}", "function fetchCount();", "public function load_agent_log(){\n\t$stmt = $this->connection()->query(\"SELECT * FROM call_log\");\n\treturn $stmt;\n\n}", "private static function fetchLogResult(&$result) {\n\t\twhile ($myrow = self::$db->fetchArray($result)) {\n\t\t\tself::addLog($myrow['Table'].' - '.$myrow['Op'].' - '.$myrow['Msg_type'].' - '.$myrow['Msg_text']);\n\t\t}\n\t}", "private function retrieveData(){\n\t\t\n\t\t$dbo=new DB();\n\t\t$db=$dbo->db;\n\t\t$stmt = $db->prepare(\t'SELECT `description`, '.\n\t\t\t\t\t\t\t\t\t\t'`duration` '.\n\t\t\t\t\t\t\t\t'FROM `status` '.\t\t\n\t\t\t\t\t\t\t\t'WHERE `status` = ? '.\n\t\t\t\t\t\t\t\t'LIMIT 1'\n\t\t\t\t\t\t\t\t);\n\t $stmt->bind_param(\"s\", $this->id);\n\t $stmt->bind_result($this->description,$this->duration);\n\t $stmt->execute();\n\t $stmt->fetch();\n \t\t$stmt->close();\n \t\t\n\t}", "abstract protected function fetchRowAssocDb();", "abstract public function FetchRow();", "function query_time_function($user_key,$search_query,$mysqli)\n{\n\t//$mysqli->query($query)or die($mysqli->error.__LINE__);;//_LINE current code row numbers\n\t$query=\"SELECT * FROM query_record \n\t\t\tWHERE user_id ='$user_key' AND query='$search_query' \n\t\t\tORDER BY `query_record`.`time` DESC \n\t\t\tLIMIT 0 , 1\";\n\t$result = $mysqli->query($query);\n\t$row1=$result->fetch_array();\n\t//echo $row1['time'].\"使用者時間\\n\";\n\treturn $row1['time'];\n}", "public function testQueryFetchCol() {\n $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] > :age', [':age' => 25]);\n $column = $result->fetchCol();\n $this->assertCount(3, $column, 'fetchCol() returns the right number of records.');\n\n $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] > :age', [':age' => 25]);\n $i = 0;\n foreach ($result as $record) {\n $this->assertSame($column[$i++], $record->name, 'Column matches direct access.');\n }\n }", "public function getAffectedRows();", "public function getAffectedRows();", "static function &QueryFetch($id, $table, $where=NULL, $extra=NULL) {\n Profiler::StartTimer(\"DataManager::QueryFetch()\");\n Profiler::StartTimer(\"DataManager::QueryFetch($id)\", 3);\n $qstart = microtime(true);\n $result = NULL;\n $queryid = new DatamanagerQueryID($id);\n if ($source =& DataManager::PickSource($queryid)) {\n // Pull default caching policy from connection object, then force enabled/disable as requested\n $cache = $source->cachepolicy;\n if (!empty($queryid->args[\"nocache\"]))\n $cache = false;\n if (!empty($queryid->args[\"cache\"])) {\n $cache = any($source->cachepolicy, true);\n }\n $query = \"SELECT *\"; // FIXME - quick hack to trick CacheSet into thinking this is a simple select\n\n $foundincache = false;\n if ($cache) {\n //Profiler::StartTimer(\"DataManager::Query() - Check cache\");\n if (($cacheresult = $source->CacheGet($queryid, $query, $args)) !== NULL) {\n if ($cacheresult && !$cacheresult->isExpired()) {\n $result = $cacheresult->getPayload(false);\n $foundincache = true;\n }\n }\n //Profiler::StopTimer(\"DataManager::Query() - Check cache\");\n }\n\n if ($result === NULL && empty($queryid->args[\"nosource\"])) {\n $result = $source->QueryFetch($queryid, $table, $where, $extra);\n if ($cache && !$foundincache && !empty($result)) {\n $source->CacheSet($queryid, $query, $args, $result);\n }\n }\n }\n Profiler::StopTimer(\"DataManager::QueryFetch()\");\n Profiler::StopTimer(\"DataManager::QueryFetch($id)\");\n self::log(\"fetch\", $id, $table, $qstart, microtime(true));\n return $result;\n }", "public function get_query_log()\n {\n }", "function get($table_name,$row,$col,$attr){\n\t\t//echo( \"Starting scanner...\\n\" );\n\t\t$scan = new \\Hbase\\TScan(); \n\t\t$scan->filterString=\"TimestampsFilter(0,9999999999999999)\"; \n\t\t$scanner = $this->client->scannerOpenWithScan($table_name, $scan,[]); \n\n\t\twhile(true) { \n\t\t\t$get_arr = $this->client->scannerGetList($scanner,1); \n\t\t\tif(!$get_arr) break; \n\t\t\tdd($get_arr);\n\t\t\t// foreach ( $get_arr as $rowresult ){ \n\t\t\t\t// foreach ($rowresult as $k=>$item) { \n\t\t\t\t\t// echo \"row: \".$rowresult->{'row'}.\"\\n\"; \n\t\t\t\t\t// echo \"cols: \"; \n\t\t\t\t\t// print_r($rowresult->{'columns'} ); \n\t\t\t\t\t// echo \"-----\\n\"; \n\t\t\t\t// } \n\t\t\t// } \n\t\t} \n\t\t//$this->client->scannerClose($scan ); \n\t}", "private function _upTime() \n {\n return microtime(true) - $this->_startTime;\n }", "public static function queryStop()\n\t{\n\t\tif (static::isEnabled(static::DB_BENCHMARK))\n\t\t{\n\t\t\tstatic::$_query['time'] = microtime(true) - static::$_query['time'];\n\t\t\tstatic::$_queries[] = static::$_query;\n\t\t}\n\t}", "public function testResultGetStatement()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test WHERE status='ACTIVE'\");\n \t$this->assertEquals(\"SELECT * FROM test WHERE status='ACTIVE'\", $result->getStatement());\n }", "public function fetch(array $params) {\n\t\t\t$numrows = isset($params['pagesize']) ? $params['pagesize'] : 0;\n\t\t\t$page = isset($params['page']) ? intval($params['page']) : 0;\n\t\t\t$limit = ($numrows > 1) ? ' limit ' . ($page * $numrows) . ', ' . $numrows : ($numrows == 1 ? ' limit 1' : '');\n\t\t\t$desc = isset($params['desc']) ? ($params['desc'] ? ' desc' : $params['desc']) : 0;\n\t\t\t$order = isset($params['order']) ? $params['order'] : '`time`';\n\t\t\t$order = ($desc !== 0) ? \" order by $order $desc\" : '';\n\t\t\t$nocalc = isset($params['nocalc']) ? $params['nocalc'] : 0;\n\t\t\t$filter = isset($params['filter']) ? $params['filter'] : '';\n\t\t\t$group = isset($params['group']) ? \" group by {$params['group']}\" : '';\n\t\t\t$collumns = isset($params['collumns']) ? $params['collumns'] : '*';\n\t\t\t$countrows = $numrows != 1 && !$nocalc;\n\n\t\t\t$s = $this->dbc->select(\n\t\t\t\t\t$this->TBL_FETCH\n\t\t\t\t, \"{$filter}{$group}{$order}{$limit}\"\n\t\t\t\t, $countrows ? \"SQL_CALC_FOUND_ROWS $collumns\" : $collumns\n\t\t\t);\n\n\t\t\tif ($countrows && $s) {\n\t\t\t\t$s1 = $this->dbc->query('SELECT FOUND_ROWS()');\n\t\t\t\t$t = @mysql_fetch_row($s1);\n\t\t\t\t$total = $t[0];\n\t\t\t} else\n\t\t\t\t$total = $s ? $this->dbc->rows($s) : 0;\n\n\t\t\t$this->data = array('result' => $s, 'data' => $this->dbc->fetchrows($s), 'total' => intval($total));\n\t\t\t$link = &$this->data;\n\t\t\treturn $link;\n\t\t}", "public function testResultFetchValue()\n {\n \t$result = $this->conn->query(\"SELECT title FROM test WHERE status='ACTIVE'\");\n \t\n \t$this->assertEquals('first row', $result->fetchValue());\n \t$this->assertEquals('next row', $result->fetchValue());\n \t$this->assertNull($result->fetchValue());\n \t\n \t$result->resetPointer();\n \t$this->assertEquals('first row', $result->fetchValue(), \"Fetch after reset pointer: \");\n }", "public function logPerformance();", "public function logPerformance();", "private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }", "function database_benchmark_sort()\n {\n if( !function_exists('dbtimecmp') )\n {\n function dbtimecmp($a, $b)\n {\n //return ( $a['time']==$b['time'] ? 0 : ($a['time']<$b['time'] ? -1 : 1) );\n return ( (float)$a['time']==(float)$b['time'] ? 0 : ((float)$a['time']>(float)$b['time'] ? -1 : 1) );\n }\n }\n \n usort($this->log_data, 'dbtimecmp');\n \n return '';\n }", "public abstract function FetchRow();", "function rows($res){\t\n\t\treturn(0);\n\t}", "function get_num_queries()\n {\n }", "public function testQueryFetchRow()\n {\n $row = $this->getConnection()->query()('SELECT \"Hello World\"')()('fetch')();\n return $this->assertTrue(count($row['rows']) === 1);\n }", "function db_fetch_next_row( $fetch_mode = DB_FETCHMODE_ASSOC ) {\n\n $this->pm_clear_cols();\n if( ! is_object( $this->dataset_obj )) return NULL;\n\n $this->curr_row_array = $this->dataset_obj->fetchRow( $fetch_mode );\n $this->pm_die_if_error( 'curr_row_array' );\n\n if( is_array( $this->curr_row_array )) { # Some data was retrieved\n $this->curr_rowno++;\n $this->cols_in_curr_row = count( $this->curr_row_array );\n }\n\n return $this->curr_row_array;\n }", "protected function analyzeCachingTables() {}", "public function test_get_rows_since(){\n\t\t$listotron = new Listotron();\n\n\t\t$user1 = md5(rand() . md5(rand()));\n\t\t$user2 = md5(rand() . md5(rand()));\n\t\t$then = $listotron->getNOW();\n\t\tusleep(500);\n\t\t$listotron->updateNOW();\n\t\t$lmb = json_decode(\"{ \\\"$user1\\\" : \\\"$then\\\" }\");\n\t\t$now = $listotron->getNOW();\n\t\t\n\t\t// modify the List\n\t\t$rows = $listotron->outdent(4, $user1);\n\n\t\t// now get the rows changed by not me\n\t\t// since before NOW()\n\t\t$rows = $listotron->getAllRowsSince($lmb, $user2);\n\t\t$this->assertEqual(count($rows), 3);\n\t\t\n\t\t$this->assertEqual($rows[0][\"row_id\"], 4);\n\t\t$this->assertEqual($rows[0][\"par\"], null);\n\t\t$this->assertEqual($rows[0][\"prev\"], 1);\n\t\t$this->assertEqual($rows[0][\"lm\"], $now);\n\t\t$this->assertEqual($rows[0][\"lmb\"], $user1);\n\t\t\n\t\t$this->assertEqual($rows[1][\"row_id\"], 5);\n\t\t$this->assertEqual($rows[1][\"par\"], 4);\n\t\t$this->assertEqual($rows[1][\"prev\"], null);\n\t\t$this->assertEqual($rows[1][\"lm\"], $now);\n\t\t$this->assertEqual($rows[1][\"lmb\"], $user1);\n\n\t\t$this->assertEqual($rows[2][\"row_id\"], 6);\n\t\t$this->assertEqual($rows[2][\"par\"], 4);\n\t\t$this->assertEqual($rows[2][\"prev\"], 5);\n\t\t$this->assertEqual($rows[2][\"lm\"], $now);\n\t\t$this->assertEqual($rows[2][\"lmb\"], $user1);\n\t}", "function RowCount() {}", "public function rowCount() {}", "public function profileSql($time, $sql) {\n\t\tif (!is_null(CWebUser::$data) && isset(CWebUser::$data['debug_mode'])\n\t\t\t\t&& CWebUser::$data['debug_mode'] == GROUP_DEBUG_MODE_DISABLED) {\n\t\t\treturn;\n\t\t}\n\n\t\t$time = round($time, 6);\n\n\t\t$this->sqlTotalTime += $time;\n\t\t$this->sqlQueryLog[] = array(\n\t\t\t$time,\n\t\t\t$sql,\n\t\t\tarray_slice(debug_backtrace(), 1)\n\t\t);\n\t}", "public function loadInfo()\n\t{\n\t\t$this->_info = $this->_adapter->describeTable($this->_identifier);\n\t}", "function tigcache($query, $cache_time, $assume_single)\n {\n $result = DB::select(DB::raw($query));\n\n if ($assume_single && !empty($result))\n {\n return get_object_vars($result[0]);\n }\n\n $result_array = array();\n foreach ($result as $row)\n {\n $result_array[] = get_object_vars($row);\n }\n\n return $result_array;\n }" ]
[ "0.62679994", "0.62127143", "0.6131634", "0.5958104", "0.58897465", "0.5880127", "0.58050627", "0.57809615", "0.57614666", "0.56341356", "0.546342", "0.5461449", "0.5458789", "0.54526335", "0.5442443", "0.54390275", "0.5380271", "0.5348849", "0.5335372", "0.5319384", "0.53098285", "0.5298321", "0.52912277", "0.52847314", "0.5265484", "0.52637535", "0.52523327", "0.52469397", "0.5238462", "0.5225883", "0.5218236", "0.52136666", "0.52111536", "0.52031296", "0.5198854", "0.51902276", "0.51746947", "0.51723623", "0.5166607", "0.51532817", "0.5146704", "0.5141943", "0.51227105", "0.51154375", "0.511248", "0.509812", "0.509812", "0.50914836", "0.5090263", "0.50812596", "0.5066373", "0.50600326", "0.5059342", "0.5055571", "0.5053568", "0.5051013", "0.5047553", "0.5027698", "0.501681", "0.5008572", "0.4997624", "0.49973923", "0.49947706", "0.49858773", "0.49692857", "0.49682558", "0.49609298", "0.49571246", "0.49553967", "0.49519685", "0.49424285", "0.49403295", "0.49274415", "0.49257904", "0.49247172", "0.49247172", "0.4921967", "0.49196988", "0.4917077", "0.4906684", "0.49057475", "0.48991674", "0.48899397", "0.48778892", "0.48687437", "0.48687437", "0.48571762", "0.48569518", "0.485546", "0.48535025", "0.48518425", "0.48412865", "0.48391837", "0.48309955", "0.4827228", "0.4824912", "0.4821674", "0.48214778", "0.48186877", "0.48173606" ]
0.53150696
20
Return an instance of DOMDocument constructed with the property of results
protected function getDom() { if (! isset($this->dom)) { $dom = new DOMDocument(); if (is_null($this->getResults())) { throw new \RuntimeException('There doesnt appear to be any results to load'); } // suppress warning but throw Exception if (! @$dom->loadXML($this->getResults())) { throw new \RuntimeException('Could not load results into DOMDocument'); } $this->dom = $dom; } return $this->dom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "public function executeDom()\n {\n $xml = $this->execute();\n\n // create new DOMDocument and load the response text.\n $dom = new \\DOMDocument();\n $dom->loadXML($xml);\n\n return $dom;\n }", "public function createQuery() {\n return new XML\\DOM();\n }", "public function getDomDocument() {}", "public function getDOMDocumentObject() {\n if (!(isset($this->_domDocument) && $this->_domDocument instanceof DOMDocument)) {\n $this->_domDocument = new DOMDocument;\n $this->_domDocument->preserveWhiteSpace = FALSE;\n }\n return $this->_domDocument;\n }", "public function toDomDocument() : DOMDocument\n {\n $document = new DOMDocument();\n $document->appendChild($this->toDomElement($document));\n return $document;\n }", "protected function load_dom()\n\t{\n\t\tif ($this->dom)\n\t\t{\n\t\t\treturn $this->dom;\n\t\t}\n\n\t\t$output = $this->ci->output->get_output();\n\n\t\t$this->dom = new DOMDocument;\n\t\tlibxml_use_internal_errors(TRUE);\n\t\t$this->dom->loadHTML($output);\n\t\tlibxml_clear_errors();\n\n\t\treturn $this->dom;\n\t}", "public function getDOMDocument(): DOMDocument\n {\n $dom = new DOMDocument();\n\n $dom->loadXML($this->document);\n return $dom;\n }", "public function createXmlDocument()\n {\n $dom = new \\DOMDocument('1.0');\n $dom->formatOutput = true;\n\n return $dom;\n }", "public function __construct (DOMDocument $doc) {}", "public function __construct(DomDocument $dom) {\n $this->totalResultsAvailable = (int) $dom->documentElement->getAttribute('totalResultsAvailable');\n $this->totalResultsReturned = (int) $dom->documentElement->getAttribute('totalResultsReturned');\n $this->firstResultPosition = (int) $dom->documentElement->getAttribute('firstResultPosition');\n\n $this->_dom = $dom;\n \t$this->_xpath = new DOMXPath($dom);\n\n \t$this->_xpath->registerNamespace(\"yh\", $this->_namespace);\n\n \t$this->_results = $this->_xpath->query(\"//yh:Result\");\n }", "public static function from_dom(DOMElement $dom) {\n\t\t$xrd = new XRD();\n\n\t\tforeach ($dom->childNodes as $node) {\n\t\t\tif (!isset($node->tagName)) continue;\n\n\t\t\tswitch($node->tagName) {\n\t\t\t\tcase 'Expires':\n\t\t\t\t\t$xrd->expires = $node->nodeValue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Subject':\n\t\t\t\t\t$xrd->subject = $node->nodeValue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Alias':\n\t\t\t\t\t$xrd->alias[] = $node->nodeValue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Property':\n\t\t\t\t\t$property = XRD_Property::from_dom($node);\n\t\t\t\t\t$xrd->property[] = $property;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Link':\n\t\t\t\t\t$link = XRD_Link::from_dom($node);\n\t\t\t\t\t$xrd->link[] = $link;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $xrd;\n\t}", "public function create($source) {\n $markup = $this->markupProvider->getMarkup($source);\n $domDocument = new DOMDocument();\n $domDocument->formatOutput=false;\n $domDocument->preserveWhiteSpace=false;\n @$domDocument->loadHTML($markup, LIBXML_HTML_NODEFDTD);\n return $domDocument;\n }", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Factuurmaand');\n\t}", "public function to_dom($dom = null) {\n\t\tif ($dom == null) {\n\t\t\t$dom = new DOMDocument();\n\t\t}\n\n\t\t$xrd_dom = $dom->createElementNS(XRD::XML_NS, 'XRD');\n\t\t$dom->appendChild($xrd_dom);\n\n\t\tif ($this->expires) {\n\t\t\t$expires_dom = $dom->createElement('Expires', $this->expires);\n\t\t\t$xrd_dom->appendChild($expires_dom);\n\t\t}\n\n\t\tif ($this->subject) {\n\t\t\t$subject_dom = $dom->createElement('Subject', $this->subject);\n\t\t\t$xrd_dom->appendChild($subject_dom);\n\t\t}\n\n\t\tforeach ($this->alias as $alias) {\n\t\t\t$alias_dom = $dom->createElement('Alias', $alias);\n\t\t\t$xrd_dom->appendChild($alias_dom);\n\t\t}\n\n\t\tforeach ($this->property as $property) {\n\t\t\t$property_dom = $property->to_dom($dom);\n\t\t\t$xrd_dom->appendChild($property_dom);\n\t\t}\n\n\t\tforeach ($this->link as $link) {\n\t\t\t$link_dom = $link->to_dom($dom);\n\t\t\t$xrd_dom->appendChild($link_dom);\n\t\t}\n\n\t\treturn $dom;\n\t}", "public function __construct(DOMElement $result)\n {\n $this->_fields = ['Summary', 'MimeType', 'ModificationDate'];\n parent::__construct($result);\n\n $this->_xpath = new DOMXPath($result->ownerDocument);\n $this->_xpath->registerNamespace('yh', $this->_namespace);\n\n // check if the cache section exists\n $cacheUrl = $this->_xpath->query('./yh:Cache/yh:Url/text()', $result)->item(0);\n if ($cacheUrl instanceof DOMNode)\n {\n $this->CacheUrl = $cacheUrl->data;\n }\n $cacheSize = $this->_xpath->query('./yh:Cache/yh:Size/text()', $result)->item(0);\n if ($cacheSize instanceof DOMNode)\n {\n $this->CacheSize = (int) $cacheSize->data;\n }\n }", "public function getDocument(): Document {\n $document = new Document($this->_document->xmlVersion, $this->_document->xmlEncoding);\n foreach ($this->_document->childNodes as $node) {\n $this->addNode($document, $node);\n }\n return $document;\n }", "public function __toDOM() {\n // Basically, use a JSX-ish syntax to do so and just\n // return the DOM fragment that had been built.\n // A DOM interpreter will turn that into an actual HTML\n // output. Something that could be used here is caching, where\n // a presenter could mark itself as being cacheable OR it\n // could dynamicaly allocate cached states of itself and just skip\n // processing itself entirely. It may only do so for fragments within too.\n return (<div class=\"articles\">\n // ...\n </div>);\n }", "public function __construct (DomDocument $doc) {}", "protected function createResultObject() {\n\t\t$result = new Result();\n\t\treturn $result;\n\t}", "public function getDocument() {\n $document = new Document();\n $document->registerNamespace('json', self::XMLNS_JSONX);\n $this->addNode($document, $this->_document->documentElement);\n return $document;\n }", "function htmlSoupToDOMDocument($html, $logPrefix = null) {\n $prevUseExtErrorsVal = libxml_use_internal_errors(true);\n\n $dom = new DOMDocument();\n $dom->loadHTML($html);\n\n # Output (if requested) and then clear the errors that libxml produced...\n if ($logPrefix !== null) {\n # TODO: We should not be directly accessing logging library here!\n foreach (libxml_get_errors() as $error) warn($logPrefix . \": \" . trim($error->message));\n }\n libxml_clear_errors();\n\n libxml_use_internal_errors($prevUseExtErrorsVal);\n return $dom;\n}", "private static function getDoc()\r\n {\r\n if (self::$docXML == null) {\r\n self::$docXML = new \\DOMDocument();\r\n self::$docXML->load(XML_SLIDER);\r\n }\r\n \r\n return self::$docXML;\r\n }", "protected function _as_doc($result){\n return new CouchDocument($this, $result);\n }", "private function createXmlDocument($html)\n {\n $xmlDocument = new \\DOMDocument;\n $xmlDocument->strictErrorChecking = false;\n $xmlDocument->formatOutput = true;\n $libXmlState = libxml_use_internal_errors(true);\n $xmlDocument->loadHTML($this->unifyHtml($html));\n libxml_clear_errors();\n libxml_use_internal_errors($libXmlState);\n\n $this->ensureExistenceOfBodyElement($xmlDocument);\n\n return $xmlDocument;\n }", "public function getDomDocument()\n {\n return $this->xmlDocument;\n }", "private function getNodesFromQueryResult($propResult, $node=null){\t\n\t\tif(is_array($propResult)){\n\t\t\tforeach ($propResult as $value){\n\t\t\t\t $values[] = new Node($value['fulltext'], $value['fullurl'], $node);\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Representacions');\n\t}", "protected function dom_init() {\r\n\t\t\r\n\t\t// severe hack!\r\n\t\t//$this->code = preg_replace(' xmlns=\"[^\"]*?\"', '', $this->code);\r\n\t\t/*print('XXX9o9beep19o9XXX\r\n');\r\n\t\tprint('$this->code in dom_init: ' . $this->code);\r\n\t\tprint('\r\nXXX9o9beep29o9XXX\r\n');*/\r\n\t\tif($this->dom) {\r\n\t\t\treturn $this->xpath_init();\r\n\t\t}\r\n\t\tif($this->xpath) {\r\n\t\t\t$this->xpath = false;\r\n\t\t}\r\n\t\t// HTML5?\r\n\t\tif($this->config['use_local_DTD']) {\r\n\t\t\tpreg_match('/(<!DOCTYPE\\s*html\\s*PUBLIC\\s*\"[^\"]*\"\\s*\")([^\"]*)(\">)/is', $this->code, $matches);\r\n\t\t\t$this->temp_DTD_file = $matches[2];\r\n\t\t\t$this->code = str_replace($matches[1] . $matches[2] . $matches[3], $matches[1] . DTD::getDTDfile() . $matches[3], $this->code);\r\n\t\t}\r\n\t\t//print('this->config[\\'encoding\\'] 1: ');var_dump($this->config['encoding']);\r\n\t\t//ReTidy::updateEncoding();\r\n\t\t//ReTidy::convert_to($this->config['encoding']);\r\n\t\t//print('this->config[\\'encoding\\'] 2: ');var_dump($this->config['encoding']);\r\n\t\t//$this->dom = new DOMDocument('1.0', $this->config['encoding']);\r\n\t\t//$this->dom = new DOMDocument('1.0', $this->config['encoding']);\r\n\t\t$this->dom = new DOMDocument('1.0', 'utf-8');\r\n\t\tif(!$this->dom) {\r\n\t\t\t$this->logMsg(self::$lang['dom_init_error']);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->dom->resolveExternals = true;\r\n\t\t\r\n\t\t//$this->dom->preserveWhiteSpace = false;\r\n\t\tif(!$this->dom->loadXML($this->code)) {\r\n\t\t\t$this->dom->loadHTML($this->code);\r\n\t\t}\r\n\t\t//$this->dom->formatOutput = true;\r\n\t\t//if(isset($this->config['encoding'])) {\r\n\t\t//\t// this should be set by cleanCode\r\n\t\t//\t$this->dom->encoding = $this->config['encoding'];\r\n\t\t//} else {\r\n\t\t//\t$this->dom->encoding = 'iso-8859-1';\r\n\t\t//}\r\n\r\n\t\t$this->logMsg('dom_init = true');\r\n\t\treturn $this->xpath_init();\r\n\t}", "public function getDocument(){\n $this->endElement();\n $this->endDocument();\n return $this->outputMemory();\n }", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Tchat');\n\t}", "protected function loadNlmxmlDom()\n {\n $this->nlmxmlDom = new DOMDocument;\n return $this->nlmxmlDom->loadXML(file_get_contents($this->inputFile));\n }", "private static function _get_parsed_dom($content) {\n $dom = new DOMDocument();\n libxml_use_internal_errors(TRUE);\n $dom->loadHTML($content);\n $libxml_errors = libxml_get_errors();\n $actual_errors = array();\n foreach ($libxml_errors as $error) {\n if ($error->level == LIBXML_ERR_ERROR || $error->level == LIBXML_ERR_FATAL) {\n $msg = $error->message;\n $line = $error->line;\n self::$error_msg[] = \"HTML Parse Error: $msg (Line $line)\";\n }\n }\n libxml_clear_errors(); // clear error buffer\n if (count($actual_errors) !== 0) {\n return new DOMDocument();\n }\n return $dom;\n }", "public function document(): DocumentNode\n {\n return ASTHelper::cloneNode($this->documentNode);\n }", "public function getDOMDocumentFromContent($content = '')\n {\n libxml_use_internal_errors(true);\n\n $doc = new \\DOMDocument();\n $doc->loadHTML($content);\n\n libxml_use_internal_errors(false);\n\n return $doc;\n }", "public function build()\n {\n if(($document = $this->getDocument()) === null) {\n $document = $this->loader->getInstance(NodeLoader::DOCUMENT_NODE);\n $this->setDocument($document);\n }\n\n if(($header = $document->getHeader()) === null) {\n $header = $this->loader->getInstance(NodeLoader::HEADER_NODE);\n $document->setHeader($header);\n }\n\n if(($supplier = $header->getSupplier()) === null) {\n $supplier = $this->loader->getInstance(NodeLoader::SUPPLIER_NODE);\n $header->setSupplier($supplier);\n }\n\n if(($catalog = $header->getCatalog()) === null) {\n $catalog = $this->loader->getInstance(NodeLoader::CATALOG_NODE);\n $header->setCatalog($catalog);\n }\n\n if(($datetime = $catalog->getDateTime()) === null) {\n $datetime = $this->loader->getInstance(NodeLoader::DATE_TIME_NODE);\n $catalog->setDateTime($datetime);\n }\n\n if(($newCatalog = $document->getNewCatalog()) === null) {\n $newCatalog = $this->loader->getInstance(NodeLoader::NEW_CATALOG_NODE);\n $document->setNewCatalog($newCatalog);\n }\n\n return $document;\n }", "public function read() {\n if ($this->_expires > 0) {\n $name = preg_replace(\n '([^A-Za-z\\d]+)', '_', get_class($this->_source)\n );\n $cacheData = $this->_cache->read(\n $name, $this->_identifier, $this->_expires\n );\n if ($cacheData) {\n $dom = new \\DOMDocument();\n $dom->loadXml($cacheData);\n return $dom;\n } else {\n $dom = $this->_source->read();\n $this->_cache->write(\n $name, $this->_identifier, $this->_expires, $dom->saveXml()\n );\n return $dom;\n }\n }\n return NULL;\n }", "function getXMLResult($sql) {\n\t\tif ((! $res = $this->goSQL ( $sql )) || ($res->num_rows == 0))\n\t\t\treturn false;\n\t\t$xml = new XMLWriter ();\n\t\t$xml->openMemory ();\n\t\t$xml->startDocument ( \"1.0\", \"UTF-8\" );\n\t\t$xml->startElement ( \"items\" );\n\t\twhile ( $item = $res->fetch_assoc () ) {\n\t\t\t$xml->startElement ( \"item\" );\n\t\t\tforeach ( $item as $key => $value ) {\n\t\t\t\t$xml->writeElement ( $key, $value );\n\t\t\t}\n\t\t\t$xml->endElement ();\n\t\t}\n\t\t$xml->endElement ();\n\t\treturn $xml->outputMemory ();\n\t}", "function toXml() {\n $domtree = new DOMDocument('1.0', 'UTF-8');\n $this->addSelfToDocument($domtree, $domtree);\n return $domtree->saveXML();\n }", "public function getDomDocument($value)\n {\n if (is_array($value)) {\n $df = $this->createDocument($value);\n if ($df->hasChildNodes()) $this->doc->appendChild($df->cloneNode(true));\n return $this->doc;\n }\n else {\n\n }\n }", "public static function generate() {\n\t\tstatic::$document = new DOMDocument('1.0', 'UTF-8');\n\t\t\n\t\t// create our rss feed\n\t\t$rss = static::element('rss', null, array('version' => '2.0'));\n\t\tstatic::$document->appendChild($rss);\n\t\t\n\t\t// create channel\n\t\t$channel = static::element('channel');\n\t\t$rss->appendChild($channel);\n\t\n\t\t\t// title\n\t\t\t$title = static::element('title', Config::get('metadata.sitename'));\n\t\t\t$channel->appendChild($title);\n\n\t\t\t// link\n\t\t\t$link = static::element('link', 'http://' . $_SERVER['HTTP_HOST']);\n\t\t\t$channel->appendChild($link);\n\n\t\t\t// description\n\t\t\t$description = static::element('description', Config::get('metadata.description'));\n\t\t\t$channel->appendChild($description);\n\n\t\t// articles\n\t\t$params = array('status' => 'published', 'sortby' => 'id', 'sortmode' => 'desc');\n\n\t\tforeach(Posts::list_all($params) as $post) {\n\t\t\t$item = static::element('item');\n\t\t\t$channel->appendChild($item);\n\n\t\t\t\t// title\n\t\t\t\t$title = static::element('title', $post->title);\n\t\t\t\t$item->appendChild($title);\n\t\t\n\t\t\t\t// link\n\t\t\t\t$url = 'http://' . $_SERVER['HTTP_HOST'] . Url::make(IoC::resolve('posts_page')->slug . '/' . $post->slug);\n\t\t\t\t$link = static::element('link', $url);\n\t\t\t\t$item->appendChild($link);\n\t\t\t\n\t\t\t\t// description\n\t\t\t\t$description = static::element('description', $post->description);\n\t\t\t\t$item->appendChild($description);\n\t\t\t\t\n\t\t\t\t// date\n\t\t\t\t$date = static::element('pubDate', date(DATE_RSS, $post->created));\n\t\t\t\t$item->appendChild($date);\n\n\t\t}\n\n\t\t// dump xml tree\n\t\treturn static::$document->saveXML();\n\t}", "public function build()\n\t{\n\t\t$this->rssNode = $this->buildRssNode();\n\t\t$this->document->appendChild($this->rssNode);\n\n\t\treturn $this;\n\t}", "public function domElement(\\DOMDocument &$aframe_dom): DOMElement;", "protected function loadDomDocument()\n {\n $this->doc = new DomDocument();\n $this->doc->formatOutput = true;\n $this->doc->loadHtml(\n mb_convert_encoding($this->html, 'HTML-ENTITIES', 'UTF-8'),\n LIBXML_HTML_NODEFDTD\n );\n }", "function setDOMDocument(&$doc) \n\t{\t\n $this->_helper->setDOMDocument($doc);\n\t\t$this->type = null;\n\t\t$this->title = null;\t\t\n\t\t$this->datasources = new VDBIQueryType_Datasources($this);\n\t\t$this->tables = new VDBIQueryType_Tables($this);\n\t\t$this->table_relationships = new VDBIQueryType_RelationshipGroupList($this);\t\t\n\t\t$this->input_filters = new VDBIQueryType_FilterList($this,'input_filters');\n\t\t$this->summary_options = new VDBIQueryType_SummaryOptions($this);\n\t\t$this->groupings = new VDBIQueryType_FieldList($this,'groupings');\t\t\t\t\n\t\t$this->output_filters = new VDBIQueryType_FilterList($this,'output_filters');\n\t\t$this->labels = new VDBIQueryType_LabelList($this);\n\t\t$this->values = new VDBIQueryType_ValueList($this);\t\t\t\n\t}", "public function XMLResult2Object()\n {\n\n\n if(!empty($this->_xml_retorno) > 0){\n libxml_use_internal_errors(true);\n $xml = simplexml_load_string(strtr($this->_xml_retorno, array(' xmlns:'=>' ')),NULL,NULL,\"http://schemas.xmlsoap.org/soap/envelope/\");\n if(!isset($xml->xpath)){\n $xml =simplexml_load_string(strtr($this->_xml_retorno, array(' xmlns:'=>' ')));\n }\n\n if(is_object($xml)){\n $xml->registerXPathNamespace('S', 'http://schemas.xmlsoap.org/soap/envelope/');\n $xml->registerXPathNamespace('ns0', 'http://br.com.getnet.ecommerce.ws.service');\n $xpath = $xml->xpath('//result');\n if(empty($xpath)){ # caso seja um erro não tratavel\n $xpath = $xml->xpath('//*');\n }\n return $xpath;\n }else{\n $this->_errors = $this->setError(101,'Falha ao receber os dados do servidor da GETNET','Resposta inválida do servidor da GETNET.');\n return false;\n }\n }else{\n $this->_errors = $this->setError(101,'Falha ao receber os dados do servidor da GETNET','Tente novamente em alguns segundos.');\n return false;\n }\n }", "abstract function getAsElem($dom);", "final function getDocumentRootElement () { return new XDTNodeList($this->root); }", "public function readDOM ( ) {\n\n return $this->getStream()->readDOM();\n }", "public function getPromotionContentDOM() {\n\t\t$contentDOM = $this->getContentDOM();\n\t\t$xpath = new \\DOMXPath($contentDOM);\n\n\t\t$list = $xpath->query(\"//promotion/content\");\n\n\t\t$this->promotionContentDOM = new \\DOMDocument('1.0','UTF-8');\n\t\t$this->promotionContentDOM->loadXML($list->item(0)->textContent);\n\n\t\treturn $this->promotionContentDOM;\n\t}", "public function parserResult($result)\n {\n\n // for now return object\n return $result;\n }", "public function toDom() {\n $dom = new DOMDocument('1.0', 'utf-8');\n\n $entry = $dom->createElementNS(Client::SCHEMA_TYPES, self::NAME);\n $entry->setAttribute(self::ATTRIBUTE_KEY, $this->Key);\n\n if ($this->Street) {\n $street = $dom->createElement(self::ELEMENT_STREET, htmlspecialchars($this->Street));\n $entry->appendChild($street);\n }\n\n if ($this->City) {\n $city = $dom->createElement(self::ELEMENT_CITY, htmlspecialchars($this->City));\n $entry->appendChild($city);\n }\n\n if ($this->State) {\n $state = $dom->createElement(self::ELEMENT_STATE, htmlspecialchars($this->State));\n $entry->appendChild($state);\n }\n\n if ($this->CountryOrRegion) {\n $country = $dom->createElement(self::ELEMENT_COUNTRY_OR_REGION, htmlspecialchars($this->CountryOrRegion));\n $entry->appendChild($country);\n }\n\n if ($this->PostalCode) {\n $postalCode = $dom->createElement(self::ELEMENT_POSTAL_CODE, htmlspecialchars($this->PostalCode));\n $entry->appendChild($postalCode);\n }\n\n $dom->appendChild($entry);\n\n return $dom;\n }", "public function toDomElement(DOMDocument $document): DOMElement\n {\n return $document->createElement('version', $this->getVersion());\n }", "public function toDOMElement(DOMDocument $dom): DOMElement\n {\n $node = $dom->createElementNS(self::NODE_NS_URI, self::NODE_NS_NAME);\n\n foreach ($this->getAttributes() as $attr => $value) {\n $node->setAttribute($attr, $value);\n }\n\n // Payments Node\n foreach ($this->payments as $payment) {\n $paymentNode = $payment->toDOMElement($dom);\n $node->appendChild($paymentNode);\n }\n\n return $node;\n }", "public function __construct()\n {\n // create XML DOM object\n $this->xmldoc = new DOMDocument('1.0', 'utf-8');\n }", "public function toDomElement(DOMDocument $document): DOMElement\n {\n $element = $document->createElement('error');\n $element->appendChild($document->createElement('summary', $this->getSummary()));\n\n // Optional\n if (! empty($this->getDetail())) {\n $element->appendChild($document->createElement('detail', $this->getDetail()));\n }\n\n return $element;\n }", "public function build()\n {\n return $this->generateXml();\n }", "public function __toString()\r\n\t{\r\n\t\treturn $this->dom->saveXML();\r\n\t}", "protected function wrapResults($outputs)\n {\n return new Google_Documents_CopyDocument_Results($outputs);\n }", "function returnXPathObject($item)\n {\n $xmlPageDom = new DOMDocument(); // khoi tao DomDocument object\n libxml_use_internal_errors(true); // dom chuyen tu html5 -> html4\n @$xmlPageDom->loadHTML('<?xml encoding=\"utf-8\" ?>' . $item); // Loading html page\n $xmlPageXPath = new DOMXPath($xmlPageDom); // khoi tao XPath DOM object\n return $xmlPageXPath; // tra ve XPath object\n }", "protected function wrapResults($outputs)\n {\n return new Google_Documents_CreateEmptyDocument_Results($outputs);\n }", "public static function getDOMDocument($source) {\n\t\tif ($source instanceof DOMDOCUMENT)\n\t\t\treturn $source;\n\t\t$source = self::getDocumentID($source);\n\t\treturn $source\n\t\t\t? self::$documents[$id]['document']\n\t\t\t: null;\n\t}", "public function asRDF()\n\t{\n\t\tif (!$this->document) return $this->return_error('1');\n\t\t$dom = new DomDocument();\n\t\t@$dom->loadHtml($this->document);\n\t\t$xpath = new DomXpath($dom);\n\t\t$this->data = $this->usedata != '' ? $this->get_file_contents($this->usedata) : $this->get_file_contents($this->json_dataset($xpath, $this->url));\n\t\tif (!$this->data) return $this->return_error('2');\n\t\t$this->json = json_decode($this->data);\n\t\tif (!$this->json) return $this->return_error('3');\n\t\t$object = $this->json;\n\t\tif (isset($object->from)) $this->url = $this->return_url($object->from , $this->url);\n\t\t$xml = new DOMDocument('1.0', 'utf-8');\n\t\t$xml->preserveWhiteSpace = true;\n\t\t$xml->formatOutput = true;\n\t\t$root = $xml->createElementNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdf:RDF');\n\t\t$root->setAttribute(\"xml:base\", $this->url);\n\t\t$this->setXmlns($object, $root);\n\t\t$xml->appendChild($root);\n\t\t$documentTags = $dom->getElementsByTagName('*');\n\t\tforeach ( $documentTags as $documentTag ) {\n\t\t\t$this->json_query_rdf_properties($this->url, $object, $documentTag, $root, $xml, false);\n\t\t}\n\t\t$document = $xml->saveXML();\n\t\t$this->set_headers();\n\t\treturn $document;\n\t}", "abstract protected function buildData(DOMDocument $xml);", "public function __construct()\n\t{\n\t\t$this->type = 'html';\n\t\t\n\t\t$docTitle = 'PHP RUN-TEST RESULTS';\n\t\t\n\t\t// dom\n\t\t$imp = new DOMImplementation();\n\t\t$dtd = $imp->createDocumentType(\"html\", \"-//W3C//DTD XHTML 1.0 Transitional//EN\", \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\");\n \t$this->dom = $imp->createDocument(\"\", \"\", $dtd);\n\n \t// html\n \t$htmlNode = $this->dom->createElement('html');\n \t$this->dom->appendChild($htmlNode);\n \t\n \t// head\n \t$headNode = $this->dom->createElement('head');\n \t$htmlNode->appendChild($headNode);\n \t$headNode->appendChild($this->dom->createElement('title', $docTitle));\n \t\n \t// body\n \t$bodyNode = $this->dom->createElement('body');\n \t$htmlNode->appendChild($bodyNode);\n \t\n \t// stage\n \t$this->stage = $this->dom->createElement('div');\n \t$this->stage->setAttribute('id', 'stage');\n \t$bodyNode->appendChild($this->stage);\n \t\n \t$this->stage->appendChild($this->dom->createElement('h1', $docTitle));\n\t}", "protected function buildXml()\n\t{\n\t\t$xml = new DOMDocument('1.0', 'utf8');\n\t\t$cra_inquiry = $xml->createElement('LoanRecord');\n\t\t$cra_inquiry->appendChild($this->buildData($xml));\n\t\t\n\t\t$xml->appendChild($cra_inquiry);\n\t\t\n\t\treturn $xml;\n\t}", "public static function newSitemapDocument()\n {\n return simplexml_load_string('<?xml version=\"1.0\" encoding=\"UTF-8\"?>' .\n '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" />');\n }", "public static function newDocumentHTML($markup = null, $charset = null) : PhpQueryObject\n {\n $contentType = $charset ? \";charset=$charset\" : '';\n return self::newDocument($markup, \"text/html{$contentType}\");\n }", "protected function return_node_value($doc, $result = '') \n\t{\t\n\t\t$tmpdoc = new DOMDocument();\n\t\t$tmpdoc->appendChild($tmpdoc->importNode($doc, TRUE));\n\t\t$tmpdoc->formatOutput = true;\n\t\t$result .= $tmpdoc->saveXML();\n\t\t$result = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", \"&#xD;\"), '', $result);\n\t\t$result = trim(preg_replace('/<\\?xml.*\\?>/', '', $result, 1));\n\t\treturn $result;\n\t}", "abstract function build($result);", "public function toDomElement(DOMDocument $document): DOMElement\n {\n $response = $document->createElement('response');\n $response->setAttribute('xmlns', self::XML_NAMESPACE);\n\n $response->appendChild($this->getVersion()->toDomElement($document));\n\n if ($this->isSuccessful()) {\n $success = $document->createElement('success');\n $message = $document->createElement('message', $this->getSuccess());\n $response->appendChild($success);\n $success->appendChild($message);\n } else {\n // Get error element.\n $error = $document->createElement('error');\n\n // Append summary to error\n $summary = $document->createElement('summary', $this->getError()->getSummary());\n $error->appendChild($summary);\n\n // If error has detail, append it.\n if ($this->getError()->hasDetail()) {\n $detail = $document->createElement('detail', $this->getError()->getDetail());\n $error->appendChild($detail);\n }\n $response->appendChild($error);\n\n }\n\n return $response;\n }", "public static function newDocumentXML($markup = null, $charset = null) : PhpQueryObject\n {\n $contentType = $charset ? \";charset=$charset\" : '';\n\n return self::newDocument($markup, \"text/xml{$contentType}\");\n }", "function fetchDomNodes ($offset = 0, $limit = null)\n {\n $this->_enterSection('fetchDomNodes');\n $result = array();\n if ($this->_extractedNodes) {\n if ($this->_phpVersion == 5) {\n for ($i=$offset; $i < $this->_extractedNodes->length \n and (is_null($limit) or $i < $offset + $limit); $i++) {\n $result[] = $this->_extractedNodes->item($i); \n }\n } else {\n $this->_extractedNodes->rewind();\n for ($i=0; $i < $offset and $this->_extractedNodes->next(); $i++);\n for ($i=0; (is_null($limit) or $i < $limit) \n and $this->_extractedNodes->next(); $i++) {\n $result[] = $this->_extractedNodes->pointer;\n }\n }\n } else {\n if ($strings = $this->fetchStrings ($offset, $limit)) {\n $reconstructed = '<?xml version=\"1.0\"?>';\n $ns = $this->getNameSpaces();\n $nsDecl = array();\n foreach ($ns as $prefix => $uri) {\n $nsDecl[] = \"xmlns:$prefix=\\\"$uri\\\"\";\n }\n $reconstructed .= '<root ' . join(' ', $nsDecl) . '>' . \n join('',$strings) . '</root>';\n\n if ($this->_phpVersion == 5) {\n $dom = new DomDocument();\n $dom->loadXml($reconstructed);\n $nodeset = $dom->documentElement->childNodes;\n $ii = $nodeset->length;\n for ($i = 0; $i < $ii; $i++) {\n $result[] = $nodeset->item($i);\n }\n } else {\n // assuming PHP4\n $dom = domxml_open_mem ($reconstructed);\n $root = $dom->document_element();\n $result = $root->child_nodes();\n }\n }\n }\n $this->_leaveSection('fetchDomNodes');\n return $result;\n }", "public function setDomDocument(DOMDocument $dom)\n {\n $this->domDocument = $dom;\n return $this;\n }", "public function fetch_dom_doc( $doc_name ) {\n\t\tif ( ! is_string( $doc_name ) ) {\n\t\t\tthrow new InvalidArgumentException();\n\t\t}\n\t\t$doc = new DOMDocument();\n\t\t$sanitized_doc_name = $this->sanitize( $doc_name );\n\t\t$status = $doc->loadHTMLFile( PATH_HTML . $sanitized_doc_name,\n\t\t\tLIBXML_COMPACT /* Optimization. */\n\t\t\t| LIBXML_HTML_NODEFDTD /* Prevent a default doctype being added when one is not found. */\n\t\t);\n\t\tif ( false === $status ) {\n\t\t\tthrow new DocException( $sanitized_doc_name );\n\t\t}\n\t\treturn $doc;\n\t}", "public function returnResult() {\r\n\t\treturn $this->_html;\r\n\t}", "private function createRootElement(): \\DOMElement {\n $attribute = [\n 'office:version' => '1.2',\n 'xmlns:office' => 'urn:oasis:names:tc:opendocument:xmlns:office:1.0',\n 'xmlns:style' => 'urn:oasis:names:tc:opendocument:xmlns:style:1.0',\n 'xmlns:text' => 'urn:oasis:names:tc:opendocument:xmlns:text:1.0',\n 'xmlns:table' => 'urn:oasis:names:tc:opendocument:xmlns:table:1.0',\n 'xmlns:draw' => 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0',\n 'xmlns:fo' => 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0',\n 'xmlns:xlink' => 'http://www.w3.org/1999/xlink',\n 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',\n 'xmlns:meta' => 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0',\n 'xmlns:number' => 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0',\n 'xmlns:svg' => 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0',\n 'xmlns:chart' => 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0',\n 'xmlns:dr3d' => 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0',\n 'xmlns:math' => 'http://www.w3.org/1998/Math/MathML',\n 'xmlns:form' => 'urn:oasis:names:tc:opendocument:xmlns:form:1.0',\n 'xmlns:script' => 'urn:oasis:names:tc:opendocument:xmlns:script:1.0',\n 'xmlns:ooo' => 'http://openoffice.org/2004/office',\n 'xmlns:ooow' => 'http://openoffice.org/2004/writer',\n 'xmlns:oooc' => 'http://openoffice.org/2004/calc',\n 'xmlns:dom' => 'http://www.w3.org/2001/xml-events',\n 'xmlns:rpt' => 'http://openoffice.org/2005/report',\n 'xmlns:of' => 'urn:oasis:names:tc:opendocument:xmlns:of:1.2',\n 'xmlns:xhtml' => 'http://www.w3.org/1999/xhtml',\n 'xmlns:grddl' => 'http://www.w3.org/2003/g/data-view#',\n 'xmlns:tableooo' => 'http://openoffice.org/2009/table',\n 'xmlns:css3t' => 'http://www.w3.org/TR/css3-text/',\n 'xmlns:xforms' => 'http://www.w3.org/2002/xforms',\n 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',\n 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',\n 'xmlns:field' => 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0',\n 'xmlns:formx' => 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'];\n\n $rootElement = $this->createNewElement('office:document-content', $attribute);\n $bodyElement = $this->createNewElement('office:body', $attribute);\n $textElement = $this->createNewElement('office:text');\n\n $this->getDocument()->appendChild($rootElement);\n $rootElement->appendChild($bodyElement);\n $bodyElement->appendChild($textElement);\n\n return $textElement;\n }", "function domdoctoxpath($domdocinput) {\n //local variables clean themselves up, no need to unset.\n $newdomdoc = new SmartDOMDocument();\n $newdomdoc->appendChild($newdomdoc->importNode($domdocinput, true));\n $newxpathtable = new DOMXPath($newdomdoc);\n //DEBUG $image = $newdomdoc->saveHTMLExact();echo($image);\n return $newxpathtable;\n}", "function ilDOMXML ()\n\t{\n\t\t$num = func_num_args();\n\t\t$args = func_get_args();\n\t\t\n\t\tif (($num == 1) && is_object($args[0]))\n\t\t{\n\t\t\t$this->doc = $args[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->initNewDocument($args[0],$args[1],$args[2]);\n\t\t}\n\t}", "public function generateDom()\n {\n require_once 'Amazon/CloudFront.php';\n\n $dom = new DOMDocument();\n\n $root = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'DistributionConfig');\n $dom->appendChild($root);\n\n if (empty($this->_origin)) {\n require_once 'Amazon/CloudFront/Exception.php';\n throw new Amazon_CloudFront_Exception(\n \"DistributionConfig requires 'Origin'\");\n }\n $origin = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'Origin',\n $this->getOrigin());\n $root->appendChild($origin);\n\n $ref = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'CallerReference',\n $this->getCallerReference());\n $root->appendChild($ref);\n\n foreach ($this->getCname() as $cname) {\n $cnameElement = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'CNAME',\n $cname);\n $root->appendChild($cnameElement);\n }\n\n $comment = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'Comment',\n $this->getComment());\n $root->appendChild($comment);\n\n $enabled = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'Enabled',\n $this->isEnabled(true));\n $root->appendChild($enabled);\n\n return $dom;\n }", "protected function getRemoteDocument($url) {\n $feed_contents = file_get_contents($url);\n $dom = new \\DOMDocument();\n $dom->loadXML($feed_contents);\n return $dom;\n }", "function parseXMLResult($doc, &$result) {\n\tglobal $gbRepeatView;\n\n\t$result = array();\n\t$median = $doc->getElementsByTagName('median')->item(0); // This is the block of info representing ALL the data of the \"median\" run.\n\tif ( ! $median ) {\n\t\treturn;\n\t}\n\t$pageview = $median->getElementsByTagName( $gbRepeatView ? 'repeatView' : 'firstView' )->item(0); // change this to 'repeatView' for primed cache\n\tif ( ! $pageview ) {\n\t\treturn;\n\t}\n\n\t$result['medianRun'] = (int)$pageview->getElementsByTagName('run')->item(0)->nodeValue;\n}", "public function asXML();", "public function getDOM($type)\n {\n $variable = $type . 'DOM';\n if (isset($this->$variable)) {\n return $this->$variable;\n }\n throw new OpenDocument_Exception('No DOM for ' . $type);\n }", "private function __construct(){\r\n $this->dom = new DOMDocument();\r\n $this->xslt = new XSLTProcessor();\r\n }", "function printResults($us) \r\n{\r\n \theader('Content-type:text/xml;charset=\"utf-8\"');\r\n \t$xmlDoc = new MiniXMLDoc();\r\n \t$xmlRoot =& $xmlDoc->getRoot();\r\n \t$resultadosGenerales =& $xmlRoot->createChild('resultadosGenerales');\r\n\t$resultadosGenerales->attribute('resultado', 1); \r\n\t\r\n\t$op_tipo =& $resultadosGenerales->createChild('tipo');\r\n\t$op_tipo->text($us->getTipo());\r\n\t\r\n\t$op_usuario =& $resultadosGenerales->createChild('usuario');\r\n\t$op_usuario->text($us->getUsuario());\r\n\t\r\n\t$op_clave =& $resultadosGenerales->createChild('clave');\r\n\t$op_clave->text($us->getClave());\r\n\t\r\n\tprint html_entity_decode($xmlDoc->toString(MINIXML_NOWHITESPACES));\r\n}", "protected function _document( $html ) {\n\t\t$reporting = error_reporting( 0 );\n\t\t$Document = DomDocument::loadHTML( $html );\n\t\terror_reporting( $reporting );\n\n\t\tif ( $Document === false ) {\n\t\t\tthrow new Exception( 'Unable to load HTML document.' );\n\t\t}\n\n\t\treturn $Document;\n\t}", "public function getDocument() {\n\t\treturn phpQuery::getDocument($this->getDocumentID());\n\t}", "public function getDocument() {\n\t\treturn phpQuery::getDocument($this->getDocumentID());\n\t}", "private function return_query_cdata($xml, $class, $val, $documentTag, $prop, $result)\n\t{\n\t\t$children = $documentTag->childNodes;\n\t\t$property = $xml->createElement($this->get_label($val, $prop));\n\t\tforeach ($children as $child) {\n\t\t\t$result .= $this->return_node_value($child);\n\t\t}\n\t\t$cdata = $property->ownerDocument->createCDATASection($result);\n\t\t$property->appendChild($cdata);\n\t\t$class->appendChild($property);\n\t}", "public function createDocument()\r\n {\r\n return new Document($this);\r\n }", "public function html()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$doc = new DOMDocument(\"1.0\", \"UTF-8\");\n\t\t$element = $doc->importNode(dom_import_simplexml($this), true);\n\t\t\n\t\t$doc->appendChild($element);\n\t\t\n\t\tforeach($doc->firstChild->childNodes as $child)\n\t\t\t$output .= $child->ownerDocument->saveHTML($child);\n\t\t\n\t\treturn $output;\n\t}", "protected function wrapResults($outputs)\n {\n return new Google_Documents_GetAllDocuments_Results($outputs);\n }", "private function getPageSource(string $fullUrl): ?DOMDocument\n {\n $handle = curl_init($fullUrl);\n\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($handle);\n\n if(!empty($output)) {\n $dom = new DOMDocument();\n libxml_use_internal_errors(true);\n $output = str_replace(\"&nbsp;\",\"\", $output);\n $dom->loadHTML($output);\n libxml_use_internal_errors(false);\n curl_close($handle);\n return $dom;\n }\n curl_close($handle);\n return NULL;\n }", "function buildOutput()\n {\n $dom = new DOMDocument('1.0', 'UTF-8');\n $field = $dom->createElement('field');\n if ( !isset($this->class) )\n {\n $field->setAttribute('class', $this->type);\n } else {\n $field->setAttribute('class', $this->class);\n }\n $field->setAttribute('id', $this->name);\n $field->setAttribute('label', $this->label);\n $field->setAttribute('name', $this->name);\n $field->setAttribute('type', $this->type);\n if ( is_array($this->options) )\n {\n foreach ( $this->options AS $name=>$value )\n {\n $field->setAttribute($name, $value);\n }\n }\n $field->appendChild($dom->createCDATASection($this->value));\n return $field;\n }", "public function first () { return new XDTNodeList($this[0]); }", "protected function wrapResults($outputs)\n {\n return new Google_Documents_DownloadBase64EncodedDocument_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Google_Plus_Domains_Comments_Get_Results($outputs);\n }", "public function asDom(DOMDocument $doc)\n {\n return $doc->createElement('Cd', $this->code);\n }" ]
[ "0.6937923", "0.6937923", "0.68195045", "0.67717385", "0.66584253", "0.659529", "0.65547985", "0.6502658", "0.64987546", "0.6346673", "0.6260541", "0.61434364", "0.6108336", "0.6086359", "0.6032171", "0.6025498", "0.59359473", "0.58533907", "0.5848541", "0.58449787", "0.5841908", "0.5833102", "0.5783593", "0.5776076", "0.5773906", "0.5763467", "0.5756459", "0.5744123", "0.5732371", "0.57322514", "0.5728205", "0.5706415", "0.5698706", "0.5670512", "0.56678003", "0.5625685", "0.561796", "0.55989754", "0.5569457", "0.5546128", "0.5545989", "0.55442107", "0.5543895", "0.5537482", "0.55355877", "0.5510104", "0.5491772", "0.5480355", "0.54732937", "0.54728806", "0.54606324", "0.5458705", "0.5447628", "0.54353166", "0.54209924", "0.540532", "0.53980815", "0.5364563", "0.5351558", "0.5347769", "0.5338595", "0.5320184", "0.5304527", "0.53013957", "0.52966315", "0.5283208", "0.52776253", "0.52743727", "0.5259574", "0.5258888", "0.5239601", "0.52290213", "0.5226897", "0.52180254", "0.52167654", "0.5214624", "0.52144873", "0.52040523", "0.51964706", "0.5195852", "0.5177516", "0.51756936", "0.517358", "0.51643264", "0.51613486", "0.5161041", "0.5155297", "0.51374495", "0.51292825", "0.51292825", "0.51286256", "0.5113369", "0.5108047", "0.5105458", "0.51006705", "0.5096496", "0.50956106", "0.5077926", "0.5068465", "0.5066106" ]
0.7134096
0
Return the DOMNodeList containing the result class instances
protected function getDomList() { if (! isset($this->domList)) { $this->domList = $this->getXPath($this->getDom())->query($this->getDomListQuery()); } return $this->domList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNodeList($query,$doc)\n {\n $finder= new \\DomXPath($doc);\n $links = $finder->query($query);\n\n\n return $links;\n }", "public function getIterator()\n {\n $elements = new NodeList();\n if ($this->node->hasChildNodes()) {\n foreach ($this->node->childNodes as $node) {\n $elements[] = new Element($node);\n }\n }\n\n return $elements;\n }", "protected function fetchElementNodes()\n {\n $elements = [];\n\n foreach ($this->map as $query) {\n $list = $this->document->xpath($query);\n\n if (0 == count($list)) {\n continue;\n }\n\n foreach ($list as $node) {\n $elements[] = new HtmlNode($node, $this->document->getDocument());\n }\n }\n\n return $elements;\n }", "function xmllist() {\n\t\tglobal $mysql;\n\t\t$result[$this->class_name()] = $mysql->select(\"SELECT * FROM \".$this->class_name, true);\n\t\t$output = XML::get($result);\n\t\treturn xml($output);\n\t}", "public function getChildNodes() {}", "public function getChildNodes() {}", "final function getDocumentRootElement () { return new XDTNodeList($this->root); }", "public function getResults()\n {\n if ($this->_children === null) {\n $this->_children = $this->getFreshResults();\n }\n return $this->_children;\n }", "public function meetCriteria(\\DOMNodeList $domNodeList): array\n {\n }", "public function getElements() {}", "private function getNodesFromQueryResult($propResult, $node=null){\t\n\t\tif(is_array($propResult)){\n\t\t\tforeach ($propResult as $value){\n\t\t\t\t $values[] = new Node($value['fulltext'], $value['fullurl'], $node);\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}", "public function getElementsNodes()\n {\n if (null === $this->elementNodes) {\n $this->elementNodes = $this->fetchElementNodes();\n }\n\n return $this->elementNodes;\n }", "function getChildNodes() ;", "public function getChildNodes();", "public function findNodes($query)\n {\n $query = preg_replace('#/p:#', '/' . $this->_namespace_prefix, $query);\n return $this->_xpath->query($query);\n }", "public function getThemAll(){\n $query = '//employees/employee/.';\n //$employees = $this->domDocument->getElementsByTagName('employee');\n\n // create a new XPath object and associate it with the document we want to query against\n $xpath = new DOMXPath($this->domDocument);\n $result = $xpath->query($query);\n $arrEmps = array();\n if($result->length){\n // iterate of the results\n $classCounter = 0;\n foreach($result as $emp) {\n // add the details of the employee to an array\n $arrEmps[$classCounter][\"name\"] = $emp->getElementsByTagName(\"name\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"name\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"gender\"] = $emp->getElementsByTagName(\"gender\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"gender\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"phone\"] = $emp->getElementsByTagName(\"phone\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"phone\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"email\"] = $emp->getElementsByTagName(\"email\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"email\"].\"<br><hr>\";\n $classCounter +=1;\n //echo $classCounter.\"<br><hr>\";\n }\n }\n return $arrEmps;\n }", "public function getAllChildNode()\r\n {\r\n return $this->_childNodes;\r\n }", "function fetchDomNodes ($offset = 0, $limit = null)\n {\n $this->_enterSection('fetchDomNodes');\n $result = array();\n if ($this->_extractedNodes) {\n if ($this->_phpVersion == 5) {\n for ($i=$offset; $i < $this->_extractedNodes->length \n and (is_null($limit) or $i < $offset + $limit); $i++) {\n $result[] = $this->_extractedNodes->item($i); \n }\n } else {\n $this->_extractedNodes->rewind();\n for ($i=0; $i < $offset and $this->_extractedNodes->next(); $i++);\n for ($i=0; (is_null($limit) or $i < $limit) \n and $this->_extractedNodes->next(); $i++) {\n $result[] = $this->_extractedNodes->pointer;\n }\n }\n } else {\n if ($strings = $this->fetchStrings ($offset, $limit)) {\n $reconstructed = '<?xml version=\"1.0\"?>';\n $ns = $this->getNameSpaces();\n $nsDecl = array();\n foreach ($ns as $prefix => $uri) {\n $nsDecl[] = \"xmlns:$prefix=\\\"$uri\\\"\";\n }\n $reconstructed .= '<root ' . join(' ', $nsDecl) . '>' . \n join('',$strings) . '</root>';\n\n if ($this->_phpVersion == 5) {\n $dom = new DomDocument();\n $dom->loadXml($reconstructed);\n $nodeset = $dom->documentElement->childNodes;\n $ii = $nodeset->length;\n for ($i = 0; $i < $ii; $i++) {\n $result[] = $nodeset->item($i);\n }\n } else {\n // assuming PHP4\n $dom = domxml_open_mem ($reconstructed);\n $root = $dom->document_element();\n $result = $root->child_nodes();\n }\n }\n }\n $this->_leaveSection('fetchDomNodes');\n return $result;\n }", "protected function getTargetNodeList($html) {\n\t\t$doc = new DOMDocument;\n\t\t$doc -> loadHTML($html);\n\n\t\t$xpath = new DOMXPath($doc);\n\t\t//table[@class=\"data\"]/tr[@class=\"odd\"] | //table[@class=\"data\"]/tr[@class=\"even\"]\n\t\t$query = '//table[@class=\"data\"]/tr[@class=\"odd\"] | //table[@class=\"data\"]/tr[@class=\"even\"]';\n\t\t$result = $xpath -> query($query);\n\n\t\treturn $result;\n\t}", "public function getChildNodes() : array {\n return $this->childNodes;\n }", "public function get_all(): array\n {\n return $this->nodes;\n }", "function getElements() {\n return $this->rows_object;\n }", "public function initListObject(DOMElement $node) { return new XDTNodeList($node); }", "public function elements()\n {\n return parent::elements();\n }", "public function getNodes();", "public function getResults()\n\t{\n\t\t# code...\n\t\treturn $this->results;\n\t}", "public function getTestNodes(){\n\t\treturn array($this);\n\t}", "public function getElements();", "public function elements()\n {\n return [];\n }", "public function getDescendants();", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function getElementsByClassName($className, $tag = \"*\", $node = null) {\n $classNames = explode('|', str_replace(' ', '', $className));\n $nodes = array();\n $domNodeList = ($node == null) ? $this->getElementsByTagName($tag) : $node->getElementsByTagName($tag);\n\n for ($i = 0; $i < $domNodeList->length; $i++) {\n /** @var DOMElement $element */\n $element = $domNodeList->item($i);\n if ($element->hasAttributes() && $element->hasAttribute('class')) {\n for ($j = 0; $j < count($classNames); $j++) {\n if ($this->hasClass($element, $classNames[$j])) {\n $nodes[] = $domNodeList->item($i);\n break;\n }\n }\n }\n }\n\n return $nodes;\n }", "public function findRootNodes()\n {\n return $this->findNodes();\n }", "public function getResults(){\n return $this->_results;\n }", "public function query(string $query, DOMElement $context = null) : DOMNodeList {\n $xpath = new DOMXPath($this);\n foreach($this->namespaces as $prefix => $namespace) {\n $xpath->registerNamespace($prefix, $namespace);\n }\n\n /** @var DOMNodeList|bool $result */\n $result = $context !== null ? $xpath->query($query, $context) : $xpath->query($query);\n return $result instanceof DOMNodeList ? $result : new DOMNodeList();\n }", "public function toArray($type = Document::SIMPLE)\n {\n switch ($type) {\n case Document::MINIMAL:\n $this->simple = false;\n $this->complete = false;\n break;\n\n case Document::SIMPLE:\n $this->simple = true;\n break;\n\n case Document::COMPLETE:\n $this->complete = true;\n break;\n\n default:\n throw new DomException('Invalid type', 2);\n }\n\n return $this->getNodes($this->childNodes);\n }", "protected function getElements(){\n return $this->_elements;\n }", "public static function fromDOMDocument(DOMDocument $doc) {\n\t\t$instances=array();\n\t\tforeach ($doc->getElementsByTagName('Tchat') as $node) {\n\t\t\t$instances[]=self::fromDOMElement($node);\n\t\t}\n\t\treturn $instances;\n\t}", "public function getElements()\n {\n return $this->elements;\n }", "public function elements()\r\n {\r\n return array(\r\n \r\n );\r\n }", "public function results()\n {\n return $this->_results;\n }", "public function results()\n {\n return $this->_results;\n }", "public function getElements() {\n return $this->elements;\n }", "public function getElements() {\n\t\treturn $this->elements;\n\t}", "public static function fromDOMDocument(DOMDocument $doc) {\n\t\t$instances=array();\n\t\tforeach ($doc->getElementsByTagName('Factuurmaand') as $node) {\n\t\t\t$instances[]=self::fromDOMElement($node);\n\t\t}\n\t\treturn $instances;\n\t}", "public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}", "public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}", "public function results() {\n return $this->_results;\n }", "public function results() {\n return $this->_results;\n }", "public function getChildElements() {}", "public function Results(){\r\n\t\treturn self::get_results();\r\n\t}", "public function getHtmlElements();", "private function getLinksViaDOM()\n {\n $save = array();\n $nodes = $this->getElementsByTagName('A');\n foreach ($nodes as $n_no => $node) {\n if ($node->attributes->length > 0) {\n //$save[] = $this->getNodeAttributes($node->attributes);\n }\n }\n\n return $save;\n }", "public function results()\n {\n return $this->_results;\n }", "public function results() {\n\t\treturn $this->results;\n\t}", "public static function fromDOMDocument(DOMDocument $doc) {\n\t\t$instances=array();\n\t\tforeach ($doc->getElementsByTagName('Representacions') as $node) {\n\t\t\t$instances[]=self::fromDOMElement($node);\n\t\t}\n\t\treturn $instances;\n\t}", "function getNodes()\n {\n }", "public function getElementsByTagName($qualifiedName): \\DOMNodeList {\n list($prefix, $localName) = QualifiedName::split($qualifiedName);\n $namespaceURI = (string)$this->namespaces()->resolveNamespace((string)$prefix);\n if ($namespaceURI !== '') {\n return $this->getElementsByTagNameNS($namespaceURI, $localName);\n }\n return parent::getElementsByTagName($localName);\n }", "public function allChildrenElements() {\n\t\treturn $this->childrenElements()->with('allChildrenElements');\n\t}", "public function getAllNodes(): array\n\t{\n\t\t/** @var Node[] $nodes */\n\t\t$nodes = $this->nodeAttrIndex->getAllElements();\n\t\treturn $nodes;\n\t}", "public function getElements() {\n return $this->elements;\n }", "public function createQuery() {\n return new XML\\DOM();\n }", "protected function getElements()\n {\n return $this->elements;\n }", "protected function listChildren()\n {\n $this->children = new ArrayObject();\n if ($this->cursor instanceof DOMNode) {\n $childrenNodes = $this->cursor->childNodes;\n foreach ($childrenNodes as $child) {\n switch ($child->nodeName) {\n case 'text:p':\n $element = new OpenDocument_Element_Paragraph($child, $this);\n break;\n case 'text:h':\n $element = new OpenDocument_Element_Heading($child, $this);\n break;\n default:\n $element = false;\n }\n if ($element) {\n $this->children->append($element);\n }\n }\n }\n }", "public function getChildNodes()\n {\n return array_values($this->getChildNodesById());\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }" ]
[ "0.66843086", "0.6507952", "0.65048516", "0.6271274", "0.6243193", "0.6241497", "0.6188414", "0.61618453", "0.6158531", "0.6113553", "0.60674095", "0.6043164", "0.59769255", "0.5928247", "0.592632", "0.59245837", "0.5914295", "0.5862952", "0.5844102", "0.5840606", "0.58309174", "0.5805478", "0.57903427", "0.57810247", "0.5768766", "0.5765076", "0.57555956", "0.574255", "0.56959015", "0.5674857", "0.5646283", "0.5646283", "0.5646283", "0.5646283", "0.5646283", "0.5646283", "0.5632937", "0.5630568", "0.5619688", "0.55756754", "0.5573548", "0.55698115", "0.5560828", "0.5547687", "0.55455685", "0.5538957", "0.5538957", "0.55386007", "0.5531055", "0.5519818", "0.55162644", "0.55162644", "0.55150694", "0.55150694", "0.55145556", "0.55086917", "0.5506748", "0.54968536", "0.54946464", "0.5493019", "0.5484901", "0.54844314", "0.5481382", "0.5478581", "0.5474205", "0.5463767", "0.5453882", "0.5448158", "0.5445452", "0.5428063", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505", "0.54269505" ]
0.59058565
17
Return the XPath query string used to retrieved result class DOMNodes Template method. Calls for domListQuery which should be defined in subclasses from the DOMDocument
protected function getDomListQuery() { return $this->domListQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createQuery() {\n return new XML\\DOM();\n }", "private function generateXpathQuery() {\n $parentElementClass = trim(Settings::get(\"main_class\"), \".\");\n $excludeProcessingClass = trim(Settings::get(\"exclude_class\"), \".\");\n\n $xQuery = \"\";\n if(!empty($parentElementClass)) {\n $xQuery .= \"//*[contains(@class, '\".$parentElementClass.\"')]\";\n }\n $xQuery .= \"//img\";\n\n if(!empty($excludeProcessingClass)){\n $xQuery .= \"[not(contains(@class, '\".$excludeProcessingClass.\"'))]\";\n }\n\n return $xQuery;\n }", "public function get($xpathQuery, \\DOMNode $contextnode = null);", "public function xpath() {\n return new DOMXPath($this);\n }", "protected function getDomList()\n {\n if (! isset($this->domList)) {\n $this->domList = $this->getXPath($this->getDom())->query($this->getDomListQuery());\n }\n return $this->domList;\n }", "public function query($query){\r\n return $this->xpath->evaluate($query);\r\n }", "protected function getXpathString() {\n return 'xpathparser:' . $this->getCounter();\n }", "public function findNodes($query)\n {\n $query = preg_replace('#/p:#', '/' . $this->_namespace_prefix, $query);\n return $this->_xpath->query($query);\n }", "protected function getXPath()\n {\n $xpath = parent::getXPath();\n $xpath->registerNamespace('m', OData::META);\n $xpath->registerNamespace('d', OData::DATA);\n\n return $xpath;\n }", "function xmllist() {\n\t\tglobal $mysql;\n\t\t$result[$this->class_name()] = $mysql->select(\"SELECT * FROM \".$this->class_name, true);\n\t\t$output = XML::get($result);\n\t\treturn xml($output);\n\t}", "public function getQuery() {\r\n\t\tif (null === $this->_query) {\r\n\t\t\trequire_once 'Zend/Dom/Query.php';\r\n\t\t\t$this->_query = new Zend_Dom_Query;\r\n\t\t}\r\n\t\treturn $this->_query;\r\n\t}", "public function getXpath()\n {\n if (null === $this->xpath) {\n $this->setXpath(new DOMXPath($this->getDomDocument()));\n }\n\n return $this->xpath;\n }", "function domdoctoxpath($domdocinput) {\n //local variables clean themselves up, no need to unset.\n $newdomdoc = new SmartDOMDocument();\n $newdomdoc->appendChild($newdomdoc->importNode($domdocinput, true));\n $newxpathtable = new DOMXPath($newdomdoc);\n //DEBUG $image = $newdomdoc->saveHTMLExact();echo($image);\n return $newxpathtable;\n}", "public function getNodeList($query,$doc)\n {\n $finder= new \\DomXPath($doc);\n $links = $finder->query($query);\n\n\n return $links;\n }", "public function query(string $query, DOMElement $context = null) : DOMNodeList {\n $xpath = new DOMXPath($this);\n foreach($this->namespaces as $prefix => $namespace) {\n $xpath->registerNamespace($prefix, $namespace);\n }\n\n /** @var DOMNodeList|bool $result */\n $result = $context !== null ? $xpath->query($query, $context) : $xpath->query($query);\n return $result instanceof DOMNodeList ? $result : new DOMNodeList();\n }", "function query_dom($query) {\n\t\t$xpath = new DOMXpath($this->dom);\n\t\t$id = $xpath->query($query);\n\t\tif ($id->length == 0)\n\t\t\t$id = null;\n\t\tif (isset ($id)) {\n\t\t\tforeach ($id as $handle) {\n\t\t\t\t$id = $handle->nodeValue;\n\t\t\t}\n\t\t}\n\t\treturn $id;\n\t}", "public function findNodesRelativeTo($query, $context)\n {\n $query = preg_replace('#/p:#', '/' . $this->_namespace_prefix, $query);\n return $this->_xpath->query($query, $context);\n }", "public static function pq($arg1, $context = null) {\n\t\tif ($arg1 instanceof DOMNODE && ! isset($context)) {\n\t\t\tforeach(phpQuery::$documents as $documentWrapper) {\n\t\t\t\t$compare = $arg1 instanceof DOMDocument\n\t\t\t\t\t? $arg1 : $arg1->ownerDocument;\n\t\t\t\tif ($documentWrapper->document->isSameNode($compare))\n\t\t\t\t\t$context = $documentWrapper->id;\n\t\t\t}\n\t\t}\n\t\tif (! $context) {\n\t\t\t$domId = self::$defaultDocumentID;\n\t\t\tif (! $domId)\n\t\t\t\tthrow new Exception(\"Can't use last created DOM, because there isn't any. Use phpQuery::newDocument() first.\");\n//\t\t} else if (is_object($context) && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject')))\n\t\t} else if (is_object($context) && $context instanceof phpQueryObject)\n\t\t\t$domId = $context->getDocumentID();\n\t\telse if ($context instanceof DOMDOCUMENT) {\n\t\t\t$domId = self::getDocumentID($context);\n\t\t\tif (! $domId) {\n\t\t\t\t//throw new Exception('Orphaned DOMDocument');\n\t\t\t\t$domId = self::newDocument($context)->getDocumentID();\n\t\t\t}\n\t\t} else if ($context instanceof DOMNODE) {\n\t\t\t$domId = self::getDocumentID($context);\n\t\t\tif (! $domId) {\n\t\t\t\tthrow new Exception('Orphaned DOMNode');\n//\t\t\t\t$domId = self::newDocument($context->ownerDocument);\n\t\t\t}\n\t\t} else\n\t\t\t$domId = $context;\n\t\tif ($arg1 instanceof phpQueryObject) {\n//\t\tif (is_object($arg1) && (get_class($arg1) == 'phpQueryObject' || $arg1 instanceof PHPQUERY || is_subclass_of($arg1, 'phpQueryObject'))) {\n\t\t\t/**\n\t\t\t * Return $arg1 or import $arg1 stack if document differs:\n\t\t\t * pq(pq('<div/>'))\n\t\t\t */\n\t\t\tif ($arg1->getDocumentID() == $domId)\n\t\t\t\treturn $arg1;\n\t\t\t$class = get_class($arg1);\n\t\t\t// support inheritance by passing old object to overloaded constructor\n\t\t\t$phpQuery = $class != 'phpQuery'\n\t\t\t\t? new $class($arg1, $domId)\n\t\t\t\t: new phpQueryObject($domId);\n\t\t\t$phpQuery->elements = array();\n\t\t\tforeach($arg1->elements as $node)\n\t\t\t\t$phpQuery->elements[] = $phpQuery->document->importNode($node, true);\n\t\t\treturn $phpQuery;\n\t\t} else if ($arg1 instanceof DOMNODE || (is_array($arg1) && isset($arg1[0]) && $arg1[0] instanceof DOMNODE)) {\n\t\t\t/*\n\t\t\t * Wrap DOM nodes with phpQuery object, import into document when needed:\n\t\t\t * pq(array($domNode1, $domNode2))\n\t\t\t */\n\t\t\t$phpQuery = new phpQueryObject($domId);\n\t\t\tif (!($arg1 instanceof DOMNODELIST) && ! is_array($arg1))\n\t\t\t\t$arg1 = array($arg1);\n\t\t\t$phpQuery->elements = array();\n\t\t\tforeach($arg1 as $node) {\n\t\t\t\t$sameDocument = $node->ownerDocument instanceof DOMDOCUMENT\n\t\t\t\t\t&& ! $node->ownerDocument->isSameNode($phpQuery->document);\n\t\t\t\t$phpQuery->elements[] = $sameDocument\n\t\t\t\t\t? $phpQuery->document->importNode($node, true)\n\t\t\t\t\t: $node;\n\t\t\t}\n\t\t\treturn $phpQuery;\n\t\t} else if (self::isMarkup($arg1)) {\n\t\t\t/**\n\t\t\t * Import HTML:\n\t\t\t * pq('<div/>')\n\t\t\t */\n\t\t\t$phpQuery = new phpQueryObject($domId);\n\t\t\treturn $phpQuery->newInstance(\n\t\t\t\t$phpQuery->documentWrapper->import($arg1)\n\t\t\t);\n\t\t} else {\n\t\t\t/**\n\t\t\t * Run CSS query:\n\t\t\t * pq('div.myClass')\n\t\t\t */\n\t\t\t$phpQuery = new phpQueryObject($domId);\n//\t\t\tif ($context && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject')))\n\t\t\tif ($context && $context instanceof phpQueryObject)\n\t\t\t\t$phpQuery->elements = $context->elements;\n\t\t\telse if ($context && $context instanceof DOMNODELIST) {\n\t\t\t\t$phpQuery->elements = array();\n\t\t\t\tforeach($context as $node)\n\t\t\t\t\t$phpQuery->elements[] = $node;\n\t\t\t} else if ($context && $context instanceof DOMNODE)\n\t\t\t\t$phpQuery->elements = array($context);\n\t\t\treturn $phpQuery->find($arg1);\n\t\t}\n\t}", "function getNodeXPath( $node ) {\n\t\t\n\t\t$result='';\n\t\twhile ($parentNode = $node->parentNode) {\n\t\t\t$nodeIndex=-1;\n $nodeTagIndex=0;\n\t\t\tdo {\n $nodeIndex++;\n\t\t\t\t$testNode = $parentNode->childNodes->item( $nodeIndex );\n \n /**\n * This complex condition is because there is two html tags inside dom tree, one is empty!!\n */\n if ($testNode->nodeName==$node->nodeName and $testNode->parentNode->isSameNode($node->parentNode) and ($testNode->nodeName!='html' or $testNode->childNodes->length>0)) {\n $nodeTagIndex++;\n }\n \n\t\t\t} while (!$node->isSameNode($testNode));\n\n\t\t\t$result=\"/{$node->nodeName}[{$nodeTagIndex}]\".$result;\n\t\t\t$node=$parentNode;\n\t\t};\n\t\treturn $result;\n\t}", "function run ($query,$xml)\n{\n // GET AN ELEMENT\n if ($query['FROM'][0]==\"ROOT\" || $query['FROM'][0]==\"\")\n {\n $path=NULL;\n } \n else\n {\n $path=$query['FROM'][0];\n }\n // GET AN ATTRIBUTTE\n if(!empty($query['FROM'][1]))\n {\n $path=$path.\".{$query[\"FROM\"][1]}\";\n }\n $xml=my_xpath($path,$xml);\n\n if(!empty($xml))\n {\n $xml=$xml[0];\n }\n else\n return (string) NULL;\n\n // SELECT ELEMENT from FROM\n $path=$query['SELECT'];\n $xml=my_xpath($path,$xml);\n\n if(empty($xml))\n {\n return (string)NULL;\n }\n else\n {\n if(empty($query['WHERE']))\n {\n $result=$xml;\n }\n else\n {\n // WHERE\n if(empty($query['WHERE'][0]))\n {\n $path=NULL;\n }\n else\n {\n $path=$query['WHERE'][0];\n }\n\n if(!empty($query['WHERE'][1]))\n {\n $path=$path.\".{$query[\"WHERE\"][1]}\";\n }\n $result=array();\n \n foreach($xml as $element)\n {\n $flag=0;\n $validity=false;\n\n if(!empty($query['WHERE'][1]))\n {\n $tmp_array=array_keys((array)$element);\n foreach ($tmp_array as $key) {\n if(strcmp($key, \"@attributes\")==0)\n {\n $data=(array)$element;\n $data=$data[\"@attributes\"];\n if(array_key_exists($query['WHERE'][1], $data))\n {\n $flag=1;\n $part_item=$data[$query['WHERE'][1]];\n }\n }\n }\n if(isset($query['WHERE'][0]) && $query['WHERE'][0] != \"\")\n {\n if(strcmp($query['WHERE'][0], $query['SELECT'])!=0)\n {\n $flag=0;\n }\n }\n }\n if($flag)\n {\n $validity=compare_operator($query,$part_item);\n }\n else\n {\n $final=my_xpath($path,$element);\n foreach ($final as $part_item) {\n $validity=compare_operator($query,$part_item);\n break;\n }\n }\n if($query['WHERE'][4]==true)\n {\n $validity=!$validity;\n }\n if(empty($query['WHERE'][1]))\n {\n $tmp_array=array_keys((array)$part_item);\n foreach ($tmp_array as $key) {\n if(!strcmp($key, \"@attributes\") && !is_int($key))\n {\n $validity=false;\n break;\n }\n }\n }\n if($validity)\n {\n array_push($result, $element);\n }\n }\n }\n }\n if(empty($result))\n {\n return (string)NULL;\n }\n if(isset($query['LIMIT']))\n {\n $result=array_slice($result, 0, $query['LIMIT']);\n }\n return $result;\n}", "protected function convertXPath($expr): string\n\t{\n\t\tif (str_starts_with($expr, 'starts-with'))\n\t\t{\n\t\t\treturn $this->convertStartsWithExpr($expr);\n\t\t}\n\n\t\t$replacements = [\n\t\t\t\"(^translate\\\\(@(\\\\w+),'(.)','(.)'\\\\))\" => '$$1|replace(\\'$2\\',\\'$3\\')',\n\n\t\t\t\"(^\\\\$(\\\\w+)(!=|(=))('.*')$)D\" => '$xf.options.s9e_MediaSites_$1$2$3$4',\n\t\t\t\"(^contains\\\\(\\\\$(\\\\w+,'[^']+')\\\\)$)D\" => 'contains($xf.options.s9e_MediaSites_$1)',\n\n\t\t\t'(^@(\\\\w+)$)D' => '$$1',\n\t\t\t\"(^@(\\\\w+)(='.*')$)D\" => '$$1=$2',\n\t\t\t'(^@(\\\\w+)>(\\\\d+)$)D' => '$$1>$2',\n\t\t\t'(^100\\\\*@height div@width$)D' => '100*$height/$width',\n\t\t\t'(^100\\\\*\\\\(@height\\\\+(\\\\d+)\\\\)div@width$)D' => '100*($height+$1)/$width',\n\t\t\t\"(^contains\\\\(@(\\\\w+,'[^']+')\\\\)$)D\" => 'contains($$1)',\n\t\t\t\"(^not\\\\(contains\\\\(@(\\\\w+,'[^']+')\\\\)\\\\)$)D\" => '!contains($$1)',\n\t\t\t\"(^@(\\\\w+) or ?contains\\\\(@(\\\\w+,'[^']+')\\\\)$)D\" => '$$1 or contains($$2)',\n\t\t\t\"(^@(\\\\w+) and ?contains\\\\(('[^']+'),@(\\\\w+)\\\\)$)D\" => '$$1 and contains($2,$$3)',\n\t\t\t\"(^@(\\\\w+) and@(\\\\w+)!=('[^']++')$)D\" => '$$1 and $$2!=$3',\n\n\t\t\t\"(^substring-after\\\\(@(\\\\w+),('[^']+')\\\\)$)\" => '$$1|split($2)|last()',\n\t\t\t\"(^substring-before\\\\(@(\\\\w+),('[^']+')\\\\)$)\" => '$$1|split($2)|first()',\n\t\t];\n\n\t\t$expr = html_entity_decode($expr);\n\t\t$expr = preg_replace(array_keys($replacements), array_values($replacements), $expr, -1, $cnt);\n\t\tif (!$cnt)\n\t\t{\n\t\t\tthrow new RuntimeException('Cannot convert ' . $expr);\n\t\t}\n\n\t\treturn $expr;\n\t}", "public function getType()\n {\n return 'xpath';\n }", "public function getTagsDropDownResultsXpath() {\n\t\t$resultXpath = $this->tagsSuggestDropDown .\n\t\t\t\"//ul[@class='select2-results']\" .\n\t\t\t\"//span\";\n\t\treturn $resultXpath;\n\t}", "function query(string $expression, ?\\DOMNode $contextNode = null, bool $registerNodeNs = true): \\DOMNodeList\n {\n if ($contextNode === null) {\n $contextNode = $this->getBody();\n\n // make sure the query is relative to the context node\n if ($expression !== '' && $expression[0] !== '.') {\n $expression = '.' . $expression;\n }\n }\n\n return parent::query($expression, $contextNode, $registerNodeNs);\n }", "public function xpath(): Xpath {\n if (\n $this->_xpath instanceof Xpath &&\n $this->_xpath->document === $this\n ) {\n return $this->_xpath;\n }\n $this->_xpath = new Xpath($this);\n foreach ($this->_namespaces as $prefix => $namespaceURI) {\n $this->_xpath->registerNamespace($prefix, $namespaceURI);\n }\n return $this->_xpath;\n }", "abstract protected function getQuery();", "function returnXPathObject($item)\n {\n $xmlPageDom = new DOMDocument(); // khoi tao DomDocument object\n libxml_use_internal_errors(true); // dom chuyen tu html5 -> html4\n @$xmlPageDom->loadHTML('<?xml encoding=\"utf-8\" ?>' . $item); // Loading html page\n $xmlPageXPath = new DOMXPath($xmlPageDom); // khoi tao XPath DOM object\n return $xmlPageXPath; // tra ve XPath object\n }", "protected function appendXPathOutput(DOMElement $parentNode, $expr)\n\t{\n\t\t$this->appendElement($parentNode, 'output', htmlspecialchars(trim($expr), ENT_COMPAT))\n\t\t ->setAttribute('type', 'xpath');\n\t}", "public abstract function get_query();", "abstract protected function getQueryIterator();", "public static function pq($arg1, $context = null)\n {\n if ($arg1 instanceof \\DOMNode && !isset($context)) {\n foreach (phpQuery::$documents as $documentWrapper) {\n $compare = $arg1 instanceof \\DOMDocument ? $arg1 : $arg1->ownerDocument;\n if ($documentWrapper->document->isSameNode($compare)) {\n $context = $documentWrapper->id;\n }\n }\n }\n\n if (!$context) {\n $domId = self::$defaultDocumentID;\n if (!$domId) {\n throw new PhpQueryException(\n \"Can't use last created DOM, because there isn't any. Use phpQuery::newDocument() first.\"\n );\n }\n } elseif (is_object($context) && $context instanceof PhpQueryObject) {\n $domId = $context->getDocumentID();\n } elseif ($context instanceof \\DOMDocument) {\n $domId = self::getDocumentID($context);\n if (!$domId) {\n $domId = self::newDocument($context)->getDocumentID();\n }\n } elseif ($context instanceof \\DOMNode) {\n $domId = self::getDocumentID($context);\n if (!$domId) {\n throw new PhpQueryException('Orphaned DOMNode');\n }\n } else {\n $domId = $context;\n }\n\n if ($arg1 instanceof PhpQueryObject) {\n if ($arg1->getDocumentID() === $domId) {\n return $arg1;\n }\n\n $class = get_class($arg1);\n // support inheritance by passing old object to overloaded constructor\n $phpQuery = $class !== 'PhpQuery'\n ? new $class($arg1, $domId)\n : new PhpQueryObject($domId);\n\n $phpQuery->elements = [];\n foreach ($arg1->elements as $node) {\n $phpQuery->elements[] = $phpQuery->document->importNode($node, true);\n }\n\n return $phpQuery;\n }\n\n if ($arg1 instanceof \\DOMNode\n || (is_array($arg1) && isset($arg1[0]) && $arg1[0] instanceof \\DOMNode)) {\n /*\n * Wrap DOM nodes with phpQuery object, import into document when needed:\n * pq(array($domNode1, $domNode2))\n */\n $phpQuery = new PhpQueryObject($domId);\n if (!($arg1 instanceof \\DOMNodeList) && !is_array($arg1)) {\n $arg1 = [$arg1,];\n }\n\n $phpQuery->elements = [];\n foreach ($arg1 as $node) {\n $sameDocument = $node->ownerDocument instanceof \\DOMDocument\n && !$node->ownerDocument->isSameNode($phpQuery->document);\n $phpQuery->elements[] = $sameDocument ? $phpQuery->document->importNode($node, true)\n : $node;\n }\n return $phpQuery;\n }\n\n if (self::isMarkup($arg1)) {\n /**\n * Import HTML:\n * pq('<div/>')\n */\n $phpQuery = new PhpQueryObject($domId);\n return $phpQuery->newInstance($phpQuery->documentWrapper->import($arg1));\n }\n\n\n /**\n * Run CSS query:\n * pq('div.myClass')\n */\n $phpQuery = new PhpQueryObject($domId);\n //\t\t\tif ($context && ($context instanceof PHPQUERY || is_subclass_of($context, 'PhpQueryObject')))\n if ($context && $context instanceof PhpQueryObject) {\n $phpQuery->elements = $context->elements;\n } elseif ($context && $context instanceof \\DOMNodeList) {\n $phpQuery->elements = [];\n foreach ($context as $node) {\n $phpQuery->elements[] = $node;\n }\n } elseif ($context && $context instanceof \\DOMNode) {\n $phpQuery->elements = [$context,];\n }\n\n return $phpQuery->find($arg1);\n }", "public function getMarkup($query, array $opts = []);", "private function getOptionsListXpath() {\n return sprintf(Dropdown::OPTIONS_LIST_XPATH,$this::$keyWord);\n }", "function _quail_server_cleanup_xpath($query) {\n\t$remove = array(\n\t\t\t '[@class=\"\"]',\n\t\t\t '[@class=\"ac_template_selected\"]',\n\t\t\t '[1]',\n\t);\n\t\n\t$query = str_replace('html[@class=\"js\"]', 'html', $query);\n\t$query = str_replace($remove, '', $query);\n\treturn $query;\n}", "public function getDomDocument() {}", "public abstract function getQuery();", "protected function fetchElementNodes()\n {\n $elements = [];\n\n foreach ($this->map as $query) {\n $list = $this->document->xpath($query);\n\n if (0 == count($list)) {\n continue;\n }\n\n foreach ($list as $node) {\n $elements[] = new HtmlNode($node, $this->document->getDocument());\n }\n }\n\n return $elements;\n }", "public function xpathQuery($expression, \\DOMNode $contextnode = null)\n {\n if (null === $this->xpath) {\n $this->xpath = new \\DOMXpath($this);\n }\n\n return $this->xpath->query($expression, $contextnode);\n }", "public function generateQuery(): string\n {\n $query = $this->template;\n $query = str_replace('{{columns}}', $this->generateColumns(), $query);\n $query = str_replace('{{pagination}}', $this->generatePagination(), $query);\n $query = str_replace('{{tables}}', $this->generateTables(), $query);\n $matches = [];\n $i = preg_match('/{{where(\\|([a-zA-Z .,\\-]*))?}}/', $query, $matches);\n if ($i) {\n $prepend = $matches[2] ?? null;\n $query = str_replace($matches[0], $this->generateWhere($prepend), $query);\n }\n $i = preg_match('/{{sort(\\|([a-zA-Z .,\\-]*))?}}/', $query, $matches);\n if ($i) {\n $prepend = $matches[2] ?? null;\n $query = str_replace($matches[0], $this->generateSort($prepend), $query);\n }\n return $query;\n }", "static function get_query_resulsts_template(){\n\t\treturn HOTWPSEARCH_DIR . '/templates/query-results.php';\n\t}", "public static function xpQuery(DOMNode $node, $query)\n {\n assert('is_string($query)');\n static $xpCache = NULL;\n\n if ($node instanceof DOMDocument) {\n $doc = $node;\n } else {\n $doc = $node->ownerDocument;\n }\n\n if ($xpCache === NULL || !$xpCache->document->isSameNode($doc)) {\n $xpCache = new DOMXPath($doc);\n $xpCache->registerNamespace('soap-env', SAML2_Const::NS_SOAP);\n $xpCache->registerNamespace('saml_protocol', SAML2_Const::NS_SAMLP);\n $xpCache->registerNamespace('saml_assertion', SAML2_Const::NS_SAML);\n $xpCache->registerNamespace('saml_metadata', SAML2_Const::NS_MD);\n $xpCache->registerNamespace('ds', XMLSecurityDSig::XMLDSIGNS);\n $xpCache->registerNamespace('xenc', XMLSecEnc::XMLENCNS);\n }\n\n $results = $xpCache->query($query, $node);\n $ret = array();\n for ($i = 0; $i < $results->length; $i++) {\n $ret[$i] = $results->item($i);\n }\n\n return $ret;\n }", "private function return_query_xmlliteral($xml, $class, $val, $documentTag, $prop)\n\t{\n\t\t$children = $documentTag->childNodes;\n\t\t$property = $xml->createElement($this->get_label($val, $prop));\n\t\t$property->setAttribute('rdf:datatype', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral');\n\t\tforeach ($children as $child) {\n\t\t\tif ($child != new DOMText) $child->setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');\n\t\t\t$property->appendChild($xml->importNode($child, TRUE));\n\t\t}\n\t\t$class->appendChild($property);\n\t}", "public function query(string $query, \\DOMElement $node = null)\n {\n return $this->xpath->query($query, $node);\n }", "abstract public function\r\n\t\tget_query_for_something();", "abstract protected function buildQuery(): string;", "function fetchDomNodes ($offset = 0, $limit = null)\n {\n $this->_enterSection('fetchDomNodes');\n $result = array();\n if ($this->_extractedNodes) {\n if ($this->_phpVersion == 5) {\n for ($i=$offset; $i < $this->_extractedNodes->length \n and (is_null($limit) or $i < $offset + $limit); $i++) {\n $result[] = $this->_extractedNodes->item($i); \n }\n } else {\n $this->_extractedNodes->rewind();\n for ($i=0; $i < $offset and $this->_extractedNodes->next(); $i++);\n for ($i=0; (is_null($limit) or $i < $limit) \n and $this->_extractedNodes->next(); $i++) {\n $result[] = $this->_extractedNodes->pointer;\n }\n }\n } else {\n if ($strings = $this->fetchStrings ($offset, $limit)) {\n $reconstructed = '<?xml version=\"1.0\"?>';\n $ns = $this->getNameSpaces();\n $nsDecl = array();\n foreach ($ns as $prefix => $uri) {\n $nsDecl[] = \"xmlns:$prefix=\\\"$uri\\\"\";\n }\n $reconstructed .= '<root ' . join(' ', $nsDecl) . '>' . \n join('',$strings) . '</root>';\n\n if ($this->_phpVersion == 5) {\n $dom = new DomDocument();\n $dom->loadXml($reconstructed);\n $nodeset = $dom->documentElement->childNodes;\n $ii = $nodeset->length;\n for ($i = 0; $i < $ii; $i++) {\n $result[] = $nodeset->item($i);\n }\n } else {\n // assuming PHP4\n $dom = domxml_open_mem ($reconstructed);\n $root = $dom->document_element();\n $result = $root->child_nodes();\n }\n }\n }\n $this->_leaveSection('fetchDomNodes');\n return $result;\n }", "function xpath($xpath) {\r\n\t\treturn $this->simpleXML()->xpath($xpath);\r\n\t}", "protected function getXPath(DOMDocument $dom)\n {\n if (! isset($this->domXPath)) {\n $this->domXPath = new DOMXPath($dom);\n $namespaceURI = $dom->lookupNamespaceUri($dom->namespaceURI);\n $this->domXPath->registerNamespace('ns', $namespaceURI);\n }\n return $this->domXPath;\n }", "private function getNodesFromQueryResult($propResult, $node=null){\t\n\t\tif(is_array($propResult)){\n\t\t\tforeach ($propResult as $value){\n\t\t\t\t $values[] = new Node($value['fulltext'], $value['fullurl'], $node);\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}", "public function get_default_list_query()\n {\n return \"SELECT\n\t\t\tobj_main.*,\n\t\t\tobj_main.isys_obj__id AS '__id__',\n\t\t\tjn1.isys_its_type__title,\n\t\t\tjn3.isys_purpose__title,\n\t\t\tjn5.isys_catg_global_category__title\n\n\t\t\tFROM isys_obj AS obj_main\n\t\t\tLEFT JOIN isys_cmdb_status AS obj_main_status ON obj_main_status.isys_cmdb_status__id = obj_main.isys_obj__isys_cmdb_status__id\n\t\t\tLEFT JOIN isys_catg_its_type_list AS j2 ON j2.isys_catg_its_type_list__isys_obj__id = obj_main.isys_obj__id\n\t\t\tLEFT JOIN isys_its_type AS jn1 ON jn1.isys_its_type__id = j2.isys_catg_its_type_list__isys_its_type__id\n\t\t\tLEFT JOIN isys_catg_global_list AS j6 ON j6.isys_catg_global_list__isys_obj__id = obj_main.isys_obj__id\n\t\t\tLEFT JOIN isys_purpose AS jn3 ON jn3.isys_purpose__id = j6.isys_catg_global_list__isys_purpose__id\n\t\t\tLEFT JOIN isys_catg_global_category AS jn5 ON jn5.isys_catg_global_category__id = j6.isys_catg_global_list__isys_catg_global_category__id\n\n\t\t\tWHERE (obj_main.isys_obj__isys_obj_type__id = \" . $this->convert_sql_id(C__OBJTYPE__IT_SERVICE) . \") \";\n }", "public function getNodes($dom, $xpath, $parent = null)\n {\n $DomXpath = new DOMXPath($dom);\n $nodes = $DomXpath->query($xpath, $parent);\n return $nodes;\n }", "final function getDocumentRootElement () { return new XDTNodeList($this->root); }", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "public function getXqueryCursor () {\n $this->xmldb->getCursor();\n }", "function toXPath($sel) {\n\t\t$sel = preg_replace('/\\s*>\\s*/', '>', $sel);\n\t\t$sel = preg_replace('/\\s*~\\s*/', '~', $sel);\n\t\t$sel = preg_replace('/\\s*\\+\\s*/', '+', $sel);\n\t\t$sel = preg_replace('/\\s*,\\s*/', ',', $sel);\n\t\t$sels = preg_split('/\\s+(?![^\\[]+\\])/', $sel);\n\t\tforeach ($sels as &$sel) {\n\t\t\t$sel = preg_replace('/,/', '|descendant-or-self::', $sel);// ,\n\t\t\t$sel = preg_replace('/(.+)?:(checked|disabled|required|autofocus)/', '\\1[@\\2=\"\\2\"]', $sel);// input:checked, :disabled, etc.\n\t\t\t$sel = preg_replace('/(.+)?:(autocomplete)/', '\\1[@\\2=\"on\"]', $sel);// input:autocomplete, :autocomplete\n\t\t\t$sel = preg_replace('/:(text|password|checkbox|radio|button|submit|reset|file|hidden|image|datetime|datetime-local|date|month|time|week|number|range|email|url|search|tel|color)/', 'input[@type=\"\\1\"]', $sel);// input:button, input:submit, etc.\n\t\t\t$sel = preg_replace('/(\\w+)\\[([_\\w-]+[_\\w\\d-]*)\\]/', '\\1[@\\2]', $sel);// foo[id]\n\t\t\t$sel = preg_replace('/\\[([_\\w-]+[_\\w\\d-]*)\\]/', '*[@\\1]', $sel); // [id]\n\t\t\t$sel = preg_replace('/\\[([_\\w-]+[_\\w\\d-]*)=[\\'\"]?(.*?)[\\'\"]?\\]/', '[@\\1=\"\\2\"]', $sel); // foo[id=foo]\n\t\t\t$sel = preg_replace('/^\\[/', '*[', $sel);// [id=foo]\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*)\\#([_\\w-]+[_\\w\\d-]*)/', '\\1[@id=\"\\2\"]', $sel);// div#foo\n\t\t\t$sel = preg_replace('/\\#([_\\w-]+[_\\w\\d-]*)/', '*[@id=\"\\1\"]', $sel);// #foo\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*)\\.([_\\w-]+[_\\w\\d-]*)/', '\\1[contains(concat(\" \",@class,\" \"),\" \\2 \")]', $sel);// div.foo\n\t\t\t$sel = preg_replace('/\\.([_\\w-]+[_\\w\\d-]*)/', '*[contains(concat(\" \",@class,\" \"),\" \\1 \")]', $sel);// .foo\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):first-child/', '*/\\1[position()=1]', $sel);// div:first-child\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):last-child/', '*/\\1[position()=last()]', $sel);// div:last-child\n\t\t\t$sel = str_replace(':first-child', '*/*[position()=1]', $sel);// :first-child\n\t\t\t$sel = str_replace(':last-child', '*/*[position()=last()]', $sel);// :last-child\n\t\t\t$sel = preg_replace('/:nth-last-child\\((\\d+)\\)/', '[position()=(last() - (\\1 - 1))]', $sel);// :nth-last-child\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):nth-child\\((\\d+)\\)/', '*/*[position()=\\2 and self::\\1]', $sel);// div:nth-child\n\t\t\t$sel = preg_replace('/:nth-child\\((\\d+)\\)/', '*/*[position()=\\1]', $sel);// :nth-child\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):contains\\((.*?)\\)/', '\\1[contains(string(.),\"\\2\")]', $sel);// :contains(Foo)\n\t\t\t$sel = preg_replace('/>/', '/', $sel);// >\n\t\t\t$sel = preg_replace('/~/', '/following-sibling::', $sel);// ~\n\t\t\t$sel = preg_replace('/\\+([_\\w-]+[_\\w\\d-]*)/', '/following-sibling::\\1[position()=1]', $sel);// +\n\t\t\t$sel = str_replace(']*', ']', $sel);\n\t\t\t$sel = str_replace(']/*', ']', $sel);\n\t\t}\n\t\t// ' '\n\t\t$sel = implode('/descendant::', $sels);\n\t\t$sel = 'descendant-or-self::' . $sel;\n\t\t$sel = preg_replace('/(((\\|)?descendant-or-self::):scope)/', '.\\3', $sel);// :scope\n\t\t$sub_sel = explode(',', $sel);// $element\n\t\tforeach ($sub_sel as $key => $sub_selector) {\n\t\t\t$parts = explode('$', $sub_selector);\n\t\t\t$sub_selector = array_shift($parts);\n\t\t\tif (count($parts) && preg_match_all('/((?:[^\\/]*\\/?\\/?)|$)/', $parts[0], $matches)) {\n\t\t\t\t$results = $matches[0];\n\t\t\t\t$results[] = str_repeat('/..', count($results) - 2);\n\t\t\t\t$sub_selector .= implode('', $results);\n\t\t\t}\n\t\t\t$sub_sel[$key] = $sub_selector;\n\t\t}\n\t\t$sel = implode(',', $sub_sel);\n\t\treturn $sel;\n\t}", "public function getFirst($xpathQuery, \\DOMNode $contextnode = null);", "function query_xml($query)\n {\n\t\t\n\t\t$tag_key = strrpos($query, 'GROUP BY');\n\t\t//echo $tag_key;\n\t\techo $query .'<br>';\n\t\t$tag_list = substr($query, $tag_key+8, strlen($query)-(tag_key+8) );\n\t\techo $tag_list;\n\t\texit;\n\t\t// connect to db\n\t\t$DBUTIL = new DBUTILS();\n\t\t\n\t\t//execute the query\n\t\t$resultID = mysql_query($query) or die(\"SQL ERROR: \". mysql_error()); \n\t\t\n\t\t$xml_output = \"<?xml version=\\\"1.0\\\"?>\\n\"; \n\t\t$xml_output .= \"<SHOWS>\\n\"; \n\t\t\n\t\tfor($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){ \n\t\t\t$row = mysql_fetch_assoc($resultID); \n\t\t\t$xml_output .= \"\\t<show>\\n\"; \n\t\t\t// Escaping illegal characters \n\t\t\t$row['title'] = str_replace(\"&\", \"&\", $row['title']); \n\t\t\t$row['title'] = str_replace(\"ó\", \"o\", $row['title']); \n\t\t\t$row['title'] = str_replace(\"<\", \"<\", $row['title']); \n\t\t\t$row['title'] = str_replace(\">\", \"&gt;\", $row['title']); \n\t\t\t$row['title'] = str_replace(\"\\\"\", \"&quot;\", $row['title']); \n\t\t\t$xml_output .= \"\\t\\t<show_name>\" . $row['title'] . \"</show_name>\\n\"; \n\t\t\t$xml_output .= \"\\t\\t<date>\" . date(\"M jS Y\", $row[\"showdate\"]). \"</date>\\n\"; \n\n\t\t\t$xml_output .= \"\\t</show>\\n\"; \n\t\t} \n\t\t\n\t\t$xml_output .= \"</SHOWS>\";\n\t\treturn $xml_output; \n\t}", "public function get()\n {\n $query = $this->getForString();\n $query .= $this->getInnerExpressionsString();\n $query .= $this->getSortString();\n $query .= $this->getLimitString();\n $query .= $this->getReturnString();\n return $query;\n }", "protected function buildXPathQuery($xpath, array $args = []) {\n @trigger_error('AssertLegacyTrait::buildXPathQuery() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->buildXPathQuery() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n return $this->assertSession()->buildXPathQuery($xpath, $args);\n }", "private function getOptionsXpath() {\n return sprintf(Dropdown::OPTIONS_XPATH,$this::$keyWord);\n }", "public function first () { return new XDTNodeList($this[0]); }", "public function getXPath($type)\n {\n $variable = $type . 'XPath';\n if (isset($this->$variable)) {\n return $this->$variable;\n }\n throw new OpenDocument_Exception('No XPath for ' . $type);\n }", "public function getReplies()\r\n{\r\n\t$query_string = \"SELECT replyid, replycontent, replydate, replyauthor FROM replies \";\r\n $query_string .= \"WHERE replytopic = :replytopic\";\r\n\r\n return $query_string;\r\n}", "function DOM_quotation() {\r\n\t\t$array_exclusions = array(\r\n\t\t'head',\r\n\t\t'script',\r\n\t\t'style',\r\n\t\t);\r\n\t\t\r\n\t\t$grand_changes_count = 0;\r\n\t\t\r\n\t\t// this does not deal with &quot; entities..........\r\n\t\t$query = '//text()';\r\n\t\t$text_nodes = $this->xpath->query($query);\r\n\t\tforeach($text_nodes as $text_node) {\r\n\t\t\t$changes_count = 0;\r\n\t\t\tif(strlen(trim($text_node->nodeValue)) > 0) {\r\n\t\t\t\t$node_value = $text_node->nodeValue;\r\n\t\t\t\t// come to think of it, the right double quotes lines just take any double quotes remaining and makes them closing quote tags... oh well.\r\n\t\t\t\tif($this->config['quotes_style'] === 'omit_characters') {\r\n\t\t\t\t\t$node_value = preg_replace('/(' . $this->leftDoubleQuotes . ')(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}\\w{1,})/is', 'XXX9o9NewTagBeginXXXq9o9XXX$2$4$5', $node_value, -1, $ct1);\r\n\t\t\t\t\t$node_value = preg_replace('/(\\w{0,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/\\']{0,})(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}(' . $this->rightDoubleQuotes . ')/is', '$1$2$4XXX9o9NewTagEndXXXq9o9XXX', $node_value, -1, $ct2);\r\n\t\t\t\t\t$changes_count += $ct1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// unfortunately people seem to use french quotes on english pages...\r\n\t\t\t\t\tif($this->language === \"french\") {\r\n\t\t\t\t\t\t$node_value = preg_replace('/(' . $this->leftDoubleQuotes . ')(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}\\w{1,})/is', 'XXX9o9NewTagBeginXXXq9o9XXXXXX9o9NewEntityXXXlaquo9o9XXXXXX9o9NewEntityXXXnbsp9o9XXX$2$4$5', $node_value, -1, $ct4);\r\n\t\t\t\t\t\t$node_value = preg_replace('/(\\w{0,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/\\']{0,})(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}(' . $this->rightDoubleQuotes . ')/is', '$1$2$4XXX9o9NewEntityXXXnbsp9o9XXXXXX9o9NewEntityXXXraquo9o9XXXXXX9o9NewTagEndXXXq9o9XXX', $node_value, -1, $ct5);\r\n\t\t\t\t\t\t$changes_count += $ct4;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$node_value = preg_replace('/(' . $this->leftDoubleQuotes . ')(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}\\w{1,})/is', 'XXX9o9NewTagBeginXXXq9o9XXXXXX9o9NewEntityXXXldquo9o9XXX$2$4$5', $node_value, -1, $ct7);\r\n\t\t\t\t\t\t$node_value = preg_replace('/(\\w{0,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/\\']{0,})(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}(' . $this->rightDoubleQuotes . ')/is', '$1$2$4XXX9o9NewEntityXXXrdquo9o9XXXXXX9o9NewTagEndXXXq9o9XXX', $node_value, -1, $ct8);\r\n\t\t\t\t\t\t$changes_count += $ct7;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($ct1 > 0 || $ct2 > 0 || $ct4 > 0 || $ct5 > 0 || $ct7 > 0 || $ct8 > 0) {\r\n\t\t\t\t\t$nodeAncestorsArray = ReTidy::DOM_getNodeAncestry($text_node);\r\n\t\t\t\t\t$apply_q = true;\r\n\t\t\t\t\tforeach($nodeAncestorsArray as $ancestor) {\r\n\t\t\t\t\t\tforeach($array_exclusions as $exclusion) {\r\n\t\t\t\t\t\t\tif($exclusion === $ancestor) {\r\n\t\t\t\t\t\t\t\t$apply_q = false;\r\n\t\t\t\t\t\t\t\tcontinue 3;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($apply_q) {\r\n\t\t\t\t\t\t$text_node->nodeValue = $node_value;\r\n\t\t\t\t\t\t$grand_changes_count += $changes_count;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->logMsgIf(\"double quotes to &lt;q&gt;\", $grand_changes_count);\r\n\t}", "protected function getQuery() {\n $query = new Query();\n if($this->valid()) {\n $query->setQuery(new GtNode($this->dataStore->getIdentifier(), $this->key()));\n }\n $query->setLimit(new LimitNode($this->limit));\n $query->setSort(new SortNode([\n $this->dataStore->getIdentifier() => SortNode::SORT_ASC\n ]));\n return $query;\n }", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function parent($selector = null) { \r\n\t\t\r\n\t\t$list = new XDTNodeList();\r\n\t\t\r\n\t\tforeach ($this as $node) $list->add($node->parentNode);\r\n\t\t\r\n\t\tif (!isset($selector)) return $list;\r\n\t\t\r\n\t\t$this->xml_query = $list;\r\n\t\treturn $this->select($selector, null, XDT::SELECT_FILTER);\r\n\t}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "function Query($query)\n {\n $databasename = $this->databasename;\n static $tblcache = array();\n\n $qitems = array();\n $qitems['fields'] = false;\n $qitems['tablename'] = false;\n $qitems['option'] = false;\n $qitems['orderby'] = false;\n $qitems['min'] = false;\n $qitems['length'] = false;\n $qitems['where'] = false;\n $fieldstoget = false;\n //SELECT\n if ( preg_match(\"/^SELECT/is\",$query) )\n {\n if ( preg_match(\"/^SELECT( DISTINCT | )([a-zA-Z0-9, \\(\\)\\*]+|\\*|COUNT\\(\\*\\)) FROM (\\w+)(.+)/i\",\"$query \",$t1) )\n {\n //campi\n $qitems['fields'] = trim(ltrim($t1[2]));\n $qitems['tablename'] = trim(ltrim($t1[3]));\n $qitems['option'] = trim(ltrim($t1[1]));\n //dprint_r($t1);\n //dprint_r($qitems);\n $tmpwhere = $t1[4];\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $tbl = &$tblcache[$cid];\n //$tbl = new XMLTable($databasename, $qitems['tablename'], $this->path);\n\n\n if ( $qitems['tablename'] == \"\" )\n return \"xmldb: syntax error\";\n\n if ( !file_exists($this->path . \"/$databasename/{$qitems['tablename']}.php\") )\n return \"xmldb: unknow table {$qitems['tablename']}\";\n\n //dprint_r($tbl);\n //native mysql table ----------------------->\n /*\n if (isset($tbl->driverclass->connection))\n {\n $ret = $tbl->driverclass->dbQuery($query, $databasename);\n //dprint_r($ret);\n return $ret;\n }\n */\n //native mysql table -----------------------<\n\n\n //dprint_r($t1);\n if ( preg_match(\"/WHERE (.+)/i\",$tmpwhere,$t1) )\n {\n $tmpwhere = $t1[1];\n $qitems['where'] = $tmpwhere;\n }\n else\n $qitems['where'] = \"\";\n\n if ( preg_match(\"/(.+)LIMIT ([0-9]+),([0-9]+)/i\",$tmpwhere,$dt3) )\n {\n //dprint_r($dt3);\n $qitems['min'] = $dt3[2];\n $qitems['length'] = $dt3[3];\n $tmpwhere = $dt3[1];\n $qitems['where'] = $tmpwhere;\n }\n if ( preg_match(\"/(.+)ORDER BY (.*)(i:limit|)/i\",$tmpwhere,$dt2) )\n {\n //dprint_r($dt2);\n $tmpwhere = $dt2[1];\n $qitems['orderby'] = trim(ltrim($dt2[2]));\n $qitems['where'] = $tmpwhere;\n }\n\n //dprint_r($qitems);\n\n\n }\n\n //dprint_r($qitems);\n //----CONDIZIONE---------------------->\n $where2 = preg_replace(\"/(\\\\w+)( = )/\",'\\$item[\\'${1}\\'] == ',trim(ltrim($qitems['where'])));\n $where2 = preg_replace(\"/(\\\\w+)( > )/\",'\\$item[\\'${1}\\'] > ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( < )/\",'\\$item[\\'${1}\\'] < ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( >= )/\",'\\$item[\\'${1}\\'] >= ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( <= )/\",'\\$item[\\'${1}\\'] <= ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( <> )/\",'\\$item[\\'${1}\\'] != ',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"%(.*?)%\"/i','preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"%(.*?)\"/i','preg_match(\"/${3}$/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)%\"/i','preg_match(\"/^${3}/i\",\\$item[\\'${1}\\'])',$where2);\n\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)\"/i','\"${3}\" == \\$item[\\'${1}\\']',$where2);\n //$where2 = preg_replace ( '/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)\"/i', 'preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])', $where2 );\n\n\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'%(.*?)%\\'/i','preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'%(.*?)\\'/i','preg_match(\"/${3}$/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)%\\'/i','preg_match(\"/^${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)\\'/i','\"${3}\" == \\$item[\\'${1}\\']',$where2);\n //$where2 = preg_replace ( '/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)\\'/i', 'preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])', $where2 );\n //dprint_r($where2);\n //----CONDIZIONE----------------------<\n //per ottimizzare prendo solo i fields che mi interessano--->\n if ( $qitems['fields'] == \"*\" || preg_match('/COUNT\\(\\*\\)/is',$qitems['fields']) )\n {\n\n $fieldstoget = false;\n }\n else\n {\n //per performance coinvolgo solamente i fields interessati dalla query\n if ( $qitems['orderby'] != \"\" )\n {\n $t = explode(\",\",$qitems['orderby']);\n foreach ( $t as $tf )\n {\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n }\n $t = explode(\",\",$qitems['fields']);\n foreach ( $t as $tf )\n {\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n $t = xmldb_iExplode(\" OR \",$qitems['where']);\n //dprint_r($t);\n foreach ( $t as $tf )\n {\n $tf = trim(ltrim($tf));\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n $t = xmldb_iExplode(\" AND \",$qitems['where']);\n foreach ( $t as $tf )\n {\n $tf = trim(ltrim($tf));\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n if ( !is_array($fieldstoget) )\n return \"xmldb: syntax error\";\n\n $fieldstoget = array_unique($fieldstoget);\n }\n //dprint_r($fieldstoget);\n //per ottimizzare prendo solo i fields che mi interessano--->\n\n\n $allrecords = $tbl->GetRecords(false,false,false,false,false,$fieldstoget);\n\n //ordinamento -------->\n if ( $qitems['orderby'] != \"\" )\n {\n $orders = explode(\",\",$qitems['orderby']);\n foreach ( $orders as $order )\n {\n\n if ( preg_match(\"/([a-zA-Z0-9]+)(.*)/s\",$order,$orderfields) );\n {\n //dprint_r($orderfields);\n if ( preg_match(\"/DESC/is\",trim(ltrim($orderfields[2]))) )\n {\n $isdesc = true;\n }\n else\n $isdesc = false;\n\n $allrecords = array_sort_by_key($allrecords,trim(ltrim($orderfields[1])),$isdesc);\n }\n }\n }\n //ordinamento --------<\n\n\n $i = 0;\n $ret = null;\n\n //filtro search condition -------------------->\n if ( !is_array($allrecords) )\n return null;\n foreach ( $allrecords as $item )\n {\n $ok = false;\n\n //eval($where2);\n //dprint_r (\"if ($where2){\". '$ok=true;'.\"}\");\n if ( $where2 == \"\" )\n $ok = true;\n else\n eval(\"if ($where2){\" . '$ok=true;' . \"}\");\n if ( $ok == false )\n continue;\n //dprint_r($qitems);\n if ( $qitems['fields'] == \"*\" )\n {\n $tmp = $item;\n }\n else\n {\n\n $fields = explode(\",\",$qitems['fields']);\n $tmp = null;\n //dprint_r($fields);\n //alias ------->\n foreach ( $fields as $field )\n {\n if ( preg_match(\"/ AS /is\",$field) )\n {\n\n $as = xmldb_iExplode(\" AS \",$field);\n $k2 = trim(ltrim($as[1]));\n $k1 = trim(ltrim($as[0]));\n }\n else\n $k1 = $k2 = trim(ltrim($field));\n\n if ( !isset($item[$k1]) && strtoupper($k1) != \"COUNT(*)\" )\n return \"xmldb: unknow row '$k1' in table {$qitems['tablename']}\";\n\n if ( strtoupper($k1) != \"COUNT(*)\" )\n {\n //echo \"field = $k1 \";\n $tmp[$k2] = $item[$k1];\n }\n else\n $tmp[$k2] = $item;\n\n }\n //alias -------<\n }\n //----distinct------------->\n if ( strtoupper($qitems['option']) == \"DISTINCT\" )\n if ( array_in_array($tmp,$ret) )\n continue;\n //----distinct-------------<\n $i++ ;\n //----min length----------->\n if ( ($qitems['min']) && $i < $qitems['min'] )\n continue;\n if ( ($qitems['min'] && $qitems['length']) && ($i) >= ($qitems['min'] + $qitems['length']) )\n break;\n //----min length----------->\n $ret[] = $tmp;\n }\n //filtro search condition --------------------<\n //dprint_r($qitems);\n $count = false;\n if ( stristr($qitems['fields'],\"COUNT(*)\") )\n {\n // ADDED BY DANIELE FRANZA 2/02/2009: start\n if ( preg_match(\"/ AS /is\",$qitems['fields']) )\n {\n $as = xmldb_iExplode(\" AS \",$qitems['fields']);\n $k2 = trim(ltrim($as[1]));\n $k1 = trim(ltrim($as[0]));\n }\n else\n {\n //if (!isset($field))\n //\t$field=\"COUNT(*)\";\n $k1 = $k2 = trim(ltrim($field));\n }\n // ADDED BY DANIELE FRANZA 2/02/2009: end\n\n\n $count = true;\n //$fields = false;\n }\n\n if ( $count )\n return array(0=>array(\"$k2\"=>count($ret)));\n else\n return $ret;\n }\n\n //DESCRIBE TODO\n if ( preg_match(\"/^DESCRIBE/is\",$query) )\n {\n if ( preg_match(\"/^DESCRIBE ([a-zA-Z0-9_]+)/is\",\"$query \",$t1) )\n {\n $qitems['tablename'] = trim(ltrim($t1[1]));\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $t = &$tblcache[$cid];\n //\t\t\t\t$t = new XMLTable($databasename, $qitems['tablename'], $this->path);\n //native mysql table ----------------------->\n /*\n if ($t->driverclass->connection)\n {\n return $t->driverclass->dbQuery($query);\n }\n //native mysql table -----------------------<\n else*/\n {\n $ret = array();\n foreach ( $t->fields as $field )\n {\n $ret[] = array(\"Field\"=>$field->name,\"Type\"=>$field->type,\"Null\"=>\"NO\",\"Key\"=>$field->primarykey,\"Extra\"=>$field->extra);\n }\n return $ret;\n }\n }\n }\n //SHOW TABLES\n if ( preg_match(\"/^SHOW TABLES/is\",trim(ltrim($query))) )\n {\n $path = ($this->path . \"/\" . $this->databasename . \"/*\");\n $files = glob($path);\n $ret = array();\n foreach ( $files as $file )\n {\n if ( !is_dir($file) )\n $ret[] = array(\"Tables_in_\" . $this->databasename=>preg_replace('/.php$/s','',basename($file)));\n }\n return $ret;\n }\n //INSERT\n if ( preg_match(\"/^INSERT/is\",$query) )\n {\n if ( preg_match(\"/^INSERT[ ]+INTO([a-zA-Z0-9\\\\`\\\\._ ]+)\\\\(([a-zA-Z_ ,]+)\\\\)[ ]+VALUES[ ]+\\\\((.*)\\\\)/i\",\"$query \",$t1) )\n {\n $qitems['tablename'] = trim(ltrim($t1[1]));\n $qitems['fields'] = trim(ltrim($t1[2]));\n $qitems['values'] = trim(ltrim($t1[3]));\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $tbl = &$tblcache[$cid];\n //native mysql table ----------------------->\n /*if ($tbl->driverclass->connection)\n {\n $ret = $t->driverclass->dbQuery($query);\n //dprint_r($ret);\n return $ret;\n }*/\n //native mysql table -----------------------<\n\n\n $fields = explode(\",\",$qitems['fields']);\n $values = explode(\",\",$qitems['values']);\n $recordstoinsert = array();\n if ( count($fields) == count($values) )\n {\n for ( $i = 0;$i < count($fields);$i++ )\n {\n $recordstoinsert[$fields[$i]] = preg_replace(\"/^'/\",\"\",preg_replace(\"/'$/s\",\"\",preg_replace('/^\"/s',\"\",preg_replace('/\"$/s',\"\",$values[$i]))));\n }\n }\n else\n return \"xmldb: syntax error\";\n\n return $tbl->InsertRecord($recordstoinsert);\n }\n }\n //UPDATE TODO\n if ( preg_match(\"/^UPDATE/is\",$query) )\n {\n //UPDATE `fndatabase`.`users` SET `name` = 'quattro' WHERE CONVERT( `users`.`email` USING utf8 ) = 'uno' LIMIT 1 ;\n\n\n }\n //DELETE TODO\n if ( preg_match(\"/^DELETE/is\",$query) )\n {\n\n }\n }", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "public static function getDomNodeXmlStr($domNode)\n {\n return $domNode->ownerDocument->saveXML($domNode);\n }", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "public function query ($expression, DomNode $contextNode = null, $registerNodeNS = null) {}", "abstract protected function get_root_element();", "public function getChildNodes() {}", "public function getChildNodes() {}", "function &xmlp( $xmlObject, $xPath )\n{\n\t$x = $xmlObject->xpath( $xPath );\n\treturn $x[0];\n}", "function XMLElementToXPath($currentXPath, $myXMLElement) {\n $xpathList = array( );\n $attributes = $myXMLElement->attributes( ); // grab attributes from current root element\n\n // Process element attributes, if any.\n foreach($attributes as $att_key=>$att_value) { // process element attributes (if any)\n $xpathList[] = ($currentXPath!=''?$currentXPath.'/':'').'@'. $att_key; // create XPath for attribute\n $xpathList[] = ($currentXPath!=''?$currentXPath:'').'[@'. $att_key.'=\\''.$att_value.'\\']'; // create XPath expression for element with certain attribute value\n }\n\n // Process children, if any.\n foreach($myXMLElement->children() as $childElement) {\n// $xpathList[]= ($currentXPath!=''?$currentXPath.'/':'').(string) $childElement->getName(); // create XPath expression for element\n if ($childValue = (string) $childElement->title) {\n $append = \"/text()='$childValue'\";\n } else {\n $append = '';\n }\n\n $xpathList[]= ($currentXPath!=''?$currentXPath.'/':'').(string) $childElement->getName().$append; // create XPath expression for element\n if ($childElement instanceof SimpleXMLElement) { // if child is an XML node itself then go into recursion\n $xpathList = array_merge($xpathList,XMLElementToXPath(($currentXPath!=''?$currentXPath.'/':'').(string)$childElement->getName(),$childElement));\n }\n }\n return $xpathList;\n}", "function selectorToXPath($selector) {\r\n\t\t// a:link:link\r\n\t\t// a:visited\r\n\t\t// a:link:hover\r\n\t\t// a:active\r\n\t\t// a:visited:hover\r\n\t\t// They are put into the style attribute.\r\n\t\t$namespace = ReTidy::get_html_namespace();\r\n\t\t$selector = \" \" . $selector;\r\n\t\t$XPath = $selector;\r\n\t\t$replaceArray = array(\r\n\t\t' \\.' => '//' . $namespace . '*.',\r\n\t\t' #' => '//' . $namespace . '*#',\t\t\r\n\t\t'\\[([^\\[\\]]*)\\]' => '[@$1]',\r\n\t\t'\\s*>\\s*' => '/' . $namespace,\r\n\t\t// first-child and company are theoretically put into the style attribute\r\n\t\t//'([\\w\\-]*):first-child' => '*[1]/self::$1',\r\n\t\t// these are pseudo-selectors and could be part of either the selector or the style information for our purposes.\r\n\t\t// it is probably easier to consider them as style information.\r\n\t\t//'([\\w\\-]*):first-child' => 'child::$1[1]',\r\n\t\t'([\\w\\-]{1,}|\\*)(\\.[\\w\\-]{1,})*:first-child' => '*[1]/self::$1$2',\r\n\t\t//'([\\w\\-]*):last-child' => 'child::$1[last()]',\r\n\t\t'([\\w\\-]{1,}|\\*)(\\.[\\w\\-]{1,})*:last-child' => '*[last()]/self::$1$2',\r\n\t\t//'([\\w\\-]*):lang\\(([^\\(\\)]*)\\)' => '$1[@xml:lang=\"$2\" or starts-with(@xml:lang, concat(\"$2\",\"-\"))]',\r\n\t\t//'\\s*\\+\\s*' => '/following-sibling::*[1]/self::',\r\n\t\t'([\\w\\-]{1,}|\\*)\\s*\\+\\s*([\\w\\-\\*]*)' => '$1/following-sibling::*[1]/self::$2',\r\n\t\t//'([\\w\\-]*)\\s*\\+\\s*([\\w\\-]*)' => '$1/following-sibling::$2[0]',\r\n\t\t//'([\\w\\-]*)[([\\w\\-]*)~=(\"|\\')([^\\3]*)\\3]' => '$1[contains(concat(\" \",@$2,\" \"),concat(\" \",\"$4\",\" \"))]',\r\n\t\t//'([\\w\\-]*)[([\\w\\-]*)|=(\"|\\')([^\\3]*)\\3]' => '$1[@$2=\"$3\" or starts-with(@$2,concat(\"$3\",\"-\"))]',\r\n\t\t'#([\\w\\-]{1,})' => '[@id=\"$1\"]',\r\n\t\t' ' => '//' . $namespace,\r\n\t\t//'\\.([\\w\\-]*)' => '[@class=\"$1\"]',\r\n\t\t// the above is insufficient; elements may be multiply-classed:\r\n\t\t'\\.([\\w\\-]{1,})' => '[contains(concat(\" \",@class,\" \"),\" $1 \")]',\r\n\t\t// the following can simply be precatenated when doing the query.\r\n\t\t//'(.*)' => '//' . ReTidy::get_html_namespace() . '$1',\r\n\t\t//'\\*\\*' => '*',\r\n\t\t);\r\n\t\tforeach($replaceArray as $search => $replace) {\r\n\t\t\t$XPath = preg_replace('/' . $search . '/is', $replace, $XPath);\r\n\t\t}\r\n\t\treturn $XPath;\r\n\t}", "public function generateQuery(IDruidQueryParameters $params)\n {\n // @var ReferralsByCompanyGroupByQueryParameters $params\n $query = $this->queryTemplate;\n\n $query = str_replace('{DATASOURCE}', $params->dataSource, $query);\n $query = str_replace('{STARTINTERVAL}', $params->startInterval, $query);\n $query = str_replace('{ENDINTERVAL}', $params->endInterval, $query);\n\n return $query;\n }", "public function xml2query()\n {\n if (array_key_exists(\"CogModule\", $this->data)) {\n $q = &$this->data[\"CogModule\"];\n } else {\n $q = &$this->data[\"Report\"];\n }\n\n $criteria_links = array();\n\n // Generate Output Information...\n $ds = false;\n if (!$q) {\n return;\n }\n\n foreach ($q as $cogquery) {\n // Set Query Attributes\n foreach ($cogquery[\"Format\"] as $att => $val) {\n $this->query->setAttribute($att, $val);\n }\n\n // Set DataSource\n if (isset($cogquery[\"Datasource\"])) {\n foreach ($cogquery[\"Datasource\"] as $att => $val) {\n //if ( $att == \"SourceType\" )\n //$this->query->source_type = $val;\n\n if ($att == \"SourceConnection\") {\n // No longer relevant - connections are not supplied in xml files\n }\n }\n }\n\n // Set Query Columns\n if (!($ef = &$this->getArrayElement($cogquery, \"EntryForm\"))) {\n $this->ErrorMsg = \"No EntryForm tag within Format\";\n return false;\n }\n\n if (!($qu = &$this->getArrayElement($ef, \"Query\"))) {\n $this->ErrorMsg = \"No Query tag within EntryForm\";\n return false;\n }\n\n $this->query->table_text = $this->getArrayElement($qu, \"TableSql\");\n $this->query->where_text = $this->getArrayElement($qu, \"WhereSql\");\n $this->query->group_text = $this->getArrayElement($qu, \"GroupSql\");\n $this->query->rowselection = $this->getArrayElement($qu, \"RowSelection\");\n $has_cols = true;\n\n if (($qc = &$this->getArrayElement($qu, \"SQL\"))) {\n $this->query->sql_raw = $this->getArrayElement($qc, \"SQLRaw\");\n }\n\n if (!($qc = &$this->getArrayElement($qu, \"QueryColumns\"))) {\n $this->ErrorMsg = \"No QueryColumns tag within Query\";\n $has_cols = false;\n }\n\n // Generate QueryColumn for each column found\n if ($has_cols) {\n foreach ($qc as $col) {\n $in_query = true;\n if (!$col[\"ColumnName\"]) {\n $in_query = false;\n }\n\n $this->query->createCriteriaColumn\n (\n $col[\"Name\"],\n $col[\"TableName\"],\n $col[\"ColumnName\"],\n $col[\"ColumnType\"],\n $col[\"ColumnLength\"],\n \"###.##\",\n $in_query\n );\n\n // Set any Attributes\n if (($fm = &$this->getArrayElement($col, \"Format\"))) {\n foreach ($fm as $att => $val) {\n $this->query->setColumnAttribute($col[\"Name\"], $att, $val);\n }\n }\n }\n\n // Generate Order By List\n if (($oc = &$this->getArrayElement($qu, \"OrderColumns\"))) {\n // Generate QueryColumn for each column found\n foreach ($oc as $col) {\n if (!$col[\"Name\"]) {\n return;\n }\n\n $this->query->createQueryColumn\n (\n $col[\"Name\"],\n $col[\"OrderType\"]\n );\n }\n }\n\n // Generate Query Assignments\n if (($as = &$this->getArrayElement($ef, \"Assignments\"))) {\n foreach ($as as $col) {\n if (array_key_exists(\"AssignName\", $col)) {\n $this->query->addAssignment($col[\"AssignName\"], $col[\"Expression\"], $col[\"Condition\"]);\n } else {\n $this->query->addAssignment($col[\"Name\"], $col[\"Expression\"], $col[\"Condition\"]);\n }\n\n }\n }\n }\n\n // Generate Query Assignments\n if (($pq = &$this->getArrayElement($qu, \"PreSQLS\"))) {\n foreach ($pq as $col) {\n $this->query->addPreSql($col[\"SQLText\"]);\n }\n }\n\n // Generate Output Information...\n if (($op = &$this->getArrayElement($ef, \"Output\"))) {\n // Generate Page Headers\n if (($ph = $this->getArrayElement($op, \"PageHeaders\"))) {\n foreach ($ph as $k => $phi) {\n $this->query->createPageHeader($k, $phi[\"LineNumber\"], $phi[\"HeaderText\"]);\n if (($fm = &$this->getArrayElement($phi, \"Format\"))) {\n foreach ($fm as $att => $val) {\n $this->query->setPageHeaderAttribute($k, $att, $val);\n }\n }\n\n }\n }\n\n // Generate Page Footers\n if (($ph = $this->getArrayElement($op, \"PageFooters\"))) {\n foreach ($ph as $k => $phi) {\n $this->query->createPageFooter($k, $phi[\"LineNumber\"], $phi[\"FooterText\"]);\n if (($fm = &$this->getArrayElement($phi, \"Format\"))) {\n foreach ($fm as $att => $val) {\n $this->query->setPageFooterAttribute($k, $att, $val);\n }\n }\n\n }\n }\n\n // Generate Display Orders\n if ($has_cols && ($ph = $this->getArrayElement($op, \"DisplayOrders\"))) {\n foreach ($ph as $k => $phi) {\n $this->query->setColumnOrder($phi[\"ColumnName\"], $phi[\"OrderNumber\"]);\n }\n }\n\n if ($has_cols && ($ph = $this->getArrayElement($op, \"Groups\"))) {\n foreach ($ph as $k => $phi) {\n if (array_key_exists(\"GroupName\", $phi)) {\n $gpname = $phi[\"GroupName\"];\n } else {\n $gpname = $phi[\"Name\"];\n }\n\n $grn = $this->query->createGroup($gpname);\n\n if (array_key_exists(\"BeforeGroupHeader\", $phi)) {\n $grn->setAttribute(\"before_header\", $phi[\"BeforeGroupHeader\"]);\n $grn->setAttribute(\"after_header\", $phi[\"AfterGroupHeader\"]);\n $grn->setAttribute(\"before_trailer\", $phi[\"BeforeGroupTrailer\"]);\n $grn->setAttribute(\"after_trailer\", $phi[\"AfterGroupTrailer\"]);\n $grn->setFormat(\"before_header\", $phi[\"BeforeGroupHeader\"]);\n $grn->setFormat(\"after_header\", $phi[\"AfterGroupHeader\"]);\n $grn->setFormat(\"before_trailer\", $phi[\"BeforeGroupTrailer\"]);\n $grn->setFormat(\"after_trailer\", $phi[\"AfterGroupTrailer\"]);\n }\n\n if (($gp = &$this->getArrayElement($phi, \"GroupHeaders\"))) {\n foreach ($gp as $att => $val) {\n if (!isset($val[\"GroupHeaderCustom\"])) {\n $val[\"GroupHeaderCustom\"] = false;\n }\n\n if (!isset($val[\"ShowInHTML\"])) {\n $val[\"ShowInHTML\"] = \"yes\";\n }\n\n if (!isset($val[\"ShowInPDF\"])) {\n $val[\"ShowInPDF\"] = \"yes\";\n }\n\n $this->query->createGroupHeader($gpname, $val[\"GroupHeaderColumn\"], $val[\"GroupHeaderCustom\"], $val[\"ShowInHTML\"], $val[\"ShowInPDF\"]);\n }\n }\n\n if (($gp = &$this->getArrayElement($phi, \"GroupTrailers\"))) {\n foreach ($gp as $att => $val) {\n if (!isset($val[\"GroupTrailerCustom\"])) {\n $val[\"GroupTrailerCustom\"] = false;\n }\n\n if (!isset($val[\"ShowInHTML\"])) {\n $val[\"ShowInHTML\"] = \"yes\";\n }\n\n if (!isset($val[\"ShowInPDF\"])) {\n $val[\"ShowInPDF\"] = \"yes\";\n }\n\n $this->query->createGroupTrailer($gpname, $val[\"GroupTrailerDisplayColumn\"],\n $val[\"GroupTrailerValueColumn\"],\n $val[\"GroupTrailerCustom\"], $val[\"ShowInHTML\"], $val[\"ShowInPDF\"]);\n }\n }\n\n }\n }\n\n // Generate Graphs\n if ($has_cols && ($gph = $this->getArrayElement($op, \"Graphs\"))) {\n foreach ($gph as $k => $gphi) {\n $ka = array_keys($gphi);\n $gph = &$this->query->createGraph();\n\n $gph->setGraphColumn($gphi[\"GraphColumn\"]);\n\n $gph->setTitle($gphi[\"Title\"]);\n $gph->setXtitle($gphi[\"XTitle\"]);\n $gph->setXlabelColumn($gphi[\"XLabelColumn\"]);\n $gph->setYtitle($gphi[\"YTitle\"]);\n //$gph->setYlabelColumn($gphi[\"YLabelColumn\"]);\n //////HERE!!!\n if (array_key_exists(\"GraphWidth\", $gphi)) {\n $gph->setWidth($gphi[\"GraphWidth\"]);\n $gph->setHeight($gphi[\"GraphHeight\"]);\n $gph->setWidthPdf($gphi[\"GraphWidthPDF\"]);\n $gph->setHeightPdf($gphi[\"GraphHeightPDF\"]);\n } else {\n $gph->setWidth($gphi[\"Width\"]);\n $gph->setHeight($gphi[\"Height\"]);\n }\n\n if (array_key_exists(\"GraphColor\", $gphi)) {\n $gph->setGraphColor($gphi[\"GraphColor\"]);\n $gph->setGrid($gphi[\"GridPosition\"],\n $gphi[\"XGridDisplay\"], $gphi[\"XGridColor\"],\n $gphi[\"YGridDisplay\"], $gphi[\"YGridColor\"]\n );\n $gph->setTitleFont($gphi[\"TitleFont\"], $gphi[\"TitleFontStyle\"],\n $gphi[\"TitleFontSize\"], $gphi[\"TitleColor\"]);\n $gph->setXtitleFont($gphi[\"XTitleFont\"], $gphi[\"XTitleFontStyle\"],\n $gphi[\"XTitleFontSize\"], $gphi[\"XTitleColor\"]);\n $gph->setYtitleFont($gphi[\"YTitleFont\"], $gphi[\"YTitleFontStyle\"],\n $gphi[\"YTitleFontSize\"], $gphi[\"YTitleColor\"]);\n $gph->setXaxis($gphi[\"XTickInterval\"], $gphi[\"XTickLabelInterval\"], $gphi[\"XAxisColor\"]);\n $gph->setYaxis($gphi[\"YTickInterval\"], $gphi[\"YTickLabelInterval\"], $gphi[\"YAxisColor\"]);\n $gph->setXaxisFont($gphi[\"XAxisFont\"], $gphi[\"XAxisFontStyle\"],\n $gphi[\"XAxisFontSize\"], $gphi[\"XAxisFontColor\"]);\n $gph->setYaxisFont($gphi[\"YAxisFont\"], $gphi[\"YAxisFontStyle\"],\n $gphi[\"YAxisFontSize\"], $gphi[\"YAxisFontColor\"]);\n $gph->setMarginColor($gphi[\"MarginColor\"]);\n $gph->setMargins($gphi[\"MarginLeft\"], $gphi[\"MarginRight\"],\n $gphi[\"MarginTop\"], $gphi[\"MarginBottom\"]);\n }\n foreach ($gphi[\"Plots\"] as $pltk => $pltv) {\n $pl = &$gph->createPlot($pltv[\"PlotColumn\"]);\n $pl[\"type\"] = $pltv[\"PlotType\"];\n $pl[\"fillcolor\"] = $pltv[\"FillColor\"];\n $pl[\"linecolor\"] = $pltv[\"LineColor\"];\n $pl[\"legend\"] = $pltv[\"Legend\"];\n }\n }\n }\n\n } // Output\n\n // Check for Criteria Items ...\n\n if (($crt = &$this->getArrayElement($ef, \"Criteria\"))) {\n foreach ($crt as $ci) {\n $critnm = $this->getArrayElement($ci, \"Name\");\n\n $crittb = $this->getArrayElement($ci, \"QueryTableName\");\n $critcl = $this->getArrayElement($ci, \"QueryColumnName\");\n $linked_report = $this->getArrayElement($ci, \"LinkToReport\");\n $linked_report_item = $this->getArrayElement($ci, \"LinkToReportItem\");\n\n // If we are not designing a report then\n // replace a linked criteria with the criteria\n // item it links to from another report\n if ($linked_report && $this->query->execute_mode != \"MAINTAIN\") {\n $q = new Reportico();\n $q->reports_path = $q->projects_folder . \"/\" . ReporticoApp::getConfig(\"project\");\n $reader = new XmlReader($q, $linked_report, false);\n $reader->xml2query();\n\n foreach ($q->lookup_queries as $k => $v) {\n\n $found = false;\n foreach ($this->query->columns as $querycol) {\n if ($querycol->query_name == $v->query_name) {\n $found = true;\n }\n }\n\n $qu = new Reportico();\n if ($linked_report_item == $v->query_name) {\n $this->query->lookup_queries[$v->query_name] = $v;\n }\n\n }\n continue;\n }\n\n if ($crittb) {\n $critcl = $crittb . \".\" . $critcl;\n $crittb = \"\";\n }\n $crittp = $this->getArrayElement($ci, \"CriteriaType\");\n $critlt = $this->getArrayElement($ci, \"CriteriaList\");\n $crituse = $this->getArrayElement($ci, \"Use\");\n $critds = $this->getArrayElement($ci, \"CriteriaDisplay\");\n $critexp = $this->getArrayElement($ci, \"ExpandDisplay\");\n $critmatch = $this->getArrayElement($ci, \"MatchColumn\");\n $critdefault = $this->getArrayElement($ci, \"CriteriaDefaults\");\n $crithelp = $this->getArrayElement($ci, \"CriteriaHelp\");\n $crittitle = $this->getArrayElement($ci, \"Title\");\n $crit_required = $this->getArrayElement($ci, \"CriteriaRequired\");\n $crit_hidden = $this->getArrayElement($ci, \"CriteriaHidden\");\n $crit_display_group = $this->getArrayElement($ci, \"CriteriaDisplayGroup\");\n $crit_lookup_return = $this->getArrayElement($ci, \"ReturnColumn\");\n $crit_lookup_display = $this->getArrayElement($ci, \"DisplayColumn\");\n $crit_criteria_display = $this->getArrayElement($ci, \"OverviewColumn\");\n\n if ($crittp == \"ANYCHAR\") {\n $crittp = \"TEXTFIELD\";\n }\n\n if ($critds == \"ANYCHAR\") {\n $critds = \"TEXTFIELD\";\n }\n\n if ($critexp == \"ANYCHAR\") {\n $critexp = \"TEXTFIELD\";\n }\n\n // Generate criteria lookup info unless its a link to a criteria in a nother report\n if (!$linked_report && !($ciq = &$this->getArrayElement($ci, \"Query\"))) {\n continue;\n }\n\n $critquery = new Reportico();\n\n // Generate Criteria Query Columns\n if (!$linked_report && ($ciqc = &$this->getArrayElement($ciq, \"QueryColumns\"))) {\n foreach ($ciqc as $ccol) {\n $in_query = true;\n if (!$ccol[\"ColumnName\"]) {\n $in_query = false;\n }\n\n if ( !$crit_lookup_display ) $crit_lookup_display = $ccol[\"Name\"];\n if ( !$crit_lookup_return ) $crit_lookup_return = $ccol[\"Name\"];\n $critquery->createCriteriaColumn\n (\n $ccol[\"Name\"],\n $ccol[\"TableName\"],\n $ccol[\"ColumnName\"],\n $ccol[\"ColumnType\"],\n $ccol[\"ColumnLength\"],\n \"###.##\",\n $in_query\n );\n }\n }\n // Generate Order By List\n if (!$linked_report && ($coc = &$this->getArrayElement($ciq, \"OrderColumns\"))) {\n // Generate QueryColumn for each column found\n foreach ($coc as $col) {\n $critquery->createOrderColumn\n (\n $col[\"Name\"],\n $col[\"OrderType\"]\n );\n }\n }\n\n if (!$linked_report && ($as = &$this->getArrayElement($ciq, \"Assignments\"))) {\n foreach ($as as $ast) {\n if (array_key_exists(\"AssignName\", $ast)) {\n $critquery->addAssignment($ast[\"AssignName\"], $ast[\"Expression\"], $ast[\"Condition\"]);\n } else {\n $critquery->addAssignment($ast[\"Name\"], $ast[\"Expression\"], $ast[\"Condition\"]);\n }\n\n }\n }\n\n // Generate Criteria Links In Array for later use\n if (!$linked_report && ($cl = &$this->getArrayElement($ci, \"CriteriaLinks\"))) {\n foreach ($cl as $clitem) {\n $criteria_links[] = array(\n \"LinkFrom\" => $clitem[\"LinkFrom\"],\n \"LinkTo\" => $clitem[\"LinkTo\"],\n \"LinkClause\" => $clitem[\"LinkClause\"],\n );\n }\n }\n\n // Set Query SQL Text\n if (!$linked_report) {\n $critquery->table_text = $this->getArrayElement($ciq, \"TableSql\");\n $critquery->where_text = $this->getArrayElement($ciq, \"WhereSql\");\n $critquery->group_text = $this->getArrayElement($ciq, \"GroupSql\");\n $critquery->sql_raw = $this->getArrayElement($ciq, \"SQLRaw\");\n $critquery->rowselection = $this->getArrayElement($ciq, \"RowSelection\");\n }\n $critquery->setLookupReturn($crit_lookup_return);\n $critquery->setLookupDisplay($crit_lookup_display, $crit_criteria_display);\n $critquery->setLookupExpandMatch($critmatch);\n $this->query->setCriteriaLookup($critnm, $critquery, $crittb, $critcl);\n $this->query->setCriteriaInput($critnm, $crittp, $critds, $critexp, $crituse);\n $this->query->setCriteriaLinkReport($critnm, $linked_report, $linked_report_item);\n\n $this->query->setCriteriaDefaults($critnm, $critdefault);\n $this->query->setCriteriaList($critnm, $critlt);\n //var_dump($crit_required);\n $this->query->setCriteriaRequired($critnm, $crit_required);\n $this->query->setCriteriaHidden($critnm, $crit_hidden);\n $this->query->setCriteriaDisplayGroup($critnm, $crit_display_group);\n //$this->query->setCriteriaHelp($critnm, $crithelp);\n $this->query->setCriteriaAttribute($critnm, \"column_title\", $crittitle);\n\n $this->query->setCriteriaHelp($critnm, $crithelp);\n\n } // End Criteria Item\n\n // Set up any Criteria Links\n foreach ($criteria_links as $cl) {\n $this->query->setCriteriaLink($cl[\"LinkFrom\"], $cl[\"LinkTo\"], $cl[\"LinkClause\"]);\n }\n }\n }\n\n }", "function execute() {\n $query = $this->getQuery();\n \n $args = $this->getArguments();\n \n $numArgs = count($args);\n if($numArgs == 2) {\n $name = $args[0];\n \n $value = $args[1];\n } else {\n throw new \\InvalidArgumentException(\"XPath Contains must have 2 arguments\");\n }\n \n $valueFn = function($value) {\n if($value!=='.') {\n return \"'$value'\";\n } else {\n return $value;\n }\n };\n \n if(qtil\\ArrayUtil::isIterable($value)) {\n $nvalue = [];\n foreach($value as $v) {\n $nvalue[] = $valueFn($v);\n }\n \n $value = implode(',',$nvalue);\n } else {\n $value = $valueFn($value);\n }\n \n $query['xpath'] .= '[contains('.$name.','.$value.')]';\n }", "public function getQueryDataProvider() {}", "abstract function get_html();", "public function getQueryselector() {\n\t\t$id = $this->sq instanceof SavedQuery ? $this->sq->getID() : 0;\n\n\t\t$return = '<a class=\"btn\" href=\"#\" onclick=\"$(\\'#sqSelector\\').toggle();\">Laat queryselector zien.</a>';\n\t\t$return .= '<div id=\"sqSelector\" ';\n\t\tif ($id != 0) {\n\t\t\t$return .= 'class=\"verborgen\"';\n\t\t}\n\t\t$return .= '>';\n\t\t$current = '';\n\t\tforeach (SavedQuery::getQueries() as $query) {\n\t\t\tif ($current != $query['categorie']) {\n\t\t\t\tif ($current != '') {\n\t\t\t\t\t$return .= '</ul></div>';\n\t\t\t\t}\n\t\t\t\t$return .= '<div class=\"sqCategorie \"><span class=\"dikgedrukt\">' . $query['categorie'] . '</span><ul>';\n\t\t\t\t$current = $query['categorie'];\n\t\t\t}\n\t\t\t$return .= '<li><a href=\"query.php?id=' . $query['ID'] . '\">';\n\t\t\tif ($id == $query['ID']) {\n\t\t\t\t$return .= '<span class=\"cursief\">';\n\t\t\t}\n\t\t\t$return.=htmlspecialchars($query['beschrijving']);\n\t\t\tif ($id == $query['ID']) {\n\t\t\t\t$return .= '</span>';\n\t\t\t}\n\t\t\t$return .= '</a></li>';\n\t\t}\n\t\t$return .= '</ul></div></div><div class=\"clear\"></div>';\n\t\treturn $return;\n\t}" ]
[ "0.6341028", "0.6320869", "0.58280796", "0.56859773", "0.56746715", "0.565675", "0.55895334", "0.54552805", "0.54449564", "0.5404445", "0.5340602", "0.5239214", "0.521587", "0.5182041", "0.517856", "0.5127131", "0.5105987", "0.5102869", "0.5070465", "0.5064086", "0.50508446", "0.50214374", "0.50190604", "0.49975514", "0.49965283", "0.49835432", "0.49540564", "0.49462", "0.49345946", "0.4918386", "0.48914608", "0.48879203", "0.48859462", "0.48824525", "0.48553386", "0.4849412", "0.48466772", "0.48338643", "0.48085132", "0.48027596", "0.4801349", "0.47969624", "0.47756422", "0.47489026", "0.47358033", "0.4735795", "0.46974906", "0.468329", "0.4683034", "0.46656895", "0.46628594", "0.4643092", "0.4635104", "0.46234167", "0.46144837", "0.45929867", "0.45915374", "0.45913628", "0.45890024", "0.4586528", "0.45606542", "0.4557233", "0.45419362", "0.45302323", "0.4520088", "0.4514797", "0.4514797", "0.4514797", "0.4514797", "0.4514797", "0.4514797", "0.4514797", "0.4514797", "0.4514797", "0.4508868", "0.45042345", "0.45042345", "0.45035768", "0.45034188", "0.45034188", "0.45034188", "0.45034188", "0.4503356", "0.4503356", "0.45023158", "0.448753", "0.44742155", "0.44663957", "0.44577372", "0.44539118", "0.44536537", "0.44519725", "0.4449583", "0.44442806", "0.44420323", "0.4441745", "0.443862", "0.44366637", "0.44354165", "0.44334972" ]
0.66692346
0
Return an instance of DOMXPath used to query the DOMDocument for artists
protected function getXPath(DOMDocument $dom) { if (! isset($this->domXPath)) { $this->domXPath = new DOMXPath($dom); $namespaceURI = $dom->lookupNamespaceUri($dom->namespaceURI); $this->domXPath->registerNamespace('ns', $namespaceURI); } return $this->domXPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFeaturedArtists($dom) {\n $feat = $dom->find('div.featured_artists',0);\n $artists = array();\n if ($feat != NULL && sizeof($feat) > 0) {\n foreach($feat->find('a') as $artist) {\n $artists[] = $artist->plaintext;\n }\n }\n return $artists;\n}", "function getFeaturedArtists($dom) {\n $feat = $dom->find('div.featured_artists',0);\n $artists = array();\n if ($feat != NULL && sizeof($feat) > 0) {\n foreach($feat->find('a') as $artist) {\n $artists[] = $artist->plaintext;\n }\n }\n return $artists;\n}", "public function xpath() {\n return new DOMXPath($this);\n }", "public function getAllArtists() {\n\t\t$artists = $this->model->getAllArtists();\n\t\t\n\t\tif ( !$artists )\n\t\t\treturn null;\n\t\t\n\t\treturn $artists;\n\t}", "function searchConceptXML($concept,$collection){\n\n\n$xml=simplexml_load_file('./conceptDir/'.$collection);\n$query = $concept;\n\n//echo 'concept to look for is: ' . $query . '<br>';\n/* Search for <a><b><c> */\n$result = $xml->xpath('concept/keyword[../@id = \"'.$query.'\"]');\n\n\nreturn $result;\n}", "public function getArtists(){\n return Artist::all();\n }", "protected function getXPath()\n {\n $xpath = parent::getXPath();\n $xpath->registerNamespace('m', OData::META);\n $xpath->registerNamespace('d', OData::DATA);\n\n return $xpath;\n }", "public function getArtistsList() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe artists list\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_artists.id,\n\t\t\t{$this->wpdb->prefix}topspin_artists.name,\n\t\t\t{$this->wpdb->prefix}topspin_artists.avatar_image,\n\t\t\t{$this->wpdb->prefix}topspin_artists.url,\n\t\t\t{$this->wpdb->prefix}topspin_artists.description,\n\t\t\t{$this->wpdb->prefix}topspin_artists.website\n\t\tFROM {$this->wpdb->prefix}topspin_artists\n\t\tORDER BY\n\t\t\t{$this->wpdb->prefix}topspin_artists.name ASC\nEOD;\n\t\treturn $this->wpdb->get_results($this->wpdb->prepare($sql),ARRAY_A);\n\t}", "function ting_openformat_feeds_get_xpath($xml) {\n $dom = new DOMDocument();\n if (!@$dom->loadXML($xml)) {\n return NULL;\n }\n $xpath = new DOMXPath($dom);\n $xpath->registerNamespace('dkabm', 'http://biblstandard.dk/abm/namespace/dkabm/');\n $xpath->registerNamespace('dc', 'http://purl.org/dc/elements/1.1/');\n $xpath->registerNamespace('os', 'http://oss.dbc.dk/ns/opensearch');\n return $xpath;\n}", "public function getArtistsAttribute($artists)\n {\n return explode('*|*', $artists);\n }", "function xpath($xpath) {\r\n\t\treturn $this->simpleXML()->xpath($xpath);\r\n\t}", "function SERVICE_GETARTISTMETADATA_rs($node = false, $return = false, $artistName = false){\n\t\tglobal $include_path;\n\t\t\n\t\t// Let's up the max execution time...\n\t\tini_set('max_execution_time','600');\n\t\t\n\t\t// let's set the artist we're looking at\n\t\tif ($node){\n\t\t\t$artist = $node->getName();\n\t\t} else {\n\t\t\t$artist = $artistName;\n\t\t}\n\t\t\n\t\tinclude_once($include_path. \"lib/snoopy.class.php\");\n\t\t\n\t\t// Now let's open it up\n\t\t$snoopy = new Snoopy;\n\t\t$snoopy->fetch(\"http://www.rollingstone.com/?searchtype=RSArtist&query=\". urlencode($artist));\n\t\t$contents = $snoopy->results;\n\t\tunset($snoopy);\n\t\t\n\t\t// Now let's fix up the name\n\t\t$albumName = str_replace(\"&\",\"&amp;\",$album);\n\t\t$artist = str_replace(\"&\",\"&amp;\",$artist);\n\n\t\t// Ok, let's see if we got the exact album or a page of possibles\n\t\t$link = false;\n\t\tif (strpos($contents,$artist)){\n\t\t\t// Ok, we found the album (or we think) now let's move to it\n\t\t\t$contents = substr($contents,strpos($contents,'\"<strong>')+10);\n\t\t\t$contents = substr($contents,strpos($contents,'<tr>')+4);\n\t\t\t// Now let's build an array so we can find the right link\n\t\t\t$linkArray = explode(\"</tr>\",$contents);\n\t\t\tfor ($i=0; $i < count($linkArray); $i++){\n\t\t\t\t// Now let's see if this one has our artist\n\t\t\t\tif (stristr($linkArray[$i],$artist)){\n\t\t\t\t\t// Ok, we've got our block, let's get the link\n\t\t\t\t\t$link = substr($linkArray[$i],strpos($linkArray[$i],'href=\"')+6);\n\t\t\t\t\t$link = substr($link,0,strpos($link,'\"'));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Ok, did we find a link?\n\t\tif ($link){\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch($link. \"?rnd=1107178952184&has-player=true&version=6.0.12.1040\");\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t\t\n\t\t\t// First let's get the artist image\n\t\t\t$image = substr($contents,strpos($contents,'class=\"artistName\">')+20);\n\t\t\t$image = substr($image,strpos($image,'src=\"')+5);\n\t\t\t$image = substr($image,0,strpos($image,'\"'));\n\t\t\t\n\t\t\t// Now let's get the bio from that link\n\t\t\t$bioLink = substr($contents,strpos($contents,'/artist/bio/'));\n\t\t\t$bioLink = \"http://www.rollingstone.com\". substr($bioLink,0,strpos($bioLink,'\"'));\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch($bioLink);\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t\t\n\t\t\t// Now let's get the bio\n\t\t\t$bio = substr($contents,strpos($contents,'<div class=\"bio\">')+strlen('<div class=\"bio\">'));\n\t\t\t$bio = substr($bio,0,strpos($bio,\"</\"));\n\t\t\t\n\t\t\t// Now let's find the similar artists\n\t\t\t$similar = substr($contents,strpos($contents,'contemporaries.gif')+30);\n\t\t\t$similar = substr($similar,strpos($similar,'</td>')+5);\n\t\t\t$simArray = explode(\"</tr>\",$similar);\n\t\t\tfor ($i=0; $i < count($simArray); $i++){\n\t\t\t\tif (stristr($simArray[$i],\"title=\") and !stristr($simArray[$i],\"<img class\")){\n\t\t\t\t\t$sim = substr($simArray[$i],strpos($simArray[$i],'<a')+2);\n\t\t\t\t\t$sim = substr($sim,strpos($sim,'\">')+2);\n\t\t\t\t\t$sim = substr($sim,0,strpos($sim,'</'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Now let's get the genre\n\t\t\t$genre = substr($contents, strpos($contents,\"Genre:\")+7);\n\t\t\t$genre = substr($genre,strpos($genre,'\">')+2);\n\t\t\t$genre = substr($genre,0,strpos($genre,','));\n\t\t\t\n\t\t\t// Now let's write the data\n\t\t\tif ($return){\n\t\t\t\tif ($return == \"array\"){\n\t\t\t\t\t$retArr['bio'] = $bio;\n\t\t\t\t\t$retArr['image'] = $image;\t\t\n\t\t\t\t\t$retArr['genre'] = $genre;\t\t\n\t\t\t\t\treturn $retArr;\n\t\t\t\t} else {\n\t\t\t\t\treturn $$return;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$artReturn = writeArtistMetaData($image, $bio, $genre, $node, $return);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function xpath(): Xpath {\n if (\n $this->_xpath instanceof Xpath &&\n $this->_xpath->document === $this\n ) {\n return $this->_xpath;\n }\n $this->_xpath = new Xpath($this);\n foreach ($this->_namespaces as $prefix => $namespaceURI) {\n $this->_xpath->registerNamespace($prefix, $namespaceURI);\n }\n return $this->_xpath;\n }", "public function getAllSetlistArtists() {\n\t\t\t\n\t\t\t$query = \"SELECT DISTINCT(artist.artist_name) as artist_name, artist.artist_id as artist_id\n\t\t\t\t\tFROM setlist\n\t\t\t\t\tJOIN artist\n\t\t\t\t\tON artist.artist_id = setlist.artist_id\n\t\t\t\t\tORDER BY artist.artist_name\";\n\n\t\t\t$result = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);\n\t\t\t\n\t\t\tif($result->num_rows > 0) {\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\t\n\t\t\t}\n\t\t}", "public function getXpath()\n {\n if (null === $this->xpath) {\n $this->setXpath(new DOMXPath($this->getDomDocument()));\n }\n\n return $this->xpath;\n }", "function domdoctoxpath($domdocinput) {\n //local variables clean themselves up, no need to unset.\n $newdomdoc = new SmartDOMDocument();\n $newdomdoc->appendChild($newdomdoc->importNode($domdocinput, true));\n $newxpathtable = new DOMXPath($newdomdoc);\n //DEBUG $image = $newdomdoc->saveHTMLExact();echo($image);\n return $newxpathtable;\n}", "public function allArtists()\n {\n return $this->orderBy('created_at', 'desc')->paginate(10);\n }", "public function findAllArtists()\n {\n $query = 'SELECT DISTINCT t.artist FROM ApiTracklistBundle:Track t ORDER BY t.artist';\n\n return $this->getEntityManager()\n ->createQuery($query)\n ->getResult();\n }", "public function artist()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" artist ?\");\n\t}", "function query_publications_from_specimen ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t\n\t$sparql = '\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\nPREFIX bibo: <http://purl.org/ontology/bibo/>\n\nCONSTRUCT \n{\n ?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n?pub rdf:type ?t .\n}\nWHERE\n{\n ?s dcterms:relation <' . $uri . '> .\n?s dcterms:isReferencedBy ?pub . \n?pub rdf:type ?t .\n?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n \n}';\n\n//echo $sparql;\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "function returnXPathObject($item)\n {\n $xmlPageDom = new DOMDocument(); // khoi tao DomDocument object\n libxml_use_internal_errors(true); // dom chuyen tu html5 -> html4\n @$xmlPageDom->loadHTML('<?xml encoding=\"utf-8\" ?>' . $item); // Loading html page\n $xmlPageXPath = new DOMXPath($xmlPageDom); // khoi tao XPath DOM object\n return $xmlPageXPath; // tra ve XPath object\n }", "public function getArtist() {}", "public function getArtists($id){\n $album = Album::find($id);\n return $album->artists;\n }", "function getArtists() {\n \n $sql = \"SELECT * \n FROM Artists\";\n getDataRows($sql);\n}", "public function searchForArtists($criteria){\n\t\t//\n\t\t$artists = Artists::where(function ($query) use($criteria){\n\t\t\t$query->where('artists.name','like','%'.$criteria.'%');\n\t\t})->select('artists.*')->get();\n\t\treturn $artists;\n\t}", "function getAllArtist()\n {\n\n $db = dbConnect();\n\n $query = $db->query('SELECT * FROM artists');\n $artists = $query->fetchAll();\n\n return $artists;\n }", "function icu_drush_build_XPath_array($datastream) {\n $simpleXML = new SimpleXMLElement($datastream->content); // create a SimpleXMLElement object from the XML document\n $contextElements = $simpleXML->xpath('/mods:mods'); // select the root MODS node\n $contextElement = $contextElements[0]; // grab the first context node\n $xpathList = XMLElementToXPath($contextElement->getName(), $contextElement);\n\n return $xpathList;\n\n // foreach ($xpathList as $xpath) { echo $xpath . \"\\n\"; }\n}", "public function getArtist() {\n\t\t##\thttps://docs.topspin.net/tiki-index.php?page=Artist+Search+API\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tA standard object containing the artist data\n\t\t$url = 'http://app.topspin.net/api/v1/artist';\n\t\t$data = json_decode($this->process($url,null,false));\n\t\t$artist = null;\n\t\tif(isset($data->artists) && count($data->artists)) {\n\t\t\tforeach($data->artists as $item) {\n\t\t\t\tif($item->id==$this->artist_id) {\n\t\t\t\t\t$artist = $item;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $artist;\n\t}", "public function matchArtists($keyword)\n {\n return ArtistResource::collection(Artist::where('displayname', 'like', '%' . $keyword . '%')->get());\n }", "function query_specimens_from_collection ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\t\n\tif (preg_match('/^urn:/', $uri))\n\t{\n\t\t$uri = 'http://bioguid.info/' . $uri;\n\t}\n\n\t$xml = '';\n\t\n\t$sparql = '\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\nPREFIX toccurrence: <http://rs.tdwg.org/ontology/voc/TaxonOccurrence#>\n\n\nCONSTRUCT \n{\n ?specimen toccurrence:hostCollection <' . $uri . '> .\n ?specimen geo:lat ?lat . \n?specimen geo:long ?long . \n?specimen rdf:type ?type .\n}\nWHERE \n{ \n ?specimen toccurrence:hostCollection <' . $uri .'> .\n?specimen rdf:type ?type .\nOPTIONAL\n{\n ?specimen geo:lat ?lat . \n?specimen geo:long ?long . \n}\n}\n';\n\n//echo $sparql;\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "function getArtistAndTrackName($dom) {\n $artistTrack = $dom->find('h1.song_title',0);\n $artist = $artistTrack->find('a',0)->plaintext;\n $startBuffer = 8;\n $endBuffer = -11;\n $track = substr($artistTrack->plaintext, ($startBuffer + strlen($artist)) , $endBuffer);\n $output['track'] = $track;\n $output['artist'] = $artist;\n\n return $output;\n}", "function getArtistAndTrackName($dom) {\n $artistTrack = $dom->find('h1.song_title',0);\n $artist = $artistTrack->find('a',0)->plaintext;\n $startBuffer = 8;\n $endBuffer = -11;\n $track = substr($artistTrack->plaintext, ($startBuffer + strlen($artist)) , $endBuffer);\n $output['track'] = $track;\n $output['artist'] = $artist;\n\n return $output;\n}", "function query_publications_from_taxon ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\nPREFIX dcterms: <http://purl.org/dc/terms/>\nPREFIX bibo: <http://purl.org/ontology/bibo/>\n\n\nCONSTRUCT \n{\n ?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n?pub rdf:type ?t .\n}\nWHERE\n{\n ?gb dcterms:subject <' . $uri . '> .\n ?gb dcterms:title ?accession .\n?gb dcterms:isReferencedBy ?pub .\n?pub rdf:type ?t .\n?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n}';\n\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "protected function extractArtist($oXPath)\n {\n $this->debug('Extracting cards artist.');\n\n $aXPathArtist = $oXPath->query(\n '//div[@id=\"' . self::DIV_PREFIX . $this->sPrefix . '_artistRow\"]/div[@class=\"value\"]'\n );\n foreach ($aXPathArtist as $sTmp) {\n return trim($sTmp->nodeValue);\n }\n\n return;\n }", "public function getXPath($XPathSelector)\n {\n return $this->filterXPath($XPathSelector);\n }", "public function searchAlbum( $albumName, $artistName ) {\n $content = $this->getter->getContent( $this->getSearchAlbumUrl( $albumName ) );\n $dom = new Query( $content );\n $rows = $dom->execute( 'li.result' );\n $album = new AmAlbum();\n foreach( $rows as $row ) {\n $artistDom = new Query( utf8_decode( $row->ownerDocument->saveHTML( $row ) ) );\n $artistNodes = $artistDom->execute( 'p.artist' );\n if( count( $artistNodes ) !== 1 ) {\n throw new UnexpectedValueException( 'No artist node in response.' );\n }\n $node = $artistNodes[ 0 ];\n $artist = trim( $node->textContent );\n if( strtolower( $artist ) !== strtolower( $artistName ) ) {\n continue;\n }\n $id = $row->getAttribute( 'data-id' );\n $url = $row->getAttribute( 'data-url' );\n $name = $row->getAttribute( 'data-text' );\n $album->setId( $id );\n $album->setUrlName( $url );\n $album->setName( $name );\n }\n\n //query album page\n\n return $album;\n }", "function my_xpath($cmd,$xml)\n{\n if(($cmd===NULL) ||(!strcmp($cmd,$xml->getName())))\n {\n return $xml;\n }\n $keywords=preg_split(\"/\\./\", $cmd);\n if($keywords[0]!=NULL)\n {\n $tmp_array=array();\n $tmp_array=find_path($keywords[0],$xml,$tmp_array);\n }\n else\n {\n $tmp_array=$xml;\n if(isset($keywords[1]))\n {\n $tmp_array=find_attribute($keywords[1],$tmp_array,0);\n }\n return $tmp_array;\n }\n if(isset($keywords[1]))\n {\n $tmp_array=find_attribute($keywords[1],$tmp_array,1);\n }\n return $tmp_array;\n}", "function STOREArtistAlbumTracks($ArtistURL) {\n $dom = new simple_html_dom();\n $BASE_URL = \"http://rapgenius.com\";\n $artistStartPage = scraperwiki::scrape($BASE_URL . $ArtistURL);\n $dom->load($artistStartPage);\n $albumArray = getAlbums($dom);\n $albumURLArray = $albumArray['urls'];\n $albumNameArray = $albumArray['names'];\n #print_r($albumArray);\n foreach ($albumURLArray as $i => $album) {\n\n $albumDom = new simple_html_dom();\n # print $album . \"\\n\";\n\n \n $albumPage = scraperwiki::scrape($BASE_URL . $album);\n $albumDom->load($albumPage);\n \n #print $albumDom .\"\\n\\n\";\n #$albumA = $albumDom->find('ul.album_list',0);\n print \"album => \" . $albumNameArray[$i] . \"\\n\";\n\n $trackArray = getSongList($albumDom);\n $albumName = $albumNameArray[$i];\n\n #print_r($trackArray);\n\n foreach ($trackArray as $j => $track) {\n $trackPage = scraperwiki::scrape($BASE_URL . $track);\n $trackDom = new simple_html_dom();\n #print $track . \"\\n\";\n $trackDom->load($trackPage);\n //use trackDom to get lyrics and metadata?\n $trackMeta = getTrackMetaData($trackDom);\n #print_r($trackMeta);\n $trackMeta['album'] = $albumName;\n addTrack($track, $trackMeta);\n }\n }\n}", "function STOREArtistAlbumTracks($ArtistURL) {\n $dom = new simple_html_dom();\n $BASE_URL = \"http://rapgenius.com\";\n $artistStartPage = scraperwiki::scrape($BASE_URL . $ArtistURL);\n $dom->load($artistStartPage);\n $albumArray = getAlbums($dom);\n $albumURLArray = $albumArray['urls'];\n $albumNameArray = $albumArray['names'];\n #print_r($albumArray);\n foreach ($albumURLArray as $i => $album) {\n\n $albumDom = new simple_html_dom();\n # print $album . \"\\n\";\n\n \n $albumPage = scraperwiki::scrape($BASE_URL . $album);\n $albumDom->load($albumPage);\n \n #print $albumDom .\"\\n\\n\";\n #$albumA = $albumDom->find('ul.album_list',0);\n print \"album => \" . $albumNameArray[$i] . \"\\n\";\n\n $trackArray = getSongList($albumDom);\n $albumName = $albumNameArray[$i];\n\n #print_r($trackArray);\n\n foreach ($trackArray as $j => $track) {\n $trackPage = scraperwiki::scrape($BASE_URL . $track);\n $trackDom = new simple_html_dom();\n #print $track . \"\\n\";\n $trackDom->load($trackPage);\n //use trackDom to get lyrics and metadata?\n $trackMeta = getTrackMetaData($trackDom);\n #print_r($trackMeta);\n $trackMeta['album'] = $albumName;\n addTrack($track, $trackMeta);\n }\n }\n}", "public static function extractInfos($artist)\n {\n // get artist href and name\n $href = (isset($artist->href)) ? $artist->href : '';\n $name = (isset($artist->name)) ? $artist->name : '';\n\n // create Artist instance\n $artistItem = self::build($href, $name);\n\n // is popularity available ?\n if (isset($artist->popularity)) {\n\n // update popularity\n $artistItem->setPopularity((float) $artist->popularity);\n }\n\n // is albums available ?\n if (isset($artist->albums) && is_array($artist->albums)) {\n\n // setup container\n $albums = array();\n\n // iterate albums\n foreach ($artist->albums as $album) {\n\n // create album item\n $album = Album::extractInfos($album->album);\n\n // set Artist and store on container\n $albums[] = $album->setArtist($artistItem);\n }\n\n // set albums of artist\n $artistItem->setAlbums($albums);\n }\n\n // return artist instance\n return $artistItem;\n }", "public function get_artista()\r\n {\r\n // loads the associated object\r\n if (empty($this->artista))\r\n $this->artista = new Artista($this->artista_id);\r\n \r\n // returns the associated object\r\n return $this->artista;\r\n }", "static function searchArtists($search){\n $search = \"%\".$search.\"%\";\n $req = \"SELECT *\n FROM \".DB::$tableArtists.\"\n WHERE `nom_artist` LIKE :query\n LIMIT 0 , 7\";\n $query = DB::$db->prepare($req);\n $query->bindParam(':query', $search, PDO::PARAM_STR);\n $query->execute();\n $result = [];\n while($data = $query->fetch()){\n $Artist = new Artist();\n $Artist->id = $data['id_artist'];\n $Artist->name = $data['nom_artist'];\n\n $result[] = $Artist;\n }\n return $result;\n }", "public function setXPath($value)\n {\n return $this->set('XPath', $value);\n }", "public static function xpath(string $xml, string $xpath, $useDomFallback = true)\n {\n try {\n if (is_string($xml)) {\n $sxml = simplexml_load_string($xml);\n if ($sxml) {\n return $sxml->xpath($xpath);\n }\n }\n } catch (\\Exception $e) {\n if (!$useDomFallback) {\n throw $e;\n }\n }\n\n libxml_use_internal_errors(true);\n $dom = new \\DOMDocument();\n $dom->loadHTML($xml);\n $domPath = new \\DOMXPath($dom);\n\n return $domPath->query($xpath);\n }", "public function getArtist($id);", "public function artists() {\n return $this->belongsToMany('Rockit\\Models\\Artist', 'descriptions', 'genre_id', 'artist_id')->withTrashed();\n }", "private function generateXpathQuery() {\n $parentElementClass = trim(Settings::get(\"main_class\"), \".\");\n $excludeProcessingClass = trim(Settings::get(\"exclude_class\"), \".\");\n\n $xQuery = \"\";\n if(!empty($parentElementClass)) {\n $xQuery .= \"//*[contains(@class, '\".$parentElementClass.\"')]\";\n }\n $xQuery .= \"//img\";\n\n if(!empty($excludeProcessingClass)){\n $xQuery .= \"[not(contains(@class, '\".$excludeProcessingClass.\"'))]\";\n }\n\n return $xQuery;\n }", "#[@test]\n public function identitySet() {\n $this->assertEquals('true', \n $this->xpath->query('string(/document/table/attribute[1]/@identity)'));\n }", "public function getTagsDropDownResultsXpath() {\n\t\t$resultXpath = $this->tagsSuggestDropDown .\n\t\t\t\"//ul[@class='select2-results']\" .\n\t\t\t\"//span\";\n\t\treturn $resultXpath;\n\t}", "public function getArtist()\n {\n if (!isset($this->data['fields']['artist'])) {\n if ($this->isNew()) {\n $this->data['fields']['artist'] = null;\n } elseif (!isset($this->data['fields']) || !array_key_exists('artist', $this->data['fields'])) {\n $this->addFieldCache('artist');\n $data = $this->getRepository()->getCollection()->findOne(array('_id' => $this->getId()), array('artist' => 1));\n if (isset($data['artist'])) {\n $this->data['fields']['artist'] = (string) $data['artist'];\n } else {\n $this->data['fields']['artist'] = null;\n }\n }\n }\n\n return $this->data['fields']['artist'];\n }", "public function toXPath($cssExpr, $prefix = 'descendant-or-self::')\n {\n\t\t\n return $this->translator->cssToXPath($cssExpr, $prefix);\n }", "public function getArtist()\n {\n return $this->artist;\n }", "function getArtist($id)\n {\n //Requete de connexion\n $db = dbConnect();\n\n $query = $db->prepare ('SELECT * FROM artists WHERE id=?');\n\n $query->execute([\n $id\n ]);\n\n $result = $query->fetch();\n\n return $result; //Retourne de l'artiste en question\n }", "function getAlbums($dom) {\n $albumURLs = array();\n $albumNames = array();\n $albums = $dom->find('ul.album_list',0);\n foreach($albums->find('li a') as $data){\n #print $data->href. \"\\n\";\n $albumURLs[] = $data->href;\n $albumNames[] = $data->plaintext;\n }\n return array(\"urls\"=>$albumURLs, \"names\"=>$albumNames);\n}", "function getAlbums($dom) {\n $albumURLs = array();\n $albumNames = array();\n $albums = $dom->find('ul.album_list',0);\n foreach($albums->find('li a') as $data){\n #print $data->href. \"\\n\";\n $albumURLs[] = $data->href;\n $albumNames[] = $data->plaintext;\n }\n return array(\"urls\"=>$albumURLs, \"names\"=>$albumNames);\n}", "public function show(Artist $artist)\n {\n return new ArtistsResource($artist);\n }", "function getNumberOfArtists()\n {\n $db = dbConnect();\n\n $query = $db->query('SELECT COUNT(id) as nombre FROM artists');\n $nbArtists = $query->fetch();\n $query->closeCursor();\n\n return $nbArtists['nombre'];\n }", "public function getArtist() {\r\n return $this->_artist;\r\n }", "protected function buildXPathQuery($xpath, array $args = []) {\n @trigger_error('AssertLegacyTrait::buildXPathQuery() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->buildXPathQuery() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n return $this->assertSession()->buildXPathQuery($xpath, $args);\n }", "public function getArtists($status);", "public function getXPath($type)\n {\n $variable = $type . 'XPath';\n if (isset($this->$variable)) {\n return $this->$variable;\n }\n throw new OpenDocument_Exception('No XPath for ' . $type);\n }", "function getSongList($dom) {\n $trackURLs = array();\n $songs = $dom->find('ul.song_list ',0);\n #print $songs; \n #print_r($songs);\n foreach($songs->find('li a') as $track) {\n #print $track->href . \"\\n\";\n $trackURLs[] = $track->href;\n #print $track->href. \"\\n\";\n }\n return $trackURLs;\n}", "function getSongList($dom) {\n $trackURLs = array();\n $songs = $dom->find('ul.song_list ',0);\n #print $songs; \n #print_r($songs);\n foreach($songs->find('li a') as $track) {\n #print $track->href . \"\\n\";\n $trackURLs[] = $track->href;\n #print $track->href. \"\\n\";\n }\n return $trackURLs;\n}", "function query_localities_from_taxon ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\n\tPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\n\nCONSTRUCT \n{\n ?specimen geo:lat ?lat . \n ?specimen geo:long ?long .\n ?specimen rdf:type <http://rs.tdwg.org/ontology/voc/TaxonOccurrence#TaxonOccurrence> .\n}\nWHERE \n{ \n ?gb dcterms:subject <' . $uri . '> .\n \n ?gb dcterms:relation ?specimen .\n?specimen geo:lat ?lat .\n?specimen geo:long ?long\n}';\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "public function xpathQuery($expression, \\DOMNode $contextnode = null)\n {\n if (null === $this->xpath) {\n $this->xpath = new \\DOMXpath($this);\n }\n\n return $this->xpath->query($expression, $contextnode);\n }", "function get_artist($name) {\n\t\t$artist = new LastfmArtist($name, $this->_connection);\n\n\t\tif ($artist->is_valid()) {\n\t\t\treturn $artist;\n\t\t}\n\n\t\treturn false;\n\n\t}", "function getTrackMetaData($dom) {\n $output = getArtistAndTrackname($dom);\n ##TODO - need to get supporting artists (array)\n $output['featuring'] = getFeaturedArtists($dom);\n return $output;\n}", "function getTrackMetaData($dom) {\n $output = getArtistAndTrackname($dom);\n ##TODO - need to get supporting artists (array)\n $output['featuring'] = getFeaturedArtists($dom);\n return $output;\n}", "public static function toXPath($cssExpr, $prefix = 'descendant-or-self::')\r\n {\r\n $translator = new Translator();\r\n\r\n if (self::$html) {\r\n $translator->registerExtension(new HtmlExtension($translator));\r\n }\r\n\r\n $translator\r\n ->registerParserShortcut(new EmptyStringParser())\r\n ->registerParserShortcut(new ElementParser())\r\n ->registerParserShortcut(new ClassParser())\r\n ->registerParserShortcut(new HashParser())\r\n ;\r\n\r\n return $translator->cssToXPath($cssExpr, $prefix);\r\n }", "public function findAll()\n {\n return $this->artistRepository->findAll();\n }", "function query_sequences_from_taxon ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\nPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\n\nCONSTRUCT \n{\n ?gb rdf:type <http://purl.uniprot.org/core/Molecule> .\n?gb dcterms:title ?accession . \n }\nWHERE \n{ \n ?gb dcterms:subject <' . $uri . '> .\n ?gb dcterms:title ?accession\n \n}';\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "function testQueryTerms()\n\t{\n\t\t// system is functional\n\t\treturn \"<filter>\\n\".\n\t\t\t\"\t<or>\\n\".\n\t\t\t\"\t\t<equals>\\n\".\n\t\t\t\"\t\t\t<darwin:Genus>Helix</darwin:Genus>\\n\".\n\t\t\t\"\t\t</equals>\\n\".\n\t\t\t\"\t\t<equals>\\n\".\n\t\t\t\"\t\t\t<darwin:Genus>Conus</darwin:Genus>\\n\".\n\t\t\t\"\t\t</equals>\\n\".\n\t\t\t\"\t</or>\\n\".\n\t\t\t\"</filter>\\n\".\n\t\t\t\"<records start='0' limit='5'>\\n\".\n\t\t\t\"\t<structure schemaLocation='http://digir.sourceforge.net/schema/conceptual/darwin/full/2003/1.0/darwin2full.xsd'/>\\n\".\n\t\t\t\"</records> \\n\";\n\t}", "function query_dom($query) {\n\t\t$xpath = new DOMXpath($this->dom);\n\t\t$id = $xpath->query($query);\n\t\tif ($id->length == 0)\n\t\t\t$id = null;\n\t\tif (isset ($id)) {\n\t\t\tforeach ($id as $handle) {\n\t\t\t\t$id = $handle->nodeValue;\n\t\t\t}\n\t\t}\n\t\treturn $id;\n\t}", "public function artistInfo(array $args) {\n if(!empty($args['mbid']) || !empty($args['artist'])) {\n $url = $this->getUrl('artist.getInfo', $args);\n $json = json_decode($this->getExternalContents($url));\n\n // check if it is a valid result\n if(!empty($json->{'error'})) {\n return false;\n }\n $json = $json->{'artist'};\n\n // build artist entity\n $artist = new Artist();\n $artist->setId($json->{'mbid'});\n $artist->setName($json->{'name'});\n\n return $artist;\n } else {\n return false;\n }\n }", "function ju_explode_xpath($p):array {return jua_flatten(array_map(function($s) {return explode('/', $s);}, ju_array($p)));}", "function toXPath($sel) {\n\t\t$sel = preg_replace('/\\s*>\\s*/', '>', $sel);\n\t\t$sel = preg_replace('/\\s*~\\s*/', '~', $sel);\n\t\t$sel = preg_replace('/\\s*\\+\\s*/', '+', $sel);\n\t\t$sel = preg_replace('/\\s*,\\s*/', ',', $sel);\n\t\t$sels = preg_split('/\\s+(?![^\\[]+\\])/', $sel);\n\t\tforeach ($sels as &$sel) {\n\t\t\t$sel = preg_replace('/,/', '|descendant-or-self::', $sel);// ,\n\t\t\t$sel = preg_replace('/(.+)?:(checked|disabled|required|autofocus)/', '\\1[@\\2=\"\\2\"]', $sel);// input:checked, :disabled, etc.\n\t\t\t$sel = preg_replace('/(.+)?:(autocomplete)/', '\\1[@\\2=\"on\"]', $sel);// input:autocomplete, :autocomplete\n\t\t\t$sel = preg_replace('/:(text|password|checkbox|radio|button|submit|reset|file|hidden|image|datetime|datetime-local|date|month|time|week|number|range|email|url|search|tel|color)/', 'input[@type=\"\\1\"]', $sel);// input:button, input:submit, etc.\n\t\t\t$sel = preg_replace('/(\\w+)\\[([_\\w-]+[_\\w\\d-]*)\\]/', '\\1[@\\2]', $sel);// foo[id]\n\t\t\t$sel = preg_replace('/\\[([_\\w-]+[_\\w\\d-]*)\\]/', '*[@\\1]', $sel); // [id]\n\t\t\t$sel = preg_replace('/\\[([_\\w-]+[_\\w\\d-]*)=[\\'\"]?(.*?)[\\'\"]?\\]/', '[@\\1=\"\\2\"]', $sel); // foo[id=foo]\n\t\t\t$sel = preg_replace('/^\\[/', '*[', $sel);// [id=foo]\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*)\\#([_\\w-]+[_\\w\\d-]*)/', '\\1[@id=\"\\2\"]', $sel);// div#foo\n\t\t\t$sel = preg_replace('/\\#([_\\w-]+[_\\w\\d-]*)/', '*[@id=\"\\1\"]', $sel);// #foo\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*)\\.([_\\w-]+[_\\w\\d-]*)/', '\\1[contains(concat(\" \",@class,\" \"),\" \\2 \")]', $sel);// div.foo\n\t\t\t$sel = preg_replace('/\\.([_\\w-]+[_\\w\\d-]*)/', '*[contains(concat(\" \",@class,\" \"),\" \\1 \")]', $sel);// .foo\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):first-child/', '*/\\1[position()=1]', $sel);// div:first-child\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):last-child/', '*/\\1[position()=last()]', $sel);// div:last-child\n\t\t\t$sel = str_replace(':first-child', '*/*[position()=1]', $sel);// :first-child\n\t\t\t$sel = str_replace(':last-child', '*/*[position()=last()]', $sel);// :last-child\n\t\t\t$sel = preg_replace('/:nth-last-child\\((\\d+)\\)/', '[position()=(last() - (\\1 - 1))]', $sel);// :nth-last-child\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):nth-child\\((\\d+)\\)/', '*/*[position()=\\2 and self::\\1]', $sel);// div:nth-child\n\t\t\t$sel = preg_replace('/:nth-child\\((\\d+)\\)/', '*/*[position()=\\1]', $sel);// :nth-child\n\t\t\t$sel = preg_replace('/([_\\w-]+[_\\w\\d-]*):contains\\((.*?)\\)/', '\\1[contains(string(.),\"\\2\")]', $sel);// :contains(Foo)\n\t\t\t$sel = preg_replace('/>/', '/', $sel);// >\n\t\t\t$sel = preg_replace('/~/', '/following-sibling::', $sel);// ~\n\t\t\t$sel = preg_replace('/\\+([_\\w-]+[_\\w\\d-]*)/', '/following-sibling::\\1[position()=1]', $sel);// +\n\t\t\t$sel = str_replace(']*', ']', $sel);\n\t\t\t$sel = str_replace(']/*', ']', $sel);\n\t\t}\n\t\t// ' '\n\t\t$sel = implode('/descendant::', $sels);\n\t\t$sel = 'descendant-or-self::' . $sel;\n\t\t$sel = preg_replace('/(((\\|)?descendant-or-self::):scope)/', '.\\3', $sel);// :scope\n\t\t$sub_sel = explode(',', $sel);// $element\n\t\tforeach ($sub_sel as $key => $sub_selector) {\n\t\t\t$parts = explode('$', $sub_selector);\n\t\t\t$sub_selector = array_shift($parts);\n\t\t\tif (count($parts) && preg_match_all('/((?:[^\\/]*\\/?\\/?)|$)/', $parts[0], $matches)) {\n\t\t\t\t$results = $matches[0];\n\t\t\t\t$results[] = str_repeat('/..', count($results) - 2);\n\t\t\t\t$sub_selector .= implode('', $results);\n\t\t\t}\n\t\t\t$sub_sel[$key] = $sub_selector;\n\t\t}\n\t\t$sel = implode(',', $sub_sel);\n\t\treturn $sel;\n\t}", "public function index()\n {\n $artists = Artist::all();\n return new ArtistsCollection($artists);\n }", "public function query($query){\r\n return $this->xpath->evaluate($query);\r\n }", "public function get($xpathQuery, \\DOMNode $contextnode = null);", "public function getArtistByDeevonaute()\n\t{\n\t\t$q = Doctrine_Query::create()\n\t\t\t\t->from('Artist a')\n\t\t\t\t->where('a.sf_guard_user_id = ?', $this->getId());\n\t\t\t\t\n\t\treturn Doctrine_Core::getTable('Artist')->retrieveArtist($q);\n\t}", "public function createQuery() {\n return new XML\\DOM();\n }", "public function artistIndex()\n {\n return SongResource::collection(auth()->user()->artist->songs);\n }", "public function artist()\n {\n return $this->belongsTo(Artist::class);\n }", "function get_taxon_file($meta_xml)\n{\n $xml = file_get_contents($meta_xml);\n /* e.g. meta.xml contents:\n <table encoding=\"UTF-8\" fieldsTerminatedBy=\"\\t\" linesTerminatedBy=\"\\n\" ignoreHeaderLines=\"1\" rowType=\"http://rs.tdwg.org/dwc/terms/Taxon\">\n <files>\n <location>taxon.tab</location>\n </files> \n */\n // $left = 'rowType=\"http://eol.org/schema/media/Document\"'; //just testing, should get e.g. \"media_resource.tab\"\n $left = 'rowType=\"http://rs.tdwg.org/dwc/terms/Taxon\"';\n if(preg_match(\"/\".preg_quote($left, '/').\"(.*?)<\\/files>/ims\", $xml, $arr)) {\n if(preg_match(\"/<location>(.*?)<\\/location>/ims\", $arr[1], $arr2)) return $arr2[1]; //e.g. \"taxon.tab\"\n }\n}", "public function artist()\n {\n return $this->belongsTo('App\\Artist', 'artist');\n }", "public function artist()\n {\n return $this->belongsTo('App\\Artist', 'artist');\n }", "public function getArtistById($id_artist)\n {\n $sql = \"SELECT firstname_artist, lastname_artist, birth_date FROM artists WHERE id_artist = :id\";\n $req = self::$_pdo->prepare($sql);\n $req->bindParam(':id', $id_artist);\n $req->execute();\n return $req->fetch();\n }", "function query_localities_from_publication ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\n\tPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\n\nCONSTRUCT \n{\n ?specimen geo:lat ?lat . \n ?specimen geo:long ?long .\n ?specimen rdf:type <http://rs.tdwg.org/ontology/voc/TaxonOccurrence#TaxonOccurrence> .\n}\nWHERE \n{ \n ?gb dcterms:isReferencedBy <' . $uri . '> .\n \n ?gb dcterms:relation ?specimen .\n?specimen geo:lat ?lat .\n?specimen geo:long ?long\n}';\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "public function getArtistWithAlbum()\n {\n return $this\n ->selectRaw('artists.id, artists.name, avatar, artists.slug, title, cover, count(*) as album_total')\n ->leftJoin('albums', 'artists.id', '=', 'albums.artist')\n ->groupBy('artists.id')\n ->orderBy('artists.name', 'asc')\n ->paginate(15);\n }", "public function getArtistsInfo($artistIDs, $returnByIDs = false)\r\n {\r\n if (empty($artistIDs)){\r\n return array();\r\n }\r\n if (!is_array($artistIDs)) {\r\n $artistIDs = array($artistIDs);\r\n }\r\n\r\n //todo: remove this once we everything is forced dynamically\r\n $sessionID = false;\r\n if (isset($this) && !empty($this->sessionID)) {\r\n $sessionID = $this->sessionID;\r\n }\r\n $result = self::makeCall('getArtistsInfo', array('artistIDs' => $artistIDs), 'artists', false, $sessionID);\r\n if ($returnByIDs) {\r\n $artistsKeyed = array();\r\n foreach ($result as $artist) {\r\n if (!empty($artist['ArtistID'])) {\r\n $artistsKeyed[$artist['ArtistID']] = $artist;\r\n }\r\n }\r\n return $artistsKeyed;\r\n }\r\n return $result;\r\n }", "public function xpath ( $path ) {\n\n return $this->getStream()->xpath($path);\n }", "public function getPathAlias()\n {\n if (! isset($this->pathAlias)) {\n $this->pathAlias = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getPathAliasQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->pathAlias;\n }", "public function getTopArtists ()\n {\n $lastFmService = new LastFmService;\n $limit = $this->app->request->params('limit', 20);\n $data = $lastFmService->getTopArtists($limit);\n $this->respond($data);\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Artists');\n }", "function selectorToXPath($selector) {\r\n\t\t// a:link:link\r\n\t\t// a:visited\r\n\t\t// a:link:hover\r\n\t\t// a:active\r\n\t\t// a:visited:hover\r\n\t\t// They are put into the style attribute.\r\n\t\t$namespace = ReTidy::get_html_namespace();\r\n\t\t$selector = \" \" . $selector;\r\n\t\t$XPath = $selector;\r\n\t\t$replaceArray = array(\r\n\t\t' \\.' => '//' . $namespace . '*.',\r\n\t\t' #' => '//' . $namespace . '*#',\t\t\r\n\t\t'\\[([^\\[\\]]*)\\]' => '[@$1]',\r\n\t\t'\\s*>\\s*' => '/' . $namespace,\r\n\t\t// first-child and company are theoretically put into the style attribute\r\n\t\t//'([\\w\\-]*):first-child' => '*[1]/self::$1',\r\n\t\t// these are pseudo-selectors and could be part of either the selector or the style information for our purposes.\r\n\t\t// it is probably easier to consider them as style information.\r\n\t\t//'([\\w\\-]*):first-child' => 'child::$1[1]',\r\n\t\t'([\\w\\-]{1,}|\\*)(\\.[\\w\\-]{1,})*:first-child' => '*[1]/self::$1$2',\r\n\t\t//'([\\w\\-]*):last-child' => 'child::$1[last()]',\r\n\t\t'([\\w\\-]{1,}|\\*)(\\.[\\w\\-]{1,})*:last-child' => '*[last()]/self::$1$2',\r\n\t\t//'([\\w\\-]*):lang\\(([^\\(\\)]*)\\)' => '$1[@xml:lang=\"$2\" or starts-with(@xml:lang, concat(\"$2\",\"-\"))]',\r\n\t\t//'\\s*\\+\\s*' => '/following-sibling::*[1]/self::',\r\n\t\t'([\\w\\-]{1,}|\\*)\\s*\\+\\s*([\\w\\-\\*]*)' => '$1/following-sibling::*[1]/self::$2',\r\n\t\t//'([\\w\\-]*)\\s*\\+\\s*([\\w\\-]*)' => '$1/following-sibling::$2[0]',\r\n\t\t//'([\\w\\-]*)[([\\w\\-]*)~=(\"|\\')([^\\3]*)\\3]' => '$1[contains(concat(\" \",@$2,\" \"),concat(\" \",\"$4\",\" \"))]',\r\n\t\t//'([\\w\\-]*)[([\\w\\-]*)|=(\"|\\')([^\\3]*)\\3]' => '$1[@$2=\"$3\" or starts-with(@$2,concat(\"$3\",\"-\"))]',\r\n\t\t'#([\\w\\-]{1,})' => '[@id=\"$1\"]',\r\n\t\t' ' => '//' . $namespace,\r\n\t\t//'\\.([\\w\\-]*)' => '[@class=\"$1\"]',\r\n\t\t// the above is insufficient; elements may be multiply-classed:\r\n\t\t'\\.([\\w\\-]{1,})' => '[contains(concat(\" \",@class,\" \"),\" $1 \")]',\r\n\t\t// the following can simply be precatenated when doing the query.\r\n\t\t//'(.*)' => '//' . ReTidy::get_html_namespace() . '$1',\r\n\t\t//'\\*\\*' => '*',\r\n\t\t);\r\n\t\tforeach($replaceArray as $search => $replace) {\r\n\t\t\t$XPath = preg_replace('/' . $search . '/is', $replace, $XPath);\r\n\t\t}\r\n\t\treturn $XPath;\r\n\t}", "protected function appendXPathOutput(DOMElement $parentNode, $expr)\n\t{\n\t\t$this->appendElement($parentNode, 'output', htmlspecialchars(trim($expr), ENT_COMPAT))\n\t\t ->setAttribute('type', 'xpath');\n\t}", "protected function getTopArtists()\r\n {\r\n Application::$app->checkSpotifyToken();\r\n $curl = curl_init();\r\n\r\n curl_setopt_array($curl, array(\r\n CURLOPT_URL => 'https://api.spotify.com/v1/me/top/artists',\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_ENCODING => '',\r\n CURLOPT_MAXREDIRS => 10,\r\n CURLOPT_TIMEOUT => 0,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n CURLOPT_CUSTOMREQUEST => 'GET',\r\n CURLOPT_HTTPHEADER => array(\r\n 'Accept: application/json',\r\n 'Content-Type: application/json',\r\n 'Authorization: Bearer ' . $_SESSION['user_token']\r\n ),\r\n ));\r\n\r\n $response = curl_exec($curl);\r\n curl_close($curl);\r\n\r\n return json_decode($response, true);\r\n }", "function artistsMatch($songs)\n {\n $val = null;\n foreach($songs as $song)\n {\n $val = $val == null ? $song->artist : $val;\n if($song->artist != $val)\n {\n return false;\n }\n }\n return true;\n }", "function XMLElementToXPath($currentXPath, $myXMLElement) {\n $xpathList = array( );\n $attributes = $myXMLElement->attributes( ); // grab attributes from current root element\n\n // Process element attributes, if any.\n foreach($attributes as $att_key=>$att_value) { // process element attributes (if any)\n $xpathList[] = ($currentXPath!=''?$currentXPath.'/':'').'@'. $att_key; // create XPath for attribute\n $xpathList[] = ($currentXPath!=''?$currentXPath:'').'[@'. $att_key.'=\\''.$att_value.'\\']'; // create XPath expression for element with certain attribute value\n }\n\n // Process children, if any.\n foreach($myXMLElement->children() as $childElement) {\n// $xpathList[]= ($currentXPath!=''?$currentXPath.'/':'').(string) $childElement->getName(); // create XPath expression for element\n if ($childValue = (string) $childElement->title) {\n $append = \"/text()='$childValue'\";\n } else {\n $append = '';\n }\n\n $xpathList[]= ($currentXPath!=''?$currentXPath.'/':'').(string) $childElement->getName().$append; // create XPath expression for element\n if ($childElement instanceof SimpleXMLElement) { // if child is an XML node itself then go into recursion\n $xpathList = array_merge($xpathList,XMLElementToXPath(($currentXPath!=''?$currentXPath.'/':'').(string)$childElement->getName(),$childElement));\n }\n }\n return $xpathList;\n}", "private function getArtista($row) {\n $artista = new Artista();\n $artista->setId($row['id']);\n $artista->setNome($row['nome']);\n return $artista;\n }" ]
[ "0.6101178", "0.6101178", "0.5781148", "0.55694723", "0.55139494", "0.54378265", "0.5398617", "0.53082967", "0.5256358", "0.5223148", "0.5125037", "0.51056504", "0.5068042", "0.5053697", "0.49494913", "0.49415228", "0.4939657", "0.49089053", "0.4896367", "0.48772585", "0.48745903", "0.4844307", "0.47721946", "0.47608644", "0.47594175", "0.4758383", "0.47574407", "0.47451207", "0.47370118", "0.46935728", "0.46780613", "0.46780613", "0.46493497", "0.4633648", "0.4621934", "0.46131012", "0.46088615", "0.46077764", "0.46077764", "0.45983994", "0.45536983", "0.45437494", "0.45366102", "0.45320424", "0.4525386", "0.45208666", "0.44625184", "0.44455153", "0.44351605", "0.44281995", "0.44226465", "0.4406795", "0.44049218", "0.43983924", "0.43983924", "0.437151", "0.4362312", "0.43596518", "0.43535918", "0.43530324", "0.435203", "0.43346855", "0.43346855", "0.433343", "0.43285796", "0.43092567", "0.43062484", "0.43062484", "0.4305912", "0.4289316", "0.42762405", "0.4261863", "0.42585355", "0.42039204", "0.42005128", "0.41975316", "0.4197433", "0.4197054", "0.41882285", "0.41857314", "0.41813973", "0.41789094", "0.41643324", "0.41491187", "0.41453278", "0.41453278", "0.41448563", "0.41357267", "0.41298154", "0.41297662", "0.41202635", "0.41143626", "0.41138706", "0.4113025", "0.41059116", "0.41048515", "0.41035485", "0.41018653", "0.40963012", "0.40936795" ]
0.43600884
57
Iterator interface Lazy load an instance of result class using data from the DOMDocument
public function current() { if (! $this->getStorage()->offsetExists($this->position)) { $adapter = $this->getFactory()->getResultAdapter($this->resultAdapter, $this->getDomList()->item($this->position)); $resultClass = $this->getResultClass(); $result = new $resultClass($adapter); $this->getStorage()->offsetSet($this->position, $result); } return $this->getStorage()->offsetGet($this->position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIterator() {}", "public function getIterator() {}", "abstract public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator(): Iterator {}", "function getIterator()\n {\n return new MySQL_Result( $this );\n }", "public function iterator();", "public function getIterator()\n {\n }", "public function getIterator(): \\Traversable;", "public function getIterator(): \\Traversable;", "public function getIterator()\n {\n return new \\ArrayIterator([$this->contents]);\n }", "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->fetch());\n\t}", "public function getIterator()\n {\n return new Iterator($this->entities);\n }", "function getIterator() {\r\n\t\treturn new \\ArrayIterator($this->data);\r\n\t}", "public function getIterator()\n {\n return $this->multi()->load();\n }", "public function getIterator()\n {\n return new ArrayIterator($this->result);\n }", "public function __construct(DomDocument $dom) {\n $this->totalResultsAvailable = (int) $dom->documentElement->getAttribute('totalResultsAvailable');\n $this->totalResultsReturned = (int) $dom->documentElement->getAttribute('totalResultsReturned');\n $this->firstResultPosition = (int) $dom->documentElement->getAttribute('firstResultPosition');\n\n $this->_dom = $dom;\n \t$this->_xpath = new DOMXPath($dom);\n\n \t$this->_xpath->registerNamespace(\"yh\", $this->_namespace);\n\n \t$this->_results = $this->_xpath->query(\"//yh:Result\");\n }", "abstract protected function getQueryIterator();", "function getiterator() {\n\t\treturn new \\ArrayIterator($this->cast());\n\t}", "public function getIterator()\n {\n throw new NotImplementedException(\"This resource does not support iteration\");\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n foreach ($this->iteratePages() as $page) {\n foreach ($page as $key => $element) {\n yield $key => $element;\n }\n }\n }", "public function getIterator() {\n return new PageIterator($this);\n }", "static function iter_results($results) {\n if (!$results) {\n return null;\n }\n \n while ($row = $results->fetch(PDO::FETCH_ASSOC)) {\n yield $row;\n }\n }", "public function getIterator()\n {\n return new ArrayIterator($this->pages);\n }", "public function executeIterator();", "public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['IdOrganization'] = $this->intIdOrganization;\n\t\t\t$iArray['Name'] = $this->strName;\n\t\t\t$iArray['Phone'] = $this->strPhone;\n\t\t\t$iArray['QrCode'] = $this->strQrCode;\n\t\t\t$iArray['OrganizationImage'] = $this->strOrganizationImage;\n\t\t\t$iArray['Latitude'] = $this->strLatitude;\n\t\t\t$iArray['Longitude'] = $this->strLongitude;\n\t\t\t$iArray['Country'] = $this->strCountry;\n\t\t\t$iArray['City'] = $this->strCity;\n\t\t\t$iArray['Address'] = $this->strAddress;\n\t\t\t$iArray['IdOrganizationType'] = $this->intIdOrganizationType;\n\t\t\t$iArray['IdOwner'] = $this->intIdOwner;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}", "public function getIterator()\n {\n return $this->iterator();\n }", "public function parse(DOMNode $node): iterable;", "public function __construct (DOMDocument $doc) {}", "function getIterator() {\n foreach($this->data() as $record) {\n yield $record;\n }\n }", "public function getIterator()\n {\n return new Model_Collection_Iterator($this->getQueryResult());\n }", "public function getIterator()\n\t{\n return new ArrayIterator($this->_tbody->getElements());\n\t}", "public function getIterator()\n {\n return new \\ArrayIterator($this->sitemaps);\n }", "public function iterator()\n {\n return $this->getIterator();\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->__data);\n }", "public function pulled(): Iterator;", "public function iterateAllElements()\n {\n return $this->getIterator();\n }", "public function getIterator()\r\n {\r\n return new \\ArrayIterator($this->data);\r\n }", "public function read() {\n if ($this->_expires > 0) {\n $name = preg_replace(\n '([^A-Za-z\\d]+)', '_', get_class($this->_source)\n );\n $cacheData = $this->_cache->read(\n $name, $this->_identifier, $this->_expires\n );\n if ($cacheData) {\n $dom = new \\DOMDocument();\n $dom->loadXml($cacheData);\n return $dom;\n } else {\n $dom = $this->_source->read();\n $this->_cache->write(\n $name, $this->_identifier, $this->_expires, $dom->saveXml()\n );\n return $dom;\n }\n }\n return NULL;\n }", "public function getIterator()\n {\n return new ArrayIterator((array)$this->data);\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "public function iterator () {\n\t\t$ret = new \\Array_hx();\n\t\tBalancedTree::iteratorLoop($this->root, $ret);\n\t\treturn new ArrayIterator($ret);\n\t}", "public function getIterator()\n {\n return new \\ArrayIterator($this->_data);\n }", "function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}", "public function getIterator()\n {\n return new ArrayIterator($this->entities);\n }", "public function getIterator()\n\t{\n return $this->getData();\n\t\t// return new CMapIterator($this->getData());\n\t}", "public function getIterator(): Result|Iterator\n {\n $return = $this->getResults();\n\n return ($return instanceof Result) ? $return : new EmptyIterator();\n }", "public function getIterator() {\n\t\t// Load related records for current row\n\t\t$data = $this->execute();\n\t\treturn $data ? $data : array();\n\t}", "public function getIterator() {\n\t\treturn new \\ArrayObject($this->data);\n\t}", "public function getIterator(): Generator\n {\n foreach ($this->api->getEach(\"{$this}/items\") as $data) {\n yield $this->api->factory(static::GRAPH[$data['resource_type']] ?? Data::class, $this, $data);\n }\n }", "public function getIterator()\n {\n return new RefEntityIterator($this->storage);\n }", "public function getIterator() {\n\n\t\tif ($this->_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn $this->_callAdapter(get_class(), __FUNCTION__);\n\n\t\tif ($this->_collection === null) {\n\t\t\t$this->_collection = new Collection();\n\t\t}\n\t\treturn $this->_collection->getIterator();\n\t}", "public function getIterator(): \\Traversable\n {\n yield from $this->source;\n }", "public function getIterator()\n {\n return $this->iterator;\n }", "public function getIterator(): Iterator\n {\n return $this->{$this->fnDoGetIterator}();\n }", "public function getIterator() {\n return new \\ArrayIterator($this->cast);\n }", "public function getIterator()\n {\n return new ArrayIterator($this->getResultList());\n }", "public function getTrueIterator();", "abstract public function scrape(): Result;", "public function getIterator()\r\n {\r\n return $this->all();\r\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->elements(true));\n }", "public function getIterator()\n {\n return new Itr($this);\n }", "public function getIterator(): \\Traversable\n {\n yield from $this->generator;\n }", "public function getIterator() {\r\n return new ArrayIterator($this -> _data);\r\n }", "public function getIterator() {\n return new ArrayIterator($this->getAll());\n }", "protected function _execute()\n {\n $this->triggerBeforeFind();\n if ($this->_results) {\n $decorator = $this->_decoratorClass();\n\n return new $decorator($this->_results);\n }\n\n $statement = $this->getEagerLoader()->loadExternal($this, $this->execute());\n\n return new ResultSet($this, $statement);\n }", "function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }", "public function getIterator(): ArrayIterator\n {\n return new ArrayIterator($this->results);\n }", "public function getIterator()\n\t{\n\t\t// Execute query and return ResultSet for iteration\n\t\t$result = $this->execute();\n\t\treturn ($result !== false) ? $result : array();\n\t}", "public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['Id'] = $this->intId;\n\t\t\t$iArray['FirstName'] = $this->strFirstName;\n\t\t\t$iArray['LastName'] = $this->strLastName;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}", "public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['Id'] = $this->intId;\n\t\t\t$iArray['FirstName'] = $this->strFirstName;\n\t\t\t$iArray['LastName'] = $this->strLastName;\n\t\t\t$iArray['SysTimestamp'] = $this->strSysTimestamp;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}", "public function getIterator()\n {\n return new \\ArrayIterator($this->_cache);\n }", "public function getIterator() { return new mfp_iterator($this->list); }", "abstract public function scrape();", "public function all(): \\Iterator;", "public function __construct(DOMElement $result)\n {\n $this->_fields = ['Summary', 'MimeType', 'ModificationDate'];\n parent::__construct($result);\n\n $this->_xpath = new DOMXPath($result->ownerDocument);\n $this->_xpath->registerNamespace('yh', $this->_namespace);\n\n // check if the cache section exists\n $cacheUrl = $this->_xpath->query('./yh:Cache/yh:Url/text()', $result)->item(0);\n if ($cacheUrl instanceof DOMNode)\n {\n $this->CacheUrl = $cacheUrl->data;\n }\n $cacheSize = $this->_xpath->query('./yh:Cache/yh:Size/text()', $result)->item(0);\n if ($cacheSize instanceof DOMNode)\n {\n $this->CacheSize = (int) $cacheSize->data;\n }\n }", "protected function getDom()\n {\n if (! isset($this->dom)) {\n $dom = new DOMDocument();\n if (is_null($this->getResults())) {\n throw new \\RuntimeException('There doesnt appear to be any results to load');\n }\n // suppress warning but throw Exception\n if (! @$dom->loadXML($this->getResults())) {\n throw new \\RuntimeException('Could not load results into DOMDocument');\n }\n $this->dom = $dom;\n }\n return $this->dom;\n }", "public function getIterator(): ArrayIterator\n {\n return new ArrayIterator($this->nodes->all());\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->attributes, 1);\n }", "public function getIterator()\n {\n $elements = new NodeList();\n if ($this->node->hasChildNodes()) {\n foreach ($this->node->childNodes as $node) {\n $elements[] = new Element($node);\n }\n }\n\n return $elements;\n }", "public abstract function getResults();", "public function getIterator()\n {\n return new \\ArrayIterator($this->items->all());\n }", "abstract public function getResults(): mixed;", "public function getIterator()\n {\n foreach ($this->iterable as $item) {\n yield $item;\n }\n }", "private function __construct(){\r\n $this->dom = new DOMDocument();\r\n $this->xslt = new XSLTProcessor();\r\n }", "public function getIterator()\n {\n // Ensure immutable.\n return new IteratorProxy($this->iterator);\n }", "public function getIterator()\n\t{\n\t\tif($this->_statement == null)\n\t\t\t$this->execute($this->params);\n\t\t//if($this->_statement instanceof PDOStatement)\n\t\t\t//var_dump($this->_statement);\n\t\treturn new IteratorIterator($this->_statement);\n\t}", "function _init() {\n\t\t$total = $this->node->documentElement->childCount;\n\t\t$itemCounter = 0;\n\t\t$channelCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->documentElement->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t\tswitch ($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\t\t\t\t\t\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CHANNEL:\n\t\t\t\t\t$this->domit_rss_channels[$channelCounter] =& new xml_domit_rss_channel($currNode);\n\t\t\t\t\t$channelCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($channelCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CHANNELS] =& $this->domit_rss_channels;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t\t\n\t\t$this->handleChannelElementsEmbedded();\n\t}", "function _init() {\n\t\t$total = $this->node->childCount;\n\t\t$itemCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\t\t\t\n\t\t\tswitch($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t}", "public function getIterator()\n {\n $statement = $this->db->pdo($this->connection)->prepare($this->query);\n\n $statement->execute($this->bindings);\n\n while ($row = $statement->fetch()) {\n yield $row;\n }\n }", "public function getIterator() {\r\n return new ArrayIterator($this->data);\r\n }", "public function getIterator()\n {\n return new ArrayIterator($this->data);\n }", "public function getIterator()\n {\n return new ArrayIterator($this->data);\n }" ]
[ "0.65932065", "0.65932065", "0.6559098", "0.64023924", "0.64023924", "0.64023924", "0.64023924", "0.64023924", "0.64023924", "0.6208165", "0.61536837", "0.61131763", "0.6083572", "0.598146", "0.598146", "0.59315294", "0.5921017", "0.584694", "0.5814333", "0.5810584", "0.5765224", "0.573566", "0.5708828", "0.5693992", "0.5658892", "0.5656825", "0.5656825", "0.56481904", "0.56440485", "0.5612673", "0.55988723", "0.5597873", "0.5583772", "0.5565274", "0.5552922", "0.5550868", "0.55435824", "0.55365133", "0.5534496", "0.5531191", "0.55263793", "0.55128103", "0.55031306", "0.5502238", "0.5500399", "0.54876006", "0.5482946", "0.5479535", "0.5479535", "0.5476307", "0.54712814", "0.54636437", "0.54592514", "0.5455668", "0.54444957", "0.5439806", "0.54177004", "0.5415405", "0.5414062", "0.5412868", "0.5410545", "0.540776", "0.54056233", "0.5405052", "0.54001063", "0.5396545", "0.53814787", "0.5373063", "0.53657484", "0.53537226", "0.5351285", "0.5344415", "0.53359723", "0.5330456", "0.53294426", "0.53225225", "0.53163093", "0.53156674", "0.53074014", "0.52950305", "0.5294372", "0.52942187", "0.52940613", "0.52902", "0.5286439", "0.5285023", "0.52804035", "0.52762455", "0.5270363", "0.5267959", "0.5255119", "0.52420354", "0.52404237", "0.5233336", "0.5231172", "0.5223772", "0.52177036", "0.52156925", "0.520305", "0.519424", "0.519424" ]
0.0
-1
SplFixedArray instance lazy loaded used to store result class instances
protected function getStorage() { if (! isset($this->storage)) { $this->storage = new SplFixedArray($this->getDomList()->length); } return $this->storage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __constructor() {\n $arr = array();\n }", "protected function initializeResultArray() {}", "public abstract function FetchArray();", "public function getInternalArray() {}", "#[Pure]\nfunction spl_classes(): array {}", "public function __invoke() : array;", "public function __invoke() : array;", "public function fetchArray();", "public function fetchArray();", "protected function blank_array($className){\n\t\tif (class_exists($className)) {\n\t\t\t$res= new $className();\n\t\t\treturn get_object_vars($res);// convert to array\n\t\t} else\n\t\t\t// throw a fatal exception SoapFault\n\t\t\t$this->error(\"internal error :class $className not found !\");\n\t}", "function createLibClassArray(){\n return array(\n \"MA2090\",\n \"ED3700\",\n \"ML4220\",\n \"EL1000\",\n \"VA2010\",\n \"PY2010\",\n \"HI2681\",\n \"BS2400\",\n \"BS2401\",\n \"MA2310\",\n \"ED3820\",\n \"ML1100\",\n \"EL2206\",\n \"VA2020\",\n \"PY3410\",\n \"AS2112\",\n \"CP2220\",\n \"CP2221\",\n \"CS2511\",\n \"ED3950\",\n \"ML1101\",\n \"EL4312\",\n \"VA2030\",\n \"PY3420\",\n \"HI3091\",\n \"BS2410\",\n \"BS2411\",\n \"CS2511\",\n \"EL3865\",\n \"VA3100\",\n \"HI2810\",\n \"HI3002\",\n \"HI3011\",\n \"HI3021\"\n );\n }", "public function aArray() {}", "abstract public function getArray();", "private function getStack(iterable $params) : SplFixedArray\n {\n $index = -1;\n $length = count($params);\n $stack = new SplFixedArray($length);\n\n while ($length) {\n $stack[++$index] = $params[--$length]->getClass() ?: $params[$length];\n }\n\n return $stack;\n }", "public function __construct($size = 0) // [\\SplFixedArray]\n\t{\n\t\t$this->start = ($size instanceof \\SplFixedArray) ? 0\n\t\t : $size / 2;\n\t\tparent::__construct($size);\n\t}", "public static function instanceToArray() : array{\n\n if(!method_exists(self::class,'instance')):\n return [];\n endif;\n\n return self::instance()->toArray();\n }", "public function fetchArray(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_array\";\n return $this;\n }", "private function createArrayable()\n {\n $this->data = $this->data->toArray();\n\n $this->createArray();\n }", "abstract protected function to_array($res, $className, $emptyMsg);", "private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }", "public function maker(): array;", "public static function arrayWithObjects()\n {\n return new RsoArray(func_get_args());\n }", "public function AsArray();", "protected function &getItemsAsArray() {\n\n if ($this->_itemArray !== null) {\n return $this->_itemArray;\n }\n\n $this->_itemArray = array();\n $q = $this->query();\n\n while($row = $q->fetchRow()) {\n\n $item = $this->createModelInstance($row);\n $this->_itemArray[] = $item;\n\n }\n\n if ($this->_comparatorFunction) {\n\n // Error suppression is because of\n // https://bugs.php.net/bug.php?id=50688\n @usort($this->_itemArray, $this->_comparatorFunction);\n\n }\n\n if ($this->_offset && $this->_maxRecords) {\n\n $this->_itemArray = array_slice($this->_itemArray, $this->_offset, $this->_maxRecords);\n\n } else if ($this->_maxRecords) {\n\n $this->_itemArray = array_slice($this->_itemArray, 0, $this->_maxRecords);\n\n } else if ($this->_offset) {\n\n $this->_itemArray = array_slice($this->_itemArray, $this->_offset);\n\n }\n\n return $this->_itemArray;\n\n }", "abstract protected function &container() : array ;", "public function result() : array;", "public function getFakedData(): array;", "public function build(): array;", "public function build(): array;", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function factory($arrayfetch){\n $arraytoret = Array();\n if($arrayfetch){\n foreach($arrayfetch as $fetch){\n $newObject = new Usuario($this->driver);\n $newObject->fill($fetch);\n array_push($arraytoret,$newObject);\n }\n }\n return $arraytoret;\n }", "public function load() : array;", "public function getAsArray();", "function __construct() {\n $this->records = array(new Record(), new Record(), new Record);\n }", "private function get_object_array($array){\n \n }", "public function getData()\n {\n if ($this->_cache === null) {\n $this->_cache = $this->asArray(); // Throws.\n }\n\n if ($this->_type !== null) {\n foreach ($this->_cache as &$value) {\n if (is_array($value)) {\n $value = new $this->_type($value); // Throws.\n }\n }\n }\n\n return $this->_cache;\n }", "abstract protected function toArray();", "public function get() : array;", "public function & toArray()\n\t{\n\t\t$x = new ArrayObject($this->data);\n\t\treturn $x;\n\t}", "public function results(): array;", "public function getProcessedData(): object|array;", "private function getDataArray() {\n\t\treturn $this->dataArray;\n\t}", "function InicializaArray($Limite){\n\t\tfor($i = 1; $i <= $Limite; $i++) \n\t\t{ \n\t\t ${'array'}[$i] = 0; \n\t\t} \n\treturn $array;\n}", "public function asArray()\n {\n }", "function get_array(){\n return $this->getArrayCopy();\n }", "function get_array(){\n return $this->getArrayCopy();\n }", "function make()\n{\n return [];\n}", "function toArray() {\n # This may use up all your RAM if you aren't careful.\n $arr = array();\n while (($i = $this->next()) !== NULL) {\n $arr[] = $i;\n }\n return $arr;\n }", "public function __construct()\n {\n $this->placas = new ArrayCollection();\n }", "public function __construct($arraySize = 1000)\n {\n for ($i=0; $i<$arraySize; $i++) {\n $this->data[dechex($i)] = $i;\n }\n }", "private function dataConvert($array)\n {\n $result = false;\n if(count($array) && isset($array[0]) && is_array($array[0]))\n {\n $class = get_class($this);\n foreach($array as $arr)\n {\n $result[] = new $class((int) $arr[$this->primaryName]);\n }\n }\n else if(count($array))\n {\n $class = get_class($this);\n $result = new $class((int) $array[$this->primaryName]);\n }\n return $result;\n }", "public function getProcessedElements(): array;", "public function makeNew() {\n\t\t$class = get_class($this);\n\t\t$newArray = $this->wire(new $class($this->parent, $this->field));\n\t\treturn $newArray;\n\t}", "public function __construct($big_arr=null)\n {\n if(!empty($big_arr))\n $this->data_arr = $big_arr;\n }", "public static function buildDataCache()\n {\n return new ArrayCache;\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "abstract public function getTestData(): array;", "private function loadClass() {\n $this->_instances = array();\n\n $this->_instances['log'] = new Log();\n if(ENVIRONMENT == self::ENVIRONMENT_DEV) {\n $this->_instances['debug'] = new Debug();\n $this->_instances['panel'] = new Panel();\n }\n $this->_instances['controller'] = null;\n $this->_instances['configuration'] = new Configuration();\n $this->_instances['routing'] = new Routing();\n }", "function __construct()\n {\n $this->_data = array();\n }", "public function __construct(){\n $this->variables = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function get(): array;", "public function get(): array;", "public function getData() : array;", "public function getData() : array;", "public function __construct()\n\t{\n parent::__construct();\n $this->return_as = 'array';\n\t}", "function getDatosInArray(){ if($this->mSocioIniciado == false ){ $this->init(); } \treturn $this->mDSocioByArray;\t}", "function getArray();", "public final function __toArray()\n {\n $data = array();\n \n $all_fields = $this->__get_fields();\n \n foreach ($all_fields as $key => $value)\n {\n $data[$key] = $value;\n }\n \n $data[self::CLASS_FIELD_KEY] = $this->__getRawClassName();\n \n return $data;\n }", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "abstract protected function load(): array;", "public function getIterator()\n {\n return new MF_PHP_Array($this->__data);\n }", "public function custom_result_object($class_name)\n\t{\n\t\tif (array_key_exists($class_name, $this->custom_result_object))\n\t\t{\n\t\t\treturn $this->custom_result_object[$class_name];\n\t\t}\n\n\t\tif ( ! class_exists($class_name) OR $this->result_id === FALSE OR $this->num_rows() === 0)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// add the data to the object\n\t\t$result_object = array();\n\t\t$data = NULL;\n\n\t\t/* First check if we don't already have the data.\n\t\t * If so - pass by reference, as we don't know how\n\t\t * large it might be and we don't want 1000 row\n\t\t * sets being copied.\n\t\t */\n\t\tif (count($this->result_array) > 0)\n\t\t{\n\t\t\t$data = &$this->result_array;\n\t\t}\n\t\telseif (count($this->result_object) > 0)\n\t\t{\n\t\t\t$data = &$this->result_object;\n\t\t}\n\n\t\tif ( ! is_null($data))\n\t\t{\n\t\t\tfor ($i = 0, $c = count($data); $i < $c; $i++)\n\t\t\t{\n\t\t\t\t$result_object[$i] = new $class_name();\n\t\t\t\tforeach ($data[$i] as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$result_object[$i]->$key = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No prefetched result set\n\t\t\tif (is_array($this->row_data))\n\t\t\t{\n\t\t\t\t$row_index = count($this->row_data);\n\t\t\t\tif ($row_index === 0)\n\t\t\t\t{\n\t\t\t\t\treturn array();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor ($i = 0; $i < $row_index; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result_object[$i] = new $class_name();\n\t\t\t\t\t\tforeach ($this->row_data[$i] as $key => $value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$result_object[$i]->$key = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row_index = 0;\n\t\t\t\t$this->row_data = array();\n\t\t\t}\n\n\t\t\twhile ($row = $this->_fetch_assoc())\n\t\t\t{\n\t\t\t\t$data = new $class_name();\n\t\t\t\tforeach ($row as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$data->$key = $value;\n\t\t\t\t}\n\n\t\t\t\t$this->row_data[$row_index] = $row;\n\t\t\t\t$result_object[$row_index++] = $data;\n\t\t\t}\n\t\t\t// Un-comment the following line, in case it becomes needed\n\t\t\t// $this->_data_seek();\n\t\t}\n\n\t\t/* As described for the num_rows() method - there's no easy\n\t\t * way to get the number of rows selected. Our work-around\n\t\t * solution (as in here as well) first checks if result_array\n\t\t * or result_object exist and returns their count. It doesn't\n\t\t * however check for a custom_object_result, so - do it here.\n\t\t */\n\t\tif ( ! is_int($this->num_rows))\n\t\t{\n\t\t\t$this->num_rows = count($result_object);\n\t\t}\n\n\t\t// Cache and return the array\n\t\treturn $this->custom_result_object[$class_name] = $result_object;\n }", "public function __construct(array $array)\n {\n parent::hydrate($array);\n }", "public function __new(array $arr) \n {\n if (is_array($arr)) {\n foreach ($arr as $key => $value)\n {\n $this->__add($key, $value);\n }\n }\n }", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;" ]
[ "0.6181477", "0.5976668", "0.58095276", "0.5759732", "0.56752026", "0.5482036", "0.5482036", "0.5426325", "0.5426325", "0.5395693", "0.5376134", "0.5332684", "0.533219", "0.53218246", "0.5308685", "0.5301731", "0.52830416", "0.5245325", "0.5212397", "0.520137", "0.517126", "0.51672554", "0.5108052", "0.51039934", "0.5103052", "0.5081274", "0.50700337", "0.50645226", "0.50645226", "0.5047581", "0.5047581", "0.5047581", "0.5047581", "0.5047581", "0.5047581", "0.5037841", "0.5029417", "0.50199187", "0.5007437", "0.49767438", "0.49664178", "0.49634397", "0.49615854", "0.49551925", "0.49549165", "0.49546328", "0.4944129", "0.49425054", "0.49379098", "0.49310184", "0.49310184", "0.49204957", "0.49046704", "0.49043062", "0.49042115", "0.48998168", "0.48987705", "0.4892754", "0.48881498", "0.4884122", "0.48651084", "0.48651084", "0.48638606", "0.48638606", "0.48638606", "0.48638606", "0.48635164", "0.48635164", "0.48635164", "0.48635164", "0.48635164", "0.48635164", "0.48635164", "0.48635164", "0.48635164", "0.48635164", "0.48633447", "0.485224", "0.485057", "0.48459628", "0.48447764", "0.48447764", "0.4836859", "0.4836859", "0.48344997", "0.4826737", "0.48226938", "0.4820722", "0.4815429", "0.4815429", "0.48145762", "0.48139757", "0.48131117", "0.48112857", "0.48093614", "0.48026562", "0.48018375", "0.47953853", "0.47953853", "0.47953853" ]
0.5035046
36
Return the total number of records that can be retrieved from the web service
public function getCount() { if (! isset($this->count)) { $this->count = (int)$this->getXPath($this->getDom())->query($this->getCountQuery())->item(0)->value; } return $this->count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumberOfRecords() {}", "public function getTotalNumberOfResults();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function count(){\n\t\t$this->initRecordSet();\n\t\treturn $this->recordSetSize;\n\t}", "public function getRecordsTotal(): int;", "public function getTotalRecords()\n {\n return $this->pageMetaData['total_records'];\n }", "public function totalCount();", "public function totalCount();", "function get_num_records()\n\t{\n\t\t$this->sql = 'SELECT COUNT(*) FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\treturn db_getOne($this->sql, $this->use_db);\n\t}", "public function getTotalRecords()\n\t{\n\t\tif ($this->_totalRecords == NULL) {\n\t\t\tif ($this->_sql) {\n\t\t\t\t$result = $this->_database->fetchAll('SELECT COUNT(*) AS count FROM (' . $this->_sql . ') AS dummy');\n\t\t\t\t$this->_totalRecords = $result[0]['count'];\n\t\t\t} else\n\n\t\t\tif ($this->_file) {\n\t\t\t\t$this->_totalRecords = count($this->_file);\n\t\t\t} else\n\n\t\t\tif ($this->_array) {\n\t\t\t\t$this->_totalRecords = count($this->_array);\n\t\t\t} else {\n\t\t\t\t$this->_totalRecords = count($this->_dataCollection);\n\t\t\t}\n\t\t}\n\t\treturn $this->_totalRecords;\n\t}", "public function computeCount() {\n if ($str = elis_consumer_http_request($this->url_pattern . '&rows=0', array('Accept' => 'application/json'))) {\n if ($json = json_decode($str)) {\n $this->totalCount = $json->response->numFound;\n }\n }\n return $this->totalCount;\n }", "public function numberOfRecords(): int\n {\n return $this->number_of_records;\n }", "public function getRecordsCount()\n {\n return $this->count(self::_RECORDS);\n }", "public function getCount()\n\t{\n\t\treturn $this->data_source->count();\n\t}", "public function getCount() {\n \treturn $this->count();\n }", "public function count()\n\t{\n\t\treturn $this->result->count();\n\t}", "function RecordCount() {\r\n return $this->result->numRows();\r\n }", "public function numberOfRecords(): int\n {\n return $this->lastResponse->numberOfRecords;\n }", "public function getTotalResultsCount()\n {\n if (!$this->xmlRoot) {\n $this->processData();\n }\n return intval((string)$this->xmlRoot->xpath('/searchRetrieveResponse/numberOfRecords'));\n }", "public function getTotalRecords() {\n return $this->totalRecords;\n }", "public function record_count() {\r\n return $this->db->count_all(\"pessoafisica\");\r\n }", "public function fetchNrRecordsToGet();", "public function getTotalResults();", "public function GetTotalCount(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n $res->get_total_count($conn);\n }", "public function computeCount() {\n $count = 0;\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n $count = count($data);\n }\n }\n return $count;\n }", "public function getTotal()\n\t{\n\t\t\n\t\treturn count($this->findAll());\n\t}", "public function getRecordCount(){\n $records = $this->statement(\"SELECT count(*) AS total_records FROM `voters`\");\n return $records[0]['total_records'];\n }", "public function getRecordCount()\n {\n return $this->count(self::_RECORD);\n }", "function ListRecordCount() {\n\t\t$filter = $this->getSessionWhere();\n\t\tew_AddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->ApplyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$sql = ew_BuildSelectSql(\"SELECT * FROM \" . $this->getSqlFrom(), $this->getSqlWhere(), \"\", \"\", \"\", $filter, \"\");\n\t\t$cnt = $this->TryGetRecordCount($sql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}", "public function count()\n {\n return $this->queryResult->getSize();\n }", "public function count()\n\t{\n\t\t$content = $this->resource->get($this->name)->getContent();\n\t\t\n\t\treturn $content['doc_count'];\n\t}", "public function recordCount()\n {\n return sizeof($this->getRecords());\n }", "public function rowTotalCount() {\n if (is_null($this->response)) {\n throw new Exception('Response in NULL');\n }\n return $this->response->found;\n }", "public function getTotalItemCount();", "public function count()\n {\n return count($this->getResults());\n }", "public function count()\n {\n return $this->model->paginate(1, $this->select)->total();\n }", "public function count()\n {\n $result = new QueryResult($this);\n return $result->count();\n }", "public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"mailingdataavmedgroupinvoicesrecord30\");\n\t}", "public static function record_count()\r\r\n {\r\r\n global $wpdb;\r\r\n $result = false;\r\r\n $totalRecords = 0;\r\r\n $countKey = 'total';\r\r\n $mitambo_json_api = wpsearchconsole::getInstance()->mitambo_json_api;\r\r\n $lastCollectDate = $mitambo_json_api->last_collect_date;\r\r\n $tabName = List_of_Data::getCurrentTabName(isset($_GET['tab']) ? $_GET['tab'] : 1);\r\r\n $type = List_of_Data::getDefaultType($tabName);\r\r\n $type = (isset($_GET['type']) ? $_GET['type'] : $type);\r\r\n\r\r\n $sql = \"SELECT json_value FROM {$wpdb->prefix}wpsearchconsole_data\";\r\r\n\r\r\n $sql .= \" WHERE api_key = '$tabName'\";\r\r\n $sql .= ($tabName == 'keywords' && $type == 0) ? \" AND api_subkey = '$type'\" : \"\";\r\r\n $sql .= ($type && $type != 'all') ? \" AND api_subkey = '$type'\" : \"\";\r\r\n $sql .= \" AND datetime = '\" . substr($lastCollectDate, 0, 10) . \"'\";\r\r\n $sql .= \"GROUP BY api_subkey\";\r\r\n\r\r\n if ($tabName == 'duplication') {\r\r\n $countKey = 'DuplicateGroupsCount';\r\r\n }\r\r\n $response = $wpdb->get_results($sql);\r\r\n foreach ($response as $key => $val) {\r\r\n\r\r\n if (!empty($val) && array_key_exists('json_value', $val)) {\r\r\n\r\r\n $result = json_decode($val->json_value);\r\r\n $totalRecords += ($result && array_key_exists($countKey, $result)) ? $result->$countKey : 0;\r\r\n }\r\r\n }\r\r\n\r\r\n return $totalRecords;\r\r\n }", "public function count() {\n\t\t// return $this->_count;\n\t\treturn count($this->_data);\n\t}", "public function total_data_objects()\n {\n if(isset($this->total_data_objects)) return $this->total_data_objects;\n $this->total_data_objects = 0;\n \n $result = $this->mysqli_slave->query(\"SELECT COUNT(*) count FROM data_objects WHERE published=1 AND visibility_id=\".Visibility::find('visible'));\n if($result && $row=$result->fetch_assoc()) $this->total_data_objects = $row['count'];\n return $this->total_data_objects;\n }", "public function getCount()\n {\n return $this->doQuery(null, false, false)->count();\n }", "public function getNumberOfRecords() {\r\n\t\treturn mysqli_num_rows($this->result);\r\n\t}", "public static function getTotalData()\n {\n $table = \"return_list\";\n $condition = \"\";\n return Connection::getCountData($table, $condition);\n\n }", "public function record_count() {\n return $this->db->count_all(\"promotores\");\n }", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "function fetchTotalObjectCount()\n {\n $db = eZDB::instance();\n $objectCount = array();\n $objectCount = $db->arrayQuery( \"SELECT COUNT(*) AS count FROM ezcontentobject\" );\n $totalObjectCount = $objectCount[0][\"count\"];\n return $totalObjectCount;\n }", "public function count() {\n\t\treturn count($this->getData());\n\t}", "public function count() {\n\t\treturn count($this->data);\n\t}", "function gettotalpageno(){\n\t $qry = \"SELECT * FROM countries\";\n\t return $result = $this->modelObj->numRows($qry);\n\t}", "public function count() {\n\t\treturn count($this->_dataobjects);\n\t}", "function RecordCount() {}", "function record_count() {\n return $this->db->count_all($this->_student);\n }", "public function count() \n { \n $query = $this->processInput();\n \n $model = $this->model;\n \n $result['total'] = $model::countAll($query['where']);\n\n $jsend = JSend\\JSendResponse::success($result);\n return $jsend->respond();\n }", "function RecordCount()\n\t{\n\t\treturn $this->_numOfRows;\n\t}", "public function count()\r\n {\r\n\t\tif ( null === $this->totalResults )\r\n\t\t{\r\n\t\t\t$this->warmUp();\r\n\t\t}\r\n\r\n\t\treturn $this->totalResults;\r\n\t}", "public function getResultAllCount() {\n if (is_null($this->response)) {\n throw new Exception('Response is NULL');\n }\n return count($this->response);\n }", "function getTotal()\r\n{\r\n if (empty($this->_total))\r\n {\r\n $query = $this->_buildQuery();\r\n $this->_total = $this->_getListCount($query);\r\n }\r\n \r\n return $this->_total;\r\n}", "public function getCount(){\n\t\t$result = mysql_num_rows(mysql_query(\"select * from customer\"));\n\t\treturn $result;\n\t}", "public function getCount();", "public function getCount();", "public function getCount();", "public function count() {\n\t\treturn count($this->_data);\n\t}", "public function getCountList(){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\treturn count($stmt->fetchAll());\n\t}", "public static function getCount(){\n \t$sql = \"SELECT COUNT(*) as count FROM yy_hospital\";\n \t$res = self::getDb()->query($sql)->fetchAll();\n \t$count = $res[0]['count'];\n \treturn $count;\n }", "static public function getTotalCount()\n\t{\n\t\treturn self::$count;\n\t}", "public function count() {\r\n\r\n return $this->total_size;\r\n\r\n }", "public static function getCount()\n\t{\n\t\treturn self::find()->count();\n\t}", "public function getCount()\n {\n if ($this->_queryResult === null) {\n return 0;\n }\n\n return $this->_queryResult->count();\n }", "public function getCount()\n {\n if ($this->isValid()) {\n return isset($this['request']['records']) ? $this['request']['records'] : null;\n }\n }", "public function count(): int\n\t{\n\t\treturn $this->paginator->count();\n\t}", "public function count() {\r\n return count($this->data);\r\n }", "function get_total_all_records($connect)\n{\n\t$statement = $connect->prepare('SELECT * FROM sites');\n\t$statement->execute();\n\treturn $statement->rowCount();\n}", "public function getCount() {}", "public function getCount() {}", "function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "public function getCount() {}", "public function getCount() {\n return $this->get(self::COUNT);\n }", "function getTotal() {\r\n\t\tif (empty ( $this->_total )) {\r\n\t\t\t$query = $this->_buildQuery ();\r\n\t\t\t$this->_total = $this->_getListCount ( $query );\r\n\t\t}\r\n\t\treturn $this->_total;\r\n\t}", "public function count() {\r\n if (is_null($this->objectcount)) {\r\n $this->fetchData();\r\n }\r\n return $this->objectcount;\r\n }", "public function count()\n {\n return count( $this->data );\n }", "function count() {\n\t\treturn count($this->data);\n\t}", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();" ]
[ "0.79170746", "0.7713301", "0.7666421", "0.7666421", "0.7666421", "0.7606588", "0.75759774", "0.7509158", "0.74404985", "0.74404985", "0.7437769", "0.7436009", "0.73814195", "0.73646903", "0.73494375", "0.7339666", "0.73304313", "0.73103654", "0.72928804", "0.7265972", "0.72522736", "0.72441506", "0.7222669", "0.72123754", "0.72107375", "0.71871156", "0.7185962", "0.7183801", "0.7156198", "0.7149917", "0.71301806", "0.71278006", "0.71273047", "0.71251", "0.7111875", "0.7088301", "0.708478", "0.70820206", "0.7052018", "0.70216954", "0.7016921", "0.701107", "0.70064664", "0.7000285", "0.69806284", "0.69793576", "0.69674957", "0.69598526", "0.6953122", "0.6951739", "0.6951722", "0.69488525", "0.6947587", "0.6946272", "0.6945202", "0.69419163", "0.6937508", "0.6933294", "0.69289434", "0.6926375", "0.69258213", "0.69205475", "0.69205475", "0.69205475", "0.69145596", "0.6913473", "0.69123954", "0.69034225", "0.689994", "0.6897352", "0.6896914", "0.6882571", "0.6879773", "0.68789095", "0.6877988", "0.6872032", "0.6872032", "0.6871986", "0.6871735", "0.68652314", "0.68651265", "0.68617004", "0.68577796", "0.68566155", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765", "0.6853765" ]
0.0
-1
Return a DateTime instance containing the created attribute of the DOMDocument as returned from the web service
public function getCreated() { if (! isset($this->created)) { $this->created = new DateTime($this->getXPath($this->getDom())->query($this->getCreatedQuery())->item(0)->value); } return $this->created; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDate()\n {\n $yearconst = $this->getValue(self::XPATH_YEAR);\n $monthconst = $this->getValue(self::XPATH_MONTH);\n $dayconst = $this->getValue(self::XPATH_DAY);\n\n return $this->formateDate($yearconst, $monthconst, $dayconst);\n }", "public function getDateCreated() : DateTime\n {\n $rtn = $this->data['date_created'];\n\n if (!empty($rtn)) {\n $rtn = new DateTime($rtn);\n }\n\n return $rtn;\n }", "public function getDateTaken()\n {\n if (!isset($this->dateTaken)) {\n $this->dateTaken = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getDateTakenQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->dateTaken;\n }", "public function getDateCreated()\n {\n $rtn = $this->data['date_created'];\n\n if (!empty($rtn)) {\n $rtn = new \\DateTime($rtn);\n }\n\n return $rtn;\n }", "protected function _created()\n {\n $element = new Zend_Form_Element_Text('date_create');\n $element->setLabel('Date create')\n ->addValidator(new Zend_Validate_Date('Y-m-d H:i:s'));\n\n return $element;\n }", "public function getDateCreated();", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "function the_date_xml()\n {\n }", "function getCreatedDate() {\n\t\treturn $this->_CreatedDate;\n\t}", "public function getCreated(): DateTime\n {\n return $this->created;\n }", "public function getDateCreated() {\r\n return $this->_date_created;\r\n }", "public function getCreated()\n {\n $date = $this->getEntityValue('created', 0);\n // The ISO8601 DateTime format is not compatible with ISO-8601, but is left this way for backward compatibility\n // reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead.\n // See http://php.net/manual/en/class.datetime.php\n $datetime = DateTime::createFromFormat(DateTime::ATOM, $date);\n\n return $datetime;\n }", "public function getDateCreated()\n {\n return $this->_DateCreated;\n }", "public function getDate_creation()\n {\n return $this->date_creation;\n }", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "public function getDateCreate()\n\t{\n\t\treturn $this->dateCreate;\n\t}", "public function getDateCreated()\n {\n if (isset($this->data['CreatedDate'])) {\n return $this->data['CreatedDate'];\n } else {\n return false;\n }\n }", "public function _getCreatedOn() {\n\t\treturn $this->_createdOn;\n\t}", "public function getDateCreation()\n {\n return $this->date_creation;\n }", "function get_creation_date()\n\t{\n\t\treturn $this->creation_date;\n\t}", "public function getCreatedTime()\n {\n if (preg_match('/data-utime=\"(.+?)\"/', $this->body, $matches)) {\n return $matches[1];\n }\n\n return false;\n }", "public function getCreatedOn(): \\DateTime\n {\n return $this->createdOn;\n }", "public function getDateCreate()\n {\n return $this->date_create;\n }", "public function getDateCreate()\n {\n return $this->date_create;\n }", "public function get_date_created();", "public function getCreated()\n {\n if (is_string($this->created))\n $this->created = new UDate($this->created);\n return $this->created;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreated()\n {\n return $this->date_created;\n }", "public function getDateCreated()\n {\n return $this->date_created;\n }", "public function getCreationDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->creationDate;\r\n\t}", "public function getCreatedDate()\n {\n return isset($this->CreatedDate) ? $this->CreatedDate : null;\n }", "public function created() {\n\t\treturn gmdate( 'Y-m-d\\TH:i:s\\Z' );\n\t}", "public function getDate() {\n return @$this->attributes['date'];\n }", "public function getReviewDateTime() : \\DateTime {\n\t\treturn ($this->reviewDateTime);\n\t}", "function getCreatedTime() {\n\t\tif (is_null($this->created_time)) {\n\t\t\t$this->created_time = new \\MongoDate();\n\t\t}\n\t\treturn $this->created_time;\n\t}", "public function getCreated() {\n\n $createdDateTime = \\DateTime::createFromFormat('Y-m-d H:i:s', $this->created);\n return $createdDateTime;\n\n }", "public function getDateUpload()\n {\n if (!isset($this->dateUpload)) {\n $this->dateUpload = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getDateUploadQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->dateUpload;\n }", "public function getCreateDate()\n {\n $this->create_date = null;\n\n return;\n }", "public function getCreated()\n {\n return $this->_created;\n }", "public function getCreated()\n {\n return $this->_created;\n }", "private function GetCreated()\n\t\t{\n\t\t\treturn $this->created;\n\t\t}", "public function getCreationDate()\n {\n return $this->created;\n }", "public function getDateCreated()\n {\n return $this->dateCreated;\n }", "public function getDateCreated()\n {\n return $this->dateCreated;\n }", "public function get_creation_date()\n {\n return $this->get_default_property(self::PROPERTY_CREATION_DATE);\n }", "public function getDate()\n {\n return $this->date = new \\DateTime($this->get()->post_date);\n }", "public function getDate()\n {\n return $this->getNodeText('/p:package/p:date');\n }", "public function fromMeta(): ?DateTime\n {\n $tags = [\n ['attribute' => 'class', 'value' => 'date', 'content' => 'data-datetime'],\n ['attribute' => 'property', 'value' => 'rnews:datePublished', 'content' => 'content'],\n ['attribute' => 'property', 'value' => 'article:published_time', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'OriginalPublicationDate', 'content' => 'content'],\n ['attribute' => 'itemprop', 'value' => 'datePublished', 'content' => 'datetime'],\n ['attribute' => 'property', 'value' => 'og:published_time', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'article_date_original', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'publication_date', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'sailthru.date', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'PublishDate', 'content' => 'content'],\n ['attribute' => 'pubdate', 'value' => 'pubdate', 'content' => 'datetime'],\n ];\n\n foreach ($tags as $selector) {\n $filter = sprintf('[%s=\"%s\"]', $selector['attribute'], $selector['value']);\n\n foreach ($this->dom->filter($filter) as $tag) {\n if (true === $tag->hasAttribute($selector['content'])) {\n try {\n $content = $this->decode($tag->getAttribute($selector['content']));\n\n return new DateTime($content);\n } catch (Exception $e) {\n // continue\n }\n }\n }\n }\n\n return null;\n }", "public function getCreateddate()\n {\n return $this->createddate;\n }", "public function getDateCreated() {\n return($this->dateCreated);\n }", "public function get_date_create()\n\t{\n\t\treturn $this->date_create;\n\t}", "public function getDateCreated() {\n return $this->dateCreated;\n }", "public function getCreatedDate()\n {\n return $this->created_date;\n }", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getCreateDate()\n {\n return $this->create_date;\n }", "public function getCreatedAt()\n {\n return \\DateTime::createFromFormat(DATE_ISO8601, $this->file->get(self::SETTING_CREATED_AT));\n }", "public function getCreationDate() \r\n { \r\n return $this->_creationDate; \r\n }", "public function getCreatedDate();", "public function getCreatedDate()\r\n\t\t{\r\n\t\t\treturn date('m/d/Y', strtotime($this->_created_date));\r\n\t\t}", "public function getCreated()\n {\n\n if (!$this->createdat instanceof DateTime) {\n return new DateTime();\n }\n\n return $this->createdat;\n }", "public function getCreateDate()\n\t{\n\t\treturn $this->CreateDate;\n\t}", "public function getArticleDate(): \\DateTime {\n\t\treturn ($this->articleDate);\n\t}", "public function getCreated()\r\n {\r\n return $this->created;\r\n }", "function getCreationTime() ;", "public function getCreationDate();", "public function getCreatedAt() : \\DateTime\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAd;\n }", "public function getCreated() \n\t{\n\t\treturn $this->created;\n\t}", "public function getCreationDatetime()\n {\n return $this->getValue('nb_icontact_prospect_creation_datetime');\n }", "public function getCreate_date(){\n return $this->create_date;\n }", "public function getCreate_time()\r\n {\r\n return $this->create_time;\r\n }", "public function fromMeta(): ?DateTime\n {\n $tags = [\n ['attribute' => 'property', 'value' => 'article:modified_time', 'content' => 'content'],\n ['attribute' => 'itemprop', 'value' => 'dateModified', 'content' => 'datetime'],\n ['attribute' => 'property', 'value' => 'og:modified_time', 'content' => 'content'],\n ];\n\n foreach ($tags as $selector) {\n $filter = sprintf('[%s=\"%s\"]', $selector['attribute'], $selector['value']);\n\n foreach ($this->dom->filter($filter) as $tag) {\n if (true === $tag->hasAttribute($selector['content'])) {\n try {\n $content = $this->decode($tag->getAttribute($selector['content']));\n\n return new DateTime($content);\n } catch (Exception $e) {\n // continue\n }\n }\n }\n }\n\n return null;\n }", "public function getDateCreated()\n {\n return $this->getDateModified();\n }", "private function XML_addDate() {\n\t\t$dateEntity = $this->xmlHandler->createElement('date');\n\t\t$dateEntity->appendChild($this->xmlHandler->createTextNode(date(\"F j, Y, g:i a\")));\n\n\t\t$this->xmlRoot->appendChild($dateEntity);\n\t}", "public function getDate()\n {\n return $this->getData('created_at');\n }", "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "public function getCreatedAtAttribute()\n {\n return strtotime($this->attributes['created_at']);\n }", "function get_timecreated() {\n return $this->timecreated;\n }", "public\n\tfunction getPostDate(): \\DateTime {\n\t\treturn ($this->postDate);\n\t}", "public function getTimestampCreated()\n {\n return $this->_getData(self::TIMESTAMP_CREATED);\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }" ]
[ "0.67757446", "0.6628347", "0.6293689", "0.6265451", "0.6250675", "0.6211613", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6135572", "0.61332995", "0.610985", "0.61069834", "0.60814273", "0.60775733", "0.6069899", "0.6064826", "0.6064826", "0.605501", "0.6054867", "0.6049929", "0.60454047", "0.60393333", "0.6022242", "0.6003466", "0.59866536", "0.59866536", "0.59635067", "0.5957372", "0.5956701", "0.5956701", "0.5956701", "0.5956529", "0.5956529", "0.59408265", "0.59191275", "0.5912799", "0.59113604", "0.590364", "0.5894237", "0.5891287", "0.5880861", "0.5871403", "0.5869207", "0.5869207", "0.5864846", "0.5861925", "0.5857976", "0.5857976", "0.5855606", "0.5835623", "0.5830464", "0.58262163", "0.5823721", "0.58231676", "0.58204585", "0.5819366", "0.5812139", "0.5805716", "0.5805716", "0.5798329", "0.5798005", "0.57955104", "0.57863647", "0.5779156", "0.5778713", "0.57761085", "0.5773962", "0.577042", "0.57641", "0.5760427", "0.57461584", "0.5742127", "0.5736216", "0.57359004", "0.5735129", "0.57350767", "0.5725393", "0.57219017", "0.57210827", "0.57139933", "0.5713707", "0.5711356", "0.5708133", "0.5705877", "0.5696482", "0.56893927", "0.56893927", "0.5689075", "0.5689075", "0.5689075", "0.5689075", "0.5689075", "0.5689075", "0.5689075" ]
0.747618
0
Return the current offset of the ResultSet
public function getOffset() { if (! isset($this->offset)) { $this->offset = (int)$this->getXPath($this->getDom())->query($this->getOffsetQuery())->item(0)->value; } return $this->offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOffset() {\n return ($this->getCurrentPage() - 1) * $this->getItemCountPerPage();\n }", "public function getOffset()\r\n {\r\n return ( $this->_pageno - 1 ) * $this->_size;\r\n }", "public function getOffset(): int\n {\n return $this->pageIndex * $this->pageSize;\n }", "protected function get_offset(): int\n\t{\n\t\treturn $this->start;\n\t}", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function offset() {\n return ($this->current_page - 1) * $this->per_page;\n }", "public function getRowOffset();", "function calculate_record_offset()\n\t{\n\t\treturn $this->results_per_page * ($this->page_number - 1);\n\t}", "public function getOffset(): int\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return ($this->number_of_items_per_page * $this->current_page) - $this->number_of_items_per_page;\n }", "public function getCurrentOffset() {\n return ($this->getCurrentPage() - 1) * $this->_itemsPerPage;\n }", "public function getOffset() {\n return $this->offset;\n }", "protected function getOffset(): int\n {\n return ($this->page - 1) * $this->limitPerPage;\n }", "public function get_offset() {\n\t\treturn ( $this->step - 1 ) * $this->per_step;\n\t}", "public function getOffset() {\n return $this->offset;\n }", "public function current()\n {\n mysql_data_seek($this->res, $this->index);\n \n return $this->fetch();\n }", "function current()\n\t\t{\n\t\t\tif($this->rs===NULL)\n\t\t\t\t$this->loadData($this->offset, $this->select);\n\t\t\telse if ($this->start == 0 && $this->length == NULL) {\n\t\t\t\tif ($this->offset < $this->rsOffset || $this->offset >= ($this->rsOffset + self::QUERY_ROW_LIMIT))\n\t\t\t\t\t$this->loadData($this->offset, $this->select);\n\t\t\t}\n\t\t\tif(!isset($this->rs[$this->offset - $this->rsOffset]))\n\t\t\t\treturn false;\n\t\t\treturn $this->rs[$this->offset - $this->rsOffset];\n\t\t}", "public function getOffset() { return $this->_offset; }", "public function current() {\n if (isset($this->results[$this->cursor_offset])) {\n return $this->results[$this->cursor_offset];\n }\n return $this->results[$this->cursor_offset] = $this->fetch();\n }", "function getOffset() {\n return $this->offset;\n }", "public function getOffset()\n {\n $page = $this->getRequest()->get('page', 1);\n $limit = $this->getRequest()->get('limit');\n\n return (null != $limit) ? $limit * ($page - 1) : null;\n }", "public function getOffset()\n {\n if (is_null($this->offset)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_OFFSET);\n if (is_null($data)) {\n return null;\n }\n $this->offset = (int) $data;\n }\n\n return $this->offset;\n }", "public function get_offset()\n {\n }", "public function current() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc($this->index, true);\n\t}", "private function _sql_offset() {\n\t\tif ( $this->limit && $this->offset ) {\n\t\t\treturn ' OFFSET '. $this->offset;\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}", "public function columnOffset();", "public function get_offset(){\r\n return $this->$new_offset;\r\n }", "public function getCurrentRow(): int\n {\n return $this->currentRow;\n }", "public function offset() { return $this->_m_offset; }", "public function getOffset() {}", "public function getOffset() {}", "public function getOffset() {}", "public function getOffset();", "public function getOffset();", "public function getOffset();", "function getRowOffset($index)\n\t{\n\t\treturn $index +1 + $this->limitstart;\n\t}", "public function SeekPosition()\r\n\t{\r\n\t\treturn $this->active_row;\r\n\t}", "public function getOffset(): int;", "private function getOffset()\n {\n $this->current_offset = null;\n \n $headers = $this->getHead();\n \n if (isset($headers['Offset']) === true) {\n $this->current_offset = $headers['Offset'];\n }\n \n return $this->current_offset;\n }", "public function getCursor(): ?int\n {\n return $this->cursor;\n }", "private function offset()\n {\n if(is_array($this->limite)): $this->limite=$this->limite['limite']; endif;\n\t$offset = ($this->paginaAtual() - 1) * $this->limite;\n\treturn $offset;\n }", "public function getCursor()\n {\n return $this->cursor;\n }", "public function getCursor()\n {\n return $this->cursor;\n }", "public function getCursor()\n {\n return $this->cursor;\n }", "public function getOffset() {\n // page 1 has an offset of 0 (1-1) * 20\n // page 2 has an offset of 20 (2-1) * 20\n // in other words, page 2 starts with item 21\n return ( $this->currentPage - 1 ) * $this->perPage;\n }", "public function key()\n {\n if(is_null($this->paginationVar))\n return 0;\n return $this->curIndex + $this->paginationVar->GetOffset();\n }", "public function offset(){\n\t\t//Page 1 has an offset of 0 (1-1) * 20\n\t\t//Page 2 has an offset of 20 (2-1) * 20\n\t\t//in other words, page 2 starts with item 21\n\t\treturn ($this->current_page - 1) * $this->per_page;\t\n\t}", "function getOffset($localVarName) {\n \tif($this->query_where_has_changed || isset($GLOBALS['record_has_changed'])) {\n \t\t$this->setSessionVariable($localVarName,\"offset\", 0);\n \t}\n\t$offset = $this->getSessionVariable($localVarName,\"offset\");\n\tif(isset($offset)) {\n\t\treturn $offset;\n\t}\n\treturn 0;\n}", "public function getDataOffset() : int{\n return $this->dataOffset;\n }", "public function getLimitOffset()\n\t\t{\n\t\t\tif($this->hasLimit())\n\t\t\t{\n\t\t\t\treturn $this->limit[0];\n\t\t\t}\n\t\t\tthrow new \\Exception('Retrieving non-existant limit offset');\n\t\t}", "public function key() {\n\t\t$this->checkResultSet();\n\n\t\tif (! is_null($this->keyColumn)) {\n\t\t\t$row = $this->fetchRowAssoc($this->index, true);\n\t\t\treturn $row[$this->keyColumn];\n\t\t}\n\n\t\treturn $this->index;\n\t}", "public function current()\n {\n return $this->getRow($this->pointer);\n }", "function _data_seek($n = 0)\n\t{\n\t\treturn mysqli_data_seek($this->result_id, $n);\n\t}", "public function getOffsetStart()\n\t{\n\t\treturn $this->start + 1;\n\t}", "protected function get_offset()\n {\n $offset = Request::post(self::PARAM_OFFSET);\n if (! isset($offset) || is_null($offset))\n {\n $offset = 0;\n }\n \n return $offset;\n }", "public function current() {\n return $this->currentRow;\n }", "private function getOffset($limit='unset') \n { \n if ($limit != 'unset'){return ($this->getCurrentPage() - 1 ) * $this->getLimitPerPage($limit);}\n\t else {return ( $this->getCurrentPage() - 1 ) * $this->getLimitPerPage(); } \n \n }", "public function current()\n {\n return $this->_currentRow;\n }", "function seek( $recordIndex ) { return mysql_data_seek( $this->recordSet, $recordIndex ); }", "public function current()\n {\n return $this->records[$this->position];\n }", "public function current()\n {\n return $this->get_row();\n }", "public function getLimitOffsetClause()\n\t{\n\t\treturn $this->limit;\n\t}", "public function getCursor()\n {\n return $this->sequencer->getCursor();\n }", "public function getNextStartRecordIndex()\n {\n if (!$this->xmlRoot) {\n $this->processData();\n }\n return intval((string)$this->xmlRoot->xpath('/searchRetrieveResponse/nextRecordPosition'));\n }", "public function current()\n {\n return $this->collection->offsetGet($this->getKey($this->getCursor()));\n }", "public function current()\n {\n if(is_null($this->paginationVar))\n $this->MakeNextReq();\n if(isset($this->res[$this->curIndex]))\n return $this->res[$this->curIndex];\n return null;\n }", "public function getStartOffset() {}", "#[\\ReturnTypeWillChange]\n public function current()\n {\n return $this->currentRecordSet[$this->key()];\n }", "protected function getOffsetQuery()\n {\n return $this->offsetQuery;\n }", "function getNextRow()\n {\n $this->current_row_index++;\n if ( $this->current_row_index > ( $this->offset + $this->limit - 1 ) )\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n return $this->current_row;\n }\n\n $result = $this->mysqli->query( 'SELECT * FROM ' . $this->table .\n ' LIMIT 1 OFFSET ' . $this->current_row_index );\n if ( $result->num_rows == 1 )\n {\n $this->current_row = $result->fetch_row();\n $this->current_row_hash = array();\n $this->mapping = array();\n foreach ( $result->fetch_fields() as $key => $field )\n {\n $this->current_row_hash[$field->name] = $this->current_row[$key];\n $this->mapping[$key] = $field->name;\n }\n $this->current_field = current( $this->mapping );\n }\n else\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n }\n $result->free();\n\n return $this->current_row;\n }", "public function current() {\n\t\treturn $this->getTableGroups()[ $this->position ];\n\t}", "public function current()\n {\n return $this->_row;\n }", "public function position()\n {\n return $this->i;\n }", "private function getPositionSubSql() {\n\t\t$table = $this->query->getTableMap()::TABLE_NAME;\n\t\t$col = Model::aliasproperty('id');\n\t\t$sql = \"SELECT $col, @rownum := @rownum + 1 AS position FROM $table\";\n\t\t$whereClause = $this->getWhereClauseString();\n\n\t\tif (empty($whereClause) === false) {\n\t\t\t$sql .= ' WHERE ' . $whereClause;\n\t\t}\n\t\treturn $sql;\n\t}", "public function cursor()\n {\n $this->_cursor OR $this->load();\n return $this->_cursor;\n }", "function key()\n\t\t{\n\t\t\t$this->current();\n\t\t\treturn $this->offset;\n\t\t}", "function getOffset() ;", "public function getOffsetEnd()\n\t{\n\t\treturn $this->start + count($this->entities);\n\t}", "function fetch($type=PDO::FETCH_ASSOC, $ori=PDO::FETCH_ORI_NEXT, $offset=0) {\r\n\r\n // calculate offset\r\n $last = & $this->i;\r\n $target = array( \r\n PDO::FETCH_ORI_NEXT => $last + 1,\r\n PDO::FETCH_ORI_PRIOR => $last,\r\n PDO::FETCH_ORI_REL => $last + $offset,\r\n PDO::FETCH_ORI_FIRST => -1,\r\n PDO::FETCH_ORI_LAST => $this->rowCount() - 1,\r\n PDO::FETCH_ORI_ABS => $offset,\r\n );\r\n $target = $target[$ori];\r\n#print \"seek($last->$target) \";\r\n \r\n // last row? got that covered!\r\n if (isset($this->cache[$target])) {\r\n#print \"seek(==) \";\r\n return $this->rowType($type, $this->cache[$target]);\r\n }\r\n \r\n // moving farther backwards\r\n if ($target < $last) {\r\n#print \"seek(<<) \";\r\n $this->reExecute();\r\n }\r\n \r\n // jump forwards\r\n while ($target > $last + 1) {\r\n#print \"seek(>>) \";\r\n $row = $this->stmt->fetch(PDO::FETCH_ASSOC);\r\n $last++;\r\n if (!$row) {\r\n return pdo_trigger_error(\"PDOStatement_Seekable: scrolling past last row\", E_USER_WARNING) and $row;\r\n }\r\n }\r\n\r\n // actually fetch next row\r\n if ($row = $this->stmt->fetch(PDO::FETCH_ASSOC)) {\r\n#print \"seek(ft) \";\r\n assert($target == ++$last);\r\n // keep last row(s)\r\n if (count($this->cache) > PDO_SEEKABLE) {\r\n $this->cache = array_slice($this->cache, $last, -PDO_SEEKABLE, true);\r\n }\r\n $this->cache[$last] = $row;\r\n }\r\n return $this->rowType($type, $row);\r\n }", "public function current()\n\t{\n\t\treturn $this->row;\n\t}", "public function getMatchOffset()\n {\n return $this->getOption('matchoffset');\n }", "public function next()\n {\n $row = $this->getRow($this->pointer);\n if($row){\n $this->pointer++;\n }\n return $row;\n }", "function getNextRecord() { return mysql_fetch_array( $this->recordSet ); }", "public function getRowNumber()\n {\n $this->sql_query->count($this->tableName);\n $result = $this->sql_query->getSingleResult();\n return $result[0];\n }", "function dataSeek( $res, $row );", "public function nextRowset() {\n return odbc_next_result($this->stmt);\n }", "public function key()\n {\n return $this->offset;\n }", "function current() \n {\n // TODO wrap this;\n return $this->offsetGet($this->position);\n }", "public function key()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\treturn $this->rs->key();\n\t\t}\n\t\treturn 0;\n\t}", "public function key ()\n {\n return $this->offset;\n }", "public function getStartIndex();", "private function calculateOffset() {\n $this->offset = ($this->currentpage - 1) * $this->limit;\n }", "public function getRow(): int\n {\n return $this->row;\n }", "public function current()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\t$data = $this->rs->current();\n\n\t\t\treturn $this->so_sql->data2db($data);\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.69773555", "0.6975567", "0.69649476", "0.6918436", "0.691747", "0.691747", "0.691747", "0.691747", "0.691747", "0.691747", "0.691747", "0.69173574", "0.69108844", "0.6892964", "0.68809545", "0.6861695", "0.6857015", "0.684248", "0.6799939", "0.6772319", "0.6760056", "0.6750206", "0.6725622", "0.67043525", "0.66620123", "0.6626329", "0.6611891", "0.656836", "0.65117973", "0.6490602", "0.6487271", "0.6477734", "0.64593554", "0.6450165", "0.64407897", "0.6421136", "0.6421136", "0.6421136", "0.6379716", "0.6379716", "0.6379716", "0.6357645", "0.63466877", "0.63156885", "0.62222534", "0.61558926", "0.6155103", "0.6125369", "0.6125369", "0.6125369", "0.6124726", "0.61066526", "0.6093408", "0.60615236", "0.6051658", "0.60353005", "0.6011172", "0.6008283", "0.60074496", "0.6005598", "0.59912914", "0.59849966", "0.5982114", "0.59706706", "0.5939212", "0.5929223", "0.59196323", "0.5911103", "0.59079707", "0.5905256", "0.58890074", "0.5883047", "0.5866216", "0.58622324", "0.58472204", "0.58417547", "0.5841312", "0.58410275", "0.58194804", "0.5810448", "0.5807262", "0.5805243", "0.5796652", "0.57548994", "0.57345694", "0.57322615", "0.57321453", "0.5725654", "0.57121736", "0.5709799", "0.56985927", "0.56956935", "0.5695225", "0.56868416", "0.5684671", "0.56792665", "0.5674631", "0.5660839", "0.565438", "0.5652619" ]
0.63970184
38
Return the DOMXPath query string used to retrieve the count property Template method makes a call for countQuery which should be defined in child classes
protected function getCountQuery() { return $this->countQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQueryCount();", "public function getCount()\n {\n if (! isset($this->count)) {\n $this->count = (int)$this->getXPath($this->getDom())->query($this->getCountQuery())->item(0)->value;\n }\n return $this->count;\n }", "protected function getCountQuery() {\n if ($this->customCountQuery) {\n return $this->customCountQuery;\n }\n else {\n return $this->query->countQuery();\n }\n }", "public function getCountQuery()\n {\n return $this->countQuery;\n }", "public function getCountQuery()\n {\n return $this->countQuery;\n }", "public function countQuery();", "public function getQuerycount() : int\n {\n return $this->queryCount;\n }", "public function getQueryCount()\n\t{\n\t\treturn $this->query_count;\n\t}", "public function getQueryCount()\n {\n return $this->query_count;\n }", "public function getCount() {\n\treturn $this->parseQuery->getCount()->count;\n }", "final public static function count( ) {\n\t\treturn self::$intQueryCount;\n\t}", "public static function getQueryCount() \n {\n return self::$queryCount;\t\n }", "public function count()\n\t{\n\t\t// Get a \"count all\" query\n $db = $this->getDbo();\n\n $query = $this->buildQuery(true);\n\n $query->clear('select')->clear('order')->select('COUNT(*)');\n\n\t\t// Run the \"before build query\" hook and behaviours\n $this->triggerEvent('onBuildCountQuery', array(&$query));\n\n $total = $db->setQuery($query)->loadResult();\n\n\t\treturn $this->count = $total;\n\t}", "public function countquery(){ \n\t\treturn $this->query_total; \n\t}", "public static function get_count_element() {\n\t\tglobal $wpdb;\n\n\t\t$query = 'Select count(*) from ' . self::TABLE_NAME . ';';\n\n\t\t$count = $wpdb->get_var( $query );\n\n\t\treturn $count;\n\t}", "public function queryCount() {\n return $this->queryCount;\n }", "public function queryCount()\n {\n return $this->_QUERYCOUNT;\n }", "public function setCountQuery()\n {\n $this->countQuery = true;\n return $this;\n }", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "public function toCount()\n {\n return $this->buildCountQuery($this->toQuery())->count();\n }", "public function count(Query $query): int;", "public function count()\n {\n return $this->queryResult->getSize();\n }", "public function count() {\n $this->_active_query->fields($this->func()->count());\n $query = $this->query( $this->_active_query->getQuery(), $this->_active_query->getParams() );\n return (int)$query->rowCount();\n }", "public function getCount()\n {\n $query = $this->createSearchQuery()\n ->select(\"COUNT(p.id)\")\n ->getQuery();\n \n $queryPath = $this->getCreatedSearchQueryCachePath();\n $query->useResultCache(true, self::CACHE_DAY, $this->getCachePrefix(__FUNCTION__) . $queryPath);\n \n $result = $query->getScalarResult();\n\n return $result[0][1];\n }", "public function count()\n {\n $result = new QueryResult($this);\n return $result->count();\n }", "public function build_count() {\n\t\t$this->validate_input();\n\n\t\t$tree = $this->sql_tree;\n\n\t\t$pagination_info = $this->make_pagination_info();\n\t\t// order is important here. The count transform puts everything within a subquery so it must go last\n\t\tif (!$this->ignore_filtering) {\n\t\t\t$tree = $this->filter_transform->alter($tree, $pagination_info);\n\t\t}\n\t\t$tree = $this->count_transform->alter($tree, $pagination_info);\n\n\t\t$creator = new PHPSQLCreator();\n\t\treturn $creator->create($tree);\n\t}", "public function count()\n\t{\n\t\t$content = $this->resource->get($this->name)->getContent();\n\t\t\n\t\treturn $content['doc_count'];\n\t}", "public function count() {\n $queryId = $this->getQueryId('##count##');\n\n if ($this->willCacheResult) {\n $resultId = $this->getResultId($queryId);\n\n $cachedResult = $this->cache->getResult($resultId);\n if ($cachedResult) {\n return $cachedResult->getResult();\n }\n }\n\n $connection = $this->model->getMeta()->getConnection();\n\n $cachedQuery = $this->cache->getQuery($queryId);\n if (!$cachedQuery) {\n $statement = self::$queryParser->parseQueryForCount($this);\n\n $statementParser = $connection->getStatementParser();\n\n $sql = $statementParser->parseStatement($statement);\n $usedModels = $this->getUsedModels($statement);\n\n $cachedQuery = new QueryCacheObject($sql, $usedModels);\n\n $this->cache->setQuery($queryId, $cachedQuery);\n } else {\n $sql = $cachedQuery->getSql();\n $usedModels = $cachedQuery->getUsedModels();\n }\n\n $sql = $this->parseVariablesIntoSql($sql, $connection);\n\n $result = $connection->execute($sql);\n\n if ($result->getRowCount()) {\n $row = $result->getFirst();\n $result = $row[QueryParser::ALIAS_COUNT];\n } else {\n $result = 0;\n }\n\n if ($this->willCacheResult) {\n $cachedResult = new ResultCacheObject($result);\n\n $this->cache->setResult($resultId, $cachedResult, $usedModels);\n }\n\n return $result;\n }", "public function count()\n {\n return $this->createStandardQueryBuilder()->count()->getQuery()->execute();\n }", "public function count() {\n if ($this->_count <= 0) {\n $where = new Where();\n if (isset($this->_options[\"eventData\"]) && $this->_options[\"eventData\"] != '') {\n $where->expression($this->_sql_search_expression, \"%\" . $this->_options[\"eventData\"] . \"%\");\n }\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from($this->table)->where($where)->columns(array('count' => new Expression('COUNT(*)')));\n $sqlTxt = $sql->getSqlStringForSqlObject($select);\n $resultSet = $this->adapter->query($sqlTxt, Adapter::QUERY_MODE_EXECUTE);\n foreach ($resultSet as $row) {\n $this->_count = intval($row->count);\n break;\n }\n }\n return $this->_count;\n }", "public function _count();", "protected function getCountQuery() {\n\t\tif ($this->countQuery !== null) {\n\t\t\treturn $this->countQuery;\n\t\t}\n\n\t\tif ($this->searchTerm !== null && $this->searchFields === null) {\n\t\t\t$fields = $this->getFields();\n\t\t\t$searchFields = array();\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t$searchFields[] = $field['name'];\n\t\t\t}\n\t\t} else {\n\t\t\t$searchFields = null;\n\t\t}\n\n\t\t$query = clone $this;\n\t\t$query->resetFields();\n\t\t$query->resetLimit();\n\t\t$query->resetOrderBy();\n\t\t$query->field('COUNT(*)', 'total');\n\n\t\tif ($searchFields !== null) {\n\t\t\t$query->setSearchFields($searchFields);\n\t\t}\n\n\t\treturn $query;\n\t}", "protected function _performCount()\n {\n $query = $this->cleanCopy();\n $counter = $this->_counter;\n if ($counter) {\n $query->counter(null);\n\n return (int)$counter($query);\n }\n\n $complex = (\n $query->clause('distinct') ||\n count($query->clause('group')) ||\n count($query->clause('union')) ||\n $query->clause('having')\n );\n\n if (!$complex) {\n // Expression fields could have bound parameters.\n foreach ($query->clause('select') as $field) {\n if ($field instanceof ExpressionInterface) {\n $complex = true;\n break;\n }\n }\n }\n\n if (!$complex && $this->_valueBinder !== null) {\n $order = $this->clause('order');\n $complex = $order === null ? false : $order->hasNestedExpression();\n }\n\n $count = ['count' => $query->func()->count('*')];\n\n if (!$complex) {\n $query->getEagerLoader()->enableAutoFields(false);\n $statement = $query\n ->select($count, true)\n ->enableAutoFields(false)\n ->execute();\n } else {\n $statement = $this->getConnection()->newQuery()\n ->select($count)\n ->from(['count_source' => $query])\n ->execute();\n }\n\n $result = $statement->fetch('assoc')['count'];\n $statement->closeCursor();\n\n return (int)$result;\n }", "public function count()\r\n\t{\r\n\t\t$countModel = clone $this->model;\r\n\t\t$countQuery = $countModel->getQuery();\r\n\t\t$countQuery->orders = null;\r\n\t\t$countModel->setQuery($countQuery);\r\n\r\n\t\treturn $countModel->count();\r\n\t}", "public function getCount()\n {\n return $this->get('Count');\n }", "public static function getCount()\n\t{\n\t\treturn self::find()->count();\n\t}", "function getCount() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query = \"SELECT count(*) FROM \\n\\t\".$this->class->table.\"\\n \".implode(\"\\n \", $this->joins).$where.' '.$group.' ';\n\n\t\t$count =self::$global['dbCon']->fetchRow($query,MYSQLI_NUM);\n\t\treturn $count[0];\n\n\t}", "public static function getQueryCount() {\n\t\tif(self::$con == null) return 0;\n\t\treturn self::$con->count();\n\t}", "public function count()\n\t{\n\t\t$query = clone $this->df;\n\n\t\t$query->removeClause('select')\n\t\t\t->removeClause('limit')\n\t\t\t->removeClause('offset')\n\t\t\t->removeClause('order by')\n\t\t\t->select('count(*)');\n\n\t\treturn $this->count = (int)$query->fetchSingle();\n\t}", "protected function getXpathString() {\n return 'xpathparser:' . $this->getCounter();\n }", "public function count(){\n $query = \"SELECT count(*) FROM \" . $this->parent_tbl;\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n // execute query\n\n \\Database::execute($stmt);\n\n // get row value\n $rows = $stmt->fetch(\\PDO::FETCH_NUM);\n\n // return count\n return $rows[0];\n\n }", "public function count()\n {\n return $this->model->paginate(1, $this->select)->total();\n }", "public function getCount(string $expression) : string;", "public function getCount()\n {\n if ($this->_queryResult === null) {\n return 0;\n }\n\n return $this->_queryResult->count();\n }", "public abstract function count();", "public abstract function count();", "public function count(): int\n {\n return $this->makeQuery()->count();\n }", "public function fetchCount()\n {\n $this->prepareCount();\n\n $url = $this->urlbase.$this->urlbranch;\n\n $query = $this->genQuery();\n\n $path = $this->options['Action'].'Result';\n if ($this->mockMode) {\n $xml = $this->fetchMockFile()->$path;\n } else {\n $response = $this->sendRequest($url, ['Post' => $query]);\n\n if (! $this->checkResponse($response)) {\n return false;\n }\n\n $xml = simplexml_load_string($response['body'])->$path;\n }\n\n $this->count = (string) $xml->Count;\n }", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "public function count() {\n $s = $this->buildSelect(true, null, false, false);\n return $s->numRows();\n }", "public function assertQueryCount($path, $count, $message = '') {\r\n\t\t$this->_incrementAssertionCount();\r\n\t\trequire_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php';\r\n\t\t$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);\r\n\t\t$content = $this->_response->outputBody();\r\n\t\tif (!$constraint->evaluate($content, __FUNCTION__, $count)) {\r\n\t\t\t$constraint->fail($path, $message);\r\n\t\t}\r\n\t}", "public static function getCount()\n {\n return static::find()->count();\n }", "function getCount() {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\t\t$query->column(\"COUNT(DISTINCT $i.node_id)\");\n\n\t\t$persistent = $this->_storage->getPersistentStorage();\n\t\t$database = $persistent->getDatabase();\n\t\treturn $database->getOne($query->toString());\n\t}", "public function count($criterio=\"\"){\n\t\t$sql = 'SELECT COUNT(id) AS qtd FROM conta_a_pagar '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$rs=$this->execute($sqlQuery);\n return $rs[0][\"qtd\"];\n\t}", "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "public function getCount() {\n return $this->get(self::COUNT);\n }", "public function assertXpathCount($path, $count, $message = '') {\r\n\t\t$this->_incrementAssertionCount();\r\n\t\trequire_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php';\r\n\t\t$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);\r\n\t\t$constraint->registerXpathNamespaces($this->_xpathNamespaces);\r\n\t\t$content = $this->_response->outputBody();\r\n\t\tif (!$constraint->evaluate($content, __FUNCTION__, $count)) {\r\n\t\t\t$constraint->fail($path, $message);\r\n\t\t}\r\n\t}", "function getQueryCount( $queryString )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $queryString = $db->escapeString( $queryString );\r\n $message_array = 0;\r\n\r\n $query = new eZQuery( array( \"Topic\", \"Body\" ), $queryString );\r\n $query->setPartialCompare( true );\r\n\r\n $query_str = \"SELECT count(*) AS Count FROM eZForum_Message WHERE (\" . $query->buildQuery() . \")\";\r\n\r\n $db->array_query( $message_array, $query_str );\r\n\r\n $ret = 0;\r\n if ( count( $message_array ) == 1 )\r\n $ret = $message_array[0][$db->fieldName( \"Count\" )];\r\n settype( $ret, \"integer\" );\r\n return $ret;\r\n }", "public function getCountQuery()\n {\n $query = clone $this;\n\n //reset any orders or limits previously set since don't want those for\n //a query that just counts the results.\n $query->order('', true)\n ->limit(0);\n\n //Set main column to get to \"COUNT(*)\", and remove rest of columns\n $keys = array_keys($query->_from);\n foreach ($keys as $key) {\n $columns = ($key == 0) ? array('COUNT(*)') : array();\n $query->_from[$key]['columns'] = $columns;\n }\n\n return $query;\n }", "public function composeCountQuery()\n\t{\n\t\t$query = '';\n\n\t\tif (!empty($this->group)) {\n\t\t\t// if the query uses GROUP BY we have to call COUNT on sub-query\n\t\t\t$query .= 'SELECT COUNT( sub.' . $this->orm->getConfigDbPrimaryKey() . ') AS count\n\t\t\tFROM (SELECT ' . $this->orm->getConfigDbTable() . '.' . $this->orm->getConfigDbPrimaryKey() . '';\n\t\t} else {\n\t\t\t$query .= 'SELECT count(' . $this->orm->getConfigDbTable() . '.' . $this->orm->getConfigDbPrimaryKey() . ') AS count';\n\t\t}\n\n\t\t$query .= ' FROM ' . $this->orm->getConfigDbTable() . ' ';\n\n\t\tif (!empty($this->joinTables)) {\n\t\t\t$query .= ' ' . implode(' ', $this->joinTables);\n\t\t}\n\n\t\tif (!empty($this->search)) {\n\t\t\t$query .= ' WHERE ' . implode($this->imploder, $this->search);\n\t\t}\n\n\t\tif (!empty($this->group)) {\n\t\t\t$query .= ' GROUP BY ' . implode(', ', $this->group) . ') AS sub';\n\t\t}\n\n\t\treturn $query;\n\t}", "public function getQueryCount()\n\t{\n\t\treturn count(self::$queryLog);\n\t}", "public function count($criterio=\"\");", "public function count(): int\n {\n if ($this->numberOfResults === null) {\n $this->initialize();\n if ($this->queryResult !== null) {\n $this->numberOfResults = count($this->queryResult ?? []);\n } else {\n parent::count();\n }\n }\n\n return $this->numberOfResults;\n }", "public function getCount()\n {\n return $this->doQuery(null, false, false)->count();\n }", "public function getCount() {\n \treturn $this->count();\n }", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "private function getCountFilteredResults()\n {\n $qb = $this->em->createQueryBuilder();\n $qb->select('count(distinct ' . $this->tableName . '.' . $this->rootEntityIdentifier . ')');\n $qb->from($this->metadata->getName(), $this->tableName);\n\n $this->setLeftJoin($qb);\n $this->setWhere($qb);\n $this->setWhereCallbacks($qb);\n\n return (int) $qb->getQuery()->getSingleScalarResult();\n }", "public function count()\n {\n return $this->getValue()->count();\n }", "public function count() { return $this->_m_count; }", "function &getQueryCount( $query )\n {\n $this->dbInit();\n $link_array = 0;\n\n $query = new eZQuery( array( \"KeyWords\", \"Title\", \"Description\" ), $query );\n \n $query_str = \"SELECT count(ID) AS Count FROM eZLink_Link WHERE (\" .\n $query->buildQuery() .\n \") AND Accepted='Y' ORDER BY Title\";\n\n $this->Database->array_query( $link_array, $query_str );\n\n $ret = 0;\n if ( count( $link_array ) == 1 )\n $ret = $link_array[0][\"Count\"];\n\n return $ret;\n }", "public function getCount() {}", "public function getCount() {}", "public function getCount() {}", "abstract public function getCount();", "public function count()\n {\n return Page::count();\n }", "public static function getCountQuery()\n {\n $key = static::getPrimaryKey();\n return DB::table(static::$schema)\n ->select([\"count({$key}) as count\"]);\n }" ]
[ "0.70860034", "0.7040847", "0.68870026", "0.66634125", "0.66634125", "0.6563482", "0.65615094", "0.65447056", "0.6509023", "0.6440495", "0.64239275", "0.63964486", "0.6371591", "0.63208205", "0.626881", "0.62432486", "0.6219097", "0.6209044", "0.62007105", "0.61886984", "0.61872685", "0.6180433", "0.61710787", "0.61687034", "0.61586404", "0.6155731", "0.61456215", "0.61412424", "0.6130575", "0.6121952", "0.6119806", "0.6117422", "0.61114305", "0.61052114", "0.60773265", "0.6063626", "0.6058314", "0.60543716", "0.60384417", "0.6035283", "0.60338306", "0.60237575", "0.6012249", "0.5986152", "0.59814", "0.59814", "0.5974546", "0.5966083", "0.59605694", "0.59605694", "0.59605694", "0.59605694", "0.5947718", "0.5945624", "0.59449214", "0.5944406", "0.59312606", "0.59290195", "0.5926344", "0.5924459", "0.59128255", "0.59081024", "0.5905427", "0.5904529", "0.5901145", "0.5900691", "0.5898696", "0.5883293", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5874386", "0.5861668", "0.5823157", "0.58213025", "0.58190197", "0.58152044", "0.5815068", "0.5815068", "0.581444", "0.58115333", "0.5807128" ]
0.66230947
5
Return the created query string
protected function getCreatedQuery() { return $this->createdQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildQueryString();", "private function getQueryString() : string\n {\n return http_build_query($this->parameters);\n }", "private function buildQueryString(){\n if(count($this->querystrings) == 0){\n return \"\";\n }\n else{\n $querystring = \"?\";\n\n foreach($this->querystrings as $index => $value){\n if($index > 0){\n $querystring .= \"&\";\n }\n $querystring .= $value;\n }\n\n return $querystring;\n }\n }", "protected function buildQueryString()\n {\n $parameters = $this->_queryParameters;\n $parameters['USER'] = $this->_username;\n $parameters['PWD'] = $this->_password;\n $parameters['SIGNATURE'] = $this->_signature;\n $parameters['VERSION'] = self::VERSION;\n $parameters['METHOD'] = $this::METHOD;\n return http_build_query($parameters);\n }", "abstract protected function buildQuery(): string;", "public function buildRequestQuery()\n\t{\n\t\t$query_string = '';\n\t\tforeach ($this->returnItems() as $index => $item) {\n\t\t\t$query_string .= '&' . $item->toQueryString($index++);\n\t\t}\n\t\treturn $query_string;\n\t}", "protected function getQuery(): string\n {\n return http_build_query($this->query);\n }", "public function getQueryString() {\n\t\t\t// Crackle permits duplicate keys, so we cannot use PHP's http_build_query()\n\t\t\t$parts = array();\n\t\t\tforeach ($this->getPairs() as $pair) {\n\t\t\t\t$parts[] = urlencode($pair->getKey()) . '=' . urlencode($pair->getValue());\n\t\t\t}\n\t\t\treturn implode('&', $parts);\n\t\t}", "public function getQueryString()\n {\n $location = $this->getLocation();\n\n if (!empty($location)) {\n $this->updateQuery($location, 'l');\n }\n\n return http_build_query($this->queryParams);\n }", "public function getQueryString() {\n\t\t\n\t}", "public function getQueryString()\n {\n $options = [\n 'w' => $this->width,\n 'h' => $this->height,\n 'fm' => $this->format,\n 'q' => $this->quality\n ];\n\n if ($this->quality !== null || $this->progressive) {\n $options['fm'] = 'jpg';\n }\n if ($this->progressive) {\n $options['fl'] = 'progressive';\n }\n\n return http_build_query($options, '', '&', PHP_QUERY_RFC3986);\n }", "private function get_query_string()\n {\n $query_string = '';\n foreach (explode('&', $_SERVER['QUERY_STRING']) as $key)\n {\n if( !preg_match('/org_openpsa_qbpager/', $key)\n && $key != '')\n {\n $query_string .= '&amp;'.$key;\n }\n }\n return $query_string;\n }", "public function getQueryString(): string\n {\n $param1 = $this->getQueryStringPart($this->parameters[0]);\n $param2 = $this->getQueryStringPart($this->parameters[1]);\n $param3 = $this->getQueryStringPart($this->parameters[2]);\n return $param1 . ' BETWEEN ' . $param2 . ' AND ' . $param3;\n }", "public static function queryString(): string\n\t{\n\t\treturn static::$queryString;\n\t}", "public function get_corrected_query_string() {\n\t\treturn '';\n\t}", "public function getPostQueryString()\n {\n return http_build_query($this->postParams);\n }", "public function queryString() : string;", "public function getQueryString()\n {\n return $this->getRequest()->getQueryString();\n }", "public function queryString();", "private function _buildUri(): string {\n return !empty($this->query) ? $this->uri.'?'.http_build_query($this->query) : $this->uri;\n }", "public function getQueryString():string;", "public function getQueryString()\n {\n return $this->query_string;\n }", "public function getQueryAsString();", "public function getQueryString(): string\n {\n return http_build_query(\n $this->imageApiOptions->toArray(),\n '',\n '&',\n PHP_QUERY_RFC3986\n );\n }", "public function queryString()\n\t{\n\t\treturn substr($this->fullUri(), strpos($this->fullUri(), '?'), strlen($this->fullUri()) - 1);\n\t}", "private function getQueryString()\n {\n return \\apply_filters('swiftype_search_query_string', stripslashes(\\get_search_query(false)));;\n }", "public function build() {\n\n //foreach ($data as $key => $value)\n //$data[$key] = urlencode($value);\n\n return http_build_query(Utils::translateKeys($this->query, $this->translationTable, 'strtoupper'), '', '&');\n }", "public function getQueryParametersAsString() {\n return $this->queryParameters || $this->query ? http_build_query($this->getQueryParameters()) : null;\n }", "protected function genQuery(){\n $secretKey = $this->store->getSecretAccessKey();\n \n unset($this->options['Signature']);\n $this->options['Timestamp'] = $this->genTime();\n $this->options['Signature'] = $this->_signParameters($this->options, $secretKey);\n return $this->_getParametersAsString($this->options);\n }", "protected function get_url_query(): string {\n if ($this->has_params()) {\n return $this->get_params_as_query();\n }\n return '';\n }", "public function build() {\n return implode('&', $this->uriParams);\n }", "public function __toString(){\r\n\t\treturn $this->queryString();\r\n\t}", "public function getQuery() {\n $query = $this->getArgument(self::QUERY_NAME, '');\n if ($query) {\n// $query = str_replace(Url::getBaseUrl(), '', $query);\n $query = str_replace('?' . self::QUERY_NAME . '=', '', $query);\n $query = ltrim($query, Request::QUERY_SEPARATOR);\n $query = rtrim($query, Request::QUERY_SEPARATOR);\n }\n\n return $query;\n }", "public function getQueryString()\n {\n return parse_str($this->partials['query']);\n }", "public function formatQueryString ($exclude=null )\n\t{\n\t\tparent::formatQueryString($exclude);\n\t\t$gqs = $this->gallery->formatQueryString($exclude);\n\t\t$this->queryString .= preg_replace(\"/^\\?/\", \"&\", $gqs);\n\t\treturn ($this->queryString);\n\t}", "public function getQueryString()\n\t{\n\t\treturn $this->queryString;\n\t}", "public function buildQuery(array $queryParams)\r\n {\r\n if($this->_params['action'] == 'onepage'){\r\n return '';\r\n }\r\n\r\n foreach($queryParams as $param => $value){\r\n $this->setParam($param, $value);\r\n }\r\n\r\n $request = '?' . $this->getRequest();\r\n return $request;\r\n }", "abstract protected function queryString(): string;", "public function getQueryString()\n {\n return isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';\n }", "protected function _buildQueryString($params = array()) {\n if (!is_array($params)) {\n $params = array();\n }\n return count($params) ? http_build_query($params) : \"\";\n }", "public function parameterize():String {\n\n\t\treturn http_build_query($this->data);\n\n\t}", "private function generateQueryString(array $queryParams)\n {\n $queryString = http_build_query($queryParams, null, \"&\", PHP_QUERY_RFC3986);\n $queryString = preg_replace(\"/%5B[0-9]*%5D=/\", \"=\", $queryString);\n\n return $queryString;\n }", "public function getQuery(): string\r\n {\r\n return $this->query;\r\n }", "public function buildQuery(): string {\n if ($this->queryHasOption || strlen($this->finalQueryString) > 0) {\n throw new \\Exception('You can only use this instance of ODataQueryBuilder for a single query! Please create a new builder for a new query.', 500);\n }\n\n $this->appendServiceUrlToQuery();\n $this->appendEntitySetsToQuery();\n $this->appendFiltersToQuery();\n $this->appendSearchToQuery();\n $this->appendSelectsToQuery();\n $this->appendExpandsToQuery();\n $this->appendOrderByToQuery();\n $this->appendSkipToQuery();\n $this->appendTopToQuery();\n $this->appendCountToQuery();\n\n //remove the ? if the query has no query options.\n if (!$this->queryHasOption) {\n $this->finalQueryString = substr($this->finalQueryString, 0, -1);\n }\n\n return $this->finalQueryString;\n }", "public function getQueryString()\n {\n $queryString = static::normaliseQueryString($_SERVER['QUERY_STRING']);\n\n return '' === $queryString ? null : $queryString;\n }", "private static function getUrlQueryString() {\n // The variable $_SERVER['QUERY_STRING'] is set by the server and can differ, e.g. it might hold additional\n // parameters or it might be empty (nginx).\n\n if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {\n $query = $_SERVER['QUERY_STRING'];\n }\n else {\n $query = strRightFrom($_SERVER['REQUEST_URI'], '?');\n }\n return $query;\n }", "public function getQueryString()\n {\n return rtrim((string) $this->request->getRequestUri(), '/');\n }", "private function getParamsUrlFormat() {\n $urlParams = \"\";\n\n if ($this->getMethod() == 'GET') {\n $urlParams .= ($this->getPaging()) ? \n \"?_paging=1\" : \n \"\";\n $urlParams .= ($this->getPaging()) ? \n \"&_return_as_object=1\" : \n \"\";\n $urlParams .= ($this->getPaging()) ? \n \"&_max_results=\" . $this->getMaxResults() : \n \"\";\n }\n\n if ($this->getMethod() == 'POST') {\n $function = $this->getFuction();\n $urlParams .= (isset($function) and $function != \"\") ?\n \"?_function=\" . $this->getFuction() :\n \"\";\n }\n\n return $urlParams;\n }", "protected function doAsQueryString() : string\n {\n $strInlineFragmentDirectives = '';\n if ($this->directives !== []) {\n $strDirectives = [];\n foreach ($this->directives as $directive) {\n $strDirectives[] = $directive->asQueryString();\n }\n $strInlineFragmentDirectives = \\sprintf(' %s', \\implode(' ', $strDirectives));\n }\n // Generate the string for the body of the fragment\n $strInlineFragmentFieldsOrFragmentBonds = '';\n if ($this->fieldsOrFragmentBonds !== []) {\n $strFieldsOrFragmentBonds = [];\n foreach ($this->fieldsOrFragmentBonds as $fieldsOrFragmentBond) {\n $strFieldsOrFragmentBonds[] = $fieldsOrFragmentBond->asQueryString();\n }\n $strInlineFragmentFieldsOrFragmentBonds = \\sprintf(' %s ', \\implode(' ', $strFieldsOrFragmentBonds));\n }\n return \\sprintf('...on %s%s {%s}', $this->typeName, $strInlineFragmentDirectives, $strInlineFragmentFieldsOrFragmentBonds);\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "private function getMainQueryString() {\n\t\treturn $this->getQueryStringUsingGenreString(self::genresToQString($this->genres));\n\t}", "public function __toString()\n {\n $query = '';\n if (count($this->options)) {\n $query = [];\n foreach ($this->options as $key => $value) {\n if (is_array($value)) {\n $value = implode(',', $value);\n }\n $query[] = '$' . $key . '=' . $value;\n }\n $query = '?' . implode('&', $query);\n }\n\n return $query;\n }", "function BuildQuery ( $array = NULL )\n\t{\n\t\tif ( count( $array ) == 0 ) {\n\t\t\treturn '';\n\t\t} else {\n\t\t\t$query = http_build_query( $array );\n\t\t\treturn $query;\n\t\t}\n\t}", "private function createQueryString(iterable $data): string\n {\n $query = '';\n\n foreach ($data as $name => $value) {\n $query .= $this->createQueryParam($name, $value);\n }\n\n return $query;\n }", "protected function toQueryString(array $data = array()){\n\t\tif(!$data){ return \"\"; }\n\t\treturn http_build_query($data, \"no_\", \"&\");\n\t}", "public function get_query_string()\n \t{\n \t\t$queryStr = array();\n \t\t$queryStr[\"task\"] = $this->task_name;\n \t\t$queryStr[\"resp\"] = $this->resp;\n \t\t$queryStr[\"by\"] = $this->by;\n \t\t\n \t\t\n \t\tswitch($this->by)\n \t\t{\n \t\t\t\n \t\t\tcase UshApiLib_Incidents_Bys::BY_CATEGORY_ID:\n \t\t\tcase UshApiLib_Incidents_Bys::BY_INCIDENT_ID:\n \t\t\tcase UshApiLib_Incidents_Bys::BY_LOCATION_ID:\n \t\t\tcase UshApiLib_Incidents_Bys::INCIDENTS_SINCE_ID:\n \t\t\t\t$queryStr[\"id\"] = $this->id;\n \t\t\t\tbreak;\n \t\t\t\t\n \t\t\tcase UshApiLib_Incidents_Bys::BY_CATEGORY_NAME:\n \t\t\tcase UshApiLib_Incidents_Bys::BY_LOCATION_NAME:\n \t\t\t\t$queryStr[\"name\"] = $this->name;\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tcase UshApiLib_Incidents_Bys::BY_BOUNDS:\n \t\t\t\tif($this->c != null)\n \t\t\t\t{\n \t\t\t\t\t$queryStr[\"c\"] = $this->c;\n \t\t\t\t}\n \t\t\t\t$queryStr[\"sw\"] = $this->sw;\n \t\t\t\t$queryStr[\"ne\"] = $this->ne;\n \t\t}\n \t\t\n \t\tif($this->orderField != null)\n \t\t{\n \t\t\t$queryStr[\"orderfield\"] = $this->orderField;\n \t\t}\n \t\t\n \t\tif($this->sort !== null)\n \t\t{\n \t\t\t$queryStr[\"sort\"] = $this->sort;\n \t\t}\n \t\t\n \t\tif($this->limit != null)\n \t\t{\n \t\t\t$queryStr[\"limit\"] = $this->limit;\n \t\t}\n\t\t\n\t\treturn $queryStr;\n \t\t\n \t}", "function getQueryString(){\n\tglobal $query_string;\n\t$query_string = array();\n\t$new_query_string = array();\n\tif(isset($_SERVER) && isset($_SERVER['REQUEST_URI'])){\n\t\tif(strpos($_SERVER['REQUEST_URI'], '?')){\n\t\t\t$query_string = explode('?', $_SERVER['REQUEST_URI']);\n\n\t\t\tif(strpos($query_string[1], '&')){\n\t\t\t\t$query_string = explode('&', $query_string[1]);\n\t\t\t\tforeach ($query_string as $value) {\n\t\t\t\t\t$value_array = explode('=', $value);\n\t\t\t\t\t$new_query_string[urldecode($value_array[0])] = urldecode($value_array[1]);\n\t\t\t\t}\n\t\t\t\t$query_string = $new_query_string;\n\t\t\t}else{\n\t\t\t\t$value_array = explode('=', $query_string[1]);\n\t\t\t\t$new_query_string[urldecode($value_array[0])] = urldecode($value_array[1]);\n\t\t\t}\n\t\t}\n\t}\n\t$query_string = $new_query_string;\n}", "protected function getQueryStringParamsSepatator () {\n\t\tif ($this->queryParamsSepatator === NULL) {\n\t\t\t$response = \\MvcCore\\Application::GetInstance()->GetResponse();\n\t\t\tif ($response->HasHeader('Content-Type')) {\n\t\t\t\t$this->queryParamsSepatator = $response->IsXmlOutput() ? '&amp;' : '&';\n\t\t\t} else {\n\t\t\t\t$viewClass = $this->application->GetViewClass();\n\t\t\t\t$viewDocType = $viewClass::GetDoctype();\n\t\t\t\t$this->queryParamsSepatator = (\n\t\t\t\t\tstrpos($viewDocType, \\MvcCore\\IView::DOCTYPE_XML) !== FALSE ||\n\t\t\t\t\tstrpos($viewDocType, \\MvcCore\\IView::DOCTYPE_XHTML) !== FALSE\n\t\t\t\t) ? '&amp;' : '&';\n\t\t\t}\n\t\t}\n\t\treturn $this->queryParamsSepatator;\n\t}", "function buildQueryString($params, $htmlEncode = false) {\n\t// Convert the key-value pairs in $params into a flat array of pairs separated by equals signs\n\t$paramsProcessed = array();\n\tforeach ($params as $key => $val) {\n\t\tif (!empty($val)) {\n\t\t\t$paramsProcessed[] = \"$key=$val\";\n\t\t}\n\t}\n\n\t// Join them up into a query string\n\t$separator = $htmlEncode ? '&amp;' : '&';\n\t$queryString = '?' . join($separator, $paramsProcessed);\n\n\treturn $queryString;\n}", "public function queryString() {\n return $_SERVER['QUERY_STRING'];\n }", "private function getQueryUrl(): string\n {\n return $this->getBaseUrl() . 'query';\n }", "public function uriWithQuery(): string\n {\n return $this->uri() . '?' . $this->server('query_string');\n }", "private static function build_query($query_array) {\n\t\t\treturn http_build_query($query_array, '', '&', PHP_QUERY_RFC3986);\n\t\t}", "public function getQueryParams() {}", "protected function buildRequestUri()\n {\n $requestParameters = array();\n\n // add entity\n if (!empty($this->defaultOptions['entity'])) {\n $tmp = array_keys($this->defaultOptions['entity']);\n $key = array_pop($tmp);\n $requestParameters[] = 'entity=' . $this->defaultOptions['entity'][$key];\n }\n\n // add media type\n if (!empty($this->defaultOptions['mediaType'])) {\n $requestParameters[] = 'media=' . $this->defaultOptions['mediaType'];\n }\n\n // add attribute\n if (!empty($this->defaultOptions['attribute'])) {\n $requestParameters[] = 'attribute=' . $this->defaultOptions['attribute'];\n }\n\n // add language\n if (!empty($this->defaultOptions['language'])) {\n $requestParameters[] = 'lang=' . $this->defaultOptions['language'];\n }\n\n // add limit\n if ($this->defaultOptions['limit'] <> 100) {\n $requestParameters[] = 'limit=' . $this->defaultOptions['limit'];\n }\n\n // add country\n if ($this->defaultOptions['country'] != 'us') {\n $requestParameters[] = 'country=' . $this->defaultOptions['country'];\n }\n\n // add callback\n if (!empty($this->defaultOptions['callback'])) {\n $requestParameters[] = 'callback=' . $this->defaultOptions['callback'];\n }\n\n // add version\n if ($this->defaultOptions['version'] <> 2) {\n $requestParameters[] = 'version=' . $this->defaultOptions['version'];\n }\n\n // add explicity\n if ($this->defaultOptions['explicit'] != 'yes') {\n $requestParameters[] = 'explicit=' . $this->defaultOptions['explicit'];\n }\n\n return implode('&', $requestParameters);\n }", "private function _create_query_string( $url, $query ) {\n\t\t$query_string = '';\n\n\t\tforeach ( $query as $var => $value ) {\n\n\t\t\tif( $var ) {\n\n\t\t\t\t// check, if required vars have a value\n\t\t\t\tif( $var[0] == '*' && $value === null ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// only add to query if there is a value\n\t\t\t\tif( $value !== null && $value !== '' ) {\n\t\t\t\t\t$query_string .= '&' . ltrim( $var, '*' ) . '=' . urlencode( $value );\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn $url . ltrim( $query_string, '&' );\n\t}", "function queryString($param_array){\n\t$cnt = 0;\n\t$qstring = null;\n\tforeach ($param_array as $key => $value){\n\t\tif($cnt > 0){\n\t\t\t$qstring .= \"&\" . $key . \"=\" . $value;\n\t\t} else {\n\t\t\t$qstring = $key . \"=\" . $value;\n\t\t}\n\t\t$cnt++;\n\t}\n\treturn $qstring;\n}", "protected function getSearchQuery()\n {\n $searchQuery = \"\";\n if (isset($_POST['searchName'])) {\n $searchQuery = Convert::slugify($_POST['searchName']);\n }\n return (string) str_replace(\"-\", \"+\", $searchQuery);\n }", "public function generateQuery(): string\n {\n $query = $this->template;\n $query = str_replace('{{columns}}', $this->generateColumns(), $query);\n $query = str_replace('{{pagination}}', $this->generatePagination(), $query);\n $query = str_replace('{{tables}}', $this->generateTables(), $query);\n $matches = [];\n $i = preg_match('/{{where(\\|([a-zA-Z .,\\-]*))?}}/', $query, $matches);\n if ($i) {\n $prepend = $matches[2] ?? null;\n $query = str_replace($matches[0], $this->generateWhere($prepend), $query);\n }\n $i = preg_match('/{{sort(\\|([a-zA-Z .,\\-]*))?}}/', $query, $matches);\n if ($i) {\n $prepend = $matches[2] ?? null;\n $query = str_replace($matches[0], $this->generateSort($prepend), $query);\n }\n return $query;\n }", "public function get_query(){\n return $this->build_query()->query;\n }", "private function getParameters()\n {\n $inputParametersStr = \"\";\n\n foreach ($_GET as $key => $input) {\n\n if(empty($input)){\n continue ; //ignore empty field \n }\n $inputParametersStr .= \"$key=\" . urlencode($input) . \"&\"; // convert string into url syntax.\n\n }\n $inputParametersStr = trim($inputParametersStr, '&'); // separate parameters by \"&\" .\n\n return $inputParametersStr ;\n }", "private function concatQueryString()\n\t{\n\t\t$query = '';\n\n\t\t// Priority to select\n\t\tif ($this->isSelectQuery())\n\t\t{\n\t\t\t// Create select query\n\t\t\t$query .= 'SELECT ' . $this->formatSelects();\n\t\t\t$query .= ' FROM ' . $this->formatFroms();\n\t\t\tif (sizeof($this->joins) > 0) $query .= $this->formatJoins();\n\t\t\tif (sizeof($this->wheres) > 0) $query .= ' WHERE ' . $this->formatWheres();\n\t\t\tif ($this->order != '') $query .= ' ORDER BY ' . $this->order;\n\t\t\tif ($this->limit != '') $query .= ' LIMIT ' . $this->limit;\n\t\t}\n\n\t\t// Second priority to insert\n\t\tif ($this->isInsertQuery())\n\t\t{\n\t\t\tif ($this->insert_replace_if_exists && $this->insert_ignore)\n\t\t\t\tthrow(new QueryNotValidException(\"REPLACE and IGNORE cannot be used together\"));\n\n\t\t\t// Create insert query\n\t\t\t$query .= $this->insert_replace_if_exists ? 'REPLACE INTO' : 'INSERT INTO';\n\t\t\tif ($this->insert_low_priority) $query .= ' LOW_PRIORITY';\n\t\t\tif ($this->insert_delayed) $query .= ' DELAYED';\n\t\t\tif ($this->insert_ignore) $query .= ' IGNORE';\n\t\t\t$query .= ' ' . $this->insert_table . ' SET';\n\t\t\t$count = 0;\n\t\t\tforeach ($this->inserts as $key => $value)\n\t\t\t{\n\t\t\t\t$query .= ($count > 0 ? ',' : '') . ' ' . $key . '=' . $value;\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\n\t\treturn $query;\n\t}", "public function getQuery(): string\n {\n return (string) $this->query;\n }", "private function getQueryString($options=array(), $prepend='?') {\n // parse query string into array\n $query = array();\n parse_str($_SERVER['QUERY_STRING'], $query);\n // Modify the existing query string with new options\n $query = array_merge($query, $options);\n\n // Return the modified querystring\n return $prepend . htmlentities(http_build_query($query));\n }", "public function getURLQuery() {\n\t\t$query = array();\n\t\tif (Request::getGET('key')) {\n\t\t\t$query['key'] = Request::getGET('key');\n\t\t}\n\t\treturn $query;\n\t}", "public function getStoredQueryParams();", "public function query(): string;", "function constructQuery($query){\n\t\tif(!is_array($query)) die (\"constructQuery requires an array as its argument.\");\n\t\t\n\t\t$url_ext = \"?\";\n\t\tforeach($query as $k => $v){\n\t\t\t$url_ext .=$k.\"=\".$v.\"&\";\n\t\t}\n\t\t$url_ext = substr($url_ext, 0, -1);//chop last ampersand off\n\t\t\n\t\treturn $url_ext;\n\t\n\t}", "function postToQueryString ($posted_vars) {\n\t\tglobal $tii_variables_not_to_post;\n\t\t$query_string = \"?\";\n\t\tforeach ($posted_vars as $k => $v) {\n\t\t\tif (!in_array($k, $tii_variables_not_to_post)) {\n\t\t\t\t$query_string .= $k.\"=\".$v.\"&\";\n\t\t\t}\n\t\t}\n\t\t$query_string = substr($query_string, 0, strlen($query_string)-1);\n\t\treturn $query_string;\n\t}", "public function getQuery()\n {\n\n if (empty($this->_query))\n return '';\n\n return $this->_query;\n }", "function getCorrectedQueryString() {\n\t\tif (io::strpos($this->_correctedQueryString, ' language:'.$this->_language) !== false) {\n\t\t\treturn io::htmlspecialchars(str_replace(' language:'.$this->_language, '', $this->_correctedQueryString)); \n\t\t}\n\t\treturn io::htmlspecialchars($this->_correctedQueryString);\n\t}", "public function getRequestUri() {\n\t\t$final = '';\n\t\tif($this->path) {\n\t\t\t$final .= $this->path;\n\t\t}\n\t\tif($this->query) {\n\t\t\t$final .= '?' . $this->query;\n\t\t}\n\t\treturn $final;\n\t}", "function CreateQueryString($dbtable, $dbinputs){\n\t$dboutputs = array();\n\t$temp2 = '';\n\tfor ($i = 0; $i < sizeof($dbinputs); $i++){\n\t\t$dboutputs[$i] = trim($_POST[$dbinputs[$i]]);\n\t\t$dboutputs[$i] = strip_tags($dboutputs[$i]);\n\t\t$dboutputs[$i] = htmlspecialchars($dboutputs[$i]);\n\t\tif($dbinputs[$i]==\"password\"){\n\t\t\t\t\t$dboutputs[$i] = CreateHash($_POST[$dbinputs[$i]]);\n\t\t}\n\t\t$temp2 = $temp2 . $dbinputs[$i] . \"=\" .\"'\" . $dboutputs[$i] . \"'\";\n\t\tif ($i!=sizeof($dbinputs)-1) {\n\t\t\t$temp2 = $temp2 . ' and ';\n\t\t}\n\t}\n\t$query = \"SELECT * FROM \". $dbtable. \" WHERE \" . $temp2;\n\treturn $query;\n}", "public final function getQuery() {\n return $this->queryString;\n }", "public function __toString() {\n\t\treturn $this->getQuery();\n\t}", "public function createQuery()\n\t{\n\t\t$this->tab[] = $this->action;\n\t\t$this->tab[] = !is_array($this->field) ? $this->field : join(', ',$this->field);\n\t\t$this->tab[] = ' FROM '.$this->from;\n\t\tif(!empty($this->where)){$this->tab[] = 'WHERE '.$this->where;}\n\t\tif(!empty($this->and)){$this->tab[] = 'AND '.$this->and;}\n\t\tif(!empty($this->or)){$this->tab[] = 'OR '.$this->or;}\n\t\tif(!empty($this->in)){$this->tab[] = 'IN '.$this->in;}\n\t\tif(!empty($this->beetween)){$this->tab[] = 'BEETWEEN '.$this->beetween;}\n\t\tif(!empty($this->not)){$this->tab[] = 'NOT '.$this->not;}\n\t\tif(!empty($this->like)){$this->tab[] = 'LIKE '.$this->like;}\n\t\tif(!empty($this->order)){$this->tab[] = 'ORDER BY '.$this->order;}\n\t\treturn join(\" \",$this->tab);\n\t}", "function buildQueryString($params, $parent=\"\")\n{\n\t$query = \"\";\n\n\tforeach ($params as $key => $value)\n\t{\n\t\tif (!empty($query))\n\t\t$query .= '&';\n\n\t\tif (!empty($parent))\n\t\t$key = \"{$parent}[{$key}]\";\n\n\t\tif (!is_array($value))\n\t\t{\n\t\t\t$query .= \"$key=\".rawurlencode($value);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query .= buildQueryString($value, $key);\n\t\t}\n\t}\n\n\treturn $query;\n}", "public function getClientQuery(): string;", "public static function addQueryArg() {\n\t\t$ret = '';\n\t\tif ( is_array( func_get_arg(0) ) ) {\n\t\t\tif ( @func_num_args() < 2 || false === @func_get_arg( 1 ) )\n\t\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t\telse\n\t\t\t\t$uri = @func_get_arg( 1 );\n\t\t} else {\n\t\t\tif ( @func_num_args() < 3 || false === @func_get_arg( 2 ) )\n\t\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t\telse\n\t\t\t\t$uri = @func_get_arg( 2 );\n\t\t}\n\t\n\t\tif ( $frag = strstr( $uri, '#' ) )\n\t\t\t$uri = substr( $uri, 0, -strlen( $frag ) );\n\t\telse\n\t\t\t$frag = '';\n\t\n\t\tif ( preg_match( '|^https?://|i', $uri, $matches ) ) {\n\t\t\t$protocol = $matches[0];\n\t\t\t$uri = substr( $uri, strlen( $protocol ) );\n\t\t} else {\n\t\t\t$protocol = '';\n\t\t}\n\t\n\t\tif ( strpos( $uri, '?' ) !== false ) {\n\t\t\t$parts = explode( '?', $uri, 2 );\n\t\t\tif ( 1 == count( $parts ) ) {\n\t\t\t\t$base = '?';\n\t\t\t\t$query = $parts[0];\n\t\t\t} else {\n\t\t\t\t$base = $parts[0] . '?';\n\t\t\t\t$query = $parts[1];\n\t\t\t}\n\t\t} elseif ( !empty( $protocol ) || strpos( $uri, '=' ) === false ) {\n\t\t\t$base = $uri . '?';\n\t\t\t$query = '';\n\t\t} else {\n\t\t\t$base = '';\n\t\t\t$query = $uri;\n\t\t}\n\t\n\t\tparse_str( $query, $qs );\n\t\t//$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string\n\t\tif ( is_array( func_get_arg( 0 ) ) ) {\n\t\t\t$kayvees = func_get_arg( 0 );\n\t\t\t$qs = array_merge( $qs, $kayvees );\n\t\t} else {\n\t\t\t$qs[func_get_arg( 0 )] = func_get_arg( 1 );\n\t\t}\n\t\n\t\tforeach ( (array) $qs as $k => $v ) {\n\t\t\tif ( $v === false )\n\t\t\t\tunset( $qs[$k] );\n\t\t}\n\t\n\t\t$ret = http_build_query( $qs );\n\t\t$ret = trim( $ret, '?' );\n\t\t$ret = preg_replace( '#=(&|$)#', '$1', $ret );\n\t\t$ret = $protocol . $base . $ret . $frag;\n\t\t$ret = rtrim( $ret, '?' );\n\t\treturn $ret;\n\t}", "public function __toString(): string\n {\n $this->buildQuery();\n return $this->query;\n }", "public function getQueryString(int $pageNumber = null): string\n {\n $array = [\n $this->getPageDetails()->getQueryString($pageNumber),\n $this->getIncludes()->getQueryString(),\n $this->getSortDetails()->getQueryString(),\n $this->getFiltersDetails()->getQueryString(),\n $this->getFields()->getQueryString(),\n $this->getExcludes()->getQueryString(),\n ];\n\n return implode('&', array_filter($array));\n }", "private function getSearchURI()\n {\n $q = $this->getInput('q');\n $hide_expired = $this->getInput('hide_expired');\n $hide_local = $this->getInput('hide_local');\n $priceFrom = $this->getInput('priceFrom');\n $priceTo = $this->getInput('priceTo');\n $url = $this->i8n('bridge-uri')\n . 'search/advanced?q='\n . urlencode($q)\n . '&hide_expired=' . $hide_expired\n . '&hide_local=' . $hide_local\n . '&priceFrom=' . $priceFrom\n . '&priceTo=' . $priceTo\n /* Some default parameters\n * search_fields : Search in Titres & Descriptions & Codes\n * sort_by : Sort the search by new deals\n * time_frame : Search will not be on a limited timeframe\n */\n . '&search_fields[]=1&search_fields[]=2&search_fields[]=3&sort_by=new&time_frame=0';\n return $url;\n }", "public function queryString() {\n\t\t/* Note that it is necessary to pass the full URL to\n\t\t * `parse_url`, because `parse_url` can be tricked into\n\t\t * thinking that part of the path is a domain name. */\n\t\treturn parse_url($this->fullUrl(), PHP_URL_QUERY);\n\t}", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();" ]
[ "0.8486032", "0.83059835", "0.82622045", "0.8206356", "0.7896433", "0.78858966", "0.7879279", "0.7803028", "0.76436317", "0.7561787", "0.7487146", "0.7427527", "0.7347393", "0.732192", "0.7280378", "0.72541714", "0.7209148", "0.72008973", "0.7198477", "0.71890926", "0.71831626", "0.7169752", "0.7167928", "0.7141158", "0.7103794", "0.7103783", "0.7099779", "0.7078909", "0.7050095", "0.7023478", "0.7001967", "0.69885755", "0.6979061", "0.69684845", "0.6941558", "0.692898", "0.6899427", "0.689892", "0.68426996", "0.6833529", "0.68271947", "0.6794821", "0.6787119", "0.67809695", "0.67690885", "0.6765427", "0.6758873", "0.6748631", "0.67471254", "0.6745357", "0.6745357", "0.6745357", "0.67445695", "0.67346144", "0.67154044", "0.6707477", "0.67039305", "0.6702285", "0.66862017", "0.66643757", "0.66622293", "0.6654012", "0.6645695", "0.66440827", "0.6625827", "0.65983975", "0.65936", "0.6580615", "0.65728474", "0.6572256", "0.6564621", "0.65529627", "0.65467846", "0.65382695", "0.65066093", "0.65058655", "0.65051705", "0.6499897", "0.6499506", "0.6487044", "0.6484608", "0.6476901", "0.6473878", "0.6467432", "0.64641094", "0.64633423", "0.6453966", "0.6431514", "0.6424113", "0.64223063", "0.6418878", "0.6403409", "0.6377155", "0.63753444", "0.637382", "0.63696843", "0.63696843", "0.63696843", "0.63696843", "0.63696843", "0.63696843" ]
0.0
-1
Return the DOMXPath query string use to retrieve the ResultSet offset property
protected function getOffsetQuery() { return $this->offsetQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetGet($offset) \n\t{\n if($this->doc && $this->doc[$offset]->length > 0) return $this->doc[$offset];\n\t\telse return phpQuery::newDocument();\n }", "public function getOffset()\n {\n if (! isset($this->offset)) {\n $this->offset = (int)$this->getXPath($this->getDom())->query($this->getOffsetQuery())->item(0)->value;\n }\n return $this->offset;\n }", "public function offsetClause(){\n try {\n // Sparql11query.g:171:3: ( OFFSET INTEGER ) \n // Sparql11query.g:172:3: OFFSET INTEGER \n {\n $this->match($this->input,$this->getToken('OFFSET'),self::$FOLLOW_OFFSET_in_offsetClause612); \n $this->match($this->input,$this->getToken('INTEGER'),self::$FOLLOW_INTEGER_in_offsetClause614); \n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "private function _sql_offset() {\n\t\tif ( $this->limit && $this->offset ) {\n\t\t\treturn ' OFFSET '. $this->offset;\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}", "protected function getXpathString() {\n return 'xpathparser:' . $this->getCounter();\n }", "public function getXqueryCursor () {\n $this->xmldb->getCursor();\n }", "private function generateXpathQuery() {\n $parentElementClass = trim(Settings::get(\"main_class\"), \".\");\n $excludeProcessingClass = trim(Settings::get(\"exclude_class\"), \".\");\n\n $xQuery = \"\";\n if(!empty($parentElementClass)) {\n $xQuery .= \"//*[contains(@class, '\".$parentElementClass.\"')]\";\n }\n $xQuery .= \"//img\";\n\n if(!empty($excludeProcessingClass)){\n $xQuery .= \"[not(contains(@class, '\".$excludeProcessingClass.\"'))]\";\n }\n\n return $xQuery;\n }", "private function getPositionSubSql() {\n\t\t$table = $this->query->getTableMap()::TABLE_NAME;\n\t\t$col = Model::aliasproperty('id');\n\t\t$sql = \"SELECT $col, @rownum := @rownum + 1 AS position FROM $table\";\n\t\t$whereClause = $this->getWhereClauseString();\n\n\t\tif (empty($whereClause) === false) {\n\t\t\t$sql .= ' WHERE ' . $whereClause;\n\t\t}\n\t\treturn $sql;\n\t}", "private function getPositionSubSql() {\n\t\t$table = $this->query->getTableMap()::TABLE_NAME;\n\t\t$sql = \"SELECT Arcucustid, ar3pacctnbr, @rownum := @rownum + 1 AS position FROM $table\";\n\t\t$whereClause = $this->getWhereClauseString();\n\t\tif (empty($whereClause) === false) {\n\t\t\t$sql .= ' WHERE ' . $whereClause;\n\t\t}\n\t\treturn $sql;\n\t}", "private function query($offset, $row_count=1) {\n\t\treturn $this->db->query(\"SELECT {$this->expr} FROM {$this->synt} LIMIT {$offset}, {$row_count}\");\n\t}", "protected function getXPath()\n {\n $xpath = parent::getXPath();\n $xpath->registerNamespace('m', OData::META);\n $xpath->registerNamespace('d', OData::DATA);\n\n return $xpath;\n }", "public function getXqlCursor () {\n $this->xmldb->getXqlCursor();\n }", "private function _findRowEnd($offset)\n {\n $rowEnd = strpos($this->_documentXML, \"</w:tr>\", $offset) + 7;\n return $rowEnd;\n }", "public function testFetchPageCursorOffset(){\n $str_gql = \"SELECT * FROM Kind\";\n $obj_request = $this->getBasicFetchRequest();\n\n $obj_gql_query = $obj_request->mutableGqlQuery();\n $obj_gql_query->setAllowLiteral(TRUE);\n $obj_gql_query->setQueryString($str_gql . \" LIMIT @intPageSize OFFSET @startCursor\");\n\n $obj_arg = $obj_gql_query->addNameArg();\n $obj_arg->setName('intPageSize');\n $obj_arg->mutableValue()->setIntegerValue(11);\n\n $obj_arg_offset = $obj_gql_query->addNameArg();\n $obj_arg_offset->setName('startCursor');\n $obj_arg_offset->setCursor('some-cursor-string');\n\n $this->apiProxyMock->expectCall('datastore_v4', 'RunQuery', $obj_request, new \\google\\appengine\\datastore\\v4\\RunQueryResponse());\n\n $obj_store = $this->createBasicStore();\n $obj_result = $obj_store->query($str_gql)->fetchPage(11, 'some-cursor-string');\n\n $this->assertEquals($obj_result, []);\n $this->apiProxyMock->verify();\n }", "public function getNextStartRecordIndex()\n {\n if (!$this->xmlRoot) {\n $this->processData();\n }\n return intval((string)$this->xmlRoot->xpath('/searchRetrieveResponse/nextRecordPosition'));\n }", "public function testFetchPageIntegerOffset(){\n $str_gql = \"SELECT * FROM Kind\";\n $obj_request = $this->getBasicFetchRequest();\n $obj_gql_query = $obj_request->mutableGqlQuery();\n $obj_gql_query->setAllowLiteral(TRUE);\n $obj_gql_query->setQueryString($str_gql . \" LIMIT @intPageSize OFFSET @intOffset\");\n\n $obj_arg = $obj_gql_query->addNameArg();\n $obj_arg->setName('intPageSize');\n $obj_arg->mutableValue()->setIntegerValue(11);\n\n $obj_arg_offset = $obj_gql_query->addNameArg();\n $obj_arg_offset->setName('intOffset');\n $obj_arg_offset->mutableValue()->setIntegerValue(22);\n\n $this->apiProxyMock->expectCall('datastore_v4', 'RunQuery', $obj_request, new \\google\\appengine\\datastore\\v4\\RunQueryResponse());\n\n $obj_store = $this->createBasicStore();\n $obj_result = $obj_store->query($str_gql)->fetchPage(11, 22);\n\n $this->assertEquals($obj_result, []);\n $this->apiProxyMock->verify();\n }", "public function getRowOffset();", "public function xpath() {\n return new DOMXPath($this);\n }", "function findAll($expression, $offset = null, $limit = null);", "public function query($query){\r\n return $this->xpath->evaluate($query);\r\n }", "public function get_offset() {\n\t\treturn ( $this->step - 1 ) * $this->per_step;\n\t}", "public function getStartIndex();", "public function getQuery()\n {\n $query = parent::getQuery();\n if ( $this->hasLimit )\n {\n if ( $this->offset) \n {\n if ( !$this->orderString ) \n {\n // Uh ow. We need some columns to sort in the oposite order to make this work\n throw new ezcQueryInvalidException( \"LIMIT workaround for MS SQL\", \"orderBy() was not called before getQuery().\" );\n }\n return 'SELECT * FROM ( SELECT TOP ' . $this->limit . ' * FROM ( ' . self::top( $this->offset + $this->limit, $query ) . ' ) AS ezcDummyTable1 ' . $this->invertedOrderString . ' ) AS ezcDummyTable2 ' . $this->orderString;\n }\n return self::top( $this->limit, $query );\n }\n return $query;\n }", "public function getOffset()\r\n {\r\n return ( $this->_pageno - 1 ) * $this->_size;\r\n }", "function calculate_record_offset()\n\t{\n\t\treturn $this->results_per_page * ($this->page_number - 1);\n\t}", "public function getOffset(): int\n {\n return $this->pageIndex * $this->pageSize;\n }", "protected function convertXPath($expr): string\n\t{\n\t\tif (str_starts_with($expr, 'starts-with'))\n\t\t{\n\t\t\treturn $this->convertStartsWithExpr($expr);\n\t\t}\n\n\t\t$replacements = [\n\t\t\t\"(^translate\\\\(@(\\\\w+),'(.)','(.)'\\\\))\" => '$$1|replace(\\'$2\\',\\'$3\\')',\n\n\t\t\t\"(^\\\\$(\\\\w+)(!=|(=))('.*')$)D\" => '$xf.options.s9e_MediaSites_$1$2$3$4',\n\t\t\t\"(^contains\\\\(\\\\$(\\\\w+,'[^']+')\\\\)$)D\" => 'contains($xf.options.s9e_MediaSites_$1)',\n\n\t\t\t'(^@(\\\\w+)$)D' => '$$1',\n\t\t\t\"(^@(\\\\w+)(='.*')$)D\" => '$$1=$2',\n\t\t\t'(^@(\\\\w+)>(\\\\d+)$)D' => '$$1>$2',\n\t\t\t'(^100\\\\*@height div@width$)D' => '100*$height/$width',\n\t\t\t'(^100\\\\*\\\\(@height\\\\+(\\\\d+)\\\\)div@width$)D' => '100*($height+$1)/$width',\n\t\t\t\"(^contains\\\\(@(\\\\w+,'[^']+')\\\\)$)D\" => 'contains($$1)',\n\t\t\t\"(^not\\\\(contains\\\\(@(\\\\w+,'[^']+')\\\\)\\\\)$)D\" => '!contains($$1)',\n\t\t\t\"(^@(\\\\w+) or ?contains\\\\(@(\\\\w+,'[^']+')\\\\)$)D\" => '$$1 or contains($$2)',\n\t\t\t\"(^@(\\\\w+) and ?contains\\\\(('[^']+'),@(\\\\w+)\\\\)$)D\" => '$$1 and contains($2,$$3)',\n\t\t\t\"(^@(\\\\w+) and@(\\\\w+)!=('[^']++')$)D\" => '$$1 and $$2!=$3',\n\n\t\t\t\"(^substring-after\\\\(@(\\\\w+),('[^']+')\\\\)$)\" => '$$1|split($2)|last()',\n\t\t\t\"(^substring-before\\\\(@(\\\\w+),('[^']+')\\\\)$)\" => '$$1|split($2)|first()',\n\t\t];\n\n\t\t$expr = html_entity_decode($expr);\n\t\t$expr = preg_replace(array_keys($replacements), array_values($replacements), $expr, -1, $cnt);\n\t\tif (!$cnt)\n\t\t{\n\t\t\tthrow new RuntimeException('Cannot convert ' . $expr);\n\t\t}\n\n\t\treturn $expr;\n\t}", "public function getOffset()\n {\n $page = $this->getRequest()->get('page', 1);\n $limit = $this->getRequest()->get('limit');\n\n return (null != $limit) ? $limit * ($page - 1) : null;\n }", "public function getXpath()\n {\n if (null === $this->xpath) {\n $this->setXpath(new DOMXPath($this->getDomDocument()));\n }\n\n return $this->xpath;\n }", "public function get($xpathQuery, \\DOMNode $contextnode = null);", "function getPagedStatement($sql,$page,$items_per_page);", "function offset_pos(){\n\t // $this->count_uri();\n\n\t \tif(isset($this->uri_array['osp']))\n\t\t{\n\t \t\t//ops without and with offset page value\n\t \t\tif(count($this->uri_array['osp'])==1){\n\t \t\t\t$pos = $this->count_uri()+1;\n\t \t\t}else{\n\t\t\t\t$segment_array = $this->uri->segment_array();\n\t\t\t\t$pos = array_search(RAPYD_URI_OSP,$segment_array)+1;\n\t \t\t}\n\t \t}\n\n\t \t/*****************************************************************************\n\t \t * We take care of this case even if we have added it in explode_uri for more\n\t \t * security in URI reading\n\t \t *****************************************************************************/\n\t \telse{\n\t \t\t$pos = $this->count_uri()+2;\n\t \t}\n\t\treturn $pos;\n\t}", "public function getOffset()\n {\n return ($this->number_of_items_per_page * $this->current_page) - $this->number_of_items_per_page;\n }", "public function get_offset(){\r\n return $this->$new_offset;\r\n }", "public function getResult($offset = 0)\n {\n return isset($this->results[$offset]) ? $this->results[$offset] : null;\n }", "public function offset() {\n return ($this->current_page - 1) * $this->per_page;\n }", "public function xpathQuery($expression, \\DOMNode $contextnode = null)\n {\n if (null === $this->xpath) {\n $this->xpath = new \\DOMXpath($this);\n }\n\n return $this->xpath->query($expression, $contextnode);\n }", "public function getOffset() {}", "public function getOffset() {}", "public function getOffset() {}", "public function get_offset()\n {\n }", "protected function get_offset()\n {\n $offset = Request::post(self::PARAM_OFFSET);\n if (! isset($offset) || is_null($offset))\n {\n $offset = 0;\n }\n \n return $offset;\n }", "public function testOffset()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->offset(10));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(10, $elasticQuery['from']);\n\n $this->assertSame($query, $query->offset(20));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(20, $elasticQuery['from']);\n }", "public function getCursor () {\n $this->xmldb->getCursor();\n }", "abstract protected function getQueryIterator();", "function getOffset() ;", "private function offset()\n {\n if(is_array($this->limite)): $this->limite=$this->limite['limite']; endif;\n\t$offset = ($this->paginaAtual() - 1) * $this->limite;\n\treturn $offset;\n }", "public function queryMore($queryLocator);", "public function testFindByQWithOffset()\n {\n $dataLoader = $this->getDataLoader();\n $all = $dataLoader->getAll();\n $filters = ['q' => $all[0]['name'], 'offset' => 0];\n $this->filterTest($filters, [$all[0]]);\n }", "public function offset(){\n\t\t//Page 1 has an offset of 0 (1-1) * 20\n\t\t//Page 2 has an offset of 20 (2-1) * 20\n\t\t//in other words, page 2 starts with item 21\n\t\treturn ($this->current_page - 1) * $this->per_page;\t\n\t}", "protected function findRowEnd($offset)\n {\n return strpos($this->tempDocumentMainPart, '</w:tr>', $offset) + 7;\n }", "public function getOffset() {\n return ($this->getCurrentPage() - 1) * $this->getItemCountPerPage();\n }", "protected function get_offset(): int\n\t{\n\t\treturn $this->start;\n\t}", "public function getOffset();", "public function getOffset();", "public function getOffset();", "public function offset($offset) {\r\n\t\t$this->query .= \" OFFSET \" . $offset;\r\n\r\n\t\t# Return this instance of the class, so we can chain methods\r\n\t\treturn $this;\r\n\t}", "function run ($query,$xml)\n{\n // GET AN ELEMENT\n if ($query['FROM'][0]==\"ROOT\" || $query['FROM'][0]==\"\")\n {\n $path=NULL;\n } \n else\n {\n $path=$query['FROM'][0];\n }\n // GET AN ATTRIBUTTE\n if(!empty($query['FROM'][1]))\n {\n $path=$path.\".{$query[\"FROM\"][1]}\";\n }\n $xml=my_xpath($path,$xml);\n\n if(!empty($xml))\n {\n $xml=$xml[0];\n }\n else\n return (string) NULL;\n\n // SELECT ELEMENT from FROM\n $path=$query['SELECT'];\n $xml=my_xpath($path,$xml);\n\n if(empty($xml))\n {\n return (string)NULL;\n }\n else\n {\n if(empty($query['WHERE']))\n {\n $result=$xml;\n }\n else\n {\n // WHERE\n if(empty($query['WHERE'][0]))\n {\n $path=NULL;\n }\n else\n {\n $path=$query['WHERE'][0];\n }\n\n if(!empty($query['WHERE'][1]))\n {\n $path=$path.\".{$query[\"WHERE\"][1]}\";\n }\n $result=array();\n \n foreach($xml as $element)\n {\n $flag=0;\n $validity=false;\n\n if(!empty($query['WHERE'][1]))\n {\n $tmp_array=array_keys((array)$element);\n foreach ($tmp_array as $key) {\n if(strcmp($key, \"@attributes\")==0)\n {\n $data=(array)$element;\n $data=$data[\"@attributes\"];\n if(array_key_exists($query['WHERE'][1], $data))\n {\n $flag=1;\n $part_item=$data[$query['WHERE'][1]];\n }\n }\n }\n if(isset($query['WHERE'][0]) && $query['WHERE'][0] != \"\")\n {\n if(strcmp($query['WHERE'][0], $query['SELECT'])!=0)\n {\n $flag=0;\n }\n }\n }\n if($flag)\n {\n $validity=compare_operator($query,$part_item);\n }\n else\n {\n $final=my_xpath($path,$element);\n foreach ($final as $part_item) {\n $validity=compare_operator($query,$part_item);\n break;\n }\n }\n if($query['WHERE'][4]==true)\n {\n $validity=!$validity;\n }\n if(empty($query['WHERE'][1]))\n {\n $tmp_array=array_keys((array)$part_item);\n foreach ($tmp_array as $key) {\n if(!strcmp($key, \"@attributes\") && !is_int($key))\n {\n $validity=false;\n break;\n }\n }\n }\n if($validity)\n {\n array_push($result, $element);\n }\n }\n }\n }\n if(empty($result))\n {\n return (string)NULL;\n }\n if(isset($query['LIMIT']))\n {\n $result=array_slice($result, 0, $query['LIMIT']);\n }\n return $result;\n}", "function xpath($xpath) {\r\n\t\treturn $this->simpleXML()->xpath($xpath);\r\n\t}", "public function getXPath($type)\n {\n $variable = $type . 'XPath';\n if (isset($this->$variable)) {\n return $this->$variable;\n }\n throw new OpenDocument_Exception('No XPath for ' . $type);\n }", "public function getOffset() {\n // page 1 has an offset of 0 (1-1) * 20\n // page 2 has an offset of 20 (2-1) * 20\n // in other words, page 2 starts with item 21\n return ( $this->currentPage - 1 ) * $this->perPage;\n }", "public function get($offset);", "public function element_start_position(){\n return ($this->amount_per_page * $this->current_page) - $this->amount_per_page;\n }", "public function pagination(){\n\t\treturn $this->dataInfos['XMLPM']['PAGINATION'];\n\t}", "public function getLimitOffsetClause()\n\t{\n\t\treturn $this->limit;\n\t}", "public function eq(int $offset): QueryInterface\n\t{\n\t\tif ( ! isset($this[$offset])) {\n\t\t\treturn new Query();\n\t\t}\n\n\t\treturn $this[$offset];\n\t}", "private function getOffset($limit='unset') \n { \n if ($limit != 'unset'){return ($this->getCurrentPage() - 1 ) * $this->getLimitPerPage($limit);}\n\t else {return ( $this->getCurrentPage() - 1 ) * $this->getLimitPerPage(); } \n \n }", "function get_pdf_offset($reference)\n{\n\t$offset = 0;\n\t\n\tif (preg_match('/[#|\\?]page=(?<offset>-?\\d+)$/', $reference->pdf, $m))\n\t{\n\t\t$offset = $m['offset'];\n\t}\n\t\n\treturn $offset;\n}", "public function columnOffset();", "protected function getOffset(): int\n {\n return ($this->page - 1) * $this->limitPerPage;\n }", "public function offset($offset = null)\n {\n if(null === $offset)\n {\n return $this->property('offset');\n }\n return $this->property('offset', (int) $offset);\n }", "protected function getDomListQuery()\n {\n return $this->domListQuery;\n }", "function offsetGet(/*. mixed .*/ $offset){}", "public function getSubscriptXOffset() {}", "protected function _findStartOffset() {}", "function current()\n\t\t{\n\t\t\tif($this->rs===NULL)\n\t\t\t\t$this->loadData($this->offset, $this->select);\n\t\t\telse if ($this->start == 0 && $this->length == NULL) {\n\t\t\t\tif ($this->offset < $this->rsOffset || $this->offset >= ($this->rsOffset + self::QUERY_ROW_LIMIT))\n\t\t\t\t\t$this->loadData($this->offset, $this->select);\n\t\t\t}\n\t\t\tif(!isset($this->rs[$this->offset - $this->rsOffset]))\n\t\t\t\treturn false;\n\t\t\treturn $this->rs[$this->offset - $this->rsOffset];\n\t\t}", "public function getXpathPrefix()\n {\n return $this->xpathPrefix;\n }", "function fetchDomNodes ($offset = 0, $limit = null)\n {\n $this->_enterSection('fetchDomNodes');\n $result = array();\n if ($this->_extractedNodes) {\n if ($this->_phpVersion == 5) {\n for ($i=$offset; $i < $this->_extractedNodes->length \n and (is_null($limit) or $i < $offset + $limit); $i++) {\n $result[] = $this->_extractedNodes->item($i); \n }\n } else {\n $this->_extractedNodes->rewind();\n for ($i=0; $i < $offset and $this->_extractedNodes->next(); $i++);\n for ($i=0; (is_null($limit) or $i < $limit) \n and $this->_extractedNodes->next(); $i++) {\n $result[] = $this->_extractedNodes->pointer;\n }\n }\n } else {\n if ($strings = $this->fetchStrings ($offset, $limit)) {\n $reconstructed = '<?xml version=\"1.0\"?>';\n $ns = $this->getNameSpaces();\n $nsDecl = array();\n foreach ($ns as $prefix => $uri) {\n $nsDecl[] = \"xmlns:$prefix=\\\"$uri\\\"\";\n }\n $reconstructed .= '<root ' . join(' ', $nsDecl) . '>' . \n join('',$strings) . '</root>';\n\n if ($this->_phpVersion == 5) {\n $dom = new DomDocument();\n $dom->loadXml($reconstructed);\n $nodeset = $dom->documentElement->childNodes;\n $ii = $nodeset->length;\n for ($i = 0; $i < $ii; $i++) {\n $result[] = $nodeset->item($i);\n }\n } else {\n // assuming PHP4\n $dom = domxml_open_mem ($reconstructed);\n $root = $dom->document_element();\n $result = $root->child_nodes();\n }\n }\n }\n $this->_leaveSection('fetchDomNodes');\n return $result;\n }", "function getPage($offset)\n {\n return max(min($this->cur_page + $offset, $this->total_page), '');\n }", "function getRowOffset($index)\n\t{\n\t\treturn $index +1 + $this->limitstart;\n\t}", "function getOffset($localVarName) {\n \tif($this->query_where_has_changed || isset($GLOBALS['record_has_changed'])) {\n \t\t$this->setSessionVariable($localVarName,\"offset\", 0);\n \t}\n\t$offset = $this->getSessionVariable($localVarName,\"offset\");\n\tif(isset($offset)) {\n\t\treturn $offset;\n\t}\n\treturn 0;\n}", "public function offset($offset)\n\t{\n\t\t\t\t\t$this->_query['offset']=(int)$offset;\n\t\t\t\t\treturn $this;\n\t}", "protected abstract function getLimitOffsetClause($limit, $offset = 0);", "public function getStringOffset() {}", "public function getOffset() { return $this->_offset; }", "public function getPathAlias()\n {\n if (! isset($this->pathAlias)) {\n $this->pathAlias = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getPathAliasQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->pathAlias;\n }", "public function getOpposAt($offset)\n {\n return $this->get(self::_OPPOS, $offset);\n }", "public function getOpposAt($offset)\n {\n return $this->get(self::_OPPOS, $offset);\n }", "public function getOpposAt($offset)\n {\n return $this->get(self::_OPPOS, $offset);\n }", "private function _findRowStart($offset)\n {\n $rowStart = strrpos($this->_documentXML, \"<w:tr \", ((strlen($this->_documentXML) - $offset) * -1));\n if (!$rowStart) {\n $rowStart = strrpos($this->_documentXML, \"<w:tr>\", ((strlen($this->_documentXML) - $offset) * -1));\n }\n if (!$rowStart) {\n throw new Exception(\"Can not find the start position of the row to clone.\");\n return false;\n }\n return $rowStart;\n }", "public function getOffset(): int;", "function query_dom($query) {\n\t\t$xpath = new DOMXpath($this->dom);\n\t\t$id = $xpath->query($query);\n\t\tif ($id->length == 0)\n\t\t\t$id = null;\n\t\tif (isset ($id)) {\n\t\t\tforeach ($id as $handle) {\n\t\t\t\t$id = $handle->nodeValue;\n\t\t\t}\n\t\t}\n\t\treturn $id;\n\t}", "public function getOffset() {\n return $this->offset;\n }", "private function getOptionsListXpath() {\n return sprintf(Dropdown::OPTIONS_LIST_XPATH,$this::$keyWord);\n }", "public function offsetGet($offset) {\n\t\tsettype($offset, 'integer');\n\n\t\tif ($offset < 0 || $offset >= $this->indexMax) {\n\t\t\tthrow new Exception('Illegal offset for ' . $this->indexMax . ' rows');\n\t\t}\n\n\t\treturn $this->fetchRowAssoc($offset);\n\t}", "public function query(string $query, \\DOMElement $node = null)\n {\n return $this->xpath->query($query, $node);\n }", "function _sf_query_offset(&$query) {\n\t\tif(!isset($query->query['offset'])) { return; }\n\t\tif(!$query->query['offset']) { return; }\n\t\n\t\t///// FIRST OUR DESIRED OFFSET\n\t\t$offset = $query->query['offset'];\n\t\t\n\t\t///// NEXT HOW MANY POSTS PER PAGE WE ACTUALLY WANT\n\t\t$ppp = $query->query['posts_per_page'];\n\t\t\n\t\t///// LETS DETECT AND HANDLE PAGINATION\n\t\tif($query->is_paged) {\n\t\n\t\t\t//Manually determine page query offset (offset + current page (minus one) x posts per page)\n\t\t\t$page_offset = $offset + ( ($query->query_vars['paged']-1) * $ppp );\n\t\n\t\t\t//Apply adjust page offset\n\t\t\t$query->set('offset', $page_offset );\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t//// ITS OUR FIRST PAGE, JUST USE THE OFFSET\n\t\t\t$query->set('offset',$offset);\n\t\t\t\n\t\t}\n\t\t\n\t}", "private function getStart()\n\t{\n//\t\tprint '#'.$this->getPage().'-'.$this->getRowsPerPage().'#';\n\t\t$iStart = ( ($this->getPage() - 1) * $this->getRowsPerPage() );\n\t\tif($iStart < 0)\n\t\t{\n\t\t\t$iStart = 0;\n\t\t}\n//\t\tprint $iStart.'*';\n\t\treturn $iStart;\n//\t\tprint $this->start .'*';\n\t}", "public function key()\n {\n if(is_null($this->paginationVar))\n return 0;\n return $this->curIndex + $this->paginationVar->GetOffset();\n }", "private function getOptionsXpath() {\n return sprintf(Dropdown::OPTIONS_XPATH,$this::$keyWord);\n }" ]
[ "0.5891331", "0.5858565", "0.57634467", "0.5634551", "0.5543583", "0.54944134", "0.54081166", "0.53653616", "0.53576374", "0.529386", "0.52843153", "0.518309", "0.5145246", "0.5143747", "0.5102981", "0.507216", "0.5064272", "0.500201", "0.4991872", "0.49641213", "0.4947015", "0.4938479", "0.49363506", "0.49302357", "0.49254614", "0.49174154", "0.48847342", "0.48772767", "0.48758712", "0.4872601", "0.4866568", "0.4863212", "0.4858866", "0.48363018", "0.4835155", "0.4813531", "0.4810297", "0.48096433", "0.48096433", "0.48096433", "0.48006743", "0.478578", "0.47853395", "0.47788563", "0.47747627", "0.4767418", "0.47647536", "0.47540948", "0.47506386", "0.47499773", "0.4738543", "0.4732531", "0.4730545", "0.4727651", "0.4727651", "0.4727651", "0.47260115", "0.47209927", "0.47191522", "0.47172868", "0.47170606", "0.47141963", "0.47134557", "0.47011474", "0.47009835", "0.467757", "0.46750507", "0.46729696", "0.46702683", "0.46677637", "0.4649119", "0.4641248", "0.4640441", "0.46363652", "0.4634032", "0.46323022", "0.46270946", "0.46101868", "0.46044272", "0.4600505", "0.45992938", "0.4597338", "0.4595153", "0.4590792", "0.45868105", "0.45813215", "0.4568625", "0.4568625", "0.4567473", "0.45555544", "0.4546467", "0.45454913", "0.4543173", "0.45415616", "0.45394003", "0.45375037", "0.45361698", "0.4534452", "0.45338815", "0.45323583" ]
0.62557465
0
Iterator interface Return the key of the current element
public function key() { return $this->position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function key()\n {\n return $this->keys[$this->iterator];\n }", "public function key() {\n return $this->iteratorKeys[$this->iteratorPosition];\n }", "public function key() {\n return $this->iterator->key();\n }", "public function key()\n {\n return $this->iterator->key();\n }", "public function key()\n {\n return key($this->iterator_data);\n }", "public function key()\n {\n Psl\\invariant($this->valid(), 'The Iterator is invalid.');\n if (!contains_key($this->entries, $this->position)) {\n $this->progress();\n }\n\n return $this->entries[$this->position][0];\n }", "function key()\n {\n $current = $this->getInnerIterator()->current();\n\n if (!is_scalar($current)) {\n return (string) $current;\n }\n\n return $current;\n }", "public function key()\n {\n return $this->current();\n }", "public function key()\n {\n return $this->current;\n }", "function key()\n\t\t{\n\t\t\t$this->current();\n\t\t\treturn $this->offset;\n\t\t}", "public function key()\n {\n return key($this->_elements);\n }", "public function key()\n {\n $current = $this->current();\n\n return is_null($current) ? null : $current->getKey();\n }", "public function key()\n\t{\n\t\treturn $this->_keys[$this->_idx];\n\t}", "public function key()\n {\n return key($this->elements);\n }", "public function key() {\n $element = key($this->elements);\n\n return $element;\n }", "public function key() {\n $key = key($this->elements);\n return $key;\n }", "public function key()\n {\n return current($this->keys);\n }", "function key() {\r\n return $this->i >= 0 ? $this->i : NULL;\r\n }", "public function key()\n {\n return $this->keys[$this->index];\n }", "public function key()\n {\n return $this->_currentIndex;\n }", "public function key() {\n return $this->keys[$this->index];\n }", "public function key()\n {\n return key($this->_items);\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n return current($this->keys);\n }", "public function key() {\n return $this->currentIndex;\n }", "public function key()\n {\n return $this->_currentKey;\n }", "public function key() {\n\t\treturn( $this->_currentRow );\n\t}", "public function key(){\n return key($this->items);\n }", "public function key(){\n return key($this->items);\n }", "function key() {\n return $this->keys[$this->position];\n }", "public function key()\n {\n return $this->currentKey;\n }", "public function key() {\n return $this->keys[$this->pos];\n }", "public function key() {\n\t\treturn key($this->_value);\n\t}", "public function key()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\treturn $this->rs->key();\n\t\t}\n\t\treturn 0;\n\t}", "#[\\ReturnTypeWillChange]\n public function key()\n {\n return key($this->_items);\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n return key($this->items);\n }", "public function key()\n {\n return $this->keys[$this->pointer];\n }", "public function key() {\n\t\tif(($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) {\n\t\t\treturn $this->lastItems[$this->endItemIdx][0];\n\t\t} else if(isset($this->firstItems[$this->firstItemIdx])) {\n\t\t\treturn $this->firstItems[$this->firstItemIdx][0];\n\t\t} else {\n\t\t\treturn $this->items->current()->{$this->keyField};\n\t\t}\n\t}", "public function key() {\n if($this->items!==false)\n return key($this->items);\n return false;\n }", "public function key(): mixed {\n return key($this->items);\n }", "public function key()\n {\n if ($this->list === null)\n $this->rewind();\n $row = key($this->list);\n return $row;\n }", "public function key()\n \t{\n \t\treturn $this->getHandle()->current;\n \t}", "protected function key()\n {\n $value = $this->keyVal();\n return key($value);\n }", "function key()\n\t{\n\t\treturn $this->index;\n\t}", "public function key()\n {\n $map = $this->__getSerialisablePropertyMap();\n $mapKeys = array_keys($map);\n return $mapKeys[$this->iteratorPosition];\n }", "public function key()\n {\n return $this->current_key;\n }", "public function key() {\r\n return key($this->collection);\r\n }", "public function key()\n {\n return $this->getKey($this->getCursor());\n }", "public function key()\n {\n return key($this->values);\n }", "public function key()\n {\n return key($this->collection);\n }", "public function key() {\n\t\treturn key($this->array);\n\t}", "public function key()\n\t{\n\t\treturn $this->index;\n\t}", "public function key()\n\t{\n\t\treturn $this->index;\n\t}", "public function key()\n {\n return key($this->array);\n }", "public function key()\n {\n return key($this->array);\n }", "public function key()\r\n\t{\r\n\t\treturn $this->elements[$this->i]->get($this->obj->primaryKey);\r\n\t}", "public function key() {\n\t\t\treturn $this->index;\n\t\t}", "public function key()\n {\n return $this->current[$this->dataStore->getIdentifier()];\n }", "public function key()\r\n {\r\n return key($this->children);\r\n }", "public function key()\n\t\t{\n\t\t\treturn key($this->source);\n\t\t}", "public function key()\n\t{\n\t\treturn $this->_position;\n\t}", "public function keyIterator() {\n return new HashmapIterator(array_keys($this->_hash));\n }", "public function key() {\n\t\treturn key($this->_data);\n\t}", "public function key()\n {\n\t\treturn key($this->_data);\n\t}", "public function key()\n\t{\n\t\treturn $this->pointer;\n\t}", "public function key()\n\t{\n\t\treturn $this->__position;\n\t}", "public function key() {\n\n\t\t\treturn $this->position;\n\t\t}", "public function key()\n {\n return key( $this->data );\n }", "function key() {\r\n return $this->_position;\r\n }", "public function key ()\n {\n return $this->offset;\n }", "function key()\n {\n return $this->_position;\n }", "public function key()\n {\n return $this->_currentRowNumber;\n }", "public function key()\n {\n return key($this->_data);\n }", "public function key()\n {\n return key($this->bricks[$this->position]);\n }", "public function key(): string|int\n {\n if ($this->_data instanceof \\Iterator) {\n return $this->out($this->_data->key(), 'key', 'iterator');\n } elseif (is_array($this->_data)) {\n return $this->out(key($this->_data), 'key', 'iterator');\n }\n }", "public function key()\n\t{\n\t\t$pageSize = $this->_dataProvider->getPagination()->getPageSize();\n\t\treturn $this->_currentPage * $pageSize + $this->_currentIndex;\n\t}", "public function key()\n {\n return $this->offset;\n }", "public function firstKey()\n\t{\n\t\treturn $this->first()->key;\n\t}", "function key(){ \r\n\t return key($this->array); \r\n\t }", "public function key()\n {\n return ($current = $this->current()) !== false ? $current->getDn() : null;\n }", "public function key()\n {\n echo __METHOD__,PHP_EOL;\n return key($this->a);\n }", "public function key() {\n return key($this->data);\n }", "public function key() {\n return key($this->data);\n }", "public function key($item);", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n return $this->_position;\n }", "public function key ()\n {\n return $this->valid() ? $this->cache[ $this->offset ][ 0 ] : NULL;\n }", "public function key() {\n\t\treturn $this->position;\n\t}", "public function key() {\n\t\treturn $this->position;\n\t}", "public function key() {\n\t\treturn $this->position;\n\t}", "public function key() {\r\n\t\treturn $this->position;\r\n\t}", "public function key ( ) {\n\n return key($this->_childs);\n }", "public function key() {\n\t\t$this->checkResultSet();\n\n\t\tif (! is_null($this->keyColumn)) {\n\t\t\t$row = $this->fetchRowAssoc($this->index, true);\n\t\t\treturn $row[$this->keyColumn];\n\t\t}\n\n\t\treturn $this->index;\n\t}", "public function key(): int\n {\n return $this->_index;\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n return key($this->_data);\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n return key($this->_data);\n }" ]
[ "0.8365543", "0.81145465", "0.80971843", "0.80922234", "0.8071163", "0.7988697", "0.7977895", "0.77580243", "0.768261", "0.76709634", "0.7659252", "0.76162475", "0.7552971", "0.7539943", "0.7538684", "0.75156915", "0.73989046", "0.7397635", "0.73962885", "0.7386537", "0.7370142", "0.7367539", "0.73317355", "0.7331672", "0.7293354", "0.72810924", "0.7266641", "0.7266641", "0.7256221", "0.7240661", "0.7212865", "0.72117203", "0.7189519", "0.717717", "0.7164678", "0.7156339", "0.7150977", "0.7144807", "0.71360844", "0.71226454", "0.70923805", "0.70876354", "0.7076905", "0.70762277", "0.7065742", "0.7060959", "0.7031215", "0.7018269", "0.7005164", "0.7004648", "0.6953743", "0.6953743", "0.6942782", "0.6942782", "0.6933237", "0.69326216", "0.6915909", "0.68816584", "0.68734", "0.6865685", "0.686376", "0.6857192", "0.68498033", "0.68368036", "0.68158853", "0.67929167", "0.6791813", "0.6790355", "0.6789222", "0.67882913", "0.67815167", "0.67754203", "0.6770192", "0.67658544", "0.6761401", "0.6760248", "0.6749286", "0.6747405", "0.6731779", "0.6731177", "0.6729058", "0.6729058", "0.6728469", "0.6727875", "0.6727875", "0.6727875", "0.6727875", "0.6727875", "0.6727875", "0.6727875", "0.6722681", "0.67027515", "0.6689886", "0.6689886", "0.6689886", "0.6682927", "0.66800106", "0.6674084", "0.6669226", "0.66660047", "0.66660047" ]
0.0
-1
Iterator interface Move the pointer on
public function next() { ++$this->position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pulled(): Iterator;", "public function next()\n {\n next($this->iterator_data);\n }", "private function next()\n {\n $clone = clone $this;\n $clone->offset++;\n return $clone;\n }", "function MoveNext() {}", "public function next()\n\t{\n\t\t$this->pointer++;\n\t\t$this->row = $this->result->get($this->pointer);\n\t}", "public function next() {\n next($this->elements);\n $this->pointer++;\n }", "public function getIterator() {}", "public function getIterator() {}", "public function rewind()\n {\n $this->pointer = -1;\n $this->next();\n }", "public function next()\n {\n $this->pointer++;\n }", "public function rewind() {\n if ($this->started) {\n // When you first foreach() an iterator the rewind() method gets called\n // so we have to work the first time.\n throw new Exception(\n pht('Stream iterators can not be rewound!'));\n }\n\n $this->started = true;\n $this->naturalKey = -1;\n $this->next();\n }", "public function next ()\n {\n if ( isset($this->iterator) && $this->offset == $this->internalOffset ) {\n $this->internalOffset++;\n $this->iterator->next();\n $this->storeNext();\n }\n\n $this->offset++;\n }", "public function next()\n\t\t{\n\t\t\tnext($this->source);\n\t\t}", "public function iterator();", "abstract public function getIterator();", "public function rewind() {\r\n\t\t$this->_iteratorArray = $this->select();\r\n\t\t$this->_iteratorPos = 0;\r\n\t}", "public function rewind()\n {\n $this->iterator_data = $this->getData();\n }", "public function next()\n {\n $this->iteratorPosition++;\n }", "public function next() {\n ++$this->iteratorPosition;\n }", "public function next() {\n $this->currentRow = $this->result->fetchObject();\n $this->currentKey = array();\n if (!is_object($this->currentRow)) {\n $this->currentRow = NULL;\n }\n else {\n foreach ($this->sourceKeyMap as $map_field) {\n $this->currentKey[$map_field] = $this->currentRow->$map_field;\n // Leave only destination fields\n unset($this->currentRow->$map_field);\n }\n }\n }", "function rewind()\n\t{\n\t\treturn $this->iterator->rewind();\n\t}", "protected function reset()\n {\n $this->iterator->rewind();\n }", "public function rewind()\n\t{\n\t\t$this->pointer = 0;\n\t\t$this->row = $this->result->get(0);\n\t}", "function next() {\n $this->position++;\n }", "public function next()\n {\n next($this->_object);\n }", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator(): \\Traversable\n {\n yield from $this->source;\n }", "public function getIterator(): Iterator {}", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind()\n {\n return $this->iterator->rewind();\n }", "public function next()\n {\n ++$this->iterator;\n }", "public function getIterator()\n {\n }", "public function next()\n {\n fseek($this->resource, 1, SEEK_CUR);\n }", "public function next()\n {\n ++$this->offset;\n }", "function moveNext() {\r\n\r\n $row = $this->result->fetchRow( MDB2_FETCHMODE_ASSOC );\r\n $this->EOF = !is_array( $row );\r\n $this->fields = $row;\r\n\r\n }", "public function rewind()\n\t\t{\n\t\t\treset($this->source);\n\t\t}", "public function next()\n {\n next($this->array);\n }", "public function next()\n {\n $this->position++;\n $this->fileIterator->seek($this->position);\n }", "public function getIterator()\n {\n // Ensure immutable.\n return new IteratorProxy($this->iterator);\n }", "public function rewind() {\n reset($this->elements);\n $this->pointer = 0;\n }", "public function rewind()\n {\n $this->iteratorIndex = 0;\n reset($this->elements);\n }", "public function rewind()\n {\n $this->iteratorPosition = 0;\n }", "public function next()\n {\n next($this->_items);\n }", "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->fetch());\n\t}", "public function getIterator()\n {\n return $this->iterator;\n }", "public function rewind()\n {\n $this->pointer = 0;\n }", "public function rewind()\n {\n $this->pointer = 0;\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n $this->index++;\n return next($this->items);\n }", "public function rewind()\r\n\t{\r\n\t\t$this->i = 0;\r\n\t\tif(count($this->elements))\r\n\t\t{\r\n\t\t\treturn $this->elements[$this->i];\r\n\t\t}\r\n\t}", "public function next(): void {\n next($this->items);\n }", "public function rewind() {\n $this->currentRow = NULL;\n $fields = array();\n foreach ($this->sourceKeyMap as $field) {\n $fields[] = $field;\n }\n foreach ($this->destinationKeyMap as $field) {\n $fields[] = $field;\n }\n\n /* TODO\n if (isset($this->options['itemlimit'])) {\n $query = $query->range(0, $this->options['itemlimit']);\n }\n */\n $this->result = $this->connection->select($this->mapTable, 'map')\n ->fields('map', $fields)\n ->execute();\n $this->next();\n }", "public function rewind()\n\t{\n\t\t$this->j = 0;\n\t\t$this->c = $this->i;\n\t}", "public function rewind()\n {\n $this->_current = clone $this->_startDate;\n }", "public function next(){\n return next($this->items);\n }", "public function next(){\n return next($this->items);\n }", "public function getIterator() {\n\t\treturn new \\ArrayObject($this->data);\n\t}", "public function next(): void\n {\n if ($this->_skipNextIteration) {\n $this->_skipNextIteration = false;\n return;\n }\n next($this->_data);\n $this->_index++;\n }", "public function next()\n {\n if ($this->skipNextIteration) {\n $this->skipNextIteration = false;\n return;\n }\n\n next($this->data);\n }", "public function next()\n {\n if ($this->skipNextIteration) {\n $this->skipNextIteration = false;\n return;\n }\n\n next($this->data);\n }", "public function next()\n\t{\n\t\t$this->__position++;\n\t}", "function next()\n {\n ++$this->_position;\n }", "function getIterator() {\r\n\t\treturn new \\ArrayIterator($this->data);\r\n\t}", "public function next() {\n ++ $this->_position;\n }", "public function next()\r\n {\r\n if ($this->index < $this->aggregate->size()) {\r\n $this->index = $this->index+1;\r\n }\r\n }", "public function next(): void\n {\n next($this->array);\n }", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n return next($this->_items);\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "public function next()\n\t{\n\t\t$this->_idx++;\n\t}", "function rewind() \n {\n $this->position = 0;\n }", "function rewind() \n {\n $this->position = 0;\n }", "function rewind (){ $this->key = -1; }", "public function rewind()\n {\n echo __METHOD__,PHP_EOL;\n reset($this->a);\n }", "public function advance();", "function next() {\n\n return $this->skip(1);\n }", "public function next(): void\n {\n ++$this->pointer;\n }", "public function getIterator()\n {\n return $this->iterator();\n }", "public function next()\n {\n if ($this->_skipNextIteration) {\n $this->_skipNextIteration = false;\n return;\n }\n next($this->_data);\n $this->_index++;\n }", "public function next()\n\t{\n\t\t$this->_position++;\n\t}", "public function rewind() \n {\n $this->pointer = 0;\n if (isset($this->list[$this->pointer])) {\n $this->list[$this->pointer]->rewind();\n }\n }", "public function next()\n {\n $this->_position++;\n }", "function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }", "public function next()\n {\n $this->currentElement = $this->readNextElement();\n $this->atStart = FALSE;\n }", "public function next() {\n $this->pos++;\n }", "public function next()\n {\n do {\n $this->iterated->attach($this->current());\n parent::next();\n } while ($this->valid() && (!$this->passes($this->current()) || $this->iterated->contains($this->current())));\n }", "public function next() {\n\t\t++$this->position;\n\t}", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n $this->position++;\n }", "public function next()\n {\n $this->position++;\n }", "function rewind() {\r\n $this->_position = 0;\r\n }", "#[\\ReturnTypeWillChange]\n public function rewind()\n {\n $this->_skipNext = false;\n return reset($this->_data);\n }" ]
[ "0.66875094", "0.6566059", "0.647737", "0.64481926", "0.63881975", "0.63865906", "0.635427", "0.635427", "0.6288552", "0.6270714", "0.62105584", "0.6196965", "0.61843807", "0.61820096", "0.6171038", "0.6149793", "0.6147565", "0.61339134", "0.61315835", "0.6118429", "0.60988736", "0.609051", "0.60891324", "0.60871714", "0.6073615", "0.6044076", "0.6044076", "0.6044076", "0.6044076", "0.6044076", "0.6044076", "0.60426843", "0.60417813", "0.60336953", "0.60336953", "0.60206723", "0.60029227", "0.6000164", "0.5985926", "0.5982523", "0.59817684", "0.597788", "0.5973992", "0.5964678", "0.5958858", "0.59539175", "0.595268", "0.5945996", "0.59371126", "0.5917424", "0.5913445", "0.590523", "0.590523", "0.5904635", "0.58921623", "0.58870715", "0.58848506", "0.5881301", "0.58751386", "0.5874922", "0.5874922", "0.58526677", "0.58518976", "0.58497506", "0.58497506", "0.58470666", "0.5846896", "0.5839066", "0.583728", "0.5834458", "0.58343303", "0.58265746", "0.58265746", "0.58249277", "0.58224106", "0.58224106", "0.581124", "0.58100665", "0.58100665", "0.5806809", "0.5805613", "0.5801259", "0.57949024", "0.5794052", "0.5788134", "0.5786233", "0.57836705", "0.57826954", "0.5782692", "0.5780727", "0.5777759", "0.5773878", "0.5762378", "0.57623094", "0.57437634", "0.57437634", "0.57437634", "0.57433885", "0.57433885", "0.5738695", "0.5738391" ]
0.0
-1
Iterator interface Rewind the Iterator to the first element
public function rewind() { $this->position = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rewind()\n {\n $this->iteratorIndex = 0;\n reset($this->elements);\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind() {\n if ($this->started) {\n // When you first foreach() an iterator the rewind() method gets called\n // so we have to work the first time.\n throw new Exception(\n pht('Stream iterators can not be rewound!'));\n }\n\n $this->started = true;\n $this->naturalKey = -1;\n $this->next();\n }", "public function first()\r\n {\r\n $this->index = 0;\r\n }", "public function first(): void\n {\n $this->index = 0;\n }", "public function first() {\n $this->index = 0;\n }", "public function rewind()\n {\n $this->iteratorPosition = 0;\n }", "protected function reset()\n {\n $this->iterator->rewind();\n }", "public function rewind()\n {\n reset($this->_items);\n }", "public function rewind()\n {\n if ($this->atStart)\n return;\n \n throw new Splunk_UnsupportedOperationException(\n 'Cannot rewind after reading past the first element.');\n }", "public function rewind() {\n if($this->items!==false)\n reset($this->items);\n }", "function rewind()\n\t{\n\t\treturn $this->iterator->rewind();\n\t}", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "public function rewind() {\r\n\t\t$this->_iteratorArray = $this->select();\r\n\t\t$this->_iteratorPos = 0;\r\n\t}", "public function rewind(): void {\n reset($this->items);\n }", "public function rewind(): void\n {\n reset($this->_items);\n }", "public function rewind()\n {\n $this->_skipNextIteration = false;\n reset($this->_data);\n $this->_index = 0; \n }", "public function rewind() {\n reset($this->elements);\n }", "public function rewind() {\n reset($this->elements);\n $this->pointer = 0;\n }", "public function rewind()\n {\n return $this->iterator->rewind();\n }", "public function rewind()\n {\n $this->pointer = -1;\n $this->next();\n }", "public function rewind()\r\n\t{\r\n\t\t$this->i = 0;\r\n\t\tif(count($this->elements))\r\n\t\t{\r\n\t\t\treturn $this->elements[$this->i];\r\n\t\t}\r\n\t}", "public function rewind()\n {\n $this->iterator_data = $this->getData();\n }", "public function rewind() {\r\n reset($this->itemList);\r\n }", "public function rewind()\n {\n $this->current = ldap_first_entry($this->handle, $this->result);\n }", "public function rewind(): void\n {\n $this->_skipNextIteration = false;\n reset($this->_data);\n $this->_index = 0;\n }", "public function rewind()\n {\n rewind($this->_handle);\n $this->_currentIndex = -1;\n $this->next();\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function rewind() \n {\n $this->pointer = 0;\n if (isset($this->list[$this->pointer])) {\n $this->list[$this->pointer]->rewind();\n }\n }", "public function rewind()\n {\n $this->_current = clone $this->_startDate;\n }", "public function rewind()\n {\n $this->cursor = 0;\n $data = $this->collection->getArrayCopy();\n reset($data);\n $this->collection->exchangeArray($data);\n\n return $this->current();\n }", "public function rewind()\n {\n $this->index = 0;\n }", "public function rewind(){\n $this->index = 0;\n }", "public function rewind()\n {\n $this->current = 0;\n }", "public function rewind() {\n $this->index = 0;\n }", "public function rewind() {\n\t\t\t$this->index = 0;\n\t\t}", "public function rewind() {\n $this->initialize();\n $this->nextElem();\n }", "public function rewind(): void\n {\n if ($this->_index === 0) {\n return;\n }\n\n $this->_index = 0;\n }", "public function rewind() {\n\t\t// Init the recordset if needed.\n\t\t$this->initRecordSet();\n\t\t// Move to first element\n\t\t$this->recordSet->MoveFirst();\n\t\t// Current index is the first index\n\t\t$this->currentIndex = 0;\n\t}", "public function rewind()\n\t\t{\n\t\t\treset($this->source);\n\t\t}", "public function first() {\n return reset($this->list);\n }", "public function rewind(): void\n {\n $this->key = 0;\n $this->current = $this->start;\n }", "function rewind()\n\t{\n\t\t$this->_iIndex = 0;\n\t}", "public function first()\n {\n return reset($this->items);\n }", "public function rewind()\n {\n reset($this->data);\n $this->current_index = 0;\n }", "function reset() {\n\n\t\treturn $this->iterator->reset();\n\n\t}", "public function rewind()\n {\n $this->key = 0;\n }", "public function rewind()\n {\n $this->key = 0;\n }", "public function first()\r\n\t{\r\n\t\treturn reset($this->_items);\r\n\t}", "public function rewind()\n {\n $this->current = null;\n }", "public function next()\n {\n next($this->iterator_data);\n }", "public function rewind()\n {\n $this->offset = 0;\n }", "public function first()\n {\n return reset($this->_elements);\n }", "public function rewind()\n {\n echo __METHOD__,PHP_EOL;\n reset($this->a);\n }", "function rewind (){ $this->key = -1; }", "#[\\ReturnTypeWillChange]\n public function rewind()\n {\n $this->_skipNext = false;\n return reset($this->_data);\n }", "public function rewind() {\n $this->_key = 0;\n }", "public function rewind() {\n do {\n $this->collections[$this->_current]->rewind(); \n } while ($this->_current-- > 0);\n }", "public function rewind()\n {\n $this->_previous = 1;\n $this->_current = 0;\n $this->_key = 0;\n }", "public function getAndRemoveFirstItem ();", "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "public function rewind(): void\n {\n reset($this->array);\n }", "public function rewind()\n\t{\n\t\t$this->pointer = 0;\n\t\t$this->row = $this->result->get(0);\n\t}", "public function rewind()\n {\n $this->currentKey = 0;\n }", "function rewind() {\r\n $this->_position = 0;\r\n }", "public function rewind()\n\t{\n\t\t$this->j = 0;\n\t\t$this->c = $this->i;\n\t}", "public function rewind()\n {\n reset($this->entities);\n }", "public function rewind()\n {\n reset($this->values);\n }", "public function rewind()\n {\n\t\treset($this->_data);\n $this->_index = 0;\n\t}", "function rewind() \n {\n $this->position = 0;\n }", "function rewind() \n {\n $this->position = 0;\n }", "public function rewind()\n {\n if (count($this->pathItemList) > 0) {\n $this->index = 0;\n }\n else {\n $this->index = NULL;\n }\n }", "public function rewind(): void\n {\n if ($this->position != 1) {\n $this->position = 1;\n $this->data = [];\n $this->fetchMore();\n }\n }", "public function rewind(): void\n {\n if ($this->_data instanceof \\Iterator) {\n $this->_data->rewind();\n return;\n } elseif (is_array($this->_data)) {\n reset($this->_data);\n }\n }", "public function first(): mixed\n {\n return Iterators::first($this->iterator);\n }", "public function rewind() {\n\t\treset($this->_value);\n\t}", "public function rewind()\n {\n reset($this->data);\n }", "public function rewind()\n {\n reset($this->data);\n }", "public function rewind()\n {\n reset($this->data);\n }", "public function first() {\n return $this->seek(0);\n }", "function rewind() {\n $this->position = 0;\n }", "public function rewind()\n\t{\n\t\t$this->__position = 0;\n\t}", "public function rewind()\n {\n $this->_position = 0;\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n $this->index++;\n return next($this->items);\n }", "public function rewind()\n\t{\n\t\t$this->_position = 0;\n\t}", "public function rewind() {\r\n\t\t$this->position = 0;\r\n\t\trewind($this->handle);\r\n\t\t$this->next();\r\n\t}", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public function rewind()\n {\n $this->seek(0);\n }", "public function rewind()\n {\n $this->seek(0);\n }", "public function rewind()\n {\n $this->seek(0);\n }", "public function rewind()\n {\n return reset( $this->data );\n }", "public function rewind()\n {\n $this->_counter = 0;\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n return next($this->_items);\n }", "public function next(){\n return next($this->items);\n }", "public function next(){\n return next($this->items);\n }", "public function rewind()\n\t{\n\t\t// not supported\n\t\tif ($this->foreach_count) {\n\t\t\tthrow new ORMException('You cannot use the same result set in multiple foreach.');\n\t\t}\n\n\t\t$this->current = $this->runFetch();\n\n\t\t$this->foreach_count++;\n\t}", "public function rewind() { \n\t\t$this->currentPage = 1;\n\t\t\n\t\tif(array_key_exists(1,$this->pages))\n\t\t\treset($this->pages[$i]);\n\t}", "public function rewind() : void\n {\n $this->page(1);\n }", "public function first()\n {\n $this->cursor = 0;\n\n return $this->at($this->cursor);\n }" ]
[ "0.7286333", "0.7134709", "0.7134709", "0.71255046", "0.70932555", "0.70534813", "0.7049705", "0.69625443", "0.6948683", "0.692338", "0.69060445", "0.6892027", "0.68879294", "0.685925", "0.685925", "0.6815761", "0.68082315", "0.68032897", "0.6797543", "0.6785506", "0.67839754", "0.6782667", "0.6761076", "0.67566067", "0.6749739", "0.67459136", "0.6739654", "0.6727349", "0.6691308", "0.6688546", "0.664678", "0.66344255", "0.6611801", "0.65848225", "0.65833944", "0.6547056", "0.6515702", "0.65060973", "0.64756966", "0.64726037", "0.64693743", "0.6465096", "0.6459513", "0.64511776", "0.6441397", "0.64356416", "0.6430772", "0.64290714", "0.6417203", "0.6417203", "0.64155084", "0.64141023", "0.6403646", "0.6403105", "0.6399829", "0.6395236", "0.63728684", "0.63728565", "0.63719", "0.63620186", "0.6361329", "0.6351273", "0.6349369", "0.63465226", "0.63294816", "0.63067603", "0.6298834", "0.6298696", "0.62958777", "0.62882084", "0.6280032", "0.62789613", "0.62789613", "0.6270615", "0.62694365", "0.6267021", "0.62585366", "0.62486213", "0.6241528", "0.6241528", "0.6241528", "0.62406224", "0.6238344", "0.623452", "0.62341946", "0.6233904", "0.6231506", "0.62285584", "0.62236345", "0.622193", "0.622193", "0.622193", "0.62185675", "0.6217006", "0.62111175", "0.6209271", "0.6209271", "0.6208894", "0.6194833", "0.61934763", "0.61790717" ]
0.0
-1
Iterator interface Check if the current position is valid
public function valid() { return ($this->position < $this->getDomList()->length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function valid()\n {\n return $this->iteratorIndex < $this->iteratorCount;\n }", "function valid() \n {\n return $this->offsetExists($this->position);\n }", "function valid()\n\t{\n\t\treturn $this->iterator->valid();\n\t}", "function valid() {\n return ($this->pos < $this->end);\n }", "public function valid() {\n return isset($this->iteratorKeys[$this->iteratorPosition]);\n }", "public function valid() {\n return $this->pointer < count($this->items);\n }", "public function valid()\n {\n return $this->_index < $this->count();\n }", "public function valid(): bool\n {\n return $this->_index < $this->_count;\n }", "public function valid()\n {\n return array_key_exists($this->key(), $this->iterator_data);\n }", "public function valid()\n {\n $this->fileIterator->seek($this->position);\n return $this->fileIterator->valid();\n }", "public function valid() : bool \n {\n return isset($this->list[$this->pointer]) ? \n ($this->list[$this->pointer]->valid() || $this->hasNext()) : false;\n }", "public function valid() {\r\n \tif ($this->__pageItems > 0) {\r\n \t\tif ($this->key() + 1 > $this->pageEnd()) {\r\n \t\t\treturn FALSE;\r\n \t\t} else {\r\n \t\t\treturn $this->current() !== FALSE;\r\n \t\t}\r\n \t} else {\r\n \t\treturn $this->current() !== FALSE;\r\n \t}\r\n }", "public function valid()\n {\n if (($this->isvalid) and (!librdf_iterator_end($this->iterator))) {\n return true;\n } else {\n return false;\n }\n }", "public function valid(): bool\n {\n return $this->current() !== false;\n }", "public function valid() {\n return !is_null($this->currentIndex);\n }", "public function valid()\n\t\t{\n\t\t\treturn $this->current() !== false;\n\t\t}", "public function valid(): bool\n {\n if (contains_key($this->entries, $this->position)) {\n return true;\n }\n\n if (null === $this->generator) {\n return false;\n }\n\n if ($this->generator->valid()) {\n return true;\n }\n\n $this->generator = null;\n return false;\n }", "public function valid() \n {\n return ($this->current() !== false);\n }", "public function valid() {\n if ($valid=isset($this->__rows__[$this->__rowsi__])) {\n $this->__iterate__ = true;\n } else {\n unset($this->__iterate__);\n }\n return $valid;\n }", "public function valid()\n {\n return ($this->current() != false);\n }", "public function valid()\n {\n return isset($this->collection->getItems()[$this->position]);\n }", "public function valid(): bool\n {\n return isset($this->collection[$this->position]);\n }", "public function valid()\n {\n return !is_null($this->current());\n }", "public function valid() {\n\t\treturn ($this->current() !== false);\n\t}", "public function valid() {\n // TODO: Check numProcessed against itemlimit\n return !is_null($this->currentRow);\n }", "public function valid()\n {\n return ($this->current() !== false);\n }", "public function valid()\n {\n return $this->iterator->valid();\n }", "public function valid()\n {\n return (! is_null($this->current()));\n }", "public function valid(): bool\n {\n return ($this->current() !== false);\n }", "public function valid()\n {\n return $this->index <= $this->length;\n }", "function valid() {\r\n return isset($this->_data[$this->_position]);\r\n }", "public function valid(): bool\n {\n if ($this->next) {\n return $this->current->toInteger() <= $this->end->toInteger();\n }\n\n return $this->current->toInteger() >= $this->end->toInteger();\n }", "public function valid()\n {\n if (isset($this->elements[$this->position]))\n {\n return true;\n }\n\n return false;\n }", "public function valid()\n {\n return (bool) $this->current();\n }", "public function valid()\n {\n // current() should return false. Needs to be tested.\n return (bool) $this->current();\n }", "public function valid() {\n\t\t// Init the recordset if needed.\n\t\t$this->initRecordSet();\n\t\t// Is current position valid?\n\t\treturn ((!$this->recordSet->EOF) and $this->currentIndex < $this->recordSet->RecordCount() );\n\t}", "public function valid() {\n\t\treturn isset($this->data[$this->position]);\n\t}", "public function valid()\n {\n return (bool) $this->current();\n }", "final public function valid(): bool\n {\n $this->sort();\n\n return false !== current($this->index) && null !== current($this->index);\n }", "public function valid()\n {\n return $this->_key + 1 <= $this->_limit;\n }", "function valid()\n {\n return $this->_position == 0 || $this->_curPage->getSize() > 0;\n }", "public function valid() : bool\n {\n return !($this->key() >= count($this->currentRecordSet) && count($this->currentRecordSet) != $this->pageSize);\n }", "public function valid() {\n\t\t$this->checkResultSet();\n\n\t\tif ($this->index >= 0 && $this->index < $this->indexMax) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function valid()\n {\n return isset($this->list[$this->position]);\n }", "public function valid()\n {\n return isset($this->data[$this->position]);\n }", "public function valid()\n {\n return isset($this->data[$this->position]);\n }", "public function valid()\n {\n return $this->_position <= $this->_subject->getHighestRow();\n }", "public function valid() { return isset($this->keys[$this->pos]);\n }", "public function valid()\n\t{\n\t\treturn $this->key() < $this->_totalItemCount;\n\t}", "public function valid(){\n return $this->index < count($this->ids);\n }", "public function valid()\n {\n return false !== current($this->data);\n }", "public function valid()\n {\n return $this->offsetExists($this->key());\n }", "public function valid()\n {\n return ($this->current() !== null) ? true : false;\n }", "public function valid(): bool\n {\n if ($this->_data instanceof \\Iterator) {\n return $this->_data->valid();\n } elseif (is_array($this->_data)) {\n return key($this->_data) !== null;\n }\n\n return false;\n }", "public function valid()\n {\n return $this->key() < $this->getTotalItemCount();\n }", "public function valid ()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\treturn $this->rs->valid();\n\t\t}\n\t\treturn false;\n\t}", "public function valid() {\n\t\treturn (\n\t\t\t(isset($this->firstItems[$this->firstItemIdx])) ||\n\t\t\t(($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) ||\n\t\t\t$this->items->valid()\n\t\t);\n\t}", "public function valid ()\n {\n return isset($this->offset) && isset($this->cache[ $this->offset ]);\n }", "public function valid()\n {\n if(is_null($this->paginationVar))\n return true;\n return $this->curIndex < count($this->res);\n }", "function valid() {\n if (isset($this->keys[$this->position])) {\n return $this->__isset($this->keys[$this->position]);\n }\n return false;\n }", "function next(){ \r\n\t $this->valid = (FALSE !== next($this->array)); \r\n\t }", "public function valid()\n {\n return !empty($this->_currentRow);\n }", "public function valid()\n {\n return isset($this->records[$this->position]);\n }", "public function valid()\r\n\t{\r\n\t\treturn isset($this->elements[$this->i]);\r\n\t}", "public function valid(): bool\n {\n return (current($this->items) !== false);\n }", "public function valid()\n {\n if (!$this->isBuffered())\n $return = $this->getCurrentData();\n else\n $return = $this->position < $this->resultOrigin->num_rows;\n\n return $return;\n }", "public function valid() {\n\t\t\treturn (isset($this->data[$this->index]));\n\t\t}", "public function valid()\n {\n if (is_null($this->current)) {\n return false;\n }\n\n return true;\n }", "public function valid()\n\t{\n\t\treturn !($this->current === null || $this->current === false);\n\t}", "public function valid(): bool {\n return null !== key($this->items);\n }", "public function valid(): bool\n {\n return null !== $this->_nextScrollId;\n }", "public function testIteratorEmpty()\r\n\t{\r\n\t\t$this->assertFalse( $this->list->valid() );\r\n\t\t$this->assertFalse( $this->list->current() );\r\n\t\t$this->assertNull( $this->list->key() );\r\n\t\t$this->assertNull( $this->list->prev() );\r\n\t\t$this->assertNull( $this->list->next() );\r\n\t\t$this->assertNull( $this->list->rewind() );\r\n\t}", "public function hasNext()\n {\n return $this->cursor()->hasNext();\n }", "public function valid()\n\t{\n\t\treturn array_key_exists($this->_idx, $this->_keys);\n\t}", "public function valid() {\n return isset($this->keys[$this->index]);\n }", "function hasNext() {\r\n if ($this->index == OFF_LIST) {\r\n return count($this->list) != 0;\r\n } else {\r\n return $this->index != count($this->list) - 1;\r\n }\r\n }", "public function isValid()\n {\n return $this->pos < strlen($this->buffer);\n }", "public function valid() {\n return isset ( $this->_iterableFiles [$this->_position] );\n }", "public function valid()\n {\n return ($this->currentElement !== NULL);\n }", "public function valid() {\n\t\treturn (current($this->_data) !== false);\n\t}", "public function valid(): bool\n {\n if (!$this->isUsed) {\n $this->call\n ->addIterableEvent($this->callEventFactory->createUsed());\n $this->isUsed = true;\n }\n\n $key = key($this->array);\n $isValid = null !== $key;\n\n if ($this->isConsumed) {\n return $isValid;\n }\n\n if ($isValid) {\n $this->call->addIterableEvent(\n $this->callEventFactory\n ->createProduced($key, current($this->array))\n );\n } else {\n $this->call->setEndEvent($this->callEventFactory->createConsumed());\n $this->isConsumed = true;\n }\n\n return $isValid;\n }", "public function valid()\n {\n return array_key_exists($this->index, $this->keys);\n }", "public function valid()\n {\n return $this->_position < ExcelCell::columnIndexFromString($this->_subject->getHighestColumn());\n }", "public function valid()\n {\n return $this->currentLine !== false;\n }", "public function valid(): bool\n {\n return !feof($this->fp) || $this->index !== null; // Is het einde van het bestand NIET bereikt?\n }", "public function hasNext()\r\n\t{\r\n\t\tif($this->position() == $this->inputLength() and feof($this->getPointer())) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function valid()\n {\n $map = $this->__getSerialisablePropertyMap();\n $mapKeys = array_keys($map);\n return isset($mapKeys[$this->iteratorPosition]);\n }", "public function valid()\n {\n return $this->key === 0;\n }", "public function valid() {\n\t\tif( ! isset( $this->_recordset[ $this->_currentRow ] ) ) {\n\t\t\t$this->_currentRow--;\n\t\t\treturn( false );\n\t\t}\n\t\treturn( true );\n\t}", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "function rewind(){ \r\n\t $this->valid = (FALSE !== reset($this->array)); \r\n\t }", "public function hasNext(): bool;", "public function hasNext(): bool;", "public function valid()\n {\n if ($this->list === null)\n $this->rewind(); // loads from the table\n if ($this->list === null)\n return false;\n $key = key($this->list);\n $valid = ($key !== NULL && $key !== FALSE);\n return $valid;\n }", "public function valid(): bool\n {\n return isset($this->parameters[$this->position]);\n }", "public function valid(): bool\n {\n $this->_current = $this->fetch();\n $valid = $this->_current !== false;\n\n if (!$valid && $this->statement !== null) {\n $this->statement->closeCursor();\n }\n\n return $valid;\n }", "public function valid(): bool\n {\n return isset($this->intervals[$this->position]);\n }", "public function valid()\n {\n return isset($this->keys[$this->pointer]);\n }", "private function storeNext ()\n {\n if ( !isset($this->iterator) ) {\n return FALSE;\n }\n\n else if ( $this->iterator->valid() ) {\n $this->cache[ $this->internalOffset ] = array(\n $this->iterator->key(),\n $this->iterator->current()\n );\n return TRUE;\n }\n\n // Once the internal iterator is invalid, we no longer need it\n else {\n unset( $this->iterator );\n return FALSE;\n }\n }" ]
[ "0.80615187", "0.7653177", "0.7596732", "0.746921", "0.74253756", "0.7402071", "0.73911244", "0.7390287", "0.73853076", "0.73671395", "0.73500544", "0.73321885", "0.7323872", "0.7323307", "0.7304442", "0.72895783", "0.72806317", "0.7246018", "0.7227232", "0.7221271", "0.7211737", "0.72085726", "0.7184711", "0.7163791", "0.71551716", "0.7139513", "0.7128839", "0.708616", "0.7082466", "0.7069232", "0.7048857", "0.70461404", "0.7039527", "0.7022911", "0.7016648", "0.6991159", "0.6981307", "0.69749385", "0.69748336", "0.6941108", "0.6916099", "0.6908427", "0.689621", "0.6891947", "0.6865955", "0.6865955", "0.6844472", "0.68432933", "0.68120277", "0.6795367", "0.67554325", "0.6748877", "0.6748199", "0.6732095", "0.672226", "0.6711069", "0.67028403", "0.67006814", "0.66890436", "0.66815996", "0.6674968", "0.66426", "0.6638904", "0.6636737", "0.6635145", "0.66278875", "0.6617536", "0.6592183", "0.6562433", "0.65471864", "0.6544631", "0.6514773", "0.64964056", "0.6472551", "0.6469802", "0.6469517", "0.6457055", "0.64549017", "0.64182377", "0.6413973", "0.64103776", "0.638748", "0.6378095", "0.63682806", "0.6349522", "0.6339031", "0.6327741", "0.63188756", "0.6311043", "0.6296324", "0.6296324", "0.6279571", "0.6277988", "0.6277988", "0.6247981", "0.62418526", "0.6232769", "0.62241507", "0.6208516", "0.6190681" ]
0.682307
48
Return an instance of XmlFactory
protected function getFactory() { if (! isset($this->factory)) { $this->factory = new \MphpMusicBrainz\Adapter\Xml\XmlFactory(); } return $this->factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFactory()\n {\n return new Factory();\n }", "public function getFactory() {}", "public function getFactory(): Factory;", "public static function factory()\n {\n return new self;\n }", "public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }", "protected static function newFactory()\n {\n return ExampleFactory::new();\n }", "public static function factory() {\n\t\tstatic $instance;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function factory() {\n\t\tstatic $instance = false;\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\t\treturn $instance;\n\t}", "public function getFactory()\n {\n return $this->_factory;\n }", "public static function factory() {\n\t\tstatic $instance = false;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function getFactory()\r\n\t{\r\n\t\treturn self::$factory;\r\n\t}", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public static function newFactory()\n {\n return ReceiptFactory::new();\n }", "public function getQomFactory() {}", "protected static function newFactory()\n {\n //\n }", "static function factory()\n {\n if (self::$_instance == NULL) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function newFactory()\n {\n return TaxCollectionFactory::new();\n }", "public function createXML() {}", "public function getNodeFactory();", "final public function getFactory() {\n\t\treturn '';\n\t}", "public function loadFactory()\n {\n $this->di = new Di\\FactoryDefault;\n\n return $this;\n }", "protected static function newFactory(): Factory\n {\n return OrderPaymentFactory::new();\n }", "protected static function newFactory()\n {\n return TypeFactory::new();\n }", "protected static function newFactory()\n {\n return new LocationFactory();\n }", "public static function newFactory()\n {\n return OrderFactory::new();\n }", "protected static function newFactory(): Factory\n {\n return ProductInventoryFactory::new();\n }", "public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}", "function getLayoutFactory()\n {\n $factory = new \\Layout\\Core\\Factory(\n app('layout.event'),\n app('layout.config'),\n app('layout.profile')\n );\n\n $factory->setLayout(\n new \\Layout\\Core\\Layout(\n app('layout.event'),\n new \\Layout\\Core\\Update(app('layout.cache'), app('layout.config'), app('layout.profile')),\n app('layout.config'),\n app('layout.profile')\n )\n );\n\n return $factory;\n }", "public function getResponseFactory()\n {\n return $this->responseFactory;\n }", "public static function newFactory()\n {\n return ReturnOrderLineFactory::new();\n }", "public static function create() {\n $factory = new static();\n return $factory->createFlo();\n }", "protected static function newFactory(): Factory\n {\n return ProductDownloadableLinkTranslationFactory::new();\n }", "protected static function newFactory(): Factory\n {\n return HotelFactory::new();\n }", "protected function getResourceFactory()\n {\n return ResourceFactory::getInstance();\n }", "public static function create() {\n\t\treturn new self();\n\t}", "public function getFactory()\n\t{\n\t\treturn empty($this->factory) ? 'new '.$this->getClass() : $this->factory;\n\t}", "protected function xmlServicesMapFactory()\n {\n $map = new Map();\n $map->add(\n Path::factory('/fwk/services', 'services', array())\n ->loop(true, '@xml')\n ->attribute('xmlMap')\n );\n \n return $map;\n }", "public static function newFactory()\n {\n return InventorySupplyFactory::new();\n }", "private static function engine(): Factory\n {\n if (!(self::$engine instanceof Factory)) {\n $loader = new FileLoader(new Filesystem(), self::$translationFolderPath);\n $translator = new Translator($loader, self::$lang);\n self::$engine = new Factory($translator, new Container());\n }\n\n return self::$engine;\n }", "protected function getNewXMLReader()\n {\n $path = $this->getFilePath();\n\n $xml = new \\XMLReader();\n if (!@$xml->open($path)) {\n throw new \\DomainException(\"Could not open file {$path} with XMLReader\");\n }\n\n return $xml;\n }", "public static function newFactory()\n {\n return PriceFactory::new();\n }", "protected static function newFactory()\n {\n return MessageFactory::new();\n }", "protected static function newFactory(): Factory\n {\n return BookingProductEventTicketFactory::new();\n }", "public static function newFactory()\n {\n return AdFactory::new();\n }", "public static function getInstance() {\n\t\tif (is_null(self::$_instance)){\n\t\t\tself::$_instance = new HTMLtoOpenXML();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function factory($config = array())\n\t{\n\t\t$config = Kohana::config('furi');\n\n\t\t// Check for 'auto' driver and adjust configuration\n\t\tif ( strtolower($config->driver == 'auto') )\n\t\t{\n\t\t\tif ( function_exists('curl_init') )\n\t\t\t{\n\t\t\t\t$config->driver = 'cURL';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$config->driver = 'Stream';\n\t\t\t}\n\t\t}\n\t\t$driver = 'Furi_Driver_' . $config->driver;\n\n\t\t$fury = new $driver($config->as_array());\n\t\t\n\t\treturn $fury;\n\t}", "protected static function newFactory()\n {\n return PostFactory::new();\n }", "public function getParserFactory() {}", "protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }", "static public function factory($config) {}", "protected static function newFactory(): CustomerFactory\n {\n return CustomerFactory::new();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public function getFactoryNamespace();", "public function getSolrDocumentFactory() {\n return $this->solrDocumentFactory ?: \\Drupal::getContainer()->get($this->solr_document . '.factory');\n }", "public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}", "static public function factory($config)\n {\n return new self();\n }", "public static function create() {\n return new self();\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "static public function getInstance() {\n\t\treturn GeneralUtility::makeInstance('Fab\\Media\\ObjectFactory');\n\t}", "public function newInstance()\n {\n return new self();\n }", "public static function create()\n\t{\n\t\treturn new self;\n\t}", "static public function create()\n\t{\n\t\treturn new static;\n\t}", "static public function create()\n {\n return new static();\n }", "public static function create()\n {\n return new static;\n }", "public static function create()\n {\n return new static;\n }", "public static function create()\n {\n return new static;\n }", "public static function create()\n {\n return new static;\n }", "public static function create(){\r\n\t\tif(self::$instance === null){\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\t\treturn self::$instance;\r\n\t}", "public function getObjectFactory(): ObjectFactoryInterface;", "protected static function newFactory()\n {\n return LoanFactory::new();\n }", "function factoryDefault();", "public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }", "public static function newFactory()\n {\n return PhoneFactory::new();\n }" ]
[ "0.68133634", "0.6687715", "0.6544517", "0.65268314", "0.65139043", "0.650521", "0.64808017", "0.6466598", "0.64327395", "0.6400517", "0.63851243", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6298765", "0.6278735", "0.6230155", "0.62003076", "0.6189119", "0.61633795", "0.6151434", "0.6113034", "0.60988456", "0.60823864", "0.60812855", "0.60688645", "0.60625565", "0.6039424", "0.6033046", "0.5999337", "0.5998898", "0.59873825", "0.5964895", "0.59369886", "0.5914115", "0.58939505", "0.5864578", "0.58644354", "0.58566487", "0.58520573", "0.5850456", "0.58390874", "0.583724", "0.5831248", "0.5829494", "0.58144975", "0.58114797", "0.5806664", "0.5786807", "0.5776844", "0.5773796", "0.5749242", "0.5740503", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57234305", "0.5722882", "0.5716551", "0.5711441", "0.5709348", "0.57056314", "0.5684835", "0.5679726", "0.56781113", "0.56636065", "0.56543136", "0.5652612", "0.5652612", "0.5652612", "0.5652612", "0.5642839", "0.56382", "0.5634809", "0.56332636", "0.5616692", "0.5616081" ]
0.84304833
0
get my gift count
public function getMyGiftCount($uid) { require_once 'Mdal/Kitchen/Gift.php'; $mdalGift = Mdal_Kitchen_Gift::getDefaultInstance(); $giftCount = $mdalGift->getMyGiftCount($uid); return $giftCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVipGiftsDrawCount()\n {\n return $this->count(self::_VIP_GIFTS_DRAW);\n }", "public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count']) / 16;\r\n\t\t\treturn ceil($count);\r\n\t\t}\r\n\t}", "public function getStarGoodsCount()\n {\n return $this->count(self::_STAR_GOODS);\n }", "public abstract function get_counts();", "public function _count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function totalCount();", "public function totalCount();", "public static function count();", "function wished_num()\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_type_name_by_id('user', $user, 'wishlist') !== '') {\n return count(json_decode($this->get_type_name_by_id('user', $user, 'wishlist')));\n } else {\n return 0;\n }\n }", "public function getCount() {}", "public function getCount() {}", "public function getCount() {}", "public function goldTrophyCount(): int\n {\n return $this->pluck('definedTrophies.gold');\n }", "function getCountOfTransferedNativePig($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud -> sql(\"SELECT *, COUNT(farmer_id_fk) FROM pigs_tbl WHERE farmer_id_fk='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['COUNT(farmer_id_fk)'];\n\t}\n\t$crud->disconnect();\n}", "function getTotalGrantsApplied() {\n\t\treturn $this->getMovieCount();\n\t}", "public function getAttackCount()\n {\n return $this->count(self::ATTACK);\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getSeatCount()\r\n {\r\n return $this->getPassengerCount();\r\n }", "function wished_num()\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_field('user', $user, 'wishlist') !== '') {\n return count(json_decode($this->get_field('user', $user, 'wishlist')));\n } else {\n return 0;\n }\n }", "public function getCount()\n {\n return $this->data['count'];\n }", "function count() ;", "public function sentCount();", "public function count_votes(){\n \t$query = \"SELECT igetit, idontgetit FROM classes WHERE classname = $1;\";\n \t$query_result = pg_prepare($this->con, \"myquery12\", $query);\n \t$query_result = pg_execute($this->con, \"myquery12\", array($this->prof_currentclass));\n \t$row = pg_fetch_row($query_result);\n \tif (!$row) {\n \t\t\techo \"An error hasssss occurred.\\n\";\n \t\t\texit;\n\t\t}\n global $iGetit ;\n $iGetit = \"$row[0]\";\n global $idontGetit ;\n $idontGetit = \"$row[1]\";\n global $Currentclass ;\n $Currentclass = $this->prof_currentclass;\n\n \n }", "function get_games_count($connexion) {\n $req_find_games_count = \"SELECT COUNT(idG) AS count FROM game\";\n echo \"<p class='statistics-header'><strong>\". mysqli_fetch_assoc(mysqli_query($connexion, $req_find_games_count))[\"count\"] .\"</strong> games played&nbsp;</p>\";\n}", "function panier_get_count() {\n global $panier;\n $resultat = 0;\n foreach ($panier as $item) {\n $resultat+= $item[PS_PANIER_ITEM_QTY];\n }\n return $resultat;\n}", "public function getCount() {\n \treturn $this->count();\n }", "function getCount() {\n $this->putCount();\n //opens countlog.data to read the number of hits\n $datei = fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR .\"countlog.data\", \"r\");\n $count = fgets($datei, 1000);\n fclose($datei);\n return $count;\n }", "function count()\n\t{\n\t\treturn count($this->getGoods());\n//\t\treturn count($this->getSESSION()[$this->sessionsGoodsKey]);\n\t}", "public function getUsageCount()\n {\n $today = Carbon::now('Asia/Singapore')->toDateTimeString();\n $timezone = new Carbon('Asia/Singapore');\n $last_thirty_days = $timezone->subDays(30);\n\n return count($this->appUserBlurb->where('interaction_type', 'use')->whereBetween('created_at', array($last_thirty_days->toDateTimeString(), $today))->groupBy('app_user_id')->get());\n }", "public function getCount() {\r\n return $this->count;\r\n }", "public function getCountPlayers(): int;", "public function getCount() {\n return $this->getFlagCount();\n }", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function getUnapprovedCount();", "public function getCountNewReviews(): int\n {\n return ShopFeedbackEntity::find()\n ->leftJoin('user', 'user.id = shop_feedback.created_by')\n ->where([\n 'shop_feedback.shop_id' => Yii::$app->user->identity->getId(),\n 'shop_feedback.status' => ShopFeedbackEntity::STATUS_UNREAD,\n 'user.status' => UserEntity::STATUS_VERIFIED,\n 'user.is_deleted' => 0\n ])\n ->count();\n }", "public function getCurrentGoodsCount()\n {\n return $this->count(self::_CURRENT_GOODS);\n }", "function count(){}", "public function getCount();", "public function getCount();", "public function getCount();", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "function count();", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function getCount()\n {\n return count($this->kids);\n }", "public function getCounter();", "public function getCount()\r\n {\r\n return $this->count;\r\n }", "function numberOfFriendships() {\n $numOfFriends = 0;\n\n $db = new Database();\n\n $sql = 'SELECT COUNT(*) as count FROM Friends';\n\n $result = $db->select($sql);\n\n $numOfFriends = $result['count'] / 2;\n\n return $numOfFriends;\n }", "function get_total_gifts(){\n $gifts = json_decode(file_get_contents(\"https://wsapi.bethel.edu/roar/total-gifts\"));\n //print_r($gifts);\n $total = $gifts->{'result'}[0][0];\n $total = number_format($total); // implode array with comma\n return \"$$total\";\n}", "public function count() { return $this->_m_count; }", "function get_all_commission_groupe_count()\n {\n $this->db->from('commission_groupe');\n return $this->db->count_all_results();\n }", "public function getCount()\n {\n return $this->count++;\n }", "function getMovieCount(){\n return $this->query(\"SELECT COUNT(id) as number FROM docs WHERE visible=1\");\n }", "public function getCount()\n {\n return $this->_count;\n }", "public function getCount()\n {\n return $this->_count;\n }", "function total_favorites()\r\n\t{\r\n\t\tglobal $db;\r\n\t\treturn $db->count(tbl($this->fav_tbl),\"favorite_id\",\" type='\".$this->type.\"'\");\r\n\t}" ]
[ "0.69484437", "0.66004586", "0.6551436", "0.6441765", "0.64232093", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63873947", "0.63873947", "0.63788277", "0.6355792", "0.6352485", "0.6352485", "0.63511145", "0.63392824", "0.6331495", "0.6330483", "0.6330326", "0.631236", "0.62954164", "0.62942463", "0.6291637", "0.6280486", "0.62726235", "0.62661177", "0.62573457", "0.6254979", "0.62541324", "0.6253651", "0.6249983", "0.6249942", "0.623122", "0.6220806", "0.6216869", "0.62145203", "0.62145203", "0.62145203", "0.6203112", "0.62023634", "0.6197906", "0.61928654", "0.61924475", "0.61924475", "0.61924475", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.61809367", "0.6177579", "0.6177579", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6174789", "0.61721176", "0.617024", "0.6160239", "0.6159854", "0.6149125", "0.61480397", "0.6146772", "0.6142977", "0.61425245", "0.61425245", "0.613773" ]
0.6474207
3
get my gift count
public function getSendGift($id) { require_once 'Mdal/Kitchen/Gift.php'; $mdalGift = Mdal_Kitchen_Gift::getDefaultInstance(); $gift = $mdalGift->getSendGiftById($id); return $gift; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVipGiftsDrawCount()\n {\n return $this->count(self::_VIP_GIFTS_DRAW);\n }", "public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count']) / 16;\r\n\t\t\treturn ceil($count);\r\n\t\t}\r\n\t}", "public function getStarGoodsCount()\n {\n return $this->count(self::_STAR_GOODS);\n }", "public function getMyGiftCount($uid)\n {\n require_once 'Mdal/Kitchen/Gift.php';\n $mdalGift = Mdal_Kitchen_Gift::getDefaultInstance();\n\n $giftCount = $mdalGift->getMyGiftCount($uid);\n\n return $giftCount;\n }", "public abstract function get_counts();", "public function _count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function totalCount();", "public function totalCount();", "public static function count();", "function wished_num()\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_type_name_by_id('user', $user, 'wishlist') !== '') {\n return count(json_decode($this->get_type_name_by_id('user', $user, 'wishlist')));\n } else {\n return 0;\n }\n }", "public function getCount() {}", "public function getCount() {}", "public function getCount() {}", "public function goldTrophyCount(): int\n {\n return $this->pluck('definedTrophies.gold');\n }", "function getCountOfTransferedNativePig($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud -> sql(\"SELECT *, COUNT(farmer_id_fk) FROM pigs_tbl WHERE farmer_id_fk='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['COUNT(farmer_id_fk)'];\n\t}\n\t$crud->disconnect();\n}", "function getTotalGrantsApplied() {\n\t\treturn $this->getMovieCount();\n\t}", "public function getAttackCount()\n {\n return $this->count(self::ATTACK);\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getSeatCount()\r\n {\r\n return $this->getPassengerCount();\r\n }", "function wished_num()\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_field('user', $user, 'wishlist') !== '') {\n return count(json_decode($this->get_field('user', $user, 'wishlist')));\n } else {\n return 0;\n }\n }", "public function getCount()\n {\n return $this->data['count'];\n }", "function count() ;", "public function sentCount();", "public function count_votes(){\n \t$query = \"SELECT igetit, idontgetit FROM classes WHERE classname = $1;\";\n \t$query_result = pg_prepare($this->con, \"myquery12\", $query);\n \t$query_result = pg_execute($this->con, \"myquery12\", array($this->prof_currentclass));\n \t$row = pg_fetch_row($query_result);\n \tif (!$row) {\n \t\t\techo \"An error hasssss occurred.\\n\";\n \t\t\texit;\n\t\t}\n global $iGetit ;\n $iGetit = \"$row[0]\";\n global $idontGetit ;\n $idontGetit = \"$row[1]\";\n global $Currentclass ;\n $Currentclass = $this->prof_currentclass;\n\n \n }", "function get_games_count($connexion) {\n $req_find_games_count = \"SELECT COUNT(idG) AS count FROM game\";\n echo \"<p class='statistics-header'><strong>\". mysqli_fetch_assoc(mysqli_query($connexion, $req_find_games_count))[\"count\"] .\"</strong> games played&nbsp;</p>\";\n}", "function panier_get_count() {\n global $panier;\n $resultat = 0;\n foreach ($panier as $item) {\n $resultat+= $item[PS_PANIER_ITEM_QTY];\n }\n return $resultat;\n}", "public function getCount() {\n \treturn $this->count();\n }", "function getCount() {\n $this->putCount();\n //opens countlog.data to read the number of hits\n $datei = fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR .\"countlog.data\", \"r\");\n $count = fgets($datei, 1000);\n fclose($datei);\n return $count;\n }", "function count()\n\t{\n\t\treturn count($this->getGoods());\n//\t\treturn count($this->getSESSION()[$this->sessionsGoodsKey]);\n\t}", "public function getUsageCount()\n {\n $today = Carbon::now('Asia/Singapore')->toDateTimeString();\n $timezone = new Carbon('Asia/Singapore');\n $last_thirty_days = $timezone->subDays(30);\n\n return count($this->appUserBlurb->where('interaction_type', 'use')->whereBetween('created_at', array($last_thirty_days->toDateTimeString(), $today))->groupBy('app_user_id')->get());\n }", "public function getCount() {\r\n return $this->count;\r\n }", "public function getCountPlayers(): int;", "public function getCount() {\n return $this->getFlagCount();\n }", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function getUnapprovedCount();", "public function getCountNewReviews(): int\n {\n return ShopFeedbackEntity::find()\n ->leftJoin('user', 'user.id = shop_feedback.created_by')\n ->where([\n 'shop_feedback.shop_id' => Yii::$app->user->identity->getId(),\n 'shop_feedback.status' => ShopFeedbackEntity::STATUS_UNREAD,\n 'user.status' => UserEntity::STATUS_VERIFIED,\n 'user.is_deleted' => 0\n ])\n ->count();\n }", "public function getCurrentGoodsCount()\n {\n return $this->count(self::_CURRENT_GOODS);\n }", "function count(){}", "public function getCount();", "public function getCount();", "public function getCount();", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "function count();", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function getCount()\n {\n return count($this->kids);\n }", "public function getCounter();", "public function getCount()\r\n {\r\n return $this->count;\r\n }", "function numberOfFriendships() {\n $numOfFriends = 0;\n\n $db = new Database();\n\n $sql = 'SELECT COUNT(*) as count FROM Friends';\n\n $result = $db->select($sql);\n\n $numOfFriends = $result['count'] / 2;\n\n return $numOfFriends;\n }", "function get_total_gifts(){\n $gifts = json_decode(file_get_contents(\"https://wsapi.bethel.edu/roar/total-gifts\"));\n //print_r($gifts);\n $total = $gifts->{'result'}[0][0];\n $total = number_format($total); // implode array with comma\n return \"$$total\";\n}", "public function count() { return $this->_m_count; }", "function get_all_commission_groupe_count()\n {\n $this->db->from('commission_groupe');\n return $this->db->count_all_results();\n }", "public function getCount()\n {\n return $this->count++;\n }", "function getMovieCount(){\n return $this->query(\"SELECT COUNT(id) as number FROM docs WHERE visible=1\");\n }", "public function getCount()\n {\n return $this->_count;\n }", "public function getCount()\n {\n return $this->_count;\n }", "function total_favorites()\r\n\t{\r\n\t\tglobal $db;\r\n\t\treturn $db->count(tbl($this->fav_tbl),\"favorite_id\",\" type='\".$this->type.\"'\");\r\n\t}" ]
[ "0.69484437", "0.66004586", "0.6551436", "0.6474207", "0.6441765", "0.64232093", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63873947", "0.63873947", "0.63788277", "0.6355792", "0.6352485", "0.6352485", "0.63511145", "0.63392824", "0.6331495", "0.6330483", "0.6330326", "0.631236", "0.62954164", "0.62942463", "0.6291637", "0.6280486", "0.62726235", "0.62661177", "0.62573457", "0.6254979", "0.62541324", "0.6253651", "0.6249983", "0.6249942", "0.623122", "0.6220806", "0.6216869", "0.62145203", "0.62145203", "0.62145203", "0.6203112", "0.62023634", "0.6197906", "0.61928654", "0.61924475", "0.61924475", "0.61924475", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.6187593", "0.61809367", "0.6177579", "0.6177579", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6177235", "0.6174789", "0.61721176", "0.617024", "0.6160239", "0.6159854", "0.6149125", "0.61480397", "0.6146772", "0.6142977", "0.61425245", "0.61425245", "0.613773" ]
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("SourceRegistryId",$param) and $param["SourceRegistryId"] !== null) { $this->SourceRegistryId = $param["SourceRegistryId"]; } if (array_key_exists("DestinationRegistryId",$param) and $param["DestinationRegistryId"] !== null) { $this->DestinationRegistryId = $param["DestinationRegistryId"]; } if (array_key_exists("Rule",$param) and $param["Rule"] !== null) { $this->Rule = new ReplicationRule(); $this->Rule->deserialize($param["Rule"]); } if (array_key_exists("Description",$param) and $param["Description"] !== null) { $this->Description = $param["Description"]; } if (array_key_exists("DestinationRegionId",$param) and $param["DestinationRegionId"] !== null) { $this->DestinationRegionId = $param["DestinationRegionId"]; } if (array_key_exists("PeerReplicationOption",$param) and $param["PeerReplicationOption"] !== null) { $this->PeerReplicationOption = new PeerReplicationOption(); $this->PeerReplicationOption->deserialize($param["PeerReplicationOption"]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "private function __construct()\t{}", "private function init()\n\t{\n\t\treturn;\n\t}", "final private function __construct() {}", "final private function __construct() {}", "final private function __construct(){\r\r\n\t}", "final private function __construct() {\n\t\t\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function _i() {\n }", "protected function fixSelf() {}", "protected function fixSelf() {}", "protected final function __construct() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function init()\n\t{\n\t\t\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "protected function init() {return;}", "final private function __construct()\n\t{\n\t}", "private function __construct () {}", "final private function __construct()\n {\n }", "private final function __construct() {}", "public function __init(){}", "public function helper()\n\t{\n\t\n\t}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct()\n\t{\n\t\t\n\t}" ]
[ "0.62662613", "0.6151871", "0.5989886", "0.5989886", "0.5989886", "0.5989886", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5988404", "0.5988404", "0.5949015", "0.5939596", "0.59168774", "0.59168774", "0.58703923", "0.58665824", "0.5855589", "0.5855589", "0.5855589", "0.5799749", "0.5797107", "0.5797107", "0.57807934", "0.5749856", "0.5749856", "0.5749856", "0.5749856", "0.57458705", "0.5741364", "0.571247", "0.5701768", "0.5694139", "0.5680823", "0.5673589", "0.5668696", "0.5640213", "0.5639332", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5626381", "0.56240404", "0.56240404", "0.5610547" ]
0.0
-1
stop if there was nothing passed
public function saveCost($cost) { if($cost == NULL) { return; } // bootstrap to doctrine require(__DIR__ . '/../../amfdoctrine/bootstrapper.php'); // map the incoming relations to their corresponding database entities $cost->event = $entityManager->merge($cost->event); // branch between creating a new cost and updating an existing one if($cost->id == 0) { // start managing this new cost $entityManager->persist($cost); } else { // merge this cost so it is managed again and we can save $entityManager->merge($cost); } // carry out the awaiting operations $entityManager->flush(); // return the saved cost, if the client happens to want it $cost = $entityManager->merge($cost); return $cost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop()\n {\n // nop\n }", "abstract public function stop();", "public function stop(): bool {}", "public function halt();", "function stop();", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "#[Pure]\n public function gotStop(): bool {}", "function stop() { \n\n\t\tif ($this->XBMCCmd(\"Stop\")!=\"OK\") { return false; }\n return true;\n\n\t}", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop() {}", "function isStopped();", "public function _break()\n {\n //set the internal execution flag to false, stopping execution\n $this->executing = false;\n }", "public function isFinished();", "public function run()\n {\n /* this particular object won't run */\n }", "public function testMissingParameterPauseCheck() {\n $this->pingdom->pauseCheck(null);\n }", "public function stop()\n {\n die;\n }", "public function stop()\r\n {\r\n\r\n }", "public function haltJobLoop()\n\t{\n\t\t$this->halt_job_loop = true;\n\t}", "public function stepOutOfScope();", "abstract public function isLoop();", "public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }", "public function stop()\n {\n }", "function stop(){\n\t\tif($this->time_end==0){\n\t\t\t $this->time_end = $this->microtime_float();\n\t\t\t $this->time_spend = $this->time_end - $this->time_start;\n\t\t}\n\t}", "public function call() {\n\t\treturn false;\n\t}", "public function stop()\n {\n\n }", "public function process()\n {\n // do nothing here\n }", "public function finish($data = null) {}", "public function finish($data = null) {}", "public function onOutOfBand (): void;", "public function clearFinished();", "public function failed()\n {\n // Do nothing\n }", "public function stop() {\n\n\t\tif (is_null($this->_httpq->stop())) { return false; }\n\t\treturn true;\n\n\t}", "public function testMissingParametersUnpauseCheck() {\n $this->pingdom->unpauseCheck(null);\n }", "public function onStop();", "static function quit(){\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array(self,'out'),$args);\n\t\texit;\n\t}", "public function stop()\n {\n }", "public function stop()\n {\n throw new Stop();\n }", "public function endSkip(/* ... */)\n {\n if ($this->getTestResult() !== self::FAIL) {\n $this->setTestResult(self::PASS);\n }\n }", "protected function run()\n {\n /* Do Nothing */\n return 'There is no implementation yet:)';\n }", "public function halt()\n {\n $this->_halt = TRUE;\n }", "public function proceed();", "public function stop()\n {\n $this->mark('__stop');\n }", "public function nothing(): void;", "public function isStopped();", "protected function Run_Failure() {\n\t\tif (!empty($this->failure)) \n\t\t{\n\t\t\tcall_user_func_array($this->failure['function'], $this->failure['parameters']);\n\t\t}\n\t}", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "function end();", "public function loopBreak();", "public function end();", "public function end();", "public function end();", "public function end();", "public function stopQuery()\n {\n }", "public function testMissingParametersPauseChecks() {\n $this->pingdom->pauseChecks(null);\n }", "function needsExecution() ;", "public function isMenuItemValidBlankCallExpectFalse() {}", "public function isMenuValidBlankCallExpectFalse() {}", "protected static function _ignoreFrameworkResult() {\n Framework::getInstance()->stop(0);\n }", "public function end() {}", "public function end() {}", "public function end() {}", "public static function stop()\n {\n }", "public function stop() { \n\n\t\tif (is_null($this->_mpd->Stop())) { return false; } \n\t\treturn true;\n\n\t}", "public function testMissingParametersUnpauseChecks() {\n $this->pingdom->unpauseChecks(null);\n }", "public function runFailed();", "abstract protected function doEnd();", "function isExecuted() ;", "public function benchThisWillBeSkipped()\n {\n }", "function nothing($kw='') {\n\tdie(\"{query:'\".$kw.\"', suggestions:'', data:''}\");\n}", "public function failNoisily() :bool{\n\t\treturn !$this->failSilently;\n\t}", "public function cancel();", "public function proceed()\n {\n }", "public function work(): void;", "private function parse_args() {\n\t\t//exit;\t\t\n\t}", "public function stop()\n {\n // TODO: Implement stop() method.\n }", "function check_if_python_end($details_obj){\n\t\tif (file_exists($details_obj->project->outputPython.'\\\\markers\\\\learner_phase_file')){\n\t\t\t$details_obj->project = update_project_list($details_obj->project,\"end_offline\",true);\n\t\t\tupdate_project_details($details_obj->project);\n\t\t\tmove_to_online_task($details_obj);\n\t\t}else {\n\t\t\t$err_f = $details_obj->project->outputPython.'\\\\markers\\\\error_file';\n\t\t\tif (file_exists($err_f)){\n\t\t\t\t$details_obj->project->problem = true;\n\t\t\t\tupdate_project_details($details_obj->project);\n\t\t\t}else {\n\t\t\t\t//nothing\n\t\t\t}\n\t\t}\n\t}", "function stop()\n\t{\n\t\tif( $this->is_running ){\n\t\t\t$this->counter += (int) (self::timeMillisecondsAsFloat() - $this->running_since + 0.5);\n\t\t\t$this->is_running = FALSE;\n\t\t}\n\t}", "public function end()\n {\n }", "function LT_call_silent() {\n\t$proc = func_get_arg(0);\n\t$args = array_slice(func_get_args(), 1);\n\t$die = FALSE;\n\treturn LT_call($proc, $args, $die);\n}", "public function stop()\n {\n // Put your code here;\n }", "public function JStop() {}", "public function failed();", "public function thereShouldBeNoOutput()\n {\n if ($this->output != \"\") {\n throw new \\Exception('Output has been detected: '.$this->output);\n }\n }", "public function _handleTerm()\n\t{\n\t\t$this->_should_stop = true;\n\t}", "public function process() {\n\t\treturn false;\n\t}", "public function stop(): void\n {\n $this->end = microtime(true);\n }", "public abstract function getNoOutput();", "public function ended();", "public function needsExecution() {}" ]
[ "0.6393736", "0.6221301", "0.6219287", "0.6200875", "0.6189588", "0.5996705", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.59593725", "0.59484863", "0.58364403", "0.58364403", "0.58364403", "0.58364403", "0.58364403", "0.5788767", "0.57877284", "0.5754226", "0.57506996", "0.5748476", "0.5729037", "0.5710953", "0.57049316", "0.56901896", "0.56763995", "0.56646204", "0.5658016", "0.56340635", "0.55850816", "0.5568949", "0.55569035", "0.5541512", "0.55397886", "0.55397886", "0.5539442", "0.553514", "0.55344564", "0.55138725", "0.5510907", "0.55100185", "0.5491186", "0.5468687", "0.54683864", "0.5467044", "0.5455419", "0.54541534", "0.5452699", "0.54494274", "0.5444837", "0.5442716", "0.54395676", "0.54365665", "0.54251164", "0.5421102", "0.5415649", "0.5415649", "0.5415649", "0.5415649", "0.540177", "0.5391504", "0.53782916", "0.53682226", "0.53646135", "0.5350872", "0.53463155", "0.53463155", "0.53463155", "0.53441894", "0.5341671", "0.5329569", "0.5319653", "0.53033143", "0.5285694", "0.5266222", "0.52541083", "0.5251918", "0.52377015", "0.52277106", "0.52247566", "0.52173555", "0.52107894", "0.5197957", "0.5187847", "0.5184618", "0.5177977", "0.51773083", "0.51728904", "0.51627296", "0.5161606", "0.51590854", "0.51521075", "0.5150511", "0.5143595", "0.51415914", "0.5137417" ]
0.0
-1
stop if there was nothing passed
public function deleteCost($cost) { if($cost == null) { return; } // bootstrap to doctrine require(__DIR__ . '/../../amfdoctrine/bootstrapper.php'); // merge and then remove the entity $cost = $entityManager->merge($cost); $entityManager->remove($cost); $entityManager->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop()\n {\n // nop\n }", "abstract public function stop();", "public function stop(): bool {}", "public function halt();", "function stop();", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "#[Pure]\n public function gotStop(): bool {}", "function stop() { \n\n\t\tif ($this->XBMCCmd(\"Stop\")!=\"OK\") { return false; }\n return true;\n\n\t}", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop() {}", "function isStopped();", "public function _break()\n {\n //set the internal execution flag to false, stopping execution\n $this->executing = false;\n }", "public function isFinished();", "public function run()\n {\n /* this particular object won't run */\n }", "public function testMissingParameterPauseCheck() {\n $this->pingdom->pauseCheck(null);\n }", "public function stop()\n {\n die;\n }", "public function stop()\r\n {\r\n\r\n }", "public function haltJobLoop()\n\t{\n\t\t$this->halt_job_loop = true;\n\t}", "public function stepOutOfScope();", "abstract public function isLoop();", "public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }", "public function stop()\n {\n }", "function stop(){\n\t\tif($this->time_end==0){\n\t\t\t $this->time_end = $this->microtime_float();\n\t\t\t $this->time_spend = $this->time_end - $this->time_start;\n\t\t}\n\t}", "public function call() {\n\t\treturn false;\n\t}", "public function stop()\n {\n\n }", "public function process()\n {\n // do nothing here\n }", "public function finish($data = null) {}", "public function finish($data = null) {}", "public function onOutOfBand (): void;", "public function failed()\n {\n // Do nothing\n }", "public function clearFinished();", "public function stop() {\n\n\t\tif (is_null($this->_httpq->stop())) { return false; }\n\t\treturn true;\n\n\t}", "public function testMissingParametersUnpauseCheck() {\n $this->pingdom->unpauseCheck(null);\n }", "public function onStop();", "static function quit(){\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array(self,'out'),$args);\n\t\texit;\n\t}", "public function stop()\n {\n throw new Stop();\n }", "public function stop()\n {\n }", "public function endSkip(/* ... */)\n {\n if ($this->getTestResult() !== self::FAIL) {\n $this->setTestResult(self::PASS);\n }\n }", "protected function run()\n {\n /* Do Nothing */\n return 'There is no implementation yet:)';\n }", "public function halt()\n {\n $this->_halt = TRUE;\n }", "public function proceed();", "public function stop()\n {\n $this->mark('__stop');\n }", "public function nothing(): void;", "protected function Run_Failure() {\n\t\tif (!empty($this->failure)) \n\t\t{\n\t\t\tcall_user_func_array($this->failure['function'], $this->failure['parameters']);\n\t\t}\n\t}", "public function isStopped();", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "function end();", "public function loopBreak();", "public function end();", "public function end();", "public function end();", "public function end();", "public function stopQuery()\n {\n }", "public function testMissingParametersPauseChecks() {\n $this->pingdom->pauseChecks(null);\n }", "function needsExecution() ;", "public function isMenuItemValidBlankCallExpectFalse() {}", "public function isMenuValidBlankCallExpectFalse() {}", "protected static function _ignoreFrameworkResult() {\n Framework::getInstance()->stop(0);\n }", "public function end() {}", "public function end() {}", "public function end() {}", "public static function stop()\n {\n }", "public function stop() { \n\n\t\tif (is_null($this->_mpd->Stop())) { return false; } \n\t\treturn true;\n\n\t}", "public function testMissingParametersUnpauseChecks() {\n $this->pingdom->unpauseChecks(null);\n }", "public function runFailed();", "abstract protected function doEnd();", "function isExecuted() ;", "public function benchThisWillBeSkipped()\n {\n }", "function nothing($kw='') {\n\tdie(\"{query:'\".$kw.\"', suggestions:'', data:''}\");\n}", "public function failNoisily() :bool{\n\t\treturn !$this->failSilently;\n\t}", "public function cancel();", "public function proceed()\n {\n }", "public function work(): void;", "private function parse_args() {\n\t\t//exit;\t\t\n\t}", "public function stop()\n {\n // TODO: Implement stop() method.\n }", "function check_if_python_end($details_obj){\n\t\tif (file_exists($details_obj->project->outputPython.'\\\\markers\\\\learner_phase_file')){\n\t\t\t$details_obj->project = update_project_list($details_obj->project,\"end_offline\",true);\n\t\t\tupdate_project_details($details_obj->project);\n\t\t\tmove_to_online_task($details_obj);\n\t\t}else {\n\t\t\t$err_f = $details_obj->project->outputPython.'\\\\markers\\\\error_file';\n\t\t\tif (file_exists($err_f)){\n\t\t\t\t$details_obj->project->problem = true;\n\t\t\t\tupdate_project_details($details_obj->project);\n\t\t\t}else {\n\t\t\t\t//nothing\n\t\t\t}\n\t\t}\n\t}", "function stop()\n\t{\n\t\tif( $this->is_running ){\n\t\t\t$this->counter += (int) (self::timeMillisecondsAsFloat() - $this->running_since + 0.5);\n\t\t\t$this->is_running = FALSE;\n\t\t}\n\t}", "public function end()\n {\n }", "function LT_call_silent() {\n\t$proc = func_get_arg(0);\n\t$args = array_slice(func_get_args(), 1);\n\t$die = FALSE;\n\treturn LT_call($proc, $args, $die);\n}", "public function stop()\n {\n // Put your code here;\n }", "public function JStop() {}", "public function failed();", "public function thereShouldBeNoOutput()\n {\n if ($this->output != \"\") {\n throw new \\Exception('Output has been detected: '.$this->output);\n }\n }", "public function _handleTerm()\n\t{\n\t\t$this->_should_stop = true;\n\t}", "public function process() {\n\t\treturn false;\n\t}", "public function stop(): void\n {\n $this->end = microtime(true);\n }", "public abstract function getNoOutput();", "public function ended();", "public function needsExecution() {}" ]
[ "0.6392024", "0.6219894", "0.621896", "0.619858", "0.61880434", "0.5994668", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.5959243", "0.5946911", "0.5835344", "0.5835344", "0.5835344", "0.5835344", "0.5835344", "0.5787563", "0.5786803", "0.5753547", "0.5750351", "0.57483566", "0.57287467", "0.57096297", "0.5704036", "0.56879205", "0.5676969", "0.5663493", "0.565683", "0.5633265", "0.5583746", "0.5569718", "0.5556184", "0.55403006", "0.55390453", "0.55390453", "0.55386657", "0.55360526", "0.55337626", "0.55126786", "0.5510393", "0.55091983", "0.5490208", "0.546837", "0.5467955", "0.54675865", "0.54553634", "0.54523945", "0.5452279", "0.5448659", "0.54428583", "0.54426575", "0.5441944", "0.54354626", "0.5423463", "0.5419077", "0.5413856", "0.5413856", "0.5413856", "0.5413856", "0.54013", "0.53913385", "0.53787196", "0.53688985", "0.53650147", "0.5350126", "0.5344541", "0.5344541", "0.5344541", "0.53433555", "0.53399444", "0.5329281", "0.53224146", "0.530196", "0.52868825", "0.526655", "0.5253318", "0.52527934", "0.5235796", "0.5228002", "0.52249634", "0.52182984", "0.5209574", "0.5198135", "0.5186527", "0.5183452", "0.51776636", "0.51763517", "0.51711303", "0.516505", "0.51609224", "0.51581156", "0.51512855", "0.5149605", "0.51411676", "0.514013", "0.51381683" ]
0.0
-1
stop if there was nothing passed
public function deleteCostById($costId) { if($costId == null) { return; } // bootstrap to doctrine require(__DIR__ . '/../../amfdoctrine/bootstrapper.php'); // find the cost with that id $dql = "SELECT u FROM org\\fos\Cost u WHERE u.id=$costId"; $query = $entityManager->createQuery($dql); $costs = $query->getResult(); // delete that cost $cost = $entityManager->merge($costs[0]); $entityManager->remove($cost); $entityManager->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop()\n {\n // nop\n }", "abstract public function stop();", "public function stop(): bool {}", "public function halt();", "function stop();", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "#[Pure]\n public function gotStop(): bool {}", "function stop() { \n\n\t\tif ($this->XBMCCmd(\"Stop\")!=\"OK\") { return false; }\n return true;\n\n\t}", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop() {}", "function isStopped();", "public function _break()\n {\n //set the internal execution flag to false, stopping execution\n $this->executing = false;\n }", "public function isFinished();", "public function run()\n {\n /* this particular object won't run */\n }", "public function testMissingParameterPauseCheck() {\n $this->pingdom->pauseCheck(null);\n }", "public function stop()\n {\n die;\n }", "public function stop()\r\n {\r\n\r\n }", "public function haltJobLoop()\n\t{\n\t\t$this->halt_job_loop = true;\n\t}", "public function stepOutOfScope();", "abstract public function isLoop();", "public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }", "public function stop()\n {\n }", "function stop(){\n\t\tif($this->time_end==0){\n\t\t\t $this->time_end = $this->microtime_float();\n\t\t\t $this->time_spend = $this->time_end - $this->time_start;\n\t\t}\n\t}", "public function call() {\n\t\treturn false;\n\t}", "public function stop()\n {\n\n }", "public function process()\n {\n // do nothing here\n }", "public function onOutOfBand (): void;", "public function finish($data = null) {}", "public function finish($data = null) {}", "public function failed()\n {\n // Do nothing\n }", "public function clearFinished();", "public function stop() {\n\n\t\tif (is_null($this->_httpq->stop())) { return false; }\n\t\treturn true;\n\n\t}", "public function onStop();", "public function testMissingParametersUnpauseCheck() {\n $this->pingdom->unpauseCheck(null);\n }", "static function quit(){\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array(self,'out'),$args);\n\t\texit;\n\t}", "public function stop()\n {\n }", "public function stop()\n {\n throw new Stop();\n }", "public function endSkip(/* ... */)\n {\n if ($this->getTestResult() !== self::FAIL) {\n $this->setTestResult(self::PASS);\n }\n }", "public function halt()\n {\n $this->_halt = TRUE;\n }", "protected function run()\n {\n /* Do Nothing */\n return 'There is no implementation yet:)';\n }", "public function stop()\n {\n $this->mark('__stop');\n }", "public function proceed();", "public function isStopped();", "public function nothing(): void;", "protected function Run_Failure() {\n\t\tif (!empty($this->failure)) \n\t\t{\n\t\t\tcall_user_func_array($this->failure['function'], $this->failure['parameters']);\n\t\t}\n\t}", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "function end();", "public function loopBreak();", "public function end();", "public function end();", "public function end();", "public function end();", "public function stopQuery()\n {\n }", "public function testMissingParametersPauseChecks() {\n $this->pingdom->pauseChecks(null);\n }", "function needsExecution() ;", "public function isMenuItemValidBlankCallExpectFalse() {}", "public function isMenuValidBlankCallExpectFalse() {}", "protected static function _ignoreFrameworkResult() {\n Framework::getInstance()->stop(0);\n }", "public static function stop()\n {\n }", "public function end() {}", "public function end() {}", "public function end() {}", "public function stop() { \n\n\t\tif (is_null($this->_mpd->Stop())) { return false; } \n\t\treturn true;\n\n\t}", "public function testMissingParametersUnpauseChecks() {\n $this->pingdom->unpauseChecks(null);\n }", "public function runFailed();", "abstract protected function doEnd();", "function isExecuted() ;", "public function benchThisWillBeSkipped()\n {\n }", "public function failNoisily() :bool{\n\t\treturn !$this->failSilently;\n\t}", "function nothing($kw='') {\n\tdie(\"{query:'\".$kw.\"', suggestions:'', data:''}\");\n}", "public function cancel();", "public function proceed()\n {\n }", "public function work(): void;", "private function parse_args() {\n\t\t//exit;\t\t\n\t}", "public function stop()\n {\n // TODO: Implement stop() method.\n }", "function check_if_python_end($details_obj){\n\t\tif (file_exists($details_obj->project->outputPython.'\\\\markers\\\\learner_phase_file')){\n\t\t\t$details_obj->project = update_project_list($details_obj->project,\"end_offline\",true);\n\t\t\tupdate_project_details($details_obj->project);\n\t\t\tmove_to_online_task($details_obj);\n\t\t}else {\n\t\t\t$err_f = $details_obj->project->outputPython.'\\\\markers\\\\error_file';\n\t\t\tif (file_exists($err_f)){\n\t\t\t\t$details_obj->project->problem = true;\n\t\t\t\tupdate_project_details($details_obj->project);\n\t\t\t}else {\n\t\t\t\t//nothing\n\t\t\t}\n\t\t}\n\t}", "function stop()\n\t{\n\t\tif( $this->is_running ){\n\t\t\t$this->counter += (int) (self::timeMillisecondsAsFloat() - $this->running_since + 0.5);\n\t\t\t$this->is_running = FALSE;\n\t\t}\n\t}", "public function end()\n {\n }", "public function stop()\n {\n // Put your code here;\n }", "function LT_call_silent() {\n\t$proc = func_get_arg(0);\n\t$args = array_slice(func_get_args(), 1);\n\t$die = FALSE;\n\treturn LT_call($proc, $args, $die);\n}", "public function JStop() {}", "public function failed();", "public function _handleTerm()\n\t{\n\t\t$this->_should_stop = true;\n\t}", "public function thereShouldBeNoOutput()\n {\n if ($this->output != \"\") {\n throw new \\Exception('Output has been detected: '.$this->output);\n }\n }", "public function stop(): void\n {\n $this->end = microtime(true);\n }", "public function process() {\n\t\treturn false;\n\t}", "public function ended();", "public abstract function getNoOutput();", "public function needsExecution() {}" ]
[ "0.63966", "0.622462", "0.6223098", "0.62023556", "0.6193066", "0.60003823", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.5961026", "0.595231", "0.58396536", "0.58396536", "0.58396536", "0.58396536", "0.58396536", "0.5792452", "0.579034", "0.5757028", "0.57524604", "0.57501173", "0.57274264", "0.5714004", "0.5707903", "0.569233", "0.56764287", "0.5665678", "0.5660487", "0.56372815", "0.55872893", "0.55698365", "0.555987", "0.5540898", "0.55392194", "0.55388147", "0.55388147", "0.55348146", "0.5534699", "0.55170304", "0.55138457", "0.5509523", "0.54904217", "0.5471978", "0.54718447", "0.5466932", "0.54559964", "0.5455475", "0.5454025", "0.54526573", "0.5445392", "0.5442697", "0.54405904", "0.5436337", "0.54253155", "0.54223895", "0.5416035", "0.5416035", "0.5416035", "0.5416035", "0.5403778", "0.5390016", "0.5377789", "0.5367553", "0.536398", "0.5354536", "0.5347936", "0.53465724", "0.53465724", "0.53465724", "0.53444755", "0.53280413", "0.53206336", "0.53029203", "0.5286483", "0.5265219", "0.5253081", "0.52521837", "0.523962", "0.52277994", "0.5225059", "0.52167696", "0.52144825", "0.5199211", "0.5191068", "0.5184841", "0.5180814", "0.51769614", "0.5175704", "0.51630175", "0.51611996", "0.51597625", "0.51534134", "0.5152591", "0.5142168", "0.51407033", "0.5136916" ]
0.0
-1
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { return (new ImportUpdateHelper())->run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Reads configuration from file.
public function load(string $file, ?bool $merge = true): array { if (!\is_file($file) || !\is_readable($file)) { throw new Nette\FileNotFoundException("File '$file' is missing or is not readable."); } if (isset($this->loadedFiles[$file])) { throw new Nette\InvalidStateException("Recursive included file '$file'"); } $this->loadedFiles[$file] = true; $this->dependencies[] = $file; $data = $this->getAdapter($file)->load($file); $res = []; if (isset($data[self::INCLUDES_KEY])) { Validators::assert($data[self::INCLUDES_KEY], 'list', "section 'includes' in file '$file'"); $includes = Nette\DI\Helpers::expand($data[self::INCLUDES_KEY], $this->parameters); foreach ($includes as $include) { $include = $this->expandIncludedFile($include, $file); $res = Nette\Schema\Helpers::merge($this->load($include, $merge), $res); } } unset($data[self::INCLUDES_KEY], $this->loadedFiles[$file]); if ($merge === false) { $res[] = $data; } else { $res = Nette\Schema\Helpers::merge($data, $res); } return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "public static function read_config_file($file)\n\t{\n\t\tif (!file_exists($file) || !is_readable($file))\n\t\t{\n\t\t\tdie('<p>The Salve configuration file could not be found or is inaccessible. Check your configuration.</p>');\n\t\t}\n\n\t\trequire($file);\n\t}", "public function readConfigFile(): void\n {\n $configPath = __DIR__ . '/../../.config';\n if (!file_exists($configPath)) {\n echo \"Could not find .config\\n\";\n die;\n }\n $lines = preg_split('/[\\r\\n]+/', file_get_contents($configPath));\n foreach ($lines as $line) {\n if (empty($line)) {\n continue;\n }\n if (substr($line, 0, 1) == '#') {\n continue;\n }\n $kv = preg_split(\"/=/\", $line);\n $key = $kv[0];\n $value = $kv[1];\n $this->data[$key] = $value;\n }\n }", "public function readConfig() {\n \t// Read the current configuration file\n \t$this->setConfig(parse_ini_file($this->getConfigFile(), true));\n \t// Return instance \n \treturn $this;\n }", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "function getConfig($file) {\n echo $config;\n $config = parse_ini_file($file, true);\n if (! $config) {\n fatal(\"Configuration file missing or incorrect.\"); \n }\n return $config;\n }", "function getConfig($file) {\n $config = parse_ini_file($file, true);\n if (! $config) {\n echo \"Fatal: Configuration file missing or incorrect.\\n\";\n exit(1);\n }\n return $config;\n }", "function getConfig($file) {\n\t\t$config\t= parse_ini_file($file, true);\n\t\tif (! $config) {\n\t\t\t fatal(\"Configuration file missing or incorrect.\"); \n\t\t}\n\t return $config;\n\t}", "protected function read() {\n\t\t$fileContent = trim(file_get_contents($this->filepath));\n\t\t$pattern = '/\\$([^=]+)=([^;]+);/';\n\t\t$matches = null;\n\t\t$matchesFound = preg_match_all($pattern, $fileContent, $matches);\n\t\t$configContents = array();\n\t\tif ($matchesFound) {\n\t\t\t$configContents = $matches[0];\n\t\t}\n\t\t$this->rows = array();\n\t\tforeach ($configContents as $configLine) {\n\t\t\t$this->rows[] = new ConfigFileRow($configLine, $this);\n\t\t}\n\t\t$this->rowIndex = -1;\n\t\tunset($fileContent);\n\t}", "public function loadConfig()\n {\n return parse_ini_file(\n DIR_ROOT . '/config.ini', False\n );\n }", "private function readConfigFile($path){\n return parse_ini_file($path);\n }", "public abstract function loadConfig($fileName);", "public function read($filename)\n {\n if (!file_exists($filename)) {\n throw new Config_Lite_RuntimeException('file not found: ' . $filename);\n }\n $this->filename = $filename;\n $this->sections = parse_ini_file($filename, true);\n if (false === $this->sections) {\n throw new Config_Lite_RuntimeException(\n 'failure, can not parse the file: ' . $filename);\n }\n }", "public static function getConfig() {\n return parse_ini_file(__DIR__ . '/config.ini');\n }", "public function load_config($file = '')\n {\n return $this->{$this->_driver}->load_config($file);\n }", "public function readConfigurationValues();", "function read_config($file = false)\n{\n global $config, $databases;\n $ret = false;\n if (!$file) {\n $file = $config['config_file'];\n }\n // protect from including external files\n $search = array(':', 'http', 'ftp', ' ');\n $replace = array('', '', '', '');\n $file = str_replace($search, $replace, $file);\n\n if (is_readable($config['paths']['config'] . $file . '.php')) {\n // to prevent modern server from caching the new configuration we need to evaluate it this way\n clearstatcache();\n $f = implode('', file($config['paths']['config'] . $file . '.php'));\n $f = str_replace('<?php', '', $f);\n $f = str_replace('?>', '', $f);\n eval($f);\n $config['config_file'] = $file;\n $_SESSION['config_file'] = $config['config_file'];\n $ret = true;\n }\n\n return $ret;\n}", "public static function readFile($file = null) {\n\t\tif (is_null($file)) {\n\t\t\t$file = TMP . self::$configFile;\n\t\t} else {\n\t\t\tif (!strstr($file, DS)) {\n\t\t\t\t$file = TMP . $file;\n\t\t\t}\n\t\t}\n\n\t\t$result = false;\n\t\tif (file_exists($file)) {\n\t\t\tunset($config);\n\t\t\tinclude ($file);\n\t\t\t$result = (array)$config;\n\t\t}\n\t\treturn $result;\n\t}", "private function load()\n {\n if (!file_exists($this->file)) {\n throw new Exception('config file not found');\n }\n // read contents of wordpress config\n // we can not require the configuration because it requires a shit load of other files\n $this->config = file_get_contents($this->file);\n }", "public function getConfig()\n {\n return parse_ini_file(__DIR__ . \"/../php.ini\", true);\n }", "public static function load()\n {\n $configFile = self::getConfigFilePath();\n\n if (!is_file($configFile)) {\n self::save([]);\n }\n\n $config = require($configFile);\n\n if (!is_array($config))\n return array();\n\n return $config;\n }", "private function readConfig(){\n\n\t\t$this->_ini_array = parse_ini_file(CONFIG.'system.ini');\n\n\t\t$this->_host =\t$this->_ini_array['db_host'];\n\t\t$this->_username = $this->_ini_array['db_username'];\n\t\t$this->_password = $this->_ini_array['db_password'];\n\t\t$this->_database = $this->_ini_array['db_database'];\n\t\n\t\t$this->_log_enabled=$this->_ini_array['log_enabled'];\n\t\t$this->_log_level=$this->_ini_array['log_level'];\n\t\t$this->_log_file_path=$this->_ini_array['log_path'];\n\t\n\n\t\t$this->_lang_default=$this->_ini_array['lang_default'];\n\n\t}", "public static function read()\n {\n return self::$config;\n }", "private static function loadConfigurationFile()\n {\n if(self::$ConfigurationData == null)\n {\n $file_contents = file_get_contents(CONFIGURATION_FILE);\n $json_data = json_decode($file_contents, true);\n\n if(empty($json_data))\n {\n throw new Exception(\"Invalid JSON data in the configuration file\");\n }\n\n self::$ConfigurationData = $json_data;\n }\n }", "private function _readFile()\n {\n $content = file_get_contents($this->file);\n $this->config = json_decode(utf8_encode($content), true);\n\n if ($this->config == null && json_last_error() != JSON_ERROR_NONE)\n {\n throw new \\LogicException(sprintf(\"Failed to parse config file '%s'. Error: '%s'\", basename($this->file) , json_last_error_msg()));\n }\n }", "public function readConfigAction()\n {\n $this->getResponse()->setBody(self::getHelper()->readconfig());\n\n }", "public function loadConfig($file)\n {\n $options = [];\n try {\n $loader = new PhpConfig();\n $options = $loader->read($file);\n } catch (\\Exception $e) {\n Log::warning($e->getMessage());\n }\n\t\t$this->config('options', $options);\n\t}", "protected function getConfigFromFile()\n {\n if (! file_exists(CONFIG_FILE)) {\n throw new RuntimeException('File ' . CONFIG_FILE . ' does not exist');\n }\n\n return include CONFIG_FILE;\n }", "public function load()\n {\n $ini = APP_DIR.'config/'.ENVIRONMENT.'.ini';\n\n if(!file_exists($ini))\n Clockwork::throwError('Could not load config ('.$ini.')');\n\n $this->data = parse_ini_file($ini, true);\n \n $this->setValues();\n }", "private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}", "public function getConfig($file) {\n $config = array();\n if (file_exists($file)) {\n $yaml = new Parser();\n $config = $yaml->parse(file_get_contents($file));\n }\n return $config;\n }", "public function getConfig() {\n if ($this->config) {\n return $this->config;\n }\n \n $this->config = $this->parse($this->configFile);\n return $this->config;\n }", "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}", "public static function getConfig () {\n\n\t\treturn parse_ini_file(APPPATH . '/config/config.ini');\n\t}", "public function getConfigFromFile($file)\n {\n if (!is_file($file)) {\n throw new \\RuntimeException(\n sprintf('The \"%s\" config file does not exist.', $file),\n 5000\n );\n }\n\n $config = require $file;\n if (null === $config || !is_array($config)) {\n throw new \\RuntimeException(\n sprintf('The \"%s\" config file must return an array.', $file),\n 5001\n );\n }\n\n return $config;\n }", "function parseConfigFile( $file, $options = array( 'mode' => 'w' ) )\n\t{\n\t\treturn\t$this->loadConfig( $file, $options );\n\t}", "function get_config($filename)\n{\n\t$config = parse_ini_file($filename);\n\n\tif ($config === FALSE) {\n\t\tthrow new Exception(\"could not read configuration from '{$filename}'\");\n\t}\n\n\tif (!isset($config['url'])) {\n\t\tthrow new Exception(\"url not found in '{$filename}'\");\n\t}\n\tif (!isset($config['username'])) {\n\t\tthrow new Exception(\"username not found in '{$filename}'\");\n\t}\n\tif (!isset($config['password'])) {\n\t\tthrow new Exception(\"password not found in '{$filename}'\");\n\t}\n\tif (!isset($config['source'])) {\n\t\tthrow new Exception(\"source project not found in '{$filename}'\");\n\t}\n\tif (!isset($config['destination'])) {\n\t\tthrow new Exception(\"destination project not found in '{$filename}'\");\n\t}\n\n\treturn $config;\n}", "public function read(){\n\t\n\t\tif (!$this->cfg_loaded){\n\t\t\t$this->load();\n\t\t}\n\t\t\n\t\tif ($this->cfg_loaded){\n\t\t\t\n\t\t\t$this->getLogger()->debug(\"Starting reading XML configuration\");\n\t\t\t$config = $this->cfg->getElementsByTagName(\"configuration\");\n\t\t\t\t\n\t\t\tif ($config->length == 1){\n\t\t\t\n\t\t\t\t// first read debug configuration\n\t\t\t\t$this->cfg_debug->read_debug($config->item(0)->getElementsByTagName(\"debug\")->item(0));\n\t\t\t\t\n\t\t\t\t// $this->read_sensors($config->item(0));\n\t\t\t\t$this->cfg_sensors->read_sensors($config->item(0));\n\t\t\t\t\n\t\t\t\t$this->cfg_actions->read_actions($config->item(0)->getElementsByTagName(\"actions\")->item(0));\n\t\t\t\t$this->cfg_gpio->read_gpios($config->item(0)->getElementsByTagName(\"gpios\")->item(0));\n\t\t\t\t$this->cfg_stats->read_stats($config->item(0)->getElementsByTagName(\"statistics\")->item(0));\n\t\t\t\t\n\t\t\t\t$this->cfg_modes->read_modes($config->item(0)->getElementsByTagName(\"modes\")->item(0));\n\t\t\t\t$this->cfg_progs->read_programs($config->item(0)->getElementsByTagName(\"programs\")->item(0));\n\t\t\t} else {\n\t\t\t\t$this->getLogger()->error(\"section <configuration> not found. Can't read configuration.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function parseConfig()\n {\n $fileContents = file_get_contents($this->filename);\n if (!$fileContents) {\n $this->error = 'Failed to read file contents';\n\n return false;\n }\n\n $config = json_decode($fileContents, true);\n if (json_last_error()) {\n $this->error = json_last_error_msg();\n\n return false;\n }\n\n $this->config = new Data(array_replace_recursive($config, $this->overrides));\n\n return true;\n }", "protected function parse($file) {\n self::loadSpycLibrary();\n $config = Spyc::YAMLLoad($file);\n \n if (!$config) {\n throw new Exception(\"Configuration is either empty or contains fatal errors\");\n }\n \n return $config;\n }", "function loadConfigFile ($fileName) {\n\t\tif (file_exists ($fileName)) {\n\t\t\tif (is_readable ($fileName)) {\n\t\t\t\t$configItems = array ();\n\t\t\t\tinclude ($fileName);\n\t\t\t\t$this->loadConfigArray ($configItems);\n\t\t\t} else {\n\t\t\t\treturn new Error ('CONFIG_FILE_NOT_READABLE', $fileName);\n\t\t\t}\n\t\t} else {\n\t\t\treturn new Error ('CONFIG_FILE_NOT_FOUND', $fileName);\n\t\t}\n\t}", "public function loadConfig($filename)\n {\n return $this->getConfig()->loadConfig($filename);\n }", "private function configuration() {\n\n $f = \"includes/expr.ini\";\n\n return parse_ini_file($f);\n\n }", "function parseConfig() {\n\n\t\t// Make sure our config file exists\n\t\tif(!file_exists(CONFIGPATH . $this->_options['configFile'])) {\n\t\t\tdie('Unable to find <b>'. CONFIGPATH . $this->_options['configFile'] .'</b> file, please check your application configuration');\n\t\t}\n\n\t\t// Switch the file extension\n\t\tswitch(PPI_Helper::getFileExtension($this->_options['configFile'])) {\n\t\t\tcase 'ini':\n\t\t\t\treturn new PPI_Config_Ini(parse_ini_file(CONFIGPATH . $this->_options['configFile'], true, INI_SCANNER_RAW), $this->_options['configBlock']);\n\n\t\t\tcase 'xml':\n\t\t\t\tdie('Trying to load a xml config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'php':\n\t\t\t\tdie('Trying to load a php config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t}\n\t}", "public function loadConfig($file) {\n $config = array();\n if (file_exists(PATH_CONFIGS . $file))\n include(PATH_CONFIGS . $file);\n if (!empty($config)) {\n foreach ($config as $name => $array) {\n $this->configs[$name] = $array;\n }\n }\n }", "protected function getConfig() {\n\t\t\t$handle = fopen($this->configFile, 'r');\n\t\t\t$contents = fread($handle, filesize($this->configFile));\n\t\t\tfclose($handle);\n\n\t\t\t$this->config = json_decode($contents);\n\n\t\t\tforeach ($this->configMap as $key => $value) {\n\t\t\t\tif ($handle && !array_key_exists($key, $this->config)) {\n\t\t\t\t\tthrow new Exception('Missing key: ' . $key);\n\t\t\t\t}\n\n\t\t\t\tif (empty($this->config->{$key})) {\n\t\t\t\t\t/*\n\t\t\t\t\t\tIf the config isn't found we'll check if an environment\n\t\t\t\t\t\tvariable exists, this is largely Heroku specific, and offers\n\t\t\t\t\t\tus a nice way to avoid deploying any config.\n\n\t\t\t\t\t\tIf time were no issue this handling would be more loosely\n\t\t\t\t\t\tcoupled to this class.\n\t\t\t\t\t*/\n\t\t\t\t\t$env_value = getenv($value['env']);\n\n\t\t\t\t\tif (empty($env_value)) {\n\t\t\t\t\t\tthrow new Exception('Missing value: ' . $key);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->{$value['prop']} = !empty($env_value) ? $env_value : $this->config->{$key};\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "public function getConfig(string $fileName): array;", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "protected function loadConfig($file)\n {\n if (!(file_exists($file) && is_readable($file))) {\n throw new Exception(sprintf(\"File %s not exist or not readable!\", self::CONFIG_FILE_NAME));\n }\n\n $config = json_decode(file_get_contents($file), true);\n\n if (!is_array($config)\n || !array_key_exists(static::GENERAL_CONFIG_KEY, $config)\n || (!array_key_exists(static::PHP_CONTAINERS_CONFIG_KEY, $config)\n || !is_array($config[static::PHP_CONTAINERS_CONFIG_KEY]))\n ) {\n throw new Exception(sprintf(\"Invalid configuration in %s!\", $file));\n }\n\n $this->config = $config;\n\n return $this;\n }", "private function apiConfigFromFile(string $file = null)\r\n {\r\n $file = is_null($file) ? getenv(\"HOME\") . \"config.json\" : $file;\r\n if (empty($this->api_key) === false || empty($this->api_secret) === false) {\r\n return;\r\n }\r\n if (file_exists($file) === false) {\r\n echo \"Unable to load config from: \" . $file . PHP_EOL;\r\n echo \"API KEY or SECRET not found\" . PHP_EOL;\r\n return;\r\n }\r\n $contents = json_decode(file_get_contents($file), true);\r\n $this->api_key = isset($contents['api-key']) ? $contents['api-key'] : \"\";\r\n $this->api_secret = isset($contents['api-secret']) ? $contents['api-secret'] : \"\";\r\n }", "static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}", "function load_config() {\n\t\t$conf_file = @file_get_contents( LDAP_LOGIN_PATH.'data.dat' );\n\t\tif ($conf_file!==false)\n\t\t{\n\t\t\t$this->config = unserialize($conf_file);\n\t\t}\n\t}", "function loadConfig( $file, $options = array( 'mode' => 'w' ) )\n\t{\n\t\t//\tolder version accpeted only a string as mode parameter\n\t\tif( !is_array( $options ) )\n\t\t\t$options\t=\tarray(\n\t\t\t\t\t\t\t\t'mode'\t=>\t$mode\n\t\t\t\t\t\t\t);\n\n\t\t//\tdo not append => clear old config\n\t\tif( $options['mode'] == 'w' )\n\t\t\t$this->conf\t\t\t=\tarray();\n\n\t\t//\tno filetype given, extract from filename\n\t\tif( isset( $options['filetype'] ) && !empty( $options['filetype'] ) )\n\t\t\t$filetype\t=\t$options['filetype'];\n\t\telse\n\t\t\t$filetype\t=\t$this->_getFiletype( $file );\n\n\t\t$path\t\t\t=\t$this->getFullPath( $file );\n\n\t\tif( patErrorManager::isError( $path ) )\n\t\t\treturn\t$path;\n\n\t\t$reader\t\t=\t&$this->_getDriver( $filetype, 'Reader' );\n\n\t\tif( patErrorManager::isError( $reader ) )\n\t\t\treturn\t$reader;\n\n\t\t$result\t\t=\t$reader->loadConfigFile( $path, $options );\n\n\t\tif( !is_array( $result ) )\n\t\t\treturn\t$result;\n\n\t\tif( empty( $this->conf ) )\n\t\t\t$this->conf\t=\t$result['config'];\n\t\telse\n\t\t\t$this->conf\t=\tarray_merge( $this->conf, $result['config'] );\n\n\t\treturn\ttrue;\n\t}", "abstract protected function loadConfig();", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "protected function _readFile ($fn) {\n $options = array ();\n\n # Open configuration file for read\n $fp = fopen ($fn, \"rb\");\n if ($fp) {\n\n # Lock file against modifications\n flock ($fp, \\LOCK_SH);\n\n # Read entire file to a string\n $data = '';\n while (($line = fgets ($fp)) !== false) {\n $data .= $line;\n }\n\n # Close file and release lock\n fclose ($fp);\n\n # Parse options\n $options = $this->_parseOptions ($data);\n\n } else {\n throw new Exception (\"Cannot open file $fn\");\n }\n return $options;\n }", "function getConfig() {\n $config = parse_ini_file(\"config/config.ini\", true);\n\n return $config;\n}", "protected function getConfig($path = '') {\n if ($path == '') {\n $path = getenv('HOME') . '/.podcastr.json';\n }\n\n if ($this->output->isVerbose()) {\n $this->output->writeln(\"<comment> - Loading config from ~/.podcastr.json</comment>\");\n }\n $config = file_get_contents($path);\n $config = json_decode($config, TRUE);\n if (is_null($config)) {\n $this->output->writeln(\"<error>Config is invalid JSON or cannot be read.</error>\");\n exit(1);\n }\n\n return $config;\n }", "public static function read_config()\n\t{\n\t\t$config = realpath(dirname(__FILE__) . '/../../config_local.php');\n\t\t$hosted_config = Utils::get_hosted_path() . '/config_local.php';\n\n\t\tif (is_readable($config)) \n\t\t{\n\t\t\trequire($config);\n\t\t\t$is_hosted = FALSE;\n\t\t\t\n\t\t// maybe we are hosted\n\t\t} elseif (file_exists($hosted_config) )\n\t\t{\n\t\t\trequire($hosted_config);\n\t\t\trequire_once(Utils::get_hosted_path() . '/htdocs/system/system.php');\n\t\t\t$is_hosted = TRUE;\n\n\t\t// lets try the normal config location\n\t\t} elseif (is_readable('config.php')) \n\t\t{\n\t\t\trequire('config.php');\n\t\t\t$is_hosted = FALSE;\n\n\t\t// redirect\n\t\t} else \n\t\t{\n\t\t\theader('Location: install/index.php');\n\t\t\t$is_hosted = FALSE;\n\t\t}\n\n\t\tdefine('IS_HOSTED', $is_hosted);\n\t}", "private static function loadAppConfig() {\n\t\t\t$appConfJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/config.json\");\n\t\t\ttry {\n\t\t\t\t$appConf = JsonUtils::decode($appConfJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing app config: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// OK - now we can load up the config array from the file\n\t\t\tforeach ($appConf as $configKey => $configValue) {\n\t\t\t\tself::$config[$configKey] = $configValue;\n\t\t\t}\n\t\t}", "function getConfiguration(): Configuration\n {\n $configFileContent = file_get_contents($this->configurationFilePath);\n try {\n $this->configuration = $this->serializer->deserialize($configFileContent, Configuration::class, $this->configurationFileFormat);\n } catch (\\RuntimeException|\\Exception $e) {\n throw new ConfigurationFileDeserializationException($this->configurationFileFormat . ' is unsupported', 0, $e);\n }\n return $this->configuration;\n }", "public static function readConfByFile(string $confPath)\n {\n if (is_file($confPath)) {\n\n $conf = BabyYamlUtil::readFile($confPath);\n return $conf;\n }\n throw new DeployException(\"Cannot read conf from file: file doesn't exist: $confPath.\");\n }", "protected function getConfigFromFile()\n {\n if (isset($this->config)) {\n return $this->config;\n }\n\n $className = get_class($this);\n $configPath = realpath(dirname(File::fromClass($className)));\n\n if (File::exists($configFile = $configPath.'/extension.json')) {\n $config = json_decode(File::get($configFile), true) ?? [];\n }\n elseif (File::exists($configFile = $configPath.'/composer.json')) {\n $config = ComposerManager::instance()->getConfig($configPath);\n }\n else {\n throw new SystemException(\"The configuration file for extension <b>{$className}</b> does not exist. \".\n 'Create the file or override extensionMeta() method in the extension class.');\n }\n\n foreach (['code', 'name', 'description', 'author', 'icon'] as $item) {\n if (!array_key_exists($item, $config)) {\n throw new SystemException(sprintf(\n Lang::get('system::lang.missing.config_key'),\n $item, File::localToPublic($configFile)\n ));\n }\n }\n\n return $this->config = $config;\n }", "public function parseConfig() {\n $configArray = file('configs/' . $this->_ip . '.ini');\n \n if($configArray === FALSE || sizeof($configArray) <= 1) {\n trigger_error(\"Couldn't read config\");\n return FALSE;\n }\n \n $config = array();\n $configDirective = '';\n \n foreach($configArray as $lineNumber => $line) {\n $line = trim($line);\n \n // Filter out comments\n if(preg_match('/^;/', $line)) {\n continue;\n }\n \n // Config directive\n if(preg_match('/^\\[/', $line)) {\n $configDirective = substr(substr($line, 1), 0, -1);\n continue;\n }\n \n // Filter out blank lines\n if($line == '') {\n continue;\n }\n \n // Looks to be a regular config directive\n // Split on = and place into config array\n \n $lineSplit = explode(\"=\", $line);\n \n $config[$configDirective][$lineSplit[0]] = $lineSplit[1];\n \n unset($lineSplit);\n \n }\n \n return $config;\n }", "private function _loadConfig($options) {\n\n $conf_file = NULL;\n if (isset($options ['config'])) {\n $conf_file = $options ['config'];\n } else if (isset($options ['c'])) {\n $conf_file = $options ['c'];\n }\n\n if ($conf_file !== NULL && !file_exists($conf_file)) {\n $this->log(\"file does not exists\", self::ERROR);\n exit;\n }\n\n if ($conf_file !== NULL && file_exists($conf_file)) {\n $this->_config = parse_ini_file($conf_file, true);\n return $this;\n }\n }", "function readConfigXML($fileName) {\n\n $this->currentFile = $fileName;\n $this->_getFileXML($fileName);\n $this->_parseXML();\n }", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "protected function initConfiguration()\n {\n if (!file_exists(self::$config_file)) {\n // get the configuration directly from CMS\n $this->getConfigurationFromCMS();\n }\n elseif ((false === (self::$config_array = json_decode(@file_get_contents(self::$config_file), true))) || !is_array(self::$config_array)) {\n throw new ConfigurationException(\"Can't read the Doctrine configuration file!\");\n }\n }", "function readcfg() {\r\n // Analizar sin secciones\r\n $arraycfg = parse_ini_file(\"cfg/mysqlinventario.ini\");\r\n //print_r($arraycfg);\r\n //print_r($arraycfg['aduserinv']);\r\n return $arraycfg;\r\n }", "function __construct() {\n if (!file_exists($this->configuration_file_path)) {\n \n die(\"FATAL: Missing \" . $this->configuration_file_path . `pwd` );\n \n }\n \n $raw_contents = file_get_contents($this->configuration_file_path);\n\n\n //parse json object\n try {\n\n $this->Config = json_decode( $raw_contents );\n\n } catch (Exception $e) {\n\n die(\"FATAL: Bad configuration file? \");\n\n }\n \n\n }", "public function testConfigurationFromFile()\n {\n $path = __DIR__ . '/files/file1.config.php';\n\n $configuration = Factory::fromFile($path);\n\n $this->assertInstanceOf(Configuration::class, $configuration);\n $this->assertEquals(include $path, $configuration->getInternalContainer());\n }", "public function loadYamlConfig($filepath);", "public function load()\n {\n $parser = new ezcConfigurationIniParser( ezcConfigurationIniParser::PARSE, $this->path );\n $settings = array();\n $comments = array();\n\n foreach ( new NoRewindIterator( $parser ) as $element )\n {\n if ( $element instanceof ezcConfigurationIniItem )\n {\n switch ( $element->type )\n {\n case ezcConfigurationIniItem::GROUP_HEADER:\n $settings[$element->group] = array();\n if ( !is_null( $element->comments ) )\n {\n $comments[$element->group]['#'] = $element->comments;\n }\n break;\n\n case ezcConfigurationIniItem::SETTING:\n eval( '$settings[$element->group][$element->setting]'. $element->dimensions. ' = $element->value;' );\n if ( !is_null( $element->comments ) )\n {\n eval( '$comments[$element->group][$element->setting]'. $element->dimensions. ' = $element->comments;' );\n }\n break;\n }\n }\n if ( $element instanceof ezcConfigurationValidationItem )\n {\n throw new ezcConfigurationParseErrorException( $element->file, $element->line, $element->description );\n }\n }\n\n $this->config = new ezcConfiguration( $settings, $comments );\n return $this->config;\n }", "function load_config($path) {\n \n // Check path\n if(file_exists($path) == false) {\n throw new Exception(\"Unable to load configuration -- file not found: $path\");\n }\n \n // Check file\n if(is_file($path) == false) {\n throw new Exception(\"Unable to load configuration -- not a file: $path\");\n }\n \n // Check permissions\n if(is_readable($path) == false) {\n throw new Exception(\"Unable to load configuration -- access denied: $path\");\n }\n \n // Check size \n if(filesize($path) == 0) {\n throw new Exception(\"Unable to load configuration -- file is empty: $path\");\n }\n \n // Load parser\n require_once(YAML_PARSER);\n \n // Load config\n $config = Spyc::YAMLLoad($path);\n \n // Check result - if empty, throw an exception\n if(sizeof($config) == 0) {\n throw new Exception(\"Unable to load configuration -- parse error: $path\");\n }\n \n // General application options\n if(isset($config['info']['name'])) { $this->set_name($config['info']['name']); }\n if(isset($config['info']['admin email'])) { $this->set_admin_email($config['info']['admin email']); }\n if(isset($config['info']['admin name'])) { $this->set_admin_name($config['info']['admin name']); }\n if(isset($config['info']['base url'])) { $this->set_base_url($config['info']['base url']); }\n if(isset($config['info']['base directory'])) { $this->set_base_dir($config['info']['base directory']); }\n \n // Database\n if(isset($config['database']['name'])) { \n \n // Initialize db object\n $this->db = new StanfordDatabase();\n \n // Credentials\n if(isset($config['database']['name'])) { $this->db->set_database($config['database']['name']); }\n if(isset($config['database']['username'])) { $this->db->set_username($config['database']['username']); }\n if(isset($config['database']['password'])) { $this->db->set_password($config['database']['password']); }\n \n // Encryption\n if(isset($config['database']['use encryption'])) { $this->db->use_encryption($config['database']['use encryption']); }\n else { $this->db->use_encryption(false); }\n\n }\n \n // Use mysql sessions set to true\n if(isset($config['database']['use mysql sessions']) && $config['database']['use mysql sessions'] == true ) {\n \n // Check DB\n if($this->db instanceof StanfordDatabase) {\n \n // Enable MySQL sessions\n $this->db->setup_mysql_sessions();\n \n }\n else {\n \n // DB not configured\n throw new Exception(\"Cannot enable MySQL-based sessions -- database credentials not provided\"); \n \n }\n }\n \n // Logging\n if(isset($config['settings']['logging mode'])) {\n $this->util->set_error_reporting($config['settings']['logging mode']);\n }\n \n // Undo magic quotes\n if(isset($config['settings']['undo magic quotes']) && $config['settings']['undo magic quotes'] == true) {\n $this->util->undo_magic_quotes();\n }\n }", "public static function loadFromFile($path)\n {\n // Allow empty config\n if (!file_exists($path)) {\n return [];\n }\n $content = file_get_contents($path);\n return self::parseContent($content);\n }", "private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}", "private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}", "private function parseFile($filename) {\n if (is_null($filename) || !file_exists($filename)) {\n throw new MultidomainException('Missing config.yml file.');\n }\n $this->configFile = $filename;\n\n // get configuration values\n $this->config = json_decode(json_encode(\n Yaml::parseFile($filename)\n ));\n }", "private function loadConfig()\n {\n $base = APP_ROOT.'config/';\n $filename = $base.'app.yml';\n if (!file_exists($filename)) {\n throw new ConfigNotFoundException('The application config file '.$filename.' could not be found');\n }\n\n $config = Yaml::parseFile($filename);\n\n // Populate the environments array\n $hostname = gethostname();\n $environments = Yaml::parseFile($base.'env.yml');\n foreach ($environments as $env => $hosts) {\n foreach ($hosts as $host) {\n if (fnmatch($host, $hostname)) {\n $this->environments[] = $env;\n\n // Merge the app config for the environment\n $filename = $base.$env.'/app.yml';\n if (file_exists($filename)) {\n $envConfig = Yaml::parseFile($filename);\n $config = array_merge($config, $envConfig);\n }\n }\n }\n }\n\n // Loop through each of the config files and add them\n // to the main config array\n foreach (glob(APP_ROOT.'config/*.yml') as $file) {\n $key = str_replace('.yml', '', basename($file));\n $config[$key] = Yaml::parseFile($file);\n\n // Loop through each of the environments and merge their config\n foreach ($this->environments as $env) {\n $filename = $base.$env.'/'.$key.'.yml';\n if (file_exists($filename)) {\n $envConfig = Yaml::parseFile($filename);\n $config[$key] = array_merge($config[$key], $envConfig);\n }\n }\n }\n\n // Create and store the config object\n return $this->config = new Config($config);\n }", "function Event_Config_Read()\n {\n if (empty($this->Event_Config))\n {\n $this->Event_Config=$this->ReadPHPArray($this->Event_Config_File());\n $groups=$this->Dir_Files($this->Event_Config_Path.\"/Config\",'\\.php$');\n $this->Event_Config_Group=$this->Event_Config[ \"Config_Group_Default\" ];\n \n }\n }", "public static function read( $key ) {\r\n\t\t\t// split keys\r\n\t\t\t$keys = self::explode( $key );\r\n\t\t\t// read value\r\n\t\t\t$data = self::$data;\r\n\r\n\t\t\tforeach ( $keys as $part ) {\r\n\t\t\t\tif ( isset( $data[ $part ] ) ) {\r\n\t\t\t\t\t$data = $data[ $part ];\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tthrow new ConfigureException( $key );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $data;\r\n\t\t}", "protected function _get_config()\n {\n $config = Spyc::YAMLLoad(\"config.yaml\");\n return $config;\n }", "public static function config($_file) {\n\t\t// Generate hash code for config file\n\t\t$_hash='php.'.self::hashCode($_file);\n\t\t$_cached=Cache::cached($_hash);\n\t\tif ($_cached && filemtime($_file)<$_cached['time'])\n\t\t\t// Retrieve from cache\n\t\t\t$_save=gzinflate(Cache::fetch($_hash));\n\t\telse {\n\t\t\tif (!file_exists($_file)) {\n\t\t\t\t// .ini file not found\n\t\t\t\tself::$global['CONTEXT']=$_file;\n\t\t\t\ttrigger_error(self::TEXT_Config);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Map sections to framework methods\n\t\t\t$_map=array('global'=>'set','routes'=>'route','maps'=>'map');\n\t\t\t// Read the .ini file\n\t\t\tpreg_match_all(\n\t\t\t\t'/\\s*(?:\\[(.+?)\\]|(?:;.+?)*|(?:([^=]+)=(.+?)))(?:\\v|$)/s',\n\t\t\t\t\tfile_get_contents($_file),$_matches,PREG_SET_ORDER\n\t\t\t);\n\t\t\t$_cfg=array();\n\t\t\t$_ptr=&$_cfg;\n\t\t\tforeach ($_matches as $_match) {\n\t\t\t\tif ($_match[1]) {\n\t\t\t\t\t// Section header\n\t\t\t\t\tif (!isset($_map[$_match[1]])) {\n\t\t\t\t\t\t// Unknown section\n\t\t\t\t\t\tself::$global['CONTEXT']=$_section;\n\t\t\t\t\t\ttrigger_error(self::TEXT_Section);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$_ptr=&$_cfg[$_match[1]];\n\t\t\t\t}\n\t\t\t\telseif ($_match[2]) {\n\t\t\t\t\t$_csv=array_map(\n\t\t\t\t\t\tfunction($_val) {\n\t\t\t\t\t\t\t// Typecast if necessary\n\t\t\t\t\t\t\treturn is_numeric($_val) ||\n\t\t\t\t\t\t\t\tpreg_match('/^(TRUE|FALSE)\\b/i',$_val)?\n\t\t\t\t\t\t\t\t\teval('return '.$_val.';'):$_val;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstr_getcsv($_match[3])\n\t\t\t\t\t);\n\t\t\t\t\t// Convert comma-separated values to array\n\t\t\t\t\t$_match[3]=count($_csv)>1?$_csv:$_csv[0];\n\t\t\t\t\tif (preg_match('/(.+?)\\[(.*?)\\]/',$_match[2],$_sub)) {\n\t\t\t\t\t\tif ($_sub[2])\n\t\t\t\t\t\t\t// Associative array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][$_sub[2]]=$_match[3];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t// Numeric-indexed array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][]=$_match[3];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t// Key-value pair\n\t\t\t\t\t\t$_ptr[$_match[2]]=$_match[3];\n\t\t\t\t}\n\t\t\t}\n\t\t\tob_start();\n\t\t\tforeach ($_cfg as $_section=>$_pair) {\n\t\t\t\t$_func=$_map[$_section];\n\t\t\t\tforeach ($_pair as $_key=>$_val)\n\t\t\t\t\t// Generate PHP snippet\n\t\t\t\t\techo 'F3::'.$_func.'('.\n\t\t\t\t\t\tvar_export($_key,TRUE).','.\n\t\t\t\t\t\t($_func=='set' || !is_array($_val)?\n\t\t\t\t\t\t\tvar_export($_val,TRUE):self::listArgs($_val)).\n\t\t\t\t\t');'.\"\\n\";\n\t\t\t}\n\t\t\t$_save=ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\t// Compress and save to cache\n\t\t\tCache::store($_hash,gzdeflate($_save));\n\t\t}\n\t\t// Execute cached PHP code\n\t\teval($_save);\n\t\tif (self::$global['ERROR'])\n\t\t\t// Remove from cache\n\t\t\tCache::remove($_hash);\n\t}", "public static function loadConfig($configFile) {\n\t}", "function readconfig($filename) {\n $data = implode(\"\",file($filename));\n $parser = xml_parser_create();\n xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);\n xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);\n xml_parse_into_struct($parser,$data,$values,$tags);\n xml_parser_free($parser);\n\n // loop through the structures\n foreach ($tags as $key=>$val) {\n if ($key == \"db\") {\n $noderanges = $val;\n // each contiguous pair of array entries are the\n // lower and upper range for each node definition\n for ($i=0; $i < count($noderanges); $i+=2) {\n $offset = $noderanges[$i] + 1;\n $len = $noderanges[$i + 1] - $offset;\n $tdb[] = $this->parseXML(array_slice($values, $offset, $len));\n }\n } else {\n continue;\n }\n }\n return $tdb;\n }", "public static function getConfig() {\n\t\tif (self::$temp_config !== null) {\n\t\t\treturn self::$temp_config;\n\t\t}\n\n\t\t$config_file = self::getConfigFile();\n\t\treturn (!file_exists($config_file)) ? array() : json_decode(file_get_contents($config_file), true);\n\t}", "function config_load() {\n\t\t$config_camera = '/^\\s*([^:]+)\\s*:\\s*([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})\\s+(\\d+)\\s*x\\s*(\\d+)\\s*$/iu';\n\t\t$config_gate = '/^\\s*(.+)\\s*\\((\\d+)\\s*,\\s*(\\d+)\\)\\s*\\((\\d+),(\\d+)\\)\\s*$/u';\n\n\t\t$data = file(CONFIG_PATH);\n\t\tif ($data === NULL) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$config = array();\n\n\t\t$status = 0;\n\t\tfor ($n=0; $n<sizeof($data); $n++) {\n\t\t\t$str = $data[$n];\n\t\t\n\t\t\tif (preg_match($config_camera, $str, $matches)) {\n\t\t\t\t$name = trim($matches[1]);\n\t\t\t\t$hw_id = $matches[2].$matches[3].$matches[4].$matches[5].$matches[6].$matches[7];\n\t\t\t\t$width = $matches[8];\n\t\t\t\t$height= $matches[9];\n\n\t\t\t\t$gates = array();\n\t\t\t\tarray_push($config, \n\t\t\t\t\t\t array(\"hw\" => $hw_id, \n\t\t\t\t\t\t \"name\" => $name, \n\t\t\t\t\t\t\t\t \"gates\" => &$gates,\n\t\t\t\t\t\t\t\t \"width\" => $width,\n\t\t\t\t\t\t\t\t \"height\"=> $height));\n\t\t\t\t$status = 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($status == 1 && preg_match($config_gate, $str, $matches)) {\n\t\t\t\tarray_push($gates, array(\"name\"=>trim($matches[1]),\n\t\t\t\t\t\t\t\t\t\t \"x1\" =>$matches[2],\n\t\t\t\t\t\t\t\t\t\t \"y1\" =>$matches[3],\n\t\t\t\t\t\t\t\t\t\t \"x2\" =>$matches[4],\n\t\t\t\t\t\t\t\t\t\t \"y2\" =>$matches[5]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn $config;\n\t}", "public static function load()\n {\n $entries = Configuration::get();\n \n foreach ($entries as $entry) {\n self::$config[$entry->id] = unserialize($entry->value);\n }\n }", "private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }", "public function read($file, $force = FALSE)\n {\n /*is it memory?*/\n $file = realpath($file);\n if (isset($this->_conf[$file]) && !$force){\n return isset($this->_conf[$file]);\n }\n\n if($this->isCached($file)){\n return include $this->cacheName($file);\n }\n return $this->parser($file);\n }", "private function _loadConfig($filename)\n\t{\t\n\t\tif (!isset($config[$filename]))\n\t\t{\n\t\t\t$path = $this->pathToConfig . $filename . '.php';\n\t\t\tif (file_exists($path))\n\t\t\t{\n\t\t\t\trequire($this->pathToConfig . $filename . '.php');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Config file {$path} does not exist!\");\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * $config is the array found in ALL config files stored in $this->pathToConfig/\n\t\t */\n\t\treturn $config;\n\t}", "private function readLogConfig(){\n\n\t\t$_config = ConfigUtil::getInstance();\n\n\t\t$this->_log_enabled = $_config->isLogEnabled();\n\t\t$this->_log_level = $_config->getLogLevel();\n\t\t$this->_log_file_path = $_config->getLogFilePath();\n\t\n\t}", "private function userCurlConfigFromFile(string $file = null)\r\n {\r\n $file = is_null($file) ? getenv(\"HOME\") . \"config.json\" : $file;\r\n if (count($this->curlUserDef) > 0) {\r\n return;\r\n }\r\n if (file_exists($file) === false) {\r\n echo \"Unable to load config from: \" . $file . PHP_EOL;\r\n echo \"No found user curl options\" . PHP_EOL;\r\n return;\r\n }\r\n $contents = json_decode(file_get_contents($file), true);\r\n $this->curlUserDef = isset($contents['curlUserDef']) && is_array($contents['curlUserDef']) ? $contents['curlUserDef'] : [];\r\n }", "public function getConfig()\r\n {\r\n return $this->_file;\r\n }", "public function readConfigFiles()\n {\n $sugar_config = array();\n if (is_readable('config.php')) {\n include 'config.php';\n }\n $oldConfig = $sugar_config;\n if (is_readable('config_override.php')) {\n include 'config_override.php';\n }\n return array($oldConfig, deepArrayDiff($sugar_config, $oldConfig));\n }", "static public function load($filename) {\n\t\t$filename .= '.php';\n\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new \\Exception('Configuration file not found: ' . $filename);\n\t\t}\n\n\t\tinclude $filename;\n\n\t\tif (!isset($config)) {\n\t\t\tthrow new \\Exception('No variable $config found in ' . $filename);\n\t\t}\n\n\t\tself::$values = $config;\n\t}", "public function getConfigFile();", "function config(string $file, string $path = '')\n {\n if($path == ''){\n if(defined('LARAPRESS_PATH')){\n $path = LARAPRESS_PATH . '/config/';\n }\n }\n\n if(!is_string($path))\n return;\n\n $configFile = $path . $file . '.php';\n if(file_exists($configFile)){\n $array = include($configFile);\n\n if(!is_array($array))\n return;\n\n return $array;\n }\n }", "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::FILE_CONFIG);\n $rawdata = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal, set defaults below\n } catch (Engine_Exception $e) {\n throw new Engine_Exception($e->get_message(), CLEAROS_WARNING);\n }\n\n if (isset($rawdata['allow_shell']) && preg_match(\"/(true|1)/i\", $rawdata['allow_shell']))\n $this->config['allow_shell'] = TRUE;\n else\n $this->config['allow_shell'] = FALSE;\n\n if (isset($rawdata['theme_mode']) && !empty($rawdata['theme_mode']))\n $this->config['theme_mode'] = $rawdata['theme_mode'];\n else\n $this->config['theme_mode'] = 'normal';\n\n if (isset($rawdata['theme']) && !empty($rawdata['theme']))\n $this->config['theme'] = $rawdata['theme'];\n else\n $this->config['theme'] = 'default';\n\n $this->is_loaded = TRUE;\n }" ]
[ "0.7693695", "0.7522126", "0.71778387", "0.7023153", "0.696039", "0.69184107", "0.6907205", "0.6898652", "0.68557715", "0.6849819", "0.6744687", "0.67169845", "0.6680865", "0.6662169", "0.6651001", "0.6625341", "0.65681505", "0.6479766", "0.64769423", "0.64733887", "0.641629", "0.64117163", "0.6407586", "0.6382392", "0.6381081", "0.63759285", "0.63594025", "0.63492125", "0.6335388", "0.63283014", "0.63134223", "0.6287902", "0.62861115", "0.62861115", "0.6261148", "0.62591684", "0.6220382", "0.6192404", "0.61665833", "0.61505336", "0.61495167", "0.6149087", "0.61455595", "0.6142641", "0.61361337", "0.613333", "0.60977656", "0.60945064", "0.60742134", "0.6059048", "0.6057785", "0.60408294", "0.6039141", "0.6034802", "0.6018158", "0.596949", "0.5965309", "0.5964702", "0.5957972", "0.5949476", "0.59197885", "0.59052193", "0.5904868", "0.5898684", "0.5890721", "0.5845786", "0.5845432", "0.58242035", "0.57972556", "0.5791557", "0.57695395", "0.576066", "0.57571274", "0.5753829", "0.57515967", "0.5734775", "0.57316434", "0.57304454", "0.57304454", "0.56891704", "0.5681857", "0.5676436", "0.5676322", "0.567393", "0.5641778", "0.5637244", "0.56358504", "0.56351984", "0.5623121", "0.5611785", "0.5606933", "0.5603005", "0.56011295", "0.5598421", "0.55904245", "0.55819404", "0.55779344", "0.55756575", "0.5572365", "0.5567324", "0.55638486" ]
0.0
-1
Save configuration to file.
public function save(array $data, string $file): void { if (\file_put_contents($file, $this->getAdapter($file)->dump($data)) === false) { throw new Nette\IOException("Cannot write file '$file'."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n\t{\n\t\t$json = json_encode($this->config, JSON_PRETTY_PRINT);\n\n\t\tif (!$h = fopen(self::$configPath, 'w'))\n\t\t{\n\t\t\tdie('Could not open file ' . self::$configPath);\n\t\t}\n\n\t\tif (!fwrite($h, $json))\n\t\t{\n\t\t\tdie('Could not write file ' . self::$configPath);\n\t\t}\n\n\t\tfclose($h);\n\t}", "public function save()\n {\n $config_content = file_get_contents($this->config_path);\n\n foreach ($this->fields as $configuration => $value) {\n $config_content = str_replace(str_replace('\\\\', '\\\\\\\\', $value['default']), str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration]), $config_content);\n config([$value['config'] => str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration])]); //Reset the config value\n }\n\n file_put_contents($this->config_path, $config_content);\n }", "public function Save()\n {\n $content = \"\";\n foreach ($this->vars as $key => $elem) {\n $content .= \"[\".$key.\"]\\n\";\n foreach ($elem as $key2 => $elem2) {\n $content .= $key2.\" = \\\"\".$elem2.\"\\\"\\n\";\n }\n $content .= \"\\n\";\n }\n if (!$handle = @fopen($this->fileName, 'w')) {\n error_log(\"Config::Save() - Could not open file('\".$this->fileName.\"') for writing, error.\");\n }\n if (!fwrite($handle, $content)) {\n error_log(\"Config::Save() - Could not write to open file('\" . $this->fileName .\"'), error.\");\n }\n fclose($handle);\n }", "public function save()\n\t{\n\t\t$h = fopen(WEBDEV_CONFIG_FILE, 'w');\n\t\tfwrite($h, \"<?php\\n return \" .var_export($this->config->all(), true) .';');\n\t\tfclose($h);\n\t}", "private function writeConfigFile()\n {\n if (!$this->configFile) {\n $confDir = $this->scratchSpace . DIRECTORY_SEPARATOR . 'config';\n mkdir($confDir);\n $this->configFile = $confDir . DIRECTORY_SEPARATOR . 'config.yml';\n }\n file_put_contents($this->configFile, $this->configYaml);\n $this->container->setParameter('config.filename', $this->configFile);\n }", "public function saveSettings()\n {\n return $this->config->saveFile();\n }", "private function save() {\n global $config;\n\n //Save Config\n file_put_contents($config[\"usersFile\"],json_encode($this->users,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));\n }", "public function save()\n\t{\n\t\t// -> means the file was never loaded because no setting was changed\n\t\t// -> means no need to save\n\t\tif ($this->settings === null) return;\n\t\t\n\t\t$yaml = Spyc::YAMLDump($this->settings);\n\t}", "private function saveConfig() {\n \tself::$_configInstance = (object)$this->_data; \n file_put_contents($this->_data['cache_config_file'],serialize(self::$_configInstance)); \n }", "public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }", "public function ovpnWriteConfig($path)\n {\n //unset($path);\n $myfile = fopen($path, \"w\") or die(\"Unable to open file!\");\n fclose($myfile);\n $myfile = fopen($path, \"a\") or die(\"Unable to open file!\");\n foreach ($this as $key=>$value) {\n if ($key == \"keys\") {\n $key = \"key\";\n }\n if ($key == \"maxclients\") {\n $key = \"max-clients\";\n }\n if ($value == \"\" or $value === null) {\n continue;\n }\n if (strpos($key, '_') !== false) {\n $key = str_replace(\"_\", \"-\", $key);\n }\n if ($key == \"compression\" or $key == \"srvConfigPath\") {\n continue;\n }\n if ($key == \"client-to-client\") {\n fwrite($myfile, \"$value\\n\");\n continue;\n }\n if ($key == \"push-routes\" or $key == \"push-dns\") {\n $quo = '\"';\n $key = \"push\";\n $value = \"$quo$value$quo\\n\";\n }\n if ($key == \"push-gateway\") {\n fwrite($myfile, \"push $quo$value$quo\\n\");\n continue;\n }\n fwrite($myfile, \"$key $value\\n\");\n }\n fclose($myfile);\n //Done setting config, lets save the new object of items in a file for later processing\n $myfile = fopen(\"./vpn/urgent.conf\", \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, serialize($this));\n fclose($myfile);\n }", "public function save()\n\t{\n\t\t$this->componentConfig->save();\n\t}", "public function save()\n\t{\n\t\tFile::disk()->put($this->configPath, YAML::dump($this->configData));\n\n\t\tArtisan::call(sprintf('favicon:generate --site=%s', $this->handle));\n\t}", "function config_save($cfg) {\n\t\t$h = fopen(CONFIG_PATH,\"w+\");\n\t\tforeach ($cfg as $cam) {\n\t\t\t$cam_info = $cam[\"name\"].\" : \".$cam[\"hw\"].\"\\t\".$cam[\"width\"].\"x\".$cam[\"height\"].\"\\n\";\n\t\t\tfwrite($h, $cam_info);\n\t\t\tforeach ($cam[\"gates\"] as $gate) {\n\t\t\t\t$gate_info = \"\\t\".$gate[\"name\"].\"\\t(\".$gate[\"x1\"].\",\".$gate[\"y1\"].\")\\t(\".$gate[\"x2\"].\",\".$gate[\"y2\"].\")\\n\";\n\t\t\t\tfwrite($h, $gate_info);\n\t\t\t}\n\t\t}\n\t\tfclose($h);\n\t}", "protected function save()\n {\n $css = setcooki_path('plugin') . '/var/app.min.css';\n $json = setcooki_path('plugin'). '/var/options.json';\n $options = Option::get('wunderlist_todo_options', array());\n\n if(is_file($css))\n {\n @unlink($css);\n }\n if(is_file($json))\n {\n @chmod($json, 0755);\n }\n @file_put_contents($json, json_encode($options));\n }", "public function save()\n {\n\n // Create config folder if it does not exist.\n $fs = new Filesystem();\n $dumper = new Dumper();\n\n if (!$fs->exists(getenv('HOME').'/.talos')) {\n try {\n $fs->mkdir(getenv('HOME').'/.talos/apps');\n } catch (IOExceptionInterface $e) {\n return false;\n }\n }\n\n try {\n $fs->dumpFile(getenv('HOME').'/.talos/talos.yml', $dumper->dump($this->config, 10));\n\n return true;\n } catch (IOExceptionInterface $e) {\n return false;\n }\n }", "public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }", "public static function save()\n\t{\n\t\tConfigManager::save('discord', self::load(), 'config');\n\t}", "public function saveConfig() {\r\n\t$configObj = new \\config(PROFILE_PATH . '/' . $this->name . '/config.php', TRUE);\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t$config = array_intersect_key(\\app::$config, $config);\r\n\treturn $configObj->saveConfig($config);\r\n }", "function saveConfig(Config_Lite $inConfig) {\r\n\t\ttry {\r\n $inConfig->save();\r\n\t\t} catch (Config_Lite_Exception $e) {\r\n\t\t\techo \"\\n\" . 'Exception Message: ' . $e->getMessage();\r\n\t\t\twrite_log('Error saving configuration.','ERROR');\r\n\t\t}\r\n\t\t$configFile = dirname(__FILE__) . '/config.ini.php';\r\n\t\t$cache_new = \"'; <?php die('Access denied'); ?>\"; // Adds this to the top of the config so that PHP kills the execution if someone tries to request the config-file remotely.\r\n\t\t$cache_new .= file_get_contents($configFile);\r\n\t\tfile_put_contents($configFile,$cache_new);\r\n\t\t\r\n\t}", "private static function writeConfig($config)\n {\n self::init();\n\n return file_put_contents(self::$configFile, json_encode((object) $config, JSON_PRETTY_PRINT));\n }", "public function save() {\n\t\t$vars = $this->vars;\n\t\t$this->copyFromTemplateIfNeeded();\n\t\t$lines = file($this->filePath);\n\t\tforeach ($lines as $key => $line) {\n\t\t\tif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=(.*)\\\"(.*)\\\";(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]\\\"{$vars[$arr[3]]}\\\";$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t} elseif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=([ \t]+)([0-9]+);(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]{$vars[$arr[3]]};$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t}\n\t\t}\n\n\t\tunset($vars['module_load_paths']); // hacky\n\n\t\t// if there are additional vars which were not present in the config\n\t\t// file or in template file then add them at end of the config file\n\t\tif (!empty($vars)) {\n\t\t\t$lines []= \"<?php\\n\";\n\t\t\tforeach ($vars as $name => $value) {\n\t\t\t\tif (is_string($value)) {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = \\\"$value\\\";\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = $value;\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$lines []= \"\\n\";\n\t\t}\n\n\t\tfile_put_contents($this->filePath, $lines);\n\t}", "public function config_save() {\n }", "public function save()\n {\n $values = array('company_name', 'website_name', 'website_description');\n foreach ($values as $value) \n ConfigHelper::save($value, Input::get($value));\n ConfigHelper::save_file('favicon');\n ConfigHelper::save_file('logo');\n ConfigHelper::save_file('login-logo');\n\n return Redirect::route('view_config')->with('message_title', 'Successful!')->with('message', 'Successfully updated the config!');\n }", "public function saveConfigOptions() {}", "public function saveToFile()\n {\n $emails = $this->getEmailTemplatesFromRepository()->toJson();\n\n $this->filesystem->put($this->storagePath, $emails);\n }", "public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }", "public function save()\n {\n App::cliLog(\"Saving to $this->format file\", false);\n\n try {\n call_user_func([$this, 'export' . ucfirst($this->format)]);\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }", "public function save()\n {\n return $this->write($this->filename, $this->sections);\n }", "function write() {\n\t\t$this->readychk();\n\t\tif (!is_dir($this->dir_path)) { mkdir($this->dir_path); }\n\t\tif (!is_dir($this->asset_path)) { mkdir($this->asset_path); }\n\n\t\t$cstr = json_encode($this->export(TRUE, TRUE));\n\t\tif (\n\t\t\t$cstr === FALSE &&\n\t\t\tjson_last_error() !== JSON_ERROR_NONE\n\t\t) { throw new IntException(\"Slide config encoding failed.\"); }\n\t\tfile_lock_and_put($this->conf_path, $cstr);\n\t}", "public static function save($config)\n {\n $content = \"<\" . \"?php return \";\n $content .= var_export($config, true);\n $content .= \"; ?\" . \">\";\n\n $configFile = self::getConfigFilePath();\n file_put_contents($configFile, $content);\n\n if (function_exists('opcache_invalidate')) {\n opcache_reset();\n opcache_invalidate($configFile);\n }\n\n if (function_exists('apc_compile_file')) {\n apc_compile_file($configFile);\n }\n }", "protected function saveConfig() {\n return $this->updateConfigValues(array(\n 'PAYNETEASY_END_POINT',\n 'PAYNETEASY_LOGIN',\n 'PAYNETEASY_SIGNING_KEY',\n 'PAYNETEASY_SANDBOX_GATEWAY',\n 'PAYNETEASY_PRODUCTION_GATEWAY',\n 'PAYNETEASY_GATEWAY_MODE'\n ));\n }", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "function save($filePath);", "protected function saveConfiguration($name, $value)\n {\n // TODO: Implement saveConfiguration() method.\n }", "function Save()\n\t{\n\n\t\trequire_once(SENDSTUDIO_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'interspire_addons.php');\n\n\t\tif (!is_writable($this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$tmpfname = tempnam(TEMP_DIRECTORY, 'SS_');\n\t\tif (!$handle = fopen($tmpfname, 'w')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.prev.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_prev = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.prev.php';\n\t\tif (is_file($config_prev)) {\n\t\t\t@unlink($config_prev);\n\t\t}\n\n\t\t$contents = \"<?php\\n\\n\";\n\n\t\tgmt($this);\n\n\t\t$areas = $this->Areas;\n\n\n\t\tforeach ($areas['config'] as $area) {\n\t\t\t// See self::LoadSettings() on UTF8PATCH settings\n\t\t\tif ($area == 'DATABASE_UTF8PATCH') {\n\t\t\t\tif (!defined('SENDSTUDIO_DATABASE_UTF8PATCH')) {\n\t\t\t\t\tdefine('SENDSTUDIO_DATABASE_UTF8PATCH', 1);\n\t\t\t\t}\n\t\t\t\t$contents .= \"define('SENDSTUDIO_DATABASE_UTF8PATCH', '\" . SENDSTUDIO_DATABASE_UTF8PATCH . \"');\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$string = 'define(\\'SENDSTUDIO_' . $area . '\\', \\'' . addslashes($this->Settings[$area]) . '\\');' . \"\\n\";\n\t\t\t$contents .= $string;\n\t\t}\n\n\t\t$contents .= 'define(\\'SENDSTUDIO_IS_SETUP\\', 1);' . \"\\n\";\n\n\t\t$contents .= \"\\n\\n\";\n\n\t\tfputs($handle, $contents, strlen($contents));\n\t\tfclose($handle);\n\t\tchmod($tmpfname, 0644);\n\n\t\tif (!copy($tmpfname, $this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\t\tunlink($tmpfname);\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.bkp.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_bkp = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.bkp.php';\n\t\tif (is_file($config_bkp)) {\n\t\t\t@unlink($config_bkp);\n\t\t}\n\n\t\tunset($areas['config']);\n\n\t\tif (defined('APPLICATION_SHOW_WHITELABEL_MENU') && constant('APPLICATION_SHOW_WHITELABEL_MENU')) {\n\t\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t\tforeach ($areas['whitelabel'] as $area) {\n\t\t\t\t// If settings are not set, do not continue\n\t\t\t\tif (!isset($this->Settings[$area])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$value = $this->Settings[$area];\n\n\t\t\t\tif (strtolower($area) == 'update_check_enabled') {\n\t\t\t\t\t$subAction = 'uninstall';\n\t\t\t\t\tif ($value == '1') {\n\t\t\t\t\t\t$subAction = 'install';\n\t\t\t\t\t}\n\t\t\t\t\t$result = Interspire_Addons::Process('updatecheck', $subAction, array());\n\t\t\t\t\tcontinue;\n\t\t\t\t} elseif (strtolower($area) == 'lng_accountupgrademessage') {\n\t\t\t\t\t$agencyId = get_agency_license_variables();\n\t\t\t\t\tif(empty($agencyId['agencyid'])) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (is_bool($value)) {\n\t\t\t\t\t$value = (int)$value;\n\t\t\t\t}\n\n\t\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings(name, value) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t\t$result = $this->Db->Query($query);\n\t\t\t}\n\t\t\tif ($this->WhiteLabelCache->exists('IEM_SETTINGS_WHITELABEL')) {\n\t\t\t\t$this->WhiteLabelCache->remove('IEM_SETTINGS_WHITELABEL');\n\t\t\t}\n\t\t}\n\n\t\tif (isset($areas['whitelabel'])) {\n\t\t\tunset($areas['whitelabel']);\n\t\t}\n\n\t\t$stash = IEM_InterspireStash::getInstance();\n\t\tif ($stash->exists('IEM_SYSTEM_SETTINGS')) {\n\t\t\t$stash->remove('IEM_SYSTEM_SETTINGS');\n\t\t}\n\n\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"config_settings\";\n\t\t$result = $this->Db->Query($query);\n\n\n\t\tforeach ($areas as $area) {\n\t\t\t$value = isset($this->Settings[$area]) ? $this->Settings[$area] : '';\n\n\n\n\t\t\tif ($area == 'SYSTEM_DATABASE_VERSION') {\n\t\t\t\t$value = $this->Db->FetchOne(\"SELECT version() AS version\");\n\t\t\t}\n\t\t\tif (is_bool($value)) {\n\t\t\t\t$value = (int)$value;\n\t\t\t}\n\n\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"config_settings(area, areavalue) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t}\n\n\n\t\treturn true;\n\t}", "protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }", "public function dumpConfig()\n {\n $file = $this->buildDir . DIRECTORY_SEPARATOR . 'settings.json';\n $config = json_encode(get_object_vars($this), JSON_PRETTY_PRINT);\n\n $this->logger->info('Dumping test config {config} to {file}', ['file' => $file, 'config' => $config]);\n file_put_contents($file, $config);\n }", "function write_config()\n\t{\n\t\t$charmap \t= $this->paths['tempdir'].'/'.$this->paths['config'];\n\t\t$handle \t= @fopen( $charmap, 'w' );\n\t\t\n\t if ($handle)\n\t {\n\t fwrite( $handle, '<?php $chars = array();');\n\t \n\t foreach($this->svg_config[$this->font_name] as $unicode)\n\t {\n\t \tif(!empty($unicode))\n\t \t{\n\t \t\t$delimiter = \"'\";\n\t \t\tif(strpos($unicode, \"'\") !== false) $delimiter = '\"';\n\t \t\tfwrite( $handle, \"\\r\\n\".'$chars[\\''.$this->font_name.'\\']['.$delimiter.$unicode.$delimiter.'] = '.$delimiter.$unicode.$delimiter.';' );\n\t \t}\n\t } \t \n\t \n\t fclose( $handle );\n\t }\n\t else\n\t {\n\t \t$this->delete_folder($this->paths['tempdir']);\n\t\t\texit('Was not able to write a config file');\n\t }\n\t\t\n\t\t\n\t}", "public function save($filename) {\r\n file_put_contents($filename, $this->contents);\r\n }", "private function save() \n {\n $content = \"<?php\\n\\nreturn\\n[\\n\";\n\n foreach ($this->arrayLang as $this->key => $this->value) \n {\n $content .= \"\\t'\".$this->key.\"' => '\".$this->value.\"',\\n\";\n }\n\n $content .= \"];\";\n\n file_put_contents($this->path, $content);\n\n }", "public function writeFullConfFile()\n {\n return $this->writeFile(\n $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR .\n self::GITOLITE_CONF_DIR . self::GITOLITE_CONF_FILE,\n $this->renderFullConfFile()\n );\n }", "public function saveConfigFile($filename)\n {\n $config = Yaml::dump($this->config);\n if (false === ConfigLoader::createDir(dirname($filename)) || false === @file_put_contents($filename, $config)) {\n throw new LoaderException('Can not save configuration to ' . $filename);\n }\n return true;\n }", "function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}", "public function save()\n {\n $this->readCache();\n\n file_put_contents($this->filePath, json_encode($this->cacheContents));\n }", "public function save()\n\t\t{\n#DS_Database_Archive::_log(__METHOD__.'()');\n\t\t\tif ( $this->_dirty ) {\n#DS_Database_Archive::_log(__METHOD__.'() data is dirty');\n\t\t\t\tif ( NULL !== $this->option_name ) {\n\t\t\t\t\tset_option( $this->option_name, $this->_options );\n\t\t\t\t} else if ( NULL !== $this->filename ) {\n\t\t\t\t\t// save to filesystem\n#DS_Database_Archive::_log(__METHOD__.'() saving to file ' . $this->filename);\n\t\t\t\t\t$output = json_encode( $this->_options, JSON_PRETTY_PRINT );\n#DS_Database_Archive::_log(__METHOD__.'() contents: ' . $output);\n\t\t\t\t\tfile_put_contents( $this->filename, $output );\n\t\t\t\t}\n\t\t\t\t$this->_dirty = FALSE;\n\t\t\t}\n\t\t}", "public function saveSettingAction(){\n $configKey = array('api_key', 'api_secret','include_folders','resize_auto',\n 'resize_image','min_size','max_size','compression_type_pdf','compression_type_png','compression_type_jpg','compression_type_gif', 'saving_auto', 'compress_auto', 'cron_periodicity', 'reindex_init');\n $coreConfig = Mage::getConfig();\n $post = $this->getRequest()->getPost();\n foreach ($configKey as $key) { \n if (isset($post[$key])) { \n $coreConfig->saveConfig(\"mageio_\".$key, Mage::helper('core')->escapeHtml($post[$key]))->cleanCache();\n }\n }\n\t\t$installed_time = Mage::getStoreConfig('mageio_installed_time');\n if(empty($installed_time)) {\n $installed_time = time();\n $coreConfig = Mage::getConfig();\n $coreConfig->saveConfig('mageio_installed_time', Mage::helper('core')->escapeHtml($installed_time))->cleanCache();\n }\n\t\t//Remove error message if set\n\t\t$coreConfig->saveConfig(\"mageio_errormessage\", Mage::helper('core')->escapeHtml(null))->cleanCache();\n\t\t\n\t\t$this->_redirect('imagerecycle/index/index');\n\t}", "public function save()\n\t{\n\t\tif($this->beforeSave())\n\t\t{\n\t\t\t$dest = $this->getStorageFile();\n\t\t\t\n\t\t\tif(file_exists($dest) and is_writable($dest)===false)\n\t\t\t{\n\t\t\t\t@chmod($dest,0777);\n\t\t\t}\n\t\t\t\n\t\t\t$fp = fopen($dest,$this->mode);\n\t\t\tfwrite($fp,$this->data);\n\t\t\tfclose($fp);\n\t\t\t$this->afterSave();\n\t\t}\n\t}", "private function save_config()\n\t{\n\t\tif (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate())\n\t\t{\n\t\t\t$this->model_setting_setting->editSetting('payment_compropago', $this->request->post);\n\t\t\t$this->model_setting_setting->editSetting('payment_compropago_spei', $this->request->post);\n\t\t\t$this->session->data['success'] = $this->language->get('text_success');\n\n\t\t\t$this->register_webhook(\n\t\t\t\t$this->request->post['payment_compropago_publickey'],\n\t\t\t\t$this->request->post['payment_compropago_privatekey'],\n\t\t\t\t$this->request->post['payment_compropago_mode'] === '1'\n\t\t\t);\n\n\t\t\t$linkParams = 'user_token=' . $this->session->data['user_token'] . '&type=payment';\n\t\t\t$this->response->redirect($this->url->link('marketplace/extension', $linkParams, true));\n\t\t}\n\t}", "abstract protected function saveConfiguration($name, $value);", "public function saveTo(string $path);", "public function save($name) \n {\n // Lowercase the $name\n $name = strtolower($name);\n \n // Check to see if we need to put this in an array\n $ckey = $this->files[$name]['config_key'];\n if($ckey != FALSE)\n {\n $Old_Data = $this->data[$name];\n $this->data[$name] = array(\"$ckey\" => $this->data[$name]);\n }\n\n // Create our new file content\n $cfg = \"<?php\\n\";\n\n // Loop through each var and write it\n foreach( $this->data[$name] as $key => $val )\n {\n switch( gettype($val) )\n {\n case \"boolean\":\n $val = ($val == true) ? 'true' : 'false';\n // donot break\n case \"integer\":\n case \"double\":\n case \"float\":\n $cfg .= \"\\$$key = \" . $val . \";\\n\";\n break;\n case \"array\":\n $val = var_export($val, TRUE);\n $cfg .= \"\\$$key = \" . $val . \";\\n\";\n break;\n case \"NULL\":\n $cfg .= \"\\$$key = null;\\n\";\n break;\n case \"string\":\n $cfg .= (is_numeric($val)) ? \"\\$$key = \" . $val . \";\\n\" : \"\\$$key = '\" . addslashes( $val ) . \"';\\n\";\n break;\n default: break;\n }\n }\n\n // Close the php tag\n $cfg .= \"?>\";\n \n // Add the back to non array if we did put it in one\n if($ckey != FALSE)\n {\n $this->data[$name] = $Old_Data;\n }\n \n // Copy the current config file for backup, \n // and write the new config values to the new config\n copy($this->files[$name]['file_path'], $this->files[$name]['file_path'].'.bak');\n if(file_put_contents( $this->files[$name]['file_path'], $cfg )) \n {\n return TRUE;\n } \n else \n {\n return FALSE;\n }\n }", "public function saveFile() {\n return $this->xml->save($this->filename);\n }", "function saveRulesToFile() {\n\t\tglobal $sugar_config;\n\n\t\t$file = $this->rulesCache.\"/{$this->user->id}.php\";\n\t\t$GLOBALS['log']->info(\"SUGARROUTING: Saving rules file [ {$file} ]\");\n\t\twrite_array_to_file('routingRules', $this->rules, $file);\n\t}", "public function saveToFile() {\n\n $file = $this->getExtractedFile();\n\n $file->close();\n\n $this->extractedFile = false;\n }", "public function save()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\t\n\t\t$pl = $this->getPluginObject();\n\t\t\n\t\t$form = $this->initConfigurationForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$set1 = $form->getInput(\"setting_1\");\n\t\t\t$set2 = $form->getInput(\"setting_2\");\n\t\n\t\t\t// @todo: implement saving to db\n\t\t\t\n\t\t\tilUtil::sendSuccess($pl->txt(\"saving_invoked\"), true);\n\t\t\t$ilCtrl->redirect($this, \"configure\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form->setValuesByPost();\n\t\t\t$tpl->setContent($form->getHtml());\n\t\t}\n\t}", "public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\n }", "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "public function save()\n {\n return file_put_contents($this->getFilepath(), $this->read());\n }", "private function __saveConfiguration()\n {\n //Check is submit the form\n if (Tools::isSubmit(BECOPAY_PREFIX . 'submit')) {\n\n //clear errors messages\n $this->_errors = array();\n\n //validate is set configuration field\n foreach ($this->config['configuration'] as $config) {\n if ($config['isRequired'] && Tools::getValue(BECOPAY_PREFIX . $config['name']) == NULL)\n $this->_errors[] = $this->l($config['title'] . ' is require');\n }\n\n //if has no errors check with PaymentGateway Constructor validation\n if (empty($this->_errors)) {\n try {\n new PaymentGateway(\n Tools::getValue(BECOPAY_PREFIX . 'apiBaseUrl'),\n Tools::getValue(BECOPAY_PREFIX . 'apiKey'),\n Tools::getValue(BECOPAY_PREFIX . 'mobile')\n );\n } catch (\\Exception $e) {\n $this->_errors[] = $e->getMessage();\n }\n }\n\n //Display error messages if has error\n if (!empty($this->_errors)) {\n $this->_html = $this->displayError(implode('<br>', $this->_errors));\n } else {\n\n //save configuration form fields\n foreach ($this->config['configuration'] as $config)\n if (Tools::getValue(BECOPAY_PREFIX . $config['name']) != NULL)\n Configuration::updateValue(BECOPAY_PREFIX . $config['name'], trim(Tools::getValue(BECOPAY_PREFIX . $config['name'])));\n\n\n //display confirmation message\n $this->_html = $this->displayConfirmation($this->l('Settings updated'));\n }\n }\n }", "public function writeAndPush()\n {\n $this->gitConfig();\n $this->writeFullConfFile();\n $this->writeUsers();\n if($this->commitConfig()) $this->pushConfig();\n }", "private function saveConfig(){\n\t\tif(!isset($_POST['services_ipsec_settings_enabled'])){\n\t\t\t$this->data['enable'] = 'false';\n\t\t}\n\t\telseif($_POST['services_ipsec_settings_enabled'] == 'true'){\n\t\t\t$this->data['enable'] = 'true';\n\t\t}\n\t\t\n\t\t$this->config->saveConfig();\n\t\t$this->returnConfig();\n\t}", "public function save($file, $path);", "public function writeConfigFile($config)\n {\n $mysite = $this->directory . '/mysite';\n $file = $mysite . '/_config.php';\n\n if(!is_dir($mysite)) {\n $this->io->text('create ' . $mysite);\n mkdir($mysite);\n }\n\n $this->io->text('create ' . $file);\n touch($file);\n\n $this->io->text('writing mysite/_config.php');\n\n $content = \"<?php\\n\\n\";\n $content .= \"global \\$project;\\n\";\n $content .= \"\\$project = 'mysite';\\n\\n\";\n $content .= \"global \\$database;\\n\";\n $content .= \"\\$database = '{$config['database']['database']}';\\n\\n\";\n $content .= \"require_once('conf/ConfigureFromEnv.php');\\n\\n\";\n $content .= \"// Set the site locale\\n\";\n $content .= \"i18n::set_locale('{$config['locale']['locale']}');\\n\";\n\n if(isset($config['timezone'])) {\n $content .= \"date_default_timezone_set('{$config['timezone']['timezone']}');\\n\";\n }\n\n file_put_contents($file, $content);\n }", "public function saveAction()\n {\n $pageCode = $this->getRequest()->getParam('page_code');\n\n $config = $this->initConfig($pageCode);\n\n\n $session = Mage::getSingleton('adminhtml/session');\n\n try {\n\n $section = $config->getData('codes/section');\n $website = $this->getRequest()->getParam('website');\n $store = $this->getRequest()->getParam('store');\n $groups = $this->getRequest()->getPost('groups');\n $configData = Mage::getModel('adminhtml/config_data');\n $configData->setSection($section)\n ->setWebsite($website)\n ->setStore($store)\n ->setGroups($groups)\n ->save();\n\n $session->addSuccess(Mage::helper('novalnet_payment')->__('The configuration has been saved.'));\n } catch (Mage_Core_Exception $e) {\n foreach (explode(\"\\n\", $e->getMessage()) as $message) {\n $session->addError($message);\n }\n } catch (Exception $e) {\n $msg = Mage::helper('novalnet_payment')->__('An error occurred while saving:') . ' ' . $e->getMessage();\n $session->addException($e, $msg);\n }\n\n $this->_redirectByPageConfig();\n }", "public function write(array $values)\n {\n foreach($values as $key => $value) {\n $this->set($key, $value);\n list($filename, $item) = $this->parseKey($key);\n $config[$filename][$item] = $value;\n }\n\n foreach($config as $filename => $items) {\n $path = config_path($filename . '.php');\n if (!is_writeable($path)) throw new \\Exception('Configuration file ' . $filename . '.php is not writeable.');\n if (!$this->rewrite->toFile($path, $items)) throw new \\Exception('Unable to update configuration file ' . $filename . '.php');\n }\n }", "public final function save() {\n }", "protected function save()\n {\n return file_put_contents($this->outputPath() . '/' . $this->outputFile(), $this->stub); \n }", "public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}", "public function write(array $options, ConfigInterface $config);", "protected function exportConfig()\n {\n if ($this->option('interactive')) {\n if (! $this->confirm('Install the package config file?')) {\n return;\n }\n }\n if (file_exists(config_path('laravel-mentor.php')) && ! $this->option('force')) {\n if (! $this->confirm('The Laravel Mentor configuration file already exists. Do you want to replace it?')) {\n return;\n }\n }\n copy(\n $this->packagePath('config/laravel-mentor.php'),\n config_path('laravel-mentor.php')\n );\n\n $this->comment('Configuration Files installed successfully.');\n }", "public function saveToFile($file)\n {\n \n }", "private function writeConfig(string $key, array $config)\n {\n $this->initialize();\n $configuration = sprintf('<?php return %s;', var_export($config, true));\n file_put_contents(\n $this->directoryList->getPath(DirectoryList::GENERATED_METADATA) . '/' . $key . '.php',\n $configuration\n );\n }", "function _write_config_file($values){\n $db_server = $values['db_server'] ?: \"\";\n $db_name = $values['db_name'] ?: \"\";\n $db_user = $values['db_user'] ?: \"\";\n $db_password = $values['db_password'] ?: \"\";\n $mynautique_enabled = (isset($values['mynautique_enabled']) && $values['mynautique_enabled'] == TRUE) ? \"TRUE\" : \"FALSE\";\n $mynautique_user = isset($values['mynautique_user']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_user'] : \"\";\n $mynautique_password = isset($values['mynautique_password']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_password'] : \"\";\n\n // write configuration file (only after schema is applied)// build the configuration for the configuration file\n $config_string = '<?php'.\"\\n\";\n $config_string .= '// Database Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// database server'.\"\\n\";\n $config_string .= '$config[\\'db_server\\'] = \"'. $db_server .'\";'.\"\\n\";\n $config_string .= '// database'.\"\\n\";\n $config_string .= '$config[\\'db_name\\'] = \"'. $db_name .'\";'.\"\\n\";\n $config_string .= '// database user'.\"\\n\";\n $config_string .= '$config[\\'db_user\\'] = \"'. $db_user .'\";'.\"\\n\";\n $config_string .= '// database user password'.\"\\n\";\n $config_string .= '$config[\\'db_password\\'] = \"'. $db_password .'\";'.\"\\n\";\n $config_string .= \"\\n\";\n\n if ( isset($values['mynautique_enabled'])) {\n $config_string .= '// MyNautique Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// myNautique enabled'.\"\\n\";\n $config_string .= '$config[\\'mynautique_enabled\\'] = '.$mynautique_enabled .';'.\"\\n\";\n $config_string .= '// myNautique user'.\"\\n\";\n $config_string .= '$config[\\'mynautique_user\\'] = \"'. $mynautique_user .'\";'.\"\\n\";\n $config_string .= '// myNautique password'.\"\\n\";\n $config_string .= '$config[\\'mynautique_password\\'] = \"'. $mynautique_password .'\";'.\"\\n\";\n }\n\n $config_string .= '?>'.\"\\n\";\n\n $bytes_written = file_put_contents (\"../config/config.php\", $config_string);\n\n if($bytes_written == FALSE) {\n return $bytes_written;\n }\n return TRUE;\n }", "function saveSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$this->saveExternalSettings();\n\t\t\t\n\t\t\t$settings = serialize(array(\"settings\"=>$this->settings));\n\t\n\t\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS, MAPI_CREATE | MAPI_MODIFY);\n\t\t\tmapi_stream_setsize($stream, strlen($settings));\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\tmapi_stream_write($stream, $settings);\n\t\t\tmapi_stream_commit($stream);\n\t\n\t\t\tmapi_savechanges($this->store);\n\t\n\t\t\t// reload settings from store...\n\t\t\t$this->retrieveSettings();\n\t\t}", "public function save($path);", "public function save_settings() {\n\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}", "public function save()\n\t{\n\t\treturn file_put_contents(self::filepath($this->name), $this->content);\n\t}", "public static function save($config, $file)\r\n\t{\r\n\t\t$extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));\r\n\t\tif (!isset(self::$extensions[$extension])) {\r\n\t\t\tthrow new Nette\\InvalidArgumentException(\"Unknown file extension '$file'.\");\r\n\t\t}\r\n\t\treturn call_user_func(array(self::$extensions[$extension], 'save'), $config, $file);\r\n\t}", "public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}", "function iniwrite() {\n\t global $setini;\n\t\n\t $ini = $this->gtk_path . \"webos.ini\"; \t//echo $ini; \n\t \n if ($fp = fopen ($ini , \"wb\")) {\n\t\t\n\t\t\t\t $tow = serialize($setini) . \"<@>\";\t \n\t\t\t\t\t \n fwrite ($fp, $tow);\n fclose ($fp);\n\t\t\t\t \n\t\t $this->set_console_message(\"Writing ini settings successfully.\");\t\t\t\t \n\t\t\t\t return (true);\n\t }\n\t else {\n\t\t $this->set_console_message(\"Ini setting NOT saved !!!\");\t\t\n\t\t\t\t return (false);\n\t\t}\t\t\n\t}", "private function saveType()\n\t{\n\t\t// Build config file\n\t\t$config = \"<?php \\n\\n\";\n\t\t$config.= \"// This config file is auto generated on boot.\\n\\n\";\n\t\t$config.= 'define(\"INSTANCE_TYPE\", \"'.$this->instanceType.'\");'.\"\\n\";\n\t\t$config.= 'define(\"INSTANCE_NAME\", \"'.$this->instanceName.'\");'.\"\\n\";\n\t\t$config.= 'define(\"BRANCH\", \"'.$this->branch.'\");'.\"\\n\";\n\n\t\t// If bootstrapping the development server\n\t\tif($this->instanceDev)\n\t\t{\n\t\t\t$config.= 'define(\"DEV\", TRUE);'.\"\\n\";\n\t\t}\t\n\n\t\t// Write config file to config folder\n\t\tfile_put_contents(\"config/instance.config.php\", $config);\n\t}", "public final function save()\n {\n }", "public function saveConfig($data, $values);", "public static function config_save($key, $value, $create = true) {\n\t\t//get original value\n $original_value = Kohana::config($key);\n if (is_numeric($value)) {\n $value = $value . '';\n }\n\t\t// Get the group name from the key\n\t\t$keys = explode('.', $key, 2); // $keys[0] is the config filename, $keys[1] is the parameter name\n $config_file = APPPATH . 'config/' . $keys[0] . '.php';\n\n if (!file_exists($config_file) && $create) {\n $config_files = Kohana::find_file('config', $keys[0]);\n self::$config_data[$keys[0]] = file_get_contents(array_pop($config_files));\n $handle = fopen($config_file, 'w+b');\n fclose($handle);\n }\n\n if (empty(self::$config_data[$keys[0]])) {\n self::$config_data[$keys[0]] = file_get_contents($config_file);\n }\n\n /*\n check if is array to array or string to string\n */\n $value = var_export($value, true);\n self::$config_data[$keys[0]] = preg_replace('#(\\$config\\[\\'' . $keys[1] . '\\'\\] = )(.*?)([\\)\\']{1})(;\\s+)#s', '$1' . $value . '$4', self::$config_data[$keys[0]]);\n\n file_put_contents($config_file, self::$config_data[$keys[0]]);\n return true;\n }", "public function storeTo($path = './') {\n\t\tfile_put_contents($path . $this->filename, $this->content);\t\n\t}", "public function save()\n\t{\t\n\t\t$savePath = $this->getSavePath();\n\t\tif($result = fopen($savePath,\"w+\")) {\n\t\t\treturn $result;\n\t\t} else {\n\t\t\tthrow new Exception(\"Unable to Save File\", 1);\n\t\t}\n\t}", "function testSaveConfigFile(){\n\t\tTestsHelper::Print(\"testing magratheaConfig saving a config file...\");\n\t\t$confs = array(\"config_test\" => \"ok\", \n\t\t\t\"config_test2\" => \"another_ok\" );\n\t\t$this->magConfig->setConfig($confs);\n\t\t$this->magConfig->Save(false);\n\t\t$this->assertTrue(file_exists($this->configPath.\"/\".$this->fileName));\n\t}", "function testSaveConfigFile(){\n\t\t\techo \"testing magratheaConfig saving a config file... <br/>\";\n\t\t\t$confs = array(\"config_test\" => \"ok\", \n\t\t\t\t\"config_test2\" => \"another_ok\" );\n\t\t\t$this->magConfig->setConfig($confs);\n\t\t\t$this->magConfig->Save(false);\n\t\t\t$this->assertTrue(file_exists($this->configPath.\"test_conf.conf\"));\n\t\t}", "public function system_save_preference()\n {\n System_helper::save_preference();\n }", "private function writeCurrenciesToFile() {\n createFile(\n \"currencies.xml\",\n $this->currencies[0]->asXML()\n );\n }", "public function save() {\n $configdata = $this->get('configdata');\n if (!array_key_exists('defaultvalue_editor', $configdata)) {\n $this->field->save();\n return;\n }\n\n if (!$this->get('id')) {\n $this->field->save();\n }\n\n // Store files.\n $textoptions = $this->value_editor_options();\n $tempvalue = (object) ['defaultvalue_editor' => $configdata['defaultvalue_editor']];\n $tempvalue = file_postupdate_standard_editor($tempvalue, 'defaultvalue', $textoptions, $textoptions['context'],\n 'customfield_textarea', 'defaultvalue', $this->get('id'));\n\n $configdata['defaultvalue'] = $tempvalue->defaultvalue;\n $configdata['defaultvalueformat'] = $tempvalue->defaultvalueformat;\n unset($configdata['defaultvalue_editor']);\n $this->field->set('configdata', json_encode($configdata));\n $this->field->save();\n }", "public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }", "function persist_optionsFile()\n\t\t{\n\t\t\t$propFile = $this->thispluginpath.'hits-pngfix2.properties';\n\t\t\tif($this->is__writable($propFile))\n\t\t\t{\n\t\t\t\t$propFileHandle = @fopen($propFile, 'w') or die(\"can't open file\");\n\t\t\t\tfwrite($propFileHandle,$this->thisProtocolRelativeUrl.\"clear.gif\");\n\t\t\t\tfclose($propFileHandle);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->options['hits_ie6_debug']=='true')\n\t\t\t\t\techo \"<!-- DEBUG: Options file is not writeable -->\";\n\t\t\t}\n\t\t}", "function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}", "function saveConfigurationSettings() {\n\t$dbhost=$_POST['db_host'];\n\t$dbname=$_POST['db_name'];\n\t$dbuser=$_POST['db_user'];\n\t$dbpasswd=$_POST['db_passwd'];\n\t\n\t\n\t$dbprefix=($_POST['db_prefix']!=\"\"?$_POST['db_prefix']:\"V0_\");\n\t\n\tglobal $cmsFolder;\n\t$configFileText = '';\n\trequire_once('config-prototype.inc.php');\n\t$writeHandle = @fopen(\"../config.inc.php\", 'w');\n\tif (!$writeHandle)\n\t{\n\t\tdisplayError('Could not write to config.inc.php. Please make sure that the file is writable.');\n\t\treturn false;\n\t}\n\tfwrite($writeHandle, $configFileText);\n\tfclose($writeHandle);\n\tdisplayInfo(\"Configuration Successfully Saved!\");\n\n\tdefine(\"MYSQL_SERVER\",$dbhost);\n\tdefine(\"MYSQL_DATABASE\",$dbname);\n\tdefine(\"MYSQL_USERNAME\",$dbuser);\n\tdefine(\"MYSQL_PASSWORD\",$dbpasswd);\n\tdefine(\"MYSQL_DATABASE_PREFIX\",$dbprefix);\n\t\n\t\n\treturn true;\n}", "public function exportConfiguration() {}", "public function save(){ \r\n return $this->xmlfile->save($this->absolutepath);\r\n }", "public function configSave()\n\t{\n\t\t$section = Mage::app()->getRequest()->getParam('section');\n\t\tif ($section == 'mtghost_design')\n\t\t{\n\t\t\t$websiteCode = Mage::app()->getRequest()->getParam('website');\n\t\t\t$storeCode = Mage::app()->getRequest()->getParam('store');\n\t\t\t\n\t\t\tMage::getSingleton('mtghost/cssgen_generator')->generateCss('design', $websiteCode, $storeCode);\n\t\t}else if($section == 'mtghost'){\n $websiteCode = Mage::app()->getRequest()->getParam('website');\n $storeCode = Mage::app()->getRequest()->getParam('store');\n\n Mage::getSingleton('mtghost/cssgen_generator')->generateCss('layout', $websiteCode, $storeCode);\n }\n\t}", "public function save(DFile $target, DOutputConfig $config=NULL) {\n\t\t$this->applyFilters();\n\t\tDOutputHelper::save($this, $target, $config);\n\t}" ]
[ "0.84284216", "0.805467", "0.7937384", "0.76394635", "0.72180074", "0.70263517", "0.6897748", "0.6877988", "0.6744627", "0.6714165", "0.665837", "0.6606072", "0.6584561", "0.6582454", "0.65759933", "0.6570675", "0.65232486", "0.64757586", "0.64744574", "0.64665115", "0.6454633", "0.6431435", "0.64170116", "0.64088243", "0.63982344", "0.6389141", "0.63686234", "0.6347602", "0.62712944", "0.62536514", "0.62420607", "0.61919814", "0.6162319", "0.61569935", "0.6138324", "0.6113775", "0.6111618", "0.61075145", "0.6098798", "0.6092473", "0.60898286", "0.60852385", "0.60823", "0.6070737", "0.60607624", "0.6055186", "0.6053516", "0.60455704", "0.6030517", "0.6000642", "0.5991972", "0.5973108", "0.5951989", "0.5935657", "0.5926079", "0.59224707", "0.5889178", "0.5885368", "0.5854755", "0.58517045", "0.58418965", "0.58264077", "0.5788106", "0.5784046", "0.5762903", "0.5750231", "0.57494414", "0.573149", "0.57185274", "0.5713662", "0.5704842", "0.5704605", "0.5704588", "0.56950754", "0.56887877", "0.56813407", "0.566673", "0.565202", "0.5649588", "0.56250733", "0.5618676", "0.5613566", "0.5612416", "0.56100345", "0.5606721", "0.56059027", "0.5605379", "0.56051517", "0.56019455", "0.55947375", "0.55929947", "0.5587706", "0.558526", "0.5578989", "0.55785805", "0.5576797", "0.55734795", "0.5561795", "0.55515754", "0.55420333", "0.5538765" ]
0.0
-1
Registers adapter for given file extension.
public function addAdapter(string $extension, $adapter) { $this->adapters[\strtolower($extension)] = $adapter; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addExtension(string $extension);", "protected function registerExtensions()\n {\n $this->app['extensions'] = $this->app->share(function ($app) {\n return new ExtensionBag($app['files'], $app['extensions.finder'], $app, [], $app['cache']);\n });\n\n $this->app->alias('extensions', 'Cartalyst\\Extensions\\ExtensionBag');\n }", "public function setExtension($ext);", "protected function registerExtensionsFinder()\n {\n $this->app['extensions.finder'] = $this->app->share(function ($app) {\n $paths = $app['config']->get('cartalyst.extensions.paths');\n\n return new FileFinder($app['files'], $paths);\n });\n }", "public static function registerExtension($extension, $class)\r\n\t{\r\n\t\tif (!class_exists($class)) {\r\n\t\t\tthrow new Nette\\InvalidArgumentException(\"Class '$class' was not found.\");\r\n\t\t}\r\n\r\n\t\tif (!Nette\\Reflection\\ClassType::from($class)->implementsInterface('Nette\\Config\\IAdapter')) {\r\n\t\t\tthrow new Nette\\InvalidArgumentException(\"Configuration adapter '$class' is not Nette\\\\Config\\\\IAdapter implementor.\");\r\n\t\t}\r\n\r\n\t\tself::$extensions[strtolower($extension)] = $class;\r\n\t}", "protected function registerExtensions()\n {\n $apiResult = Event::fire('editor.extension.register');\n\n if (!is_array($apiResult)) {\n return;\n }\n\n foreach ($apiResult as $extensionClassName) {\n if (!is_string($extensionClassName)) {\n continue;\n }\n\n $this->extensionClassNames[] = $extensionClassName;\n }\n }", "protected function registerExtension()\n {\n $this->app->make('view')->addExtension($this->app->make('twig.extension'), 'twig', function () {\n return $this->app->make('twig.engine');\n });\n }", "public function registerExtension(string $extension): void\n {\n if ($this->booted) {\n // We throw an exception here to prevent the developer from registering aa extension after the Kernel has been booted.\n // The reason we do this is because at this point all the source files have already been discovered and parsed.\n // If we allowed new classes after this point, we would have to reboot everything which adds complexity.\n\n throw new BadMethodCallException('Cannot register an extension after the Kernel has been booted.');\n }\n\n if (! is_subclass_of($extension, HydeExtension::class)) {\n // We want to make sure that the extension class extends the HydeExtension class,\n // so that we won't have to check the methods we need to call exist later on.\n\n throw new InvalidArgumentException(\"Extension [$extension] must extend the HydeExtension class.\");\n }\n\n if (in_array($extension, $this->getRegisteredExtensions(), true)) {\n // While throwing an exception here is not required since we are using an associative array,\n // it may be helpful for the developer to know that their registration logic may be flawed.\n\n throw new InvalidArgumentException(\"Extension [$extension] is already registered.\");\n }\n\n $this->extensions[$extension] = new $extension();\n }", "public function addMimeType(string $mimeType, string $extension): void\n {\n self::$supportedMimeTypes[$mimeType] = $extension;\n }", "private function addExtension($extension) {\n $extension = trim(strtolower($extension));\n $extension = preg_quote($extension, \"#\");\n\n if ($extension === \"jpg\" || $extension === \"jpeg\")\n $extension = \"jpe?g\";\n\n // don't add duplicates!\n if (!in_array($extension, $this->extensions)) {\n $this->extensions[] = $extension;\n }\n }", "function add_extension() {\n\n require_once( dirname( __FILE__ ) . '/LFAPPS_Comments_Extension.php' );\n $this->ext = new LFAPPS_Comments_Extension();\n }", "function addExtension($mode, $ext) {\r\n\t\t$this->_file_extensions[$ext] = $mode;\r\n\t\treturn $this;\r\n\t}", "public function addExtension($fromExt, $toExt)\n {\n $this->extensions[strtolower($fromExt)] = strtolower($toExt);\n }", "public function setExtension(?IExtension $extension): void\n {\n $this->extension = $extension;\n }", "public function setExtension($extension, $attributes = array()) {\n\t\t$this->connections [$this->active]->setExtension ( $extension, $attributes );\n\t}", "public function setExtension($ext)\n {\n if (!empty($ext)){\n $this->extension = $ext;\n }\n }", "public function registerFile($extensions) {\r\n $extensions[] = __FILE__;\r\n return $extensions;\r\n }", "public function setExtension($extension)\n {\n $this->_extension = $extension;\n }", "public function setExtension($extension)\n {\n $this->_extension = $extension;\n }", "public function add($f, $ext_path, $ext_name = 'plugins')\n {\n if (in_array($ext_name, self::$extensions)) {\n return true;\n }\n $extension = array('name' => $f, 'base' => $ext_path);\n self::$extensions[$ext_name] = $extension;\n }", "public function setExtension($extension) {\n $this->_extension = $extension;\n }", "public static function registerExtension($name)\n {\n $feedName = $name . '_Feed';\n $entryName = $name . '_Entry';\n if (self::isRegistered($name)) {\n if (self::getPluginLoader()->isLoaded($feedName) ||\n self::getPluginLoader()->isLoaded($entryName)) {\n return;\n }\n }\n try {\n self::getPluginLoader()->load($feedName);\n self::$_extensions['feed'][] = $feedName;\n } catch (Zend_Loader_PluginLoader_Exception $e) {\n }\n try {\n self::getPluginLoader()->load($entryName);\n self::$_extensions['entry'][] = $entryName;\n } catch (Zend_Loader_PluginLoader_Exception $e) {\n }\n if (!self::getPluginLoader()->isLoaded($feedName)\n && !self::getPluginLoader()->isLoaded($entryName)\n ) {\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception('Could not load extension: ' . $name\n . 'using Plugin Loader. Check prefix paths are configured and extension exists.');\n }\n }", "protected function initializeExtensionFiles() {}", "public function addParser(ParserContract $parser, string $extension): void\n {\n self::$supportedParsers[$extension] = $parser;\n }", "public function registerAdapter($name, $class)\n {\n $this->validateAdapterName($name);\n $this->validateAdapterClass($class);\n\n $this->list[$name] = $class;\n }", "public function addEngine($engine, $extension)\n {\n if (isset($this->extensions[$extension])) {\n unset($this->extensions[$extension]);\n }\n\n $this->extensions = array_merge([$extension => $engine], $this->extensions);\n }", "public function Extension($extension){\r\n $fullpath=YEXTENTIONDIR.ucwords($extension).EXT;\r\n $this->Load($fullpath);\r\n }", "public function registerAdapter(SyncAdapterInterface $adapter)\n {\n $this->adapters[$adapter->getName()] = $adapter;\n }", "protected function _loadExtensions()\n {\n }", "public function activate_extension()\n\t{\n\n\t $data = array(\n\t 'class' => __CLASS__,\n\t 'method' => 'template_types',\n\t 'hook' => 'template_types',\n\t 'settings' => serialize($this->settings),\n\t 'priority' => 10,\n\t 'version' => $this->version,\n\t 'enabled' => 'y'\n\t );\t\n\t ee()->db->insert('extensions', $data);\n\t \n\t}", "public function setExtension(Extension $extension)\n {\n $this->extension = $extension;\n }", "public function extension($filePath);", "function spl_autoload_extensions(?string $file_extensions): string {}", "function addFileExtension($param)\n {\n\n $ext = strtoupper($param);\n if ($ext{0} !== '.') {\n $ext = '.' . $ext;\n }\n\n if (isset($this->fileExtensions[$ext])) {\n return PEAR::raiseError(\"file extension '$ext' ($param) already defined\"); \n }\n\n $this->fileExtensions[$ext] = $ext;\n }", "protected function getAdapterNamespaceGivenExtension($fileExtension)\n {\n $adapterNamespace = '\\Mmoreram\\Extractor\\Adapter\\\\';\n\n switch ($fileExtension) {\n\n case 'zip':\n $adapterNamespace .= 'ZipExtractorAdapter';\n break;\n\n case 'rar':\n $adapterNamespace .= 'RarExtractorAdapter';\n break;\n\n case 'phar':\n $adapterNamespace .= 'PharExtractorAdapter';\n break;\n\n case 'tar':\n $adapterNamespace .= 'TarExtractorAdapter';\n break;\n\n case 'gz':\n $adapterNamespace .= 'TarGzExtractorAdapter';\n break;\n\n case 'bz2':\n $adapterNamespace .= 'TarBz2ExtractorAdapter';\n break;\n\n default:\n throw new ExtensionNotSupportedException($fileExtension);\n }\n\n return $adapterNamespace;\n }", "public function setExtension( $extension ) {\n \n if( ! is_string( $extension ) ) {\n throw new \\InvalidArgumentException('Expected a string');\n }\n \n $this->extension = $extension;\n\n }", "public function setExtension($extension)\n\t{\n\t\t$this->extension = ltrim($extension, '.');\n\t}", "private function registerAutoloader() {\n\t\t\t// register autoloader\n\t\t\tspl_autoload_extensions(EXT);\n\t\t\tspl_autoload_register(array($this, 'autoload'));\n\t\t}", "protected function registerFile()\n {\n $this->app->bind('Ipalaus\\File\\File', function ($app) {\n $storageEngine = $app['file.storage.store'];\n $fileRepository = $app['file.repository'];\n $transformationRepository = $app['file.repository.transformation'];\n $fileBag = $app['request']->files;\n $transformers = $app['config']->get('file.transformers');\n\n return new File($storageEngine, $fileRepository, $transformationRepository, $fileBag, $app, $transformers);\n });\n\n $this->app->alias('Ipalaus\\File\\File', 'file');\n }", "public function allow($ext = NULL)\n {\n $this->_allow_extensions = $ext;\n }", "public function register()\n {\n $enabled_plugins = enabled_plugins();\n foreach ($enabled_plugins as $plugins) {\n foreach (glob(base_path(\"app/Plugins/$plugins/Providers/*.php\")) as $files) {\n $filename = File::name($files);\n $file_path = 'Plugins' . '\\\\' . $plugins . '\\\\Providers' . '\\\\' . $filename;\n $this->app->register($file_path);\n }\n }\n }", "protected function setAvailableExtensions() {}", "public function addExtAddon($addon);", "protected function registerStorageDriver()\n {\n $driver = config('telescope-error-service-client.driver');\n\n if (method_exists($this, $method = 'register'.ucfirst($driver).'Driver')) {\n $this->$method();\n }\n }", "public function addCheckExtension($checkExtension) {\n $this->checkExtensions[] = $checkExtension;\n }", "public function loadExtensions(): void\n {\n /**\n * @var ConfigStorageInterface $configStorage\n */\n $configStorage = $this->di->get(ConfigStorageInterface::class);\n $modules = $this->config->__toArray();\n\n if (empty($modules)) {\n return;\n }\n\n $autoLoadPaths = [];\n $autoLoadPathsPsr4 = [];\n $configPaths = [];\n\n $dependencyPaths = [];\n\n $extensionsDir = $this->extensionsConfig['path'];\n\n foreach ($modules as $index => $config) {\n if (!$config['enabled'] || isset($this->loadedExtensions[$index]['loaded'])) {\n continue;\n }\n\n $path = $extensionsDir . File::fillEndSep($config['dir']);\n\n if (!empty($config['paths']['src'])) {\n $autoLoadPaths[] = $path . $config['paths']['src'];\n }\n\n if (!empty($config['paths']['configs'])) {\n $configPaths[] = $path . $config['paths']['configs'] . '/';\n }\n\n if (!empty($config['paths']['dependency'])) {\n $dependencyPaths[] = $path . $config['paths']['dependency'];\n }\n\n /*\n * @todo implement extension locales and templates\n\n if (!empty($modCfg['autoloader-psr-4'])) {\n foreach ($modCfg['autoloader-psr-4'] as $ns =>$classPath) {\n $autoLoadPathsPsr4[$ns] = str_replace('./', $path, $classPath);\n }\n }\n\n */\n $this->loadedExtensions[$index]['load'] = true;\n }\n\n // Add autoloader paths\n if (!empty($autoLoadPaths)) {\n $autoloaderConfig = $configStorage->get('autoloader.php');\n $autoloaderCfg = $autoloaderConfig->__toArray();\n $newChain = $autoloaderCfg['priority'];\n\n foreach ($autoLoadPaths as $path) {\n $newChain[] = $path;\n }\n $currentAutoloadPaths = $this->autoloader->getRegisteredPaths();\n foreach ($currentAutoloadPaths as $path) {\n if (!in_array($path, $newChain, true)) {\n $newChain[] = $path;\n }\n }\n\n $autoloaderCfg['psr-4'] = array_merge($autoLoadPathsPsr4, $autoloaderCfg['psr-4']);\n $autoloaderCfg['paths'] = $newChain;\n\n // update autoloader paths\n $this->autoloader->setConfig(['paths' => $autoloaderCfg['paths'], 'psr-4' => $autoloaderCfg['psr-4']]);\n // update main configuration\n $autoloaderConfig->setData($autoloaderCfg);\n }\n // Add Config paths\n if (!empty($configPaths)) {\n $writePath = $configStorage->getWrite();\n $applyPath = $configStorage->getApplyTo();\n\n $paths = $configStorage->getPaths();\n $resultPaths = [];\n\n foreach ($paths as $path) {\n if ($path !== $writePath && $path !== $applyPath) {\n $resultPaths[] = $path;\n }\n }\n foreach ($configPaths as $path) {\n \\array_unshift($resultPaths, $path);\n }\n\n \\array_unshift($resultPaths, $applyPath);\n $resultPaths[] = $writePath;\n $configStorage->replacePaths($resultPaths);\n }\n // register dependencies\n if (!empty($dependencyPaths)) {\n foreach ($dependencyPaths as $file) {\n if ($this->di instanceof DependencyContainer || method_exists($this->di, 'bindArray')) {\n $this->di->bindArray(include $file);\n }\n }\n }\n }", "protected function registerFilesBindings()\n {\n $this->singleton('files', function () {\n return new Filesystem;\n });\n }", "public function setExtension($name, $list=array());", "private function loadExtensions(){\n\n // CSRF Extension\n $csrfGenerator = new UriSafeTokenGenerator();\n $csrfStorage = new NativeSessionTokenStorage();\n $csrfManager = new CsrfTokenManager($csrfGenerator, $csrfStorage); \n $csrfExtension = new CsrfExtension($csrfManager);\n \n $this->extensions[] = $csrfExtension;\n \n // HttpFoundation Extension\n $httpFoundation = new HttpFoundationExtension();\n $this->extensions[] = $httpFoundation;\n \n //Core\n $core = new CoreExtension();\n $this->extensions[] = $core;\n \n }", "protected function registerAdapterFactory()\n {\n $this->app->singleton('digitalocean.adapterfactory', function () {\n return new AdapterFactory();\n });\n\n $this->app->alias('digitalocean.adapterfactory', AdapterFactory::class);\n }", "public function setExtension(string $extension): LoaderInterface\n {\n $this->extension = $extension;\n\n return $this;\n }", "public function setExtensions(array $extensions)\n {\n foreach ($extensions as $extension) {\n $this->addExtension($extension);\n }\n }", "public static function registerReader($extension, $reader)\n {\n $extension = strtolower($extension);\n\n if (! is_string($reader) && ! $reader instanceof Reader\\ReaderInterface) {\n throw new Exception\\InvalidArgumentException(sprintf(\n 'Reader should be plugin name, class name or ' .\n 'instance of %s\\Reader\\ReaderInterface; received \"%s\"',\n __NAMESPACE__,\n (is_object($reader) ? get_class($reader) : gettype($reader))\n ));\n }\n\n static::$extensions[$extension] = $reader;\n }", "public function addAdapterConfig(string $name, string $class, array $options);", "public function extend($extender_name);", "function addAdapter(\\Tecnocreaciones\\Bundle\\BoxBundle\\Model\\Adapter\\AdapterInterface $adapter)\n {\n if($this->adapters === null){\n $this->adapters = array();\n }\n $adapter->setContainer($this->container);\n $this->adapters[] = $adapter;\n }", "public function Extensions($extensions){\r\n foreach($extensions as $extension ){\r\n $this->Extension($extension);\r\n }\r\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/extend.php', 'extend');\n\n $this->app->bind(Extend::class, function () {\n return new Extend(\n config('extend.api_key'),\n config('extend.store_id'),\n config('extend.sandbox'),\n config('extend.api_version')\n );\n });\n\n $this->app->alias(Extend::class, 'extend');\n }", "public function extensions(array $extensions) {\n $this->extensions = [];\n foreach ($extensions as $key => $value) {\n $this->addExtension($value);\n }\n }", "public function registerProvider($mimeTypeRegex, \\Closure $callable);", "public function uploadFile($adapter)\n {\n }", "public function register()\n {\n collect(\\File::allFiles(base_path('libraries/*/Providers')))\n ->map(function ($file) {\n $provider = strtr($file->getFileName(), ['.php' => '']);\n\n $module = \\Str::before($provider, 'ServiceProvider');\n\n $class = \"\\\\Libraries\\\\{$module}\\\\Providers\\\\{$provider}\";\n\n if (class_exists($class)) {\n $this->app->register($class);\n }\n });\n }", "public function setExtension(string $extension = '.serial') : self\n\t\t{\n\t\t$this->extension = $extension;\n\n\t\treturn $this;\n\t\t}", "function _addInstalledExtension($result) {\r\n\t\t\t$this->_installedExtensions[] = $result;\r\n\t\t}", "public static function fromExtension(string $extension):string;", "protected static function _registerCoreExtensions()\n {\n self::registerExtension('DublinCore');\n self::registerExtension('Content');\n self::registerExtension('Atom');\n self::registerExtension('Slash');\n self::registerExtension('WellFormedWeb');\n self::registerExtension('Thread');\n self::registerExtension('Podcast');\n }", "public function extension(string $extension): static\n {\n return $this->setAssetProperty('extension', $extension);\n }", "protected function registerBladeExtensions()\n {\n $blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();\n\n // JavaScripts extension\n $blade->extend(function($value, $compiler)\n {\n $matcher = $compiler->createMatcher('javascripts');\n\n return preg_replace($matcher, '$1<?php echo Assets::javascript$2; ?>', $value);\n });\n\n // Stylesheets extension\n $blade->extend(function($value, $compiler)\n {\n $matcher = $compiler->createMatcher('stylesheets');\n\n return preg_replace($matcher, '$1<?php echo Assets::stylesheet$2; ?>', $value);\n });\n }", "public function setAllowedExtensions(array $extensions) {\n \t $this->allowedExtensions = $extensions;\n\t }", "public function setAllowedExtensions($extensions = []){\n $this->allowedExtensions = $extensions;\n return $this;\n }", "private function injectExtensions(\n Environment $environment,\n ContainerInterface $container,\n array $extensions\n ): void {\n foreach ($extensions as $extension) {\n $extension = $this->loadExtension($extension, $container);\n\n if (! $environment->hasExtension($extension::class)) {\n $environment->addExtension($extension);\n }\n }\n }", "public function extensions();", "public function activate_extension(){}", "public function activate_extension()\n\t{\n\t\t// fetch default settings\n\t\t$settings = $this->settings();\n\t\t\n\t\t// $value is the settings array ($type, $options, $defaults)\n\t\tforeach($settings as $key => $value)\n\t\t{\n\t\t\t$this->settings[$key] = $value[2];\n\t\t}\n\t\t\n\t\t$hooks = array(\n\t\t\t'sessions_end' => 'sessions_end',\n\t\t);\n\n\t\tforeach ($hooks as $hook => $method)\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'class'\t\t=> __CLASS__,\n\t\t\t\t'method'\t=> $method,\n\t\t\t\t'hook'\t\t=> $hook,\n\t\t\t\t'settings'\t=> serialize($this->settings),\n\t\t\t\t'version'\t=> $this->version,\n\t\t\t\t'enabled'\t=> 'y'\n\t\t\t);\n\n\t\t\t$this->EE->db->insert('extensions', $data);\t\t\t\n\t\t}\n\t}", "public function extension($ext)\r\n {\r\n self::getInstance();\r\n $loaded = extension_loaded($ext) ? \"TRUE\" : \"FALSE\";\r\n self::queue(\"Extension Loaded\", \"{$ext}: {$loaded}\");\r\n\r\n return self::$instance;\r\n }", "public function getExtension($name) {}", "public function setAdapterMethod($adapter);", "public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }", "public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }", "public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }", "public function addMimetype($ext, $fileType, $writeToFile = false)\n\t{\n\t\tif($writeToFile == true)\n\t\t{\n\t\t\tif(!$this->mimetypeExists($ext))\n\t\t\t{\n\t\t\t\t$fp = fopen($this->mime_ini_location, \"a+\");\n\t\t\t\tfwrite($fp, sprintf(\"\\n\\n; Custom mimetype\\n%s = %s\",$ext,$fileType));\n\t\t\t\tfclose($fp);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->mimeTypes[$ext] = $fileType;\n\t\t\n\t\treturn true;\n\t}", "public function registerExtensionNames(array $extensionNames)\n\t{\n\t\t$tmp = [];\n\t\tforeach ($extensionNames as $extensionName) {\n\t\t\t$tmp[md5($extensionName)] = (new $extensionName)->getExtensionInfo();\n\t\t}\n\t\t$this->extensions = $tmp;\n\t}", "public function update_extension(){}", "public function activate_extension()\n\t{\n\t\t$this->EE->db->insert('extensions', array(\n\t\t\t'class' => __CLASS__,\n\t\t\t'method' => 'assets_file_meta_add_row',\n\t\t\t'hook' => 'assets_file_meta_add_row',\n\t\t\t'settings' => '',\n\t\t\t'priority' => 10,\n\t\t\t'version' => $this->version,\n\t\t\t'enabled' => 'y'\n\t\t));\n\t\t\n\t\t// Check for our column and add it to exp_assets if it doesn't exist yet\n\t\tif ($this->EE->db->table_exists('assets') && ! $this->EE->db->field_exists('members_only', 'assets'))\n\t\t{\n\t\t\t$this->EE->load->dbforge();\n\t\t\t$this->EE->dbforge->add_column('assets', array(\n\t\t\t\t// Default to assets not being members only\n\t\t\t\t'members_only' => array('type' => 'varchar', 'constraint' => 1, 'default' => 'n'),\n\t\t\t));\n\t\t}\n\t}", "protected function getExtensionsToLoad() {}", "public function registerViewFinder()\n {\n $this->app->bind('view.finder', function ($app) {\n $browser = $app->make(Browser::class);\n $paths = $app['config']['view.paths'];\n\n return new AdaptiveFileViewFinder($browser, $app['files'], $paths);\n });\n }", "public function register()\n {\n //include the active package helpers\n if (count(config('helpers.package_helpers'))) {\n foreach (config('helpers.package_helpers', []) as $active_helper) {\n $file = app_path('Helpers') . '/' . $active_helper . '_helper.php';\n if (file_exists($file)) {\n require_once($file);\n }\n }\n }\n }", "public function registerMyLibrary()\n {\n $this->Application()->Loader()->registerNamespace(\n 'ShopwarePlugins\\\\Connect',\n $this->Path()\n );\n\n $this->registerCustomModels();\n }", "protected function assignExtensionSettings() {}", "public function setExtensions(array $extensions)\n {\n $this->extensions = array();\n\n foreach ($extensions as $extension) {\n $this->addExtension($extension);\n }\n }", "static public function registerUserTSConfigFile($extKey, $file, $title) {\n\t\tif ($extKey && $file && is_array($GLOBALS['TCA']['be_groups']['columns'])) {\n\t\t\t$value = str_replace(',', '', 'EXT:' . $extKey . '/' . $file);\n\t\t\t$itemArray = array(trim($title . ' (' . $extKey . ')'), $value);\n\t\t\t$GLOBALS['TCA']['be_groups']['columns']['tx_bnbackend_tsconfig_files']['config']['items'][] = $itemArray;\n\t\t}\n\t}", "public function setExtension(?string $value): void {\n $this->getBackingStore()->set('extension', $value);\n }", "function addExtension($version_id, $file){\n\t\t// check for last vesion\n\t\tif($this->file->last_version < $version_id){\n\t\t\t$this->file->last_version = $this->file->last_version + 1;\n\t\t\t$this->file->save();\n\n\t\t\t$version_id = $this->file->last_version;\n\t\t}\n\n\t\t$version = $this->getVersion($version_id);\n\t\t$version->updateExtensionFile(null, $file);\n\n\t\treturn $version_id;\n\t}", "public function register()\n {\n $this->registerDropboxImage();\n\n $this->registerUploadImage();\n }", "protected function addExtensionsSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('extensions')\n ->useAttributeAsKey('extensions')\n ->prototype('scalar')->end()\n ->end()\n ->end();\n }", "protected function loadBaseExtensions() {}", "public function registerAdapterService($name, $callable)\n {\n $key = 'adapter.'.$name;\n $this->adapterServices[] = $key;\n $this->container[$key] = $this->container->share($callable);\n }", "public function extend($name, $extender)\n {\n $this->extends[$name][] = $extender;\n }", "protected function register()\n {\n $this->registerPaths();\n $this->registerClasses();\n $this->addOverrides();\n }", "public function fileExtensions($mimeType);" ]
[ "0.71013117", "0.6699939", "0.66026807", "0.63193", "0.6304821", "0.6266484", "0.62548923", "0.6127416", "0.6012452", "0.59246576", "0.58412623", "0.57505", "0.5748222", "0.5728959", "0.57103086", "0.5690304", "0.5651437", "0.5650781", "0.5650781", "0.5637284", "0.561386", "0.5606524", "0.5540349", "0.55148166", "0.5513796", "0.547162", "0.54570556", "0.5435491", "0.54322284", "0.5428313", "0.5416272", "0.5389325", "0.5385448", "0.5385427", "0.53796107", "0.5366703", "0.53614247", "0.53436756", "0.53323275", "0.53270835", "0.53180796", "0.5301604", "0.52857786", "0.52829", "0.5259817", "0.5243608", "0.52131265", "0.5207532", "0.5202222", "0.5185312", "0.51847845", "0.517114", "0.5156831", "0.51545185", "0.5150492", "0.5146471", "0.5145646", "0.5104249", "0.51021516", "0.5087817", "0.50716573", "0.5068297", "0.5059408", "0.5050813", "0.50504583", "0.50481164", "0.5044734", "0.504185", "0.5020493", "0.49994528", "0.49902225", "0.49816793", "0.49812537", "0.49634853", "0.4956368", "0.49449998", "0.49401534", "0.49188766", "0.49188766", "0.49188766", "0.49081308", "0.4906336", "0.49020773", "0.4896924", "0.48963767", "0.48955518", "0.488968", "0.48815346", "0.4881372", "0.48599532", "0.48554483", "0.48500282", "0.48486048", "0.4842845", "0.4838421", "0.48258594", "0.4813869", "0.4804006", "0.48014477", "0.48002604" ]
0.64624745
3